google-api-client 0.11.2 → 0.11.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.
Files changed (246) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -1
  3. data/README.md +6 -0
  4. data/api_names.yaml +1 -0
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +38 -38
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +13 -13
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +10 -10
  8. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +201 -201
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +46 -46
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +119 -119
  12. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  13. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +52 -9
  14. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +9 -0
  15. data/generated/google/apis/adsense_v1_4.rb +1 -1
  16. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  17. data/generated/google/apis/analyticsreporting_v4/classes.rb +926 -926
  18. data/generated/google/apis/analyticsreporting_v4/representations.rb +149 -149
  19. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  20. data/generated/google/apis/androidenterprise_v1/classes.rb +18 -11
  21. data/generated/google/apis/androidenterprise_v1/representations.rb +1 -0
  22. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  23. data/generated/google/apis/appengine_v1.rb +1 -1
  24. data/generated/google/apis/appengine_v1/classes.rb +1487 -1487
  25. data/generated/google/apis/appengine_v1/representations.rb +229 -229
  26. data/generated/google/apis/appengine_v1/service.rb +188 -188
  27. data/generated/google/apis/appstate_v1.rb +1 -1
  28. data/generated/google/apis/bigquery_v2.rb +1 -1
  29. data/generated/google/apis/bigquery_v2/classes.rb +15 -10
  30. data/generated/google/apis/calendar_v3.rb +1 -1
  31. data/generated/google/apis/calendar_v3/service.rb +10 -4
  32. data/generated/google/apis/classroom_v1.rb +26 -17
  33. data/generated/google/apis/classroom_v1/classes.rb +990 -990
  34. data/generated/google/apis/classroom_v1/representations.rb +239 -239
  35. data/generated/google/apis/classroom_v1/service.rb +853 -853
  36. data/generated/google/apis/cloudbilling_v1.rb +1 -1
  37. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  38. data/generated/google/apis/cloudbuild_v1/classes.rb +627 -627
  39. data/generated/google/apis/cloudbuild_v1/representations.rb +116 -116
  40. data/generated/google/apis/cloudbuild_v1/service.rb +162 -157
  41. data/generated/google/apis/clouddebugger_v2/classes.rb +258 -258
  42. data/generated/google/apis/clouddebugger_v2/representations.rb +80 -80
  43. data/generated/google/apis/clouddebugger_v2/service.rb +163 -163
  44. data/generated/google/apis/clouderrorreporting_v1beta1.rb +3 -4
  45. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +202 -167
  46. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +53 -37
  47. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +50 -51
  48. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  49. data/generated/google/apis/cloudkms_v1.rb +1 -1
  50. data/generated/google/apis/cloudkms_v1/classes.rb +628 -622
  51. data/generated/google/apis/cloudkms_v1/representations.rb +134 -133
  52. data/generated/google/apis/cloudkms_v1/service.rb +190 -190
  53. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  54. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +835 -835
  55. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +138 -138
  56. data/generated/google/apis/cloudresourcemanager_v1/service.rb +474 -474
  57. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  58. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +386 -386
  59. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +75 -75
  60. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +64 -64
  61. data/generated/google/apis/cloudtrace_v1.rb +4 -4
  62. data/generated/google/apis/cloudtrace_v1/classes.rb +114 -114
  63. data/generated/google/apis/cloudtrace_v1/representations.rb +23 -23
  64. data/generated/google/apis/cloudtrace_v1/service.rb +14 -14
  65. data/generated/google/apis/compute_beta.rb +1 -1
  66. data/generated/google/apis/compute_beta/classes.rb +66 -25
  67. data/generated/google/apis/compute_beta/representations.rb +16 -0
  68. data/generated/google/apis/compute_beta/service.rb +85 -3
  69. data/generated/google/apis/compute_v1.rb +1 -1
  70. data/generated/google/apis/compute_v1/classes.rb +375 -24
  71. data/generated/google/apis/compute_v1/representations.rb +155 -0
  72. data/generated/google/apis/compute_v1/service.rb +481 -3
  73. data/generated/google/apis/container_v1.rb +1 -1
  74. data/generated/google/apis/container_v1/classes.rb +301 -301
  75. data/generated/google/apis/container_v1/representations.rb +59 -59
  76. data/generated/google/apis/container_v1/service.rb +178 -178
  77. data/generated/google/apis/content_v2.rb +1 -1
  78. data/generated/google/apis/content_v2/classes.rb +37 -2
  79. data/generated/google/apis/content_v2/representations.rb +15 -0
  80. data/generated/google/apis/content_v2/service.rb +58 -3
  81. data/generated/google/apis/dataflow_v1b3.rb +4 -1
  82. data/generated/google/apis/dataflow_v1b3/classes.rb +3514 -3279
  83. data/generated/google/apis/dataflow_v1b3/representations.rb +530 -440
  84. data/generated/google/apis/dataflow_v1b3/service.rb +378 -137
  85. data/generated/google/apis/dataproc_v1.rb +1 -1
  86. data/generated/google/apis/dataproc_v1/classes.rb +446 -446
  87. data/generated/google/apis/dataproc_v1/representations.rb +96 -96
  88. data/generated/google/apis/dataproc_v1/service.rb +302 -302
  89. data/generated/google/apis/datastore_v1.rb +1 -1
  90. data/generated/google/apis/datastore_v1/classes.rb +370 -374
  91. data/generated/google/apis/datastore_v1/representations.rb +120 -120
  92. data/generated/google/apis/datastore_v1/service.rb +62 -62
  93. data/generated/google/apis/dns_v1.rb +1 -1
  94. data/generated/google/apis/dns_v2beta1.rb +1 -1
  95. data/generated/google/apis/doubleclickbidmanager_v1.rb +3 -0
  96. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  97. data/generated/google/apis/drive_v2.rb +1 -1
  98. data/generated/google/apis/drive_v2/classes.rb +24 -21
  99. data/generated/google/apis/drive_v3.rb +1 -1
  100. data/generated/google/apis/drive_v3/classes.rb +24 -22
  101. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  102. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +148 -149
  103. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +42 -42
  104. data/generated/google/apis/firebaserules_v1/classes.rb +71 -71
  105. data/generated/google/apis/firebaserules_v1/representations.rb +22 -22
  106. data/generated/google/apis/firebaserules_v1/service.rb +68 -68
  107. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  108. data/generated/google/apis/games_management_v1management.rb +1 -1
  109. data/generated/google/apis/games_v1.rb +1 -1
  110. data/generated/google/apis/genomics_v1.rb +1 -1
  111. data/generated/google/apis/genomics_v1/classes.rb +2348 -2348
  112. data/generated/google/apis/genomics_v1/representations.rb +430 -430
  113. data/generated/google/apis/genomics_v1/service.rb +1159 -1159
  114. data/generated/google/apis/gmail_v1.rb +1 -1
  115. data/generated/google/apis/gmail_v1/service.rb +2 -2
  116. data/generated/google/apis/iam_v1.rb +1 -1
  117. data/generated/google/apis/iam_v1/classes.rb +305 -298
  118. data/generated/google/apis/iam_v1/representations.rb +97 -96
  119. data/generated/google/apis/iam_v1/service.rb +86 -86
  120. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  121. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  122. data/generated/google/apis/kgsearch_v1/service.rb +10 -10
  123. data/generated/google/apis/language_v1.rb +4 -4
  124. data/generated/google/apis/language_v1/classes.rb +452 -452
  125. data/generated/google/apis/language_v1/representations.rb +93 -93
  126. data/generated/google/apis/language_v1/service.rb +48 -48
  127. data/generated/google/apis/language_v1beta1.rb +4 -4
  128. data/generated/google/apis/language_v1beta1/classes.rb +84 -84
  129. data/generated/google/apis/language_v1beta1/representations.rb +22 -22
  130. data/generated/google/apis/language_v1beta1/service.rb +3 -3
  131. data/generated/google/apis/logging_v2.rb +1 -1
  132. data/generated/google/apis/logging_v2/classes.rb +884 -873
  133. data/generated/google/apis/logging_v2/representations.rb +167 -166
  134. data/generated/google/apis/logging_v2/service.rb +430 -430
  135. data/generated/google/apis/logging_v2beta1.rb +1 -1
  136. data/generated/google/apis/logging_v2beta1/classes.rb +550 -539
  137. data/generated/google/apis/logging_v2beta1/representations.rb +124 -123
  138. data/generated/google/apis/logging_v2beta1/service.rb +292 -292
  139. data/generated/google/apis/manufacturers_v1/classes.rb +322 -322
  140. data/generated/google/apis/manufacturers_v1/representations.rb +66 -66
  141. data/generated/google/apis/ml_v1.rb +1 -1
  142. data/generated/google/apis/ml_v1/classes.rb +501 -494
  143. data/generated/google/apis/ml_v1/representations.rb +92 -91
  144. data/generated/google/apis/ml_v1/service.rb +190 -190
  145. data/generated/google/apis/monitoring_v3.rb +1 -1
  146. data/generated/google/apis/monitoring_v3/classes.rb +878 -878
  147. data/generated/google/apis/monitoring_v3/representations.rb +176 -176
  148. data/generated/google/apis/monitoring_v3/service.rb +223 -262
  149. data/generated/google/apis/oauth2_v2.rb +1 -1
  150. data/generated/google/apis/partners_v2.rb +1 -1
  151. data/generated/google/apis/partners_v2/classes.rb +1506 -1506
  152. data/generated/google/apis/partners_v2/representations.rb +370 -370
  153. data/generated/google/apis/partners_v2/service.rb +393 -393
  154. data/generated/google/apis/people_v1.rb +13 -13
  155. data/generated/google/apis/people_v1/classes.rb +597 -594
  156. data/generated/google/apis/people_v1/representations.rb +121 -121
  157. data/generated/google/apis/people_v1/service.rb +39 -48
  158. data/generated/google/apis/plus_domains_v1.rb +1 -1
  159. data/generated/google/apis/plus_v1.rb +1 -1
  160. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  161. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +323 -327
  162. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +100 -100
  163. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +184 -184
  164. data/generated/google/apis/pubsub_v1.rb +1 -1
  165. data/generated/google/apis/pubsub_v1/classes.rb +178 -178
  166. data/generated/google/apis/pubsub_v1/representations.rb +55 -55
  167. data/generated/google/apis/pubsub_v1/service.rb +357 -357
  168. data/generated/google/apis/runtimeconfig_v1.rb +1 -1
  169. data/generated/google/apis/runtimeconfig_v1/classes.rb +20 -20
  170. data/generated/google/apis/runtimeconfig_v1/representations.rb +2 -2
  171. data/generated/google/apis/runtimeconfig_v1/service.rb +12 -7
  172. data/generated/google/apis/script_v1.rb +16 -16
  173. data/generated/google/apis/script_v1/classes.rb +113 -113
  174. data/generated/google/apis/script_v1/representations.rb +28 -28
  175. data/generated/google/apis/script_v1/service.rb +4 -4
  176. data/generated/google/apis/searchconsole_v1.rb +1 -1
  177. data/generated/google/apis/searchconsole_v1/classes.rb +84 -84
  178. data/generated/google/apis/searchconsole_v1/representations.rb +32 -32
  179. data/generated/google/apis/searchconsole_v1/service.rb +6 -6
  180. data/generated/google/apis/servicecontrol_v1.rb +4 -4
  181. data/generated/google/apis/servicecontrol_v1/classes.rb +1146 -1145
  182. data/generated/google/apis/servicecontrol_v1/representations.rb +203 -203
  183. data/generated/google/apis/servicecontrol_v1/service.rb +57 -57
  184. data/generated/google/apis/servicemanagement_v1.rb +4 -4
  185. data/generated/google/apis/servicemanagement_v1/classes.rb +3486 -3360
  186. data/generated/google/apis/servicemanagement_v1/representations.rb +342 -329
  187. data/generated/google/apis/servicemanagement_v1/service.rb +260 -250
  188. data/generated/google/apis/serviceuser_v1.rb +1 -1
  189. data/generated/google/apis/serviceuser_v1/classes.rb +2716 -2596
  190. data/generated/google/apis/serviceuser_v1/representations.rb +391 -379
  191. data/generated/google/apis/serviceuser_v1/service.rb +16 -16
  192. data/generated/google/apis/sheets_v4.rb +1 -1
  193. data/generated/google/apis/sheets_v4/classes.rb +4255 -4252
  194. data/generated/google/apis/sheets_v4/representations.rb +548 -548
  195. data/generated/google/apis/sheets_v4/service.rb +170 -170
  196. data/generated/google/apis/slides_v1.rb +4 -4
  197. data/generated/google/apis/slides_v1/classes.rb +2945 -2916
  198. data/generated/google/apis/slides_v1/representations.rb +700 -697
  199. data/generated/google/apis/slides_v1/service.rb +44 -44
  200. data/generated/google/apis/sourcerepo_v1.rb +2 -2
  201. data/generated/google/apis/sourcerepo_v1/classes.rb +419 -410
  202. data/generated/google/apis/sourcerepo_v1/representations.rb +88 -87
  203. data/generated/google/apis/sourcerepo_v1/service.rb +67 -58
  204. data/generated/google/apis/spanner_v1/classes.rb +2187 -2187
  205. data/generated/google/apis/spanner_v1/representations.rb +323 -323
  206. data/generated/google/apis/spanner_v1/service.rb +383 -383
  207. data/generated/google/apis/speech_v1beta1.rb +1 -1
  208. data/generated/google/apis/speech_v1beta1/classes.rb +226 -226
  209. data/generated/google/apis/speech_v1beta1/representations.rb +44 -44
  210. data/generated/google/apis/speech_v1beta1/service.rb +37 -32
  211. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  212. data/generated/google/apis/sqladmin_v1beta4/classes.rb +10 -28
  213. data/generated/google/apis/sqladmin_v1beta4/representations.rb +2 -16
  214. data/generated/google/apis/sqladmin_v1beta4/service.rb +1 -1
  215. data/generated/google/apis/storage_v1.rb +1 -1
  216. data/generated/google/apis/storage_v1/classes.rb +26 -0
  217. data/generated/google/apis/storage_v1/representations.rb +15 -0
  218. data/generated/google/apis/storage_v1/service.rb +168 -42
  219. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  220. data/generated/google/apis/storagetransfer_v1/classes.rb +218 -218
  221. data/generated/google/apis/storagetransfer_v1/representations.rb +47 -47
  222. data/generated/google/apis/storagetransfer_v1/service.rb +68 -68
  223. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  224. data/generated/google/apis/toolresults_v1beta3/classes.rb +7 -4
  225. data/generated/google/apis/toolresults_v1beta3/service.rb +9 -8
  226. data/generated/google/apis/translate_v2.rb +11 -4
  227. data/generated/google/apis/translate_v2/classes.rb +140 -37
  228. data/generated/google/apis/translate_v2/representations.rb +62 -15
  229. data/generated/google/apis/translate_v2/service.rb +119 -66
  230. data/generated/google/apis/vision_v1.rb +1 -1
  231. data/generated/google/apis/vision_v1/classes.rb +1265 -1273
  232. data/generated/google/apis/vision_v1/representations.rb +202 -202
  233. data/generated/google/apis/vision_v1/service.rb +4 -4
  234. data/generated/google/apis/webmasters_v3.rb +1 -1
  235. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  236. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  237. data/generated/google/apis/youtube_partner_v1/classes.rb +2 -1
  238. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  239. data/generated/google/apis/youtubereporting_v1/classes.rb +91 -91
  240. data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
  241. data/generated/google/apis/youtubereporting_v1/service.rb +94 -94
  242. data/lib/google/apis/core/api_command.rb +43 -10
  243. data/lib/google/apis/core/json_representation.rb +1 -1
  244. data/lib/google/apis/options.rb +6 -2
  245. data/lib/google/apis/version.rb +1 -1
  246. metadata +3 -3
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://developers.google.com/ad-exchange/buyer-rest
27
27
  module AdexchangebuyerV1_4
28
28
  VERSION = 'V1_4'
29
- REVISION = '20170215'
29
+ REVISION = '20170504'
30
30
 
31
31
  # Manage your Ad Exchange buyer account configuration
32
32
  AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer'
@@ -98,8 +98,10 @@ module Google
98
98
  # - PROTOCOL_OPENRTB_2_2
99
99
  # - PROTOCOL_OPENRTB_2_3
100
100
  # - PROTOCOL_OPENRTB_2_4
101
+ # - PROTOCOL_OPENRTB_2_5
101
102
  # - PROTOCOL_OPENRTB_PROTOBUF_2_3
102
103
  # - PROTOCOL_OPENRTB_PROTOBUF_2_4
104
+ # - PROTOCOL_OPENRTB_PROTOBUF_2_5
103
105
  # Corresponds to the JSON property `bidProtocol`
104
106
  # @return [String]
105
107
  attr_accessor :bid_protocol
@@ -611,7 +613,8 @@ module Google
611
613
  # The granular status of this ad in specific contexts. A context here relates to
612
614
  # where something ultimately serves (for example, a physical location, a
613
615
  # platform, an HTTPS vs HTTP request, or the type of auction). Read-only. This
614
- # field should not be set in requests.
616
+ # field should not be set in requests. See the examples in the Creatives guide
617
+ # for more details.
615
618
  # Corresponds to the JSON property `servingRestrictions`
616
619
  # @return [Array<Google::Apis::AdexchangebuyerV1_4::Creative::ServingRestriction>]
617
620
  attr_accessor :serving_restrictions
@@ -1392,7 +1395,7 @@ module Google
1392
1395
 
1393
1396
  # The timestamp (in ms since epoch) when the original reservation price for the
1394
1397
  # deal was first converted to DFP currency. This is used to convert the
1395
- # contracted price into advertiser's currency without discrepancy.
1398
+ # contracted price into buyer's currency without discrepancy.
1396
1399
  # Corresponds to the JSON property `currencyConversionTimeMs`
1397
1400
  # @return [Fixnum]
1398
1401
  attr_accessor :currency_conversion_time_ms
@@ -1930,6 +1933,13 @@ module Google
1930
1933
  attr_accessor :is_rfp_template
1931
1934
  alias_method :is_rfp_template?, :is_rfp_template
1932
1935
 
1936
+ # True, if the buyside inventory setup is complete for this deal. (readonly,
1937
+ # except via OrderSetupCompleted action)
1938
+ # Corresponds to the JSON property `isSetupComplete`
1939
+ # @return [Boolean]
1940
+ attr_accessor :is_setup_complete
1941
+ alias_method :is_setup_complete?, :is_setup_complete
1942
+
1933
1943
  # Identifies what kind of resource this is. Value: the fixed string "
1934
1944
  # adexchangebuyer#marketplaceDeal".
1935
1945
  # Corresponds to the JSON property `kind`
@@ -2013,6 +2023,7 @@ module Google
2013
2023
  @flight_start_time_ms = args[:flight_start_time_ms] if args.key?(:flight_start_time_ms)
2014
2024
  @inventory_description = args[:inventory_description] if args.key?(:inventory_description)
2015
2025
  @is_rfp_template = args[:is_rfp_template] if args.key?(:is_rfp_template)
2026
+ @is_setup_complete = args[:is_setup_complete] if args.key?(:is_setup_complete)
2016
2027
  @kind = args[:kind] if args.key?(:kind)
2017
2028
  @last_update_time_ms = args[:last_update_time_ms] if args.key?(:last_update_time_ms)
2018
2029
  @name = args[:name] if args.key?(:name)
@@ -2698,12 +2709,11 @@ module Google
2698
2709
  end
2699
2710
  end
2700
2711
 
2701
- # Used to specify pricing rules for buyers/advertisers. Each PricePerBuyer in an
2702
- # product can become [0,1] deals. To check if there is a PricePerBuyer for a
2703
- # particular buyer or buyer/advertiser pair, we look for the most specific
2704
- # matching rule - we first look for a rule matching the buyer and advertiser,
2705
- # next a rule with the buyer but an empty advertiser list, and otherwise look
2706
- # for a matching rule where no buyer is set.
2712
+ # Used to specify pricing rules for buyers. Each PricePerBuyer in a product can
2713
+ # become [0,1] deals. To check if there is a PricePerBuyer for a particular
2714
+ # buyer we look for the most specific matching rule - we first look for a rule
2715
+ # matching the buyer and otherwise look for a matching rule where no buyer is
2716
+ # set.
2707
2717
  class PricePerBuyer
2708
2718
  include Google::Apis::Core::Hashable
2709
2719
 
@@ -2712,6 +2722,11 @@ module Google
2712
2722
  # @return [String]
2713
2723
  attr_accessor :auction_tier
2714
2724
 
2725
+ # Reference to the buyer that will get billed.
2726
+ # Corresponds to the JSON property `billedBuyer`
2727
+ # @return [Google::Apis::AdexchangebuyerV1_4::Buyer]
2728
+ attr_accessor :billed_buyer
2729
+
2715
2730
  # The buyer who will pay this price. If unset, all buyers can pay this price (if
2716
2731
  # the advertisers match, and there's no more specific rule matching the buyer).
2717
2732
  # Corresponds to the JSON property `buyer`
@@ -2730,6 +2745,7 @@ module Google
2730
2745
  # Update properties of this object
2731
2746
  def update!(**args)
2732
2747
  @auction_tier = args[:auction_tier] if args.key?(:auction_tier)
2748
+ @billed_buyer = args[:billed_buyer] if args.key?(:billed_buyer)
2733
2749
  @buyer = args[:buyer] if args.key?(:buyer)
2734
2750
  @price = args[:price] if args.key?(:price)
2735
2751
  end
@@ -2772,6 +2788,18 @@ module Google
2772
2788
  class Product
2773
2789
  include Google::Apis::Core::Hashable
2774
2790
 
2791
+ # The billed buyer corresponding to the buyer that created the offer. (readonly,
2792
+ # except on create)
2793
+ # Corresponds to the JSON property `billedBuyer`
2794
+ # @return [Google::Apis::AdexchangebuyerV1_4::Buyer]
2795
+ attr_accessor :billed_buyer
2796
+
2797
+ # The buyer that created the offer if this is a buyer initiated offer (readonly,
2798
+ # except on create)
2799
+ # Corresponds to the JSON property `buyer`
2800
+ # @return [Google::Apis::AdexchangebuyerV1_4::Buyer]
2801
+ attr_accessor :buyer
2802
+
2775
2803
  # Creation time in ms. since epoch (readonly)
2776
2804
  # Corresponds to the JSON property `creationTimeMs`
2777
2805
  # @return [Fixnum]
@@ -2782,6 +2810,11 @@ module Google
2782
2810
  # @return [Array<Google::Apis::AdexchangebuyerV1_4::ContactInformation>]
2783
2811
  attr_accessor :creator_contacts
2784
2812
 
2813
+ # The role that created the offer. Set to BUYER for buyer initiated offers.
2814
+ # Corresponds to the JSON property `creatorRole`
2815
+ # @return [String]
2816
+ attr_accessor :creator_role
2817
+
2785
2818
  # The set of fields around delivery control that are interesting for a buyer to
2786
2819
  # see but are non-negotiable. These are set by the publisher. This message is
2787
2820
  # assigned an id of 100 since some day we would want to model this as a protobuf
@@ -2917,8 +2950,11 @@ module Google
2917
2950
 
2918
2951
  # Update properties of this object
2919
2952
  def update!(**args)
2953
+ @billed_buyer = args[:billed_buyer] if args.key?(:billed_buyer)
2954
+ @buyer = args[:buyer] if args.key?(:buyer)
2920
2955
  @creation_time_ms = args[:creation_time_ms] if args.key?(:creation_time_ms)
2921
2956
  @creator_contacts = args[:creator_contacts] if args.key?(:creator_contacts)
2957
+ @creator_role = args[:creator_role] if args.key?(:creator_role)
2922
2958
  @delivery_control = args[:delivery_control] if args.key?(:delivery_control)
2923
2959
  @flight_end_time_ms = args[:flight_end_time_ms] if args.key?(:flight_end_time_ms)
2924
2960
  @flight_start_time_ms = args[:flight_start_time_ms] if args.key?(:flight_start_time_ms)
@@ -3007,7 +3043,8 @@ module Google
3007
3043
  alias_method :is_renegotiating?, :is_renegotiating
3008
3044
 
3009
3045
  # True, if the buyside inventory setup is complete for this proposal. (readonly,
3010
- # except via OrderSetupCompleted action)
3046
+ # except via OrderSetupCompleted action) Deprecated in favor of deal level setup
3047
+ # complete flag.
3011
3048
  # Corresponds to the JSON property `isSetupComplete`
3012
3049
  # @return [Boolean]
3013
3050
  attr_accessor :is_setup_complete
@@ -3410,6 +3447,11 @@ module Google
3410
3447
  # @return [String]
3411
3448
  attr_accessor :creative_size_type
3412
3449
 
3450
+ # The native template for native ad.
3451
+ # Corresponds to the JSON property `nativeTemplate`
3452
+ # @return [String]
3453
+ attr_accessor :native_template
3454
+
3413
3455
  # For regular or video creative size type, specifies the size of the creative.
3414
3456
  # Corresponds to the JSON property `size`
3415
3457
  # @return [Google::Apis::AdexchangebuyerV1_4::TargetingValueSize]
@@ -3428,6 +3470,7 @@ module Google
3428
3470
  def update!(**args)
3429
3471
  @companion_sizes = args[:companion_sizes] if args.key?(:companion_sizes)
3430
3472
  @creative_size_type = args[:creative_size_type] if args.key?(:creative_size_type)
3473
+ @native_template = args[:native_template] if args.key?(:native_template)
3431
3474
  @size = args[:size] if args.key?(:size)
3432
3475
  @skippable_ad_type = args[:skippable_ad_type] if args.key?(:skippable_ad_type)
3433
3476
  end
@@ -1025,6 +1025,7 @@ module Google
1025
1025
  property :flight_start_time_ms, :numeric_string => true, as: 'flightStartTimeMs'
1026
1026
  property :inventory_description, as: 'inventoryDescription'
1027
1027
  property :is_rfp_template, as: 'isRfpTemplate'
1028
+ property :is_setup_complete, as: 'isSetupComplete'
1028
1029
  property :kind, as: 'kind'
1029
1030
  property :last_update_time_ms, :numeric_string => true, as: 'lastUpdateTimeMs'
1030
1031
  property :name, as: 'name'
@@ -1207,6 +1208,8 @@ module Google
1207
1208
  # @private
1208
1209
  class Representation < Google::Apis::Core::JsonRepresentation
1209
1210
  property :auction_tier, as: 'auctionTier'
1211
+ property :billed_buyer, as: 'billedBuyer', class: Google::Apis::AdexchangebuyerV1_4::Buyer, decorator: Google::Apis::AdexchangebuyerV1_4::Buyer::Representation
1212
+
1210
1213
  property :buyer, as: 'buyer', class: Google::Apis::AdexchangebuyerV1_4::Buyer, decorator: Google::Apis::AdexchangebuyerV1_4::Buyer::Representation
1211
1214
 
1212
1215
  property :price, as: 'price', class: Google::Apis::AdexchangebuyerV1_4::Price, decorator: Google::Apis::AdexchangebuyerV1_4::Price::Representation
@@ -1225,9 +1228,14 @@ module Google
1225
1228
  class Product
1226
1229
  # @private
1227
1230
  class Representation < Google::Apis::Core::JsonRepresentation
1231
+ property :billed_buyer, as: 'billedBuyer', class: Google::Apis::AdexchangebuyerV1_4::Buyer, decorator: Google::Apis::AdexchangebuyerV1_4::Buyer::Representation
1232
+
1233
+ property :buyer, as: 'buyer', class: Google::Apis::AdexchangebuyerV1_4::Buyer, decorator: Google::Apis::AdexchangebuyerV1_4::Buyer::Representation
1234
+
1228
1235
  property :creation_time_ms, :numeric_string => true, as: 'creationTimeMs'
1229
1236
  collection :creator_contacts, as: 'creatorContacts', class: Google::Apis::AdexchangebuyerV1_4::ContactInformation, decorator: Google::Apis::AdexchangebuyerV1_4::ContactInformation::Representation
1230
1237
 
1238
+ property :creator_role, as: 'creatorRole'
1231
1239
  property :delivery_control, as: 'deliveryControl', class: Google::Apis::AdexchangebuyerV1_4::DeliveryControl, decorator: Google::Apis::AdexchangebuyerV1_4::DeliveryControl::Representation
1232
1240
 
1233
1241
  property :flight_end_time_ms, :numeric_string => true, as: 'flightEndTimeMs'
@@ -1373,6 +1381,7 @@ module Google
1373
1381
  collection :companion_sizes, as: 'companionSizes', class: Google::Apis::AdexchangebuyerV1_4::TargetingValueSize, decorator: Google::Apis::AdexchangebuyerV1_4::TargetingValueSize::Representation
1374
1382
 
1375
1383
  property :creative_size_type, as: 'creativeSizeType'
1384
+ property :native_template, as: 'nativeTemplate'
1376
1385
  property :size, as: 'size', class: Google::Apis::AdexchangebuyerV1_4::TargetingValueSize, decorator: Google::Apis::AdexchangebuyerV1_4::TargetingValueSize::Representation
1377
1386
 
1378
1387
  property :skippable_ad_type, as: 'skippableAdType'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/adsense/management/
26
26
  module AdsenseV1_4
27
27
  VERSION = 'V1_4'
28
- REVISION = '20170503'
28
+ REVISION = '20170524'
29
29
 
30
30
  # View and manage your AdSense data
31
31
  AUTH_ADSENSE = 'https://www.googleapis.com/auth/adsense'
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://developers.google.com/adsense/host/
27
27
  module AdsensehostV4_1
28
28
  VERSION = 'V4_1'
29
- REVISION = '20170502'
29
+ REVISION = '20170524'
30
30
 
31
31
  # View and manage your AdSense host data and associated accounts
32
32
  AUTH_ADSENSEHOST = 'https://www.googleapis.com/auth/adsensehost'
@@ -22,48 +22,22 @@ module Google
22
22
  module Apis
23
23
  module AnalyticsreportingV4
24
24
 
25
- # SegmentFilter defines the segment to be either a simple or a sequence
26
- # segment. A simple segment condition contains dimension and metric conditions
27
- # to select the sessions or users. A sequence segment condition can be used to
28
- # select users or sessions based on sequential conditions.
29
- class SegmentFilter
25
+ # A group of dimension filters. Set the operator value to specify how
26
+ # the filters are logically combined.
27
+ class DimensionFilterClause
30
28
  include Google::Apis::Core::Hashable
31
29
 
32
- # If true, match the complement of simple or sequence segment.
33
- # For example, to match all visits not from "New York", we can define the
34
- # segment as follows:
35
- # "sessionSegment": `
36
- # "segmentFilters": [`
37
- # "simpleSegment" :`
38
- # "orFiltersForSegment": [`
39
- # "segmentFilterClauses":[`
40
- # "dimensionFilter": `
41
- # "dimensionName": "ga:city",
42
- # "expressions": ["New York"]
43
- # `
44
- # `]
45
- # `]
46
- # `,
47
- # "not": "True"
48
- # `]
49
- # `,
50
- # Corresponds to the JSON property `not`
51
- # @return [Boolean]
52
- attr_accessor :not
53
- alias_method :not?, :not
54
-
55
- # A Simple segment conditions consist of one or more dimension/metric
56
- # conditions that can be combined.
57
- # Corresponds to the JSON property `simpleSegment`
58
- # @return [Google::Apis::AnalyticsreportingV4::SimpleSegment]
59
- attr_accessor :simple_segment
30
+ # The operator for combining multiple dimension filters. If unspecified, it
31
+ # is treated as an `OR`.
32
+ # Corresponds to the JSON property `operator`
33
+ # @return [String]
34
+ attr_accessor :operator
60
35
 
61
- # Sequence conditions consist of one or more steps, where each step is defined
62
- # by one or more dimension/metric conditions. Multiple steps can be combined
63
- # with special sequence operators.
64
- # Corresponds to the JSON property `sequenceSegment`
65
- # @return [Google::Apis::AnalyticsreportingV4::SequenceSegment]
66
- attr_accessor :sequence_segment
36
+ # The repeated set of filters. They are logically combined based on the
37
+ # operator specified.
38
+ # Corresponds to the JSON property `filters`
39
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilter>]
40
+ attr_accessor :filters
67
41
 
68
42
  def initialize(**args)
69
43
  update!(**args)
@@ -71,22 +45,20 @@ module Google
71
45
 
72
46
  # Update properties of this object
73
47
  def update!(**args)
74
- @not = args[:not] if args.key?(:not)
75
- @simple_segment = args[:simple_segment] if args.key?(:simple_segment)
76
- @sequence_segment = args[:sequence_segment] if args.key?(:sequence_segment)
48
+ @operator = args[:operator] if args.key?(:operator)
49
+ @filters = args[:filters] if args.key?(:filters)
77
50
  end
78
51
  end
79
52
 
80
- # SegmentDefinition defines the segment to be a set of SegmentFilters which
81
- # are combined together with a logical `AND` operation.
82
- class SegmentDefinition
53
+ # The main response class which holds the reports from the Reporting API
54
+ # `batchGet` call.
55
+ class GetReportsResponse
83
56
  include Google::Apis::Core::Hashable
84
57
 
85
- # A segment is defined by a set of segment filters which are combined
86
- # together with a logical `AND` operation.
87
- # Corresponds to the JSON property `segmentFilters`
88
- # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilter>]
89
- attr_accessor :segment_filters
58
+ # Responses corresponding to each of the request.
59
+ # Corresponds to the JSON property `reports`
60
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Report>]
61
+ attr_accessor :reports
90
62
 
91
63
  def initialize(**args)
92
64
  update!(**args)
@@ -94,23 +66,27 @@ module Google
94
66
 
95
67
  # Update properties of this object
96
68
  def update!(**args)
97
- @segment_filters = args[:segment_filters] if args.key?(:segment_filters)
69
+ @reports = args[:reports] if args.key?(:reports)
98
70
  end
99
71
  end
100
72
 
101
- # Header for the metrics.
102
- class MetricHeaderEntry
73
+ # Sequence conditions consist of one or more steps, where each step is defined
74
+ # by one or more dimension/metric conditions. Multiple steps can be combined
75
+ # with special sequence operators.
76
+ class SequenceSegment
103
77
  include Google::Apis::Core::Hashable
104
78
 
105
- # The name of the header.
106
- # Corresponds to the JSON property `name`
107
- # @return [String]
108
- attr_accessor :name
79
+ # The list of steps in the sequence.
80
+ # Corresponds to the JSON property `segmentSequenceSteps`
81
+ # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentSequenceStep>]
82
+ attr_accessor :segment_sequence_steps
109
83
 
110
- # The type of the metric, for example `INTEGER`.
111
- # Corresponds to the JSON property `type`
112
- # @return [String]
113
- attr_accessor :type
84
+ # If set, first step condition must match the first hit of the visitor (in
85
+ # the date range).
86
+ # Corresponds to the JSON property `firstStepShouldMatchFirstHit`
87
+ # @return [Boolean]
88
+ attr_accessor :first_step_should_match_first_hit
89
+ alias_method :first_step_should_match_first_hit?, :first_step_should_match_first_hit
114
90
 
115
91
  def initialize(**args)
116
92
  update!(**args)
@@ -118,85 +94,45 @@ module Google
118
94
 
119
95
  # Update properties of this object
120
96
  def update!(**args)
121
- @name = args[:name] if args.key?(:name)
122
- @type = args[:type] if args.key?(:type)
97
+ @segment_sequence_steps = args[:segment_sequence_steps] if args.key?(:segment_sequence_steps)
98
+ @first_step_should_match_first_hit = args[:first_step_should_match_first_hit] if args.key?(:first_step_should_match_first_hit)
123
99
  end
124
100
  end
125
101
 
126
- # The data part of the report.
127
- class ReportData
102
+ # Metric filter to be used in a segment filter clause.
103
+ class SegmentMetricFilter
128
104
  include Google::Apis::Core::Hashable
129
105
 
130
- # The last time the data in the report was refreshed. All the hits received
131
- # before this timestamp are included in the calculation of the report.
132
- # Corresponds to the JSON property `dataLastRefreshed`
106
+ # Max comparison value is only used for `BETWEEN` operator.
107
+ # Corresponds to the JSON property `maxComparisonValue`
133
108
  # @return [String]
134
- attr_accessor :data_last_refreshed
135
-
136
- # Minimum and maximum values seen over all matching rows. These are both
137
- # empty when `hideValueRanges` in the request is false, or when
138
- # rowCount is zero.
139
- # Corresponds to the JSON property `maximums`
140
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
141
- attr_accessor :maximums
142
-
143
- # If the results are
144
- # [sampled](https://support.google.com/analytics/answer/2637192),
145
- # this returns the total number of
146
- # samples present, one entry per date range. If the results are not sampled
147
- # this field will not be defined. See
148
- # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
149
- # for details.
150
- # Corresponds to the JSON property `samplingSpaceSizes`
151
- # @return [Array<Fixnum>]
152
- attr_accessor :sampling_space_sizes
153
-
154
- # Minimum and maximum values seen over all matching rows. These are both
155
- # empty when `hideValueRanges` in the request is false, or when
156
- # rowCount is zero.
157
- # Corresponds to the JSON property `minimums`
158
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
159
- attr_accessor :minimums
160
-
161
- # For each requested date range, for the set of all rows that match
162
- # the query, every requested value format gets a total. The total
163
- # for a value format is computed by first totaling the metrics
164
- # mentioned in the value format and then evaluating the value
165
- # format as a scalar expression. E.g., The "totals" for
166
- # `3 / (ga:sessions + 2)` we compute
167
- # `3 / ((sum of all relevant ga:sessions) + 2)`.
168
- # Totals are computed before pagination.
169
- # Corresponds to the JSON property `totals`
170
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
171
- attr_accessor :totals
109
+ attr_accessor :max_comparison_value
172
110
 
173
- # If the results are
174
- # [sampled](https://support.google.com/analytics/answer/2637192),
175
- # this returns the total number of samples read, one entry per date range.
176
- # If the results are not sampled this field will not be defined. See
177
- # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
178
- # for details.
179
- # Corresponds to the JSON property `samplesReadCounts`
180
- # @return [Array<Fixnum>]
181
- attr_accessor :samples_read_counts
111
+ # The value to compare against. If the operator is `BETWEEN`, this value is
112
+ # treated as minimum comparison value.
113
+ # Corresponds to the JSON property `comparisonValue`
114
+ # @return [String]
115
+ attr_accessor :comparison_value
182
116
 
183
- # Total number of matching rows for this query.
184
- # Corresponds to the JSON property `rowCount`
185
- # @return [Fixnum]
186
- attr_accessor :row_count
117
+ # Specifies is the operation to perform to compare the metric. The default
118
+ # is `EQUAL`.
119
+ # Corresponds to the JSON property `operator`
120
+ # @return [String]
121
+ attr_accessor :operator
187
122
 
188
- # There's one ReportRow for every unique combination of dimensions.
189
- # Corresponds to the JSON property `rows`
190
- # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRow>]
191
- attr_accessor :rows
123
+ # The metric that will be filtered on. A `metricFilter` must contain a
124
+ # metric name.
125
+ # Corresponds to the JSON property `metricName`
126
+ # @return [String]
127
+ attr_accessor :metric_name
192
128
 
193
- # Indicates if response to this request is golden or not. Data is
194
- # golden when the exact same request will not produce any new results if
195
- # asked at a later point in time.
196
- # Corresponds to the JSON property `isDataGolden`
197
- # @return [Boolean]
198
- attr_accessor :is_data_golden
199
- alias_method :is_data_golden?, :is_data_golden
129
+ # Scope for a metric defines the level at which that metric is defined. The
130
+ # specified metric scope must be equal to or greater than its primary scope
131
+ # as defined in the data model. The primary scope is defined by if the
132
+ # segment is selecting users or sessions.
133
+ # Corresponds to the JSON property `scope`
134
+ # @return [String]
135
+ attr_accessor :scope
200
136
 
201
137
  def initialize(**args)
202
138
  update!(**args)
@@ -204,52 +140,28 @@ module Google
204
140
 
205
141
  # Update properties of this object
206
142
  def update!(**args)
207
- @data_last_refreshed = args[:data_last_refreshed] if args.key?(:data_last_refreshed)
208
- @maximums = args[:maximums] if args.key?(:maximums)
209
- @sampling_space_sizes = args[:sampling_space_sizes] if args.key?(:sampling_space_sizes)
210
- @minimums = args[:minimums] if args.key?(:minimums)
211
- @totals = args[:totals] if args.key?(:totals)
212
- @samples_read_counts = args[:samples_read_counts] if args.key?(:samples_read_counts)
213
- @row_count = args[:row_count] if args.key?(:row_count)
214
- @rows = args[:rows] if args.key?(:rows)
215
- @is_data_golden = args[:is_data_golden] if args.key?(:is_data_golden)
143
+ @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
144
+ @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
145
+ @operator = args[:operator] if args.key?(:operator)
146
+ @metric_name = args[:metric_name] if args.key?(:metric_name)
147
+ @scope = args[:scope] if args.key?(:scope)
216
148
  end
217
149
  end
218
150
 
219
- # Dimension filter specifies the filtering options on a dimension.
220
- class DimensionFilter
151
+ # Used to return a list of metrics for a single DateRange / dimension
152
+ # combination
153
+ class DateRangeValues
221
154
  include Google::Apis::Core::Hashable
222
155
 
223
- # Logical `NOT` operator. If this boolean is set to true, then the matching
224
- # dimension values will be excluded in the report. The default is false.
225
- # Corresponds to the JSON property `not`
226
- # @return [Boolean]
227
- attr_accessor :not
228
- alias_method :not?, :not
229
-
230
- # Strings or regular expression to match against. Only the first value of
231
- # the list is used for comparison unless the operator is `IN_LIST`.
232
- # If `IN_LIST` operator, then the entire list is used to filter the
233
- # dimensions as explained in the description of the `IN_LIST` operator.
234
- # Corresponds to the JSON property `expressions`
156
+ # Each value corresponds to each Metric in the request.
157
+ # Corresponds to the JSON property `values`
235
158
  # @return [Array<String>]
236
- attr_accessor :expressions
237
-
238
- # Should the match be case sensitive? Default is false.
239
- # Corresponds to the JSON property `caseSensitive`
240
- # @return [Boolean]
241
- attr_accessor :case_sensitive
242
- alias_method :case_sensitive?, :case_sensitive
243
-
244
- # The dimension to filter on. A DimensionFilter must contain a dimension.
245
- # Corresponds to the JSON property `dimensionName`
246
- # @return [String]
247
- attr_accessor :dimension_name
159
+ attr_accessor :values
248
160
 
249
- # How to match the dimension to the expression. The default is REGEXP.
250
- # Corresponds to the JSON property `operator`
251
- # @return [String]
252
- attr_accessor :operator
161
+ # The values of each pivot region.
162
+ # Corresponds to the JSON property `pivotValueRegions`
163
+ # @return [Array<Google::Apis::AnalyticsreportingV4::PivotValueRegion>]
164
+ attr_accessor :pivot_value_regions
253
165
 
254
166
  def initialize(**args)
255
167
  update!(**args)
@@ -257,48 +169,63 @@ module Google
257
169
 
258
170
  # Update properties of this object
259
171
  def update!(**args)
260
- @not = args[:not] if args.key?(:not)
261
- @expressions = args[:expressions] if args.key?(:expressions)
262
- @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
263
- @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
264
- @operator = args[:operator] if args.key?(:operator)
265
- end
172
+ @values = args[:values] if args.key?(:values)
173
+ @pivot_value_regions = args[:pivot_value_regions] if args.key?(:pivot_value_regions)
174
+ end
266
175
  end
267
176
 
268
- # Dimension filter specifies the filtering options on a dimension.
269
- class SegmentDimensionFilter
177
+ # Defines a cohort group.
178
+ # For example:
179
+ # "cohortGroup": `
180
+ # "cohorts": [`
181
+ # "name": "cohort 1",
182
+ # "type": "FIRST_VISIT_DATE",
183
+ # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
184
+ # `,`
185
+ # "name": "cohort 2"
186
+ # "type": "FIRST_VISIT_DATE"
187
+ # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
188
+ # `]
189
+ # `
190
+ class CohortGroup
270
191
  include Google::Apis::Core::Hashable
271
192
 
272
- # The list of expressions, only the first element is used for all operators
273
- # Corresponds to the JSON property `expressions`
274
- # @return [Array<String>]
275
- attr_accessor :expressions
193
+ # The definition for the cohort.
194
+ # Corresponds to the JSON property `cohorts`
195
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Cohort>]
196
+ attr_accessor :cohorts
276
197
 
277
- # Should the match be case sensitive, ignored for `IN_LIST` operator.
278
- # Corresponds to the JSON property `caseSensitive`
198
+ # Enable Life Time Value (LTV). LTV measures lifetime value for users
199
+ # acquired through different channels.
200
+ # Please see:
201
+ # [Cohort Analysis](https://support.google.com/analytics/answer/6074676) and
202
+ # [Lifetime Value](https://support.google.com/analytics/answer/6182550)
203
+ # If the value of lifetimeValue is false:
204
+ # - The metric values are similar to the values in the web interface cohort
205
+ # report.
206
+ # - The cohort definition date ranges must be aligned to the calendar week
207
+ # and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in
208
+ # the cohort definition should be a Sunday and the `endDate` should be the
209
+ # following Saturday, and for `ga:cohortNthMonth`, the `startDate`
210
+ # should be the 1st of the month and `endDate` should be the last day
211
+ # of the month.
212
+ # When the lifetimeValue is true:
213
+ # - The metric values will correspond to the values in the web interface
214
+ # LifeTime value report.
215
+ # - The Lifetime Value report shows you how user value (Revenue) and
216
+ # engagement (Appviews, Goal Completions, Sessions, and Session Duration)
217
+ # grow during the 90 days after a user is acquired.
218
+ # - The metrics are calculated as a cumulative average per user per the time
219
+ # increment.
220
+ # - The cohort definition date ranges need not be aligned to the calendar
221
+ # week and month boundaries.
222
+ # - The `viewId` must be an
223
+ # [app view ID](https://support.google.com/analytics/answer/2649553#
224
+ # WebVersusAppViews)
225
+ # Corresponds to the JSON property `lifetimeValue`
279
226
  # @return [Boolean]
280
- attr_accessor :case_sensitive
281
- alias_method :case_sensitive?, :case_sensitive
282
-
283
- # Minimum comparison values for `BETWEEN` match type.
284
- # Corresponds to the JSON property `minComparisonValue`
285
- # @return [String]
286
- attr_accessor :min_comparison_value
287
-
288
- # Maximum comparison values for `BETWEEN` match type.
289
- # Corresponds to the JSON property `maxComparisonValue`
290
- # @return [String]
291
- attr_accessor :max_comparison_value
292
-
293
- # Name of the dimension for which the filter is being applied.
294
- # Corresponds to the JSON property `dimensionName`
295
- # @return [String]
296
- attr_accessor :dimension_name
297
-
298
- # The operator to use to match the dimension with the expressions.
299
- # Corresponds to the JSON property `operator`
300
- # @return [String]
301
- attr_accessor :operator
227
+ attr_accessor :lifetime_value
228
+ alias_method :lifetime_value?, :lifetime_value
302
229
 
303
230
  def initialize(**args)
304
231
  update!(**args)
@@ -306,36 +233,21 @@ module Google
306
233
 
307
234
  # Update properties of this object
308
235
  def update!(**args)
309
- @expressions = args[:expressions] if args.key?(:expressions)
310
- @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
311
- @min_comparison_value = args[:min_comparison_value] if args.key?(:min_comparison_value)
312
- @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
313
- @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
314
- @operator = args[:operator] if args.key?(:operator)
236
+ @cohorts = args[:cohorts] if args.key?(:cohorts)
237
+ @lifetime_value = args[:lifetime_value] if args.key?(:lifetime_value)
315
238
  end
316
239
  end
317
240
 
318
- # Specifies the sorting options.
319
- class OrderBy
241
+ # The batch request containing multiple report request.
242
+ class GetReportsRequest
320
243
  include Google::Apis::Core::Hashable
321
244
 
322
- # The field which to sort by. The default sort order is ascending. Example:
323
- # `ga:browser`.
324
- # Note, that you can only specify one field for sort here. For example,
325
- # `ga:browser, ga:city` is not valid.
326
- # Corresponds to the JSON property `fieldName`
327
- # @return [String]
328
- attr_accessor :field_name
329
-
330
- # The order type. The default orderType is `VALUE`.
331
- # Corresponds to the JSON property `orderType`
332
- # @return [String]
333
- attr_accessor :order_type
334
-
335
- # The sorting order for the field.
336
- # Corresponds to the JSON property `sortOrder`
337
- # @return [String]
338
- attr_accessor :sort_order
245
+ # Requests, each request will have a separate response.
246
+ # There can be a maximum of 5 requests. All requests should have the same
247
+ # `dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.
248
+ # Corresponds to the JSON property `reportRequests`
249
+ # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRequest>]
250
+ attr_accessor :report_requests
339
251
 
340
252
  def initialize(**args)
341
253
  update!(**args)
@@ -343,28 +255,61 @@ module Google
343
255
 
344
256
  # Update properties of this object
345
257
  def update!(**args)
346
- @field_name = args[:field_name] if args.key?(:field_name)
347
- @order_type = args[:order_type] if args.key?(:order_type)
348
- @sort_order = args[:sort_order] if args.key?(:sort_order)
258
+ @report_requests = args[:report_requests] if args.key?(:report_requests)
349
259
  end
350
260
  end
351
261
 
352
- # The segment definition, if the report needs to be segmented.
353
- # A Segment is a subset of the Analytics data. For example, of the entire
354
- # set of users, one Segment might be users from a particular country or city.
355
- class Segment
262
+ # The Pivot describes the pivot section in the request.
263
+ # The Pivot helps rearrange the information in the table for certain reports
264
+ # by pivoting your data on a second dimension.
265
+ class Pivot
356
266
  include Google::Apis::Core::Hashable
357
267
 
358
- # Dynamic segment definition for defining the segment within the request.
359
- # A segment can select users, sessions or both.
360
- # Corresponds to the JSON property `dynamicSegment`
361
- # @return [Google::Apis::AnalyticsreportingV4::DynamicSegment]
362
- attr_accessor :dynamic_segment
268
+ # Specifies the maximum number of groups to return.
269
+ # The default value is 10, also the maximum value is 1,000.
270
+ # Corresponds to the JSON property `maxGroupCount`
271
+ # @return [Fixnum]
272
+ attr_accessor :max_group_count
363
273
 
364
- # The segment ID of a built-in or custom segment, for example `gaid::-3`.
365
- # Corresponds to the JSON property `segmentId`
366
- # @return [String]
367
- attr_accessor :segment_id
274
+ # If k metrics were requested, then the response will contain some
275
+ # data-dependent multiple of k columns in the report. E.g., if you pivoted
276
+ # on the dimension `ga:browser` then you'd get k columns for "Firefox", k
277
+ # columns for "IE", k columns for "Chrome", etc. The ordering of the groups
278
+ # of columns is determined by descending order of "total" for the first of
279
+ # the k values. Ties are broken by lexicographic ordering of the first
280
+ # pivot dimension, then lexicographic ordering of the second pivot
281
+ # dimension, and so on. E.g., if the totals for the first value for
282
+ # Firefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns
283
+ # would be Chrome, Firefox, IE.
284
+ # The following let you choose which of the groups of k columns are
285
+ # included in the response.
286
+ # Corresponds to the JSON property `startGroup`
287
+ # @return [Fixnum]
288
+ attr_accessor :start_group
289
+
290
+ # The pivot metrics. Pivot metrics are part of the
291
+ # restriction on total number of metrics allowed in the request.
292
+ # Corresponds to the JSON property `metrics`
293
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
294
+ attr_accessor :metrics
295
+
296
+ # A list of dimensions to show as pivot columns. A Pivot can have a maximum
297
+ # of 4 dimensions. Pivot dimensions are part of the restriction on the
298
+ # total number of dimensions allowed in the request.
299
+ # Corresponds to the JSON property `dimensions`
300
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
301
+ attr_accessor :dimensions
302
+
303
+ # DimensionFilterClauses are logically combined with an `AND` operator: only
304
+ # data that is included by all these DimensionFilterClauses contributes to
305
+ # the values in this pivot region. Dimension filters can be used to restrict
306
+ # the columns shown in the pivot region. For example if you have
307
+ # `ga:browser` as the requested dimension in the pivot region, and you
308
+ # specify key filters to restrict `ga:browser` to only "IE" or "Firefox",
309
+ # then only those two browsers would show up as columns.
310
+ # Corresponds to the JSON property `dimensionFilterClauses`
311
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
312
+ attr_accessor :dimension_filter_clauses
368
313
 
369
314
  def initialize(**args)
370
315
  update!(**args)
@@ -372,26 +317,33 @@ module Google
372
317
 
373
318
  # Update properties of this object
374
319
  def update!(**args)
375
- @dynamic_segment = args[:dynamic_segment] if args.key?(:dynamic_segment)
376
- @segment_id = args[:segment_id] if args.key?(:segment_id)
320
+ @max_group_count = args[:max_group_count] if args.key?(:max_group_count)
321
+ @start_group = args[:start_group] if args.key?(:start_group)
322
+ @metrics = args[:metrics] if args.key?(:metrics)
323
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
324
+ @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
377
325
  end
378
326
  end
379
327
 
380
- # A segment sequence definition.
381
- class SegmentSequenceStep
328
+ # The headers for the each of the metric column corresponding to the metrics
329
+ # requested in the pivots section of the response.
330
+ class PivotHeaderEntry
382
331
  include Google::Apis::Core::Hashable
383
332
 
384
- # A sequence is specified with a list of Or grouped filters which are
385
- # combined with `AND` operator.
386
- # Corresponds to the JSON property `orFiltersForSegment`
387
- # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
388
- attr_accessor :or_filters_for_segment
333
+ # The values for the dimensions in the pivot.
334
+ # Corresponds to the JSON property `dimensionValues`
335
+ # @return [Array<String>]
336
+ attr_accessor :dimension_values
389
337
 
390
- # Specifies if the step immediately precedes or can be any time before the
391
- # next step.
392
- # Corresponds to the JSON property `matchType`
393
- # @return [String]
394
- attr_accessor :match_type
338
+ # The name of the dimensions in the pivot response.
339
+ # Corresponds to the JSON property `dimensionNames`
340
+ # @return [Array<String>]
341
+ attr_accessor :dimension_names
342
+
343
+ # Header for the metrics.
344
+ # Corresponds to the JSON property `metric`
345
+ # @return [Google::Apis::AnalyticsreportingV4::MetricHeaderEntry]
346
+ attr_accessor :metric
395
347
 
396
348
  def initialize(**args)
397
349
  update!(**args)
@@ -399,43 +351,54 @@ module Google
399
351
 
400
352
  # Update properties of this object
401
353
  def update!(**args)
402
- @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
403
- @match_type = args[:match_type] if args.key?(:match_type)
354
+ @dimension_values = args[:dimension_values] if args.key?(:dimension_values)
355
+ @dimension_names = args[:dimension_names] if args.key?(:dimension_names)
356
+ @metric = args[:metric] if args.key?(:metric)
404
357
  end
405
358
  end
406
359
 
407
- # [Metrics](https://support.google.com/analytics/answer/1033861)
408
- # are the quantitative measurements. For example, the metric `ga:users`
409
- # indicates the total number of users for the requested time period.
410
- class Metric
360
+ # SegmentFilter defines the segment to be either a simple or a sequence
361
+ # segment. A simple segment condition contains dimension and metric conditions
362
+ # to select the sessions or users. A sequence segment condition can be used to
363
+ # select users or sessions based on sequential conditions.
364
+ class SegmentFilter
411
365
  include Google::Apis::Core::Hashable
412
366
 
413
- # An alias for the metric expression is an alternate name for the
414
- # expression. The alias can be used for filtering and sorting. This field
415
- # is optional and is useful if the expression is not a single metric but
416
- # a complex expression which cannot be used in filtering and sorting.
417
- # The alias is also used in the response column header.
418
- # Corresponds to the JSON property `alias`
419
- # @return [String]
420
- attr_accessor :alias
421
-
422
- # A metric expression in the request. An expression is constructed from one
423
- # or more metrics and numbers. Accepted operators include: Plus (+), Minus
424
- # (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,
425
- # Positive cardinal numbers (0-9), can include decimals and is limited to
426
- # 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the
427
- # metric expression is just a single metric name like `ga:users`.
428
- # Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics
429
- # will result in unexpected results.
430
- # Corresponds to the JSON property `expression`
431
- # @return [String]
432
- attr_accessor :expression
367
+ # Sequence conditions consist of one or more steps, where each step is defined
368
+ # by one or more dimension/metric conditions. Multiple steps can be combined
369
+ # with special sequence operators.
370
+ # Corresponds to the JSON property `sequenceSegment`
371
+ # @return [Google::Apis::AnalyticsreportingV4::SequenceSegment]
372
+ attr_accessor :sequence_segment
433
373
 
434
- # Specifies how the metric expression should be formatted, for example
435
- # `INTEGER`.
436
- # Corresponds to the JSON property `formattingType`
437
- # @return [String]
438
- attr_accessor :formatting_type
374
+ # If true, match the complement of simple or sequence segment.
375
+ # For example, to match all visits not from "New York", we can define the
376
+ # segment as follows:
377
+ # "sessionSegment": `
378
+ # "segmentFilters": [`
379
+ # "simpleSegment" :`
380
+ # "orFiltersForSegment": [`
381
+ # "segmentFilterClauses":[`
382
+ # "dimensionFilter": `
383
+ # "dimensionName": "ga:city",
384
+ # "expressions": ["New York"]
385
+ # `
386
+ # `]
387
+ # `]
388
+ # `,
389
+ # "not": "True"
390
+ # `]
391
+ # `,
392
+ # Corresponds to the JSON property `not`
393
+ # @return [Boolean]
394
+ attr_accessor :not
395
+ alias_method :not?, :not
396
+
397
+ # A Simple segment conditions consist of one or more dimension/metric
398
+ # conditions that can be combined.
399
+ # Corresponds to the JSON property `simpleSegment`
400
+ # @return [Google::Apis::AnalyticsreportingV4::SimpleSegment]
401
+ attr_accessor :simple_segment
439
402
 
440
403
  def initialize(**args)
441
404
  update!(**args)
@@ -443,20 +406,22 @@ module Google
443
406
 
444
407
  # Update properties of this object
445
408
  def update!(**args)
446
- @alias = args[:alias] if args.key?(:alias)
447
- @expression = args[:expression] if args.key?(:expression)
448
- @formatting_type = args[:formatting_type] if args.key?(:formatting_type)
409
+ @sequence_segment = args[:sequence_segment] if args.key?(:sequence_segment)
410
+ @not = args[:not] if args.key?(:not)
411
+ @simple_segment = args[:simple_segment] if args.key?(:simple_segment)
449
412
  end
450
413
  end
451
414
 
452
- # The metric values in the pivot region.
453
- class PivotValueRegion
415
+ # SegmentDefinition defines the segment to be a set of SegmentFilters which
416
+ # are combined together with a logical `AND` operation.
417
+ class SegmentDefinition
454
418
  include Google::Apis::Core::Hashable
455
419
 
456
- # The values of the metrics in each of the pivot regions.
457
- # Corresponds to the JSON property `values`
458
- # @return [Array<String>]
459
- attr_accessor :values
420
+ # A segment is defined by a set of segment filters which are combined
421
+ # together with a logical `AND` operation.
422
+ # Corresponds to the JSON property `segmentFilters`
423
+ # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilter>]
424
+ attr_accessor :segment_filters
460
425
 
461
426
  def initialize(**args)
462
427
  update!(**args)
@@ -464,28 +429,23 @@ module Google
464
429
 
465
430
  # Update properties of this object
466
431
  def update!(**args)
467
- @values = args[:values] if args.key?(:values)
432
+ @segment_filters = args[:segment_filters] if args.key?(:segment_filters)
468
433
  end
469
434
  end
470
435
 
471
- # The data response corresponding to the request.
472
- class Report
436
+ # Header for the metrics.
437
+ class MetricHeaderEntry
473
438
  include Google::Apis::Core::Hashable
474
439
 
475
- # The data part of the report.
476
- # Corresponds to the JSON property `data`
477
- # @return [Google::Apis::AnalyticsreportingV4::ReportData]
478
- attr_accessor :data
479
-
480
- # Page token to retrieve the next page of results in the list.
481
- # Corresponds to the JSON property `nextPageToken`
440
+ # The type of the metric, for example `INTEGER`.
441
+ # Corresponds to the JSON property `type`
482
442
  # @return [String]
483
- attr_accessor :next_page_token
443
+ attr_accessor :type
484
444
 
485
- # Column headers.
486
- # Corresponds to the JSON property `columnHeader`
487
- # @return [Google::Apis::AnalyticsreportingV4::ColumnHeader]
488
- attr_accessor :column_header
445
+ # The name of the header.
446
+ # Corresponds to the JSON property `name`
447
+ # @return [String]
448
+ attr_accessor :name
489
449
 
490
450
  def initialize(**args)
491
451
  update!(**args)
@@ -493,52 +453,85 @@ module Google
493
453
 
494
454
  # Update properties of this object
495
455
  def update!(**args)
496
- @data = args[:data] if args.key?(:data)
497
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
498
- @column_header = args[:column_header] if args.key?(:column_header)
456
+ @type = args[:type] if args.key?(:type)
457
+ @name = args[:name] if args.key?(:name)
499
458
  end
500
459
  end
501
460
 
502
- # The headers for each of the pivot sections defined in the request.
503
- class PivotHeader
461
+ # The data part of the report.
462
+ class ReportData
504
463
  include Google::Apis::Core::Hashable
505
464
 
506
- # A single pivot section header.
507
- # Corresponds to the JSON property `pivotHeaderEntries`
508
- # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeaderEntry>]
509
- attr_accessor :pivot_header_entries
465
+ # For each requested date range, for the set of all rows that match
466
+ # the query, every requested value format gets a total. The total
467
+ # for a value format is computed by first totaling the metrics
468
+ # mentioned in the value format and then evaluating the value
469
+ # format as a scalar expression. E.g., The "totals" for
470
+ # `3 / (ga:sessions + 2)` we compute
471
+ # `3 / ((sum of all relevant ga:sessions) + 2)`.
472
+ # Totals are computed before pagination.
473
+ # Corresponds to the JSON property `totals`
474
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
475
+ attr_accessor :totals
510
476
 
511
- # The total number of groups for this pivot.
512
- # Corresponds to the JSON property `totalPivotGroupsCount`
513
- # @return [Fixnum]
514
- attr_accessor :total_pivot_groups_count
477
+ # If the results are
478
+ # [sampled](https://support.google.com/analytics/answer/2637192),
479
+ # this returns the total number of samples read, one entry per date range.
480
+ # If the results are not sampled this field will not be defined. See
481
+ # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
482
+ # for details.
483
+ # Corresponds to the JSON property `samplesReadCounts`
484
+ # @return [Array<Fixnum>]
485
+ attr_accessor :samples_read_counts
515
486
 
516
- def initialize(**args)
517
- update!(**args)
518
- end
487
+ # Total number of matching rows for this query.
488
+ # Corresponds to the JSON property `rowCount`
489
+ # @return [Fixnum]
490
+ attr_accessor :row_count
519
491
 
520
- # Update properties of this object
521
- def update!(**args)
522
- @pivot_header_entries = args[:pivot_header_entries] if args.key?(:pivot_header_entries)
523
- @total_pivot_groups_count = args[:total_pivot_groups_count] if args.key?(:total_pivot_groups_count)
524
- end
525
- end
492
+ # There's one ReportRow for every unique combination of dimensions.
493
+ # Corresponds to the JSON property `rows`
494
+ # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRow>]
495
+ attr_accessor :rows
526
496
 
527
- # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
528
- # The start and end dates are specified in
529
- # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
530
- class DateRange
531
- include Google::Apis::Core::Hashable
497
+ # Indicates if response to this request is golden or not. Data is
498
+ # golden when the exact same request will not produce any new results if
499
+ # asked at a later point in time.
500
+ # Corresponds to the JSON property `isDataGolden`
501
+ # @return [Boolean]
502
+ attr_accessor :is_data_golden
503
+ alias_method :is_data_golden?, :is_data_golden
532
504
 
533
- # The start date for the query in the format `YYYY-MM-DD`.
534
- # Corresponds to the JSON property `startDate`
505
+ # The last time the data in the report was refreshed. All the hits received
506
+ # before this timestamp are included in the calculation of the report.
507
+ # Corresponds to the JSON property `dataLastRefreshed`
535
508
  # @return [String]
536
- attr_accessor :start_date
509
+ attr_accessor :data_last_refreshed
537
510
 
538
- # The end date for the query in the format `YYYY-MM-DD`.
539
- # Corresponds to the JSON property `endDate`
540
- # @return [String]
541
- attr_accessor :end_date
511
+ # Minimum and maximum values seen over all matching rows. These are both
512
+ # empty when `hideValueRanges` in the request is false, or when
513
+ # rowCount is zero.
514
+ # Corresponds to the JSON property `maximums`
515
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
516
+ attr_accessor :maximums
517
+
518
+ # If the results are
519
+ # [sampled](https://support.google.com/analytics/answer/2637192),
520
+ # this returns the total number of
521
+ # samples present, one entry per date range. If the results are not sampled
522
+ # this field will not be defined. See
523
+ # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
524
+ # for details.
525
+ # Corresponds to the JSON property `samplingSpaceSizes`
526
+ # @return [Array<Fixnum>]
527
+ attr_accessor :sampling_space_sizes
528
+
529
+ # Minimum and maximum values seen over all matching rows. These are both
530
+ # empty when `hideValueRanges` in the request is false, or when
531
+ # rowCount is zero.
532
+ # Corresponds to the JSON property `minimums`
533
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
534
+ attr_accessor :minimums
542
535
 
543
536
  def initialize(**args)
544
537
  update!(**args)
@@ -546,41 +539,52 @@ module Google
546
539
 
547
540
  # Update properties of this object
548
541
  def update!(**args)
549
- @start_date = args[:start_date] if args.key?(:start_date)
550
- @end_date = args[:end_date] if args.key?(:end_date)
542
+ @totals = args[:totals] if args.key?(:totals)
543
+ @samples_read_counts = args[:samples_read_counts] if args.key?(:samples_read_counts)
544
+ @row_count = args[:row_count] if args.key?(:row_count)
545
+ @rows = args[:rows] if args.key?(:rows)
546
+ @is_data_golden = args[:is_data_golden] if args.key?(:is_data_golden)
547
+ @data_last_refreshed = args[:data_last_refreshed] if args.key?(:data_last_refreshed)
548
+ @maximums = args[:maximums] if args.key?(:maximums)
549
+ @sampling_space_sizes = args[:sampling_space_sizes] if args.key?(:sampling_space_sizes)
550
+ @minimums = args[:minimums] if args.key?(:minimums)
551
551
  end
552
552
  end
553
553
 
554
- # MetricFilter specifies the filter on a metric.
555
- class MetricFilter
554
+ # Dimension filter specifies the filtering options on a dimension.
555
+ class DimensionFilter
556
556
  include Google::Apis::Core::Hashable
557
557
 
558
+ # The dimension to filter on. A DimensionFilter must contain a dimension.
559
+ # Corresponds to the JSON property `dimensionName`
560
+ # @return [String]
561
+ attr_accessor :dimension_name
562
+
563
+ # How to match the dimension to the expression. The default is REGEXP.
564
+ # Corresponds to the JSON property `operator`
565
+ # @return [String]
566
+ attr_accessor :operator
567
+
558
568
  # Logical `NOT` operator. If this boolean is set to true, then the matching
559
- # metric values will be excluded in the report. The default is false.
569
+ # dimension values will be excluded in the report. The default is false.
560
570
  # Corresponds to the JSON property `not`
561
571
  # @return [Boolean]
562
572
  attr_accessor :not
563
573
  alias_method :not?, :not
564
574
 
565
- # The metric that will be filtered on. A metricFilter must contain a metric
566
- # name. A metric name can be an alias earlier defined as a metric or it can
567
- # also be a metric expression.
568
- # Corresponds to the JSON property `metricName`
569
- # @return [String]
570
- attr_accessor :metric_name
571
-
572
- # The value to compare against.
573
- # Corresponds to the JSON property `comparisonValue`
574
- # @return [String]
575
- attr_accessor :comparison_value
575
+ # Strings or regular expression to match against. Only the first value of
576
+ # the list is used for comparison unless the operator is `IN_LIST`.
577
+ # If `IN_LIST` operator, then the entire list is used to filter the
578
+ # dimensions as explained in the description of the `IN_LIST` operator.
579
+ # Corresponds to the JSON property `expressions`
580
+ # @return [Array<String>]
581
+ attr_accessor :expressions
576
582
 
577
- # Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the
578
- # comparisonValue, the default is `EQUAL`. If the operator is
579
- # `IS_MISSING`, checks if the metric is missing and would ignore the
580
- # comparisonValue.
581
- # Corresponds to the JSON property `operator`
582
- # @return [String]
583
- attr_accessor :operator
583
+ # Should the match be case sensitive? Default is false.
584
+ # Corresponds to the JSON property `caseSensitive`
585
+ # @return [Boolean]
586
+ attr_accessor :case_sensitive
587
+ alias_method :case_sensitive?, :case_sensitive
584
588
 
585
589
  def initialize(**args)
586
590
  update!(**args)
@@ -588,171 +592,114 @@ module Google
588
592
 
589
593
  # Update properties of this object
590
594
  def update!(**args)
591
- @not = args[:not] if args.key?(:not)
592
- @metric_name = args[:metric_name] if args.key?(:metric_name)
593
- @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
595
+ @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
594
596
  @operator = args[:operator] if args.key?(:operator)
597
+ @not = args[:not] if args.key?(:not)
598
+ @expressions = args[:expressions] if args.key?(:expressions)
599
+ @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
595
600
  end
596
601
  end
597
602
 
598
- # The main request class which specifies the Reporting API request.
599
- class ReportRequest
603
+ # Dimension filter specifies the filtering options on a dimension.
604
+ class SegmentDimensionFilter
600
605
  include Google::Apis::Core::Hashable
601
606
 
602
- # The metric filter clauses. They are logically combined with the `AND`
603
- # operator. Metric filters look at only the first date range and not the
604
- # comparing date range. Note that filtering on metrics occurs after the
605
- # metrics are aggregated.
606
- # Corresponds to the JSON property `metricFilterClauses`
607
- # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilterClause>]
608
- attr_accessor :metric_filter_clauses
609
-
610
- # Page size is for paging and specifies the maximum number of returned rows.
611
- # Page size should be >= 0. A query returns the default of 1,000 rows.
612
- # The Analytics Core Reporting API returns a maximum of 10,000 rows per
613
- # request, no matter how many you ask for. It can also return fewer rows
614
- # than requested, if there aren't as many dimension segments as you expect.
615
- # For instance, there are fewer than 300 possible values for `ga:country`,
616
- # so when segmenting only by country, you can't get more than 300 rows,
617
- # even if you set `pageSize` to a higher value.
618
- # Corresponds to the JSON property `pageSize`
619
- # @return [Fixnum]
620
- attr_accessor :page_size
607
+ # Minimum comparison values for `BETWEEN` match type.
608
+ # Corresponds to the JSON property `minComparisonValue`
609
+ # @return [String]
610
+ attr_accessor :min_comparison_value
621
611
 
622
- # If set to true, hides the total of all metrics for all the matching rows,
623
- # for every date range. The default false and will return the totals.
624
- # Corresponds to the JSON property `hideTotals`
625
- # @return [Boolean]
626
- attr_accessor :hide_totals
627
- alias_method :hide_totals?, :hide_totals
612
+ # Maximum comparison values for `BETWEEN` match type.
613
+ # Corresponds to the JSON property `maxComparisonValue`
614
+ # @return [String]
615
+ attr_accessor :max_comparison_value
628
616
 
629
- # If set to true, hides the minimum and maximum across all matching rows.
630
- # The default is false and the value ranges are returned.
631
- # Corresponds to the JSON property `hideValueRanges`
632
- # @return [Boolean]
633
- attr_accessor :hide_value_ranges
634
- alias_method :hide_value_ranges?, :hide_value_ranges
617
+ # Name of the dimension for which the filter is being applied.
618
+ # Corresponds to the JSON property `dimensionName`
619
+ # @return [String]
620
+ attr_accessor :dimension_name
635
621
 
636
- # Dimension or metric filters that restrict the data returned for your
637
- # request. To use the `filtersExpression`, supply a dimension or metric on
638
- # which to filter, followed by the filter expression. For example, the
639
- # following expression selects `ga:browser` dimension which starts with
640
- # Firefox; `ga:browser=~^Firefox`. For more information on dimensions
641
- # and metric filters, see
642
- # [Filters reference](https://developers.google.com/analytics/devguides/
643
- # reporting/core/v3/reference#filters).
644
- # Corresponds to the JSON property `filtersExpression`
622
+ # The operator to use to match the dimension with the expressions.
623
+ # Corresponds to the JSON property `operator`
645
624
  # @return [String]
646
- attr_accessor :filters_expression
625
+ attr_accessor :operator
647
626
 
648
- # Defines a cohort group.
649
- # For example:
650
- # "cohortGroup": `
651
- # "cohorts": [`
652
- # "name": "cohort 1",
653
- # "type": "FIRST_VISIT_DATE",
654
- # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
655
- # `,`
656
- # "name": "cohort 2"
657
- # "type": "FIRST_VISIT_DATE"
658
- # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
659
- # `]
660
- # `
661
- # Corresponds to the JSON property `cohortGroup`
662
- # @return [Google::Apis::AnalyticsreportingV4::CohortGroup]
663
- attr_accessor :cohort_group
627
+ # The list of expressions, only the first element is used for all operators
628
+ # Corresponds to the JSON property `expressions`
629
+ # @return [Array<String>]
630
+ attr_accessor :expressions
664
631
 
665
- # The Analytics
666
- # [view ID](https://support.google.com/analytics/answer/1009618)
667
- # from which to retrieve data. Every [ReportRequest](#ReportRequest)
668
- # within a `batchGet` method must contain the same `viewId`.
669
- # Corresponds to the JSON property `viewId`
670
- # @return [String]
671
- attr_accessor :view_id
632
+ # Should the match be case sensitive, ignored for `IN_LIST` operator.
633
+ # Corresponds to the JSON property `caseSensitive`
634
+ # @return [Boolean]
635
+ attr_accessor :case_sensitive
636
+ alias_method :case_sensitive?, :case_sensitive
672
637
 
673
- # The metrics requested.
674
- # Requests must specify at least one metric. Requests can have a
675
- # total of 10 metrics.
676
- # Corresponds to the JSON property `metrics`
677
- # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
678
- attr_accessor :metrics
638
+ def initialize(**args)
639
+ update!(**args)
640
+ end
679
641
 
680
- # The dimension filter clauses for filtering Dimension Values. They are
681
- # logically combined with the `AND` operator. Note that filtering occurs
682
- # before any dimensions are aggregated, so that the returned metrics
683
- # represent the total for only the relevant dimensions.
684
- # Corresponds to the JSON property `dimensionFilterClauses`
685
- # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
686
- attr_accessor :dimension_filter_clauses
642
+ # Update properties of this object
643
+ def update!(**args)
644
+ @min_comparison_value = args[:min_comparison_value] if args.key?(:min_comparison_value)
645
+ @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
646
+ @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
647
+ @operator = args[:operator] if args.key?(:operator)
648
+ @expressions = args[:expressions] if args.key?(:expressions)
649
+ @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
650
+ end
651
+ end
687
652
 
688
- # Sort order on output rows. To compare two rows, the elements of the
689
- # following are applied in order until a difference is found. All date
690
- # ranges in the output get the same row order.
691
- # Corresponds to the JSON property `orderBys`
692
- # @return [Array<Google::Apis::AnalyticsreportingV4::OrderBy>]
693
- attr_accessor :order_bys
653
+ # Specifies the sorting options.
654
+ class OrderBy
655
+ include Google::Apis::Core::Hashable
694
656
 
695
- # Segment the data returned for the request. A segment definition helps look
696
- # at a subset of the segment request. A request can contain up to four
697
- # segments. Every [ReportRequest](#ReportRequest) within a
698
- # `batchGet` method must contain the same `segments` definition. Requests
699
- # with segments must have the `ga:segment` dimension.
700
- # Corresponds to the JSON property `segments`
701
- # @return [Array<Google::Apis::AnalyticsreportingV4::Segment>]
702
- attr_accessor :segments
657
+ # The sorting order for the field.
658
+ # Corresponds to the JSON property `sortOrder`
659
+ # @return [String]
660
+ attr_accessor :sort_order
703
661
 
704
- # The desired report
705
- # [sample](https://support.google.com/analytics/answer/2637192) size.
706
- # If the the `samplingLevel` field is unspecified the `DEFAULT` sampling
707
- # level is used. Every [ReportRequest](#ReportRequest) within a
708
- # `batchGet` method must contain the same `samplingLevel` definition. See
709
- # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
710
- # for details.
711
- # Corresponds to the JSON property `samplingLevel`
662
+ # The field which to sort by. The default sort order is ascending. Example:
663
+ # `ga:browser`.
664
+ # Note, that you can only specify one field for sort here. For example,
665
+ # `ga:browser, ga:city` is not valid.
666
+ # Corresponds to the JSON property `fieldName`
712
667
  # @return [String]
713
- attr_accessor :sampling_level
668
+ attr_accessor :field_name
714
669
 
715
- # The dimensions requested.
716
- # Requests can have a total of 7 dimensions.
717
- # Corresponds to the JSON property `dimensions`
718
- # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
719
- attr_accessor :dimensions
670
+ # The order type. The default orderType is `VALUE`.
671
+ # Corresponds to the JSON property `orderType`
672
+ # @return [String]
673
+ attr_accessor :order_type
720
674
 
721
- # Date ranges in the request. The request can have a maximum of 2 date
722
- # ranges. The response will contain a set of metric values for each
723
- # combination of the dimensions for each date range in the request. So, if
724
- # there are two date ranges, there will be two set of metric values, one for
725
- # the original date range and one for the second date range.
726
- # The `reportRequest.dateRanges` field should not be specified for cohorts
727
- # or Lifetime value requests.
728
- # If a date range is not provided, the default date range is (startDate:
729
- # current date - 7 days, endDate: current date - 1 day). Every
730
- # [ReportRequest](#ReportRequest) within a `batchGet` method must
731
- # contain the same `dateRanges` definition.
732
- # Corresponds to the JSON property `dateRanges`
733
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRange>]
734
- attr_accessor :date_ranges
675
+ def initialize(**args)
676
+ update!(**args)
677
+ end
735
678
 
736
- # A continuation token to get the next page of the results. Adding this to
737
- # the request will return the rows after the pageToken. The pageToken should
738
- # be the value returned in the nextPageToken parameter in the response to
739
- # the GetReports request.
740
- # Corresponds to the JSON property `pageToken`
741
- # @return [String]
742
- attr_accessor :page_token
679
+ # Update properties of this object
680
+ def update!(**args)
681
+ @sort_order = args[:sort_order] if args.key?(:sort_order)
682
+ @field_name = args[:field_name] if args.key?(:field_name)
683
+ @order_type = args[:order_type] if args.key?(:order_type)
684
+ end
685
+ end
743
686
 
744
- # The pivot definitions. Requests can have a maximum of 2 pivots.
745
- # Corresponds to the JSON property `pivots`
746
- # @return [Array<Google::Apis::AnalyticsreportingV4::Pivot>]
747
- attr_accessor :pivots
687
+ # The segment definition, if the report needs to be segmented.
688
+ # A Segment is a subset of the Analytics data. For example, of the entire
689
+ # set of users, one Segment might be users from a particular country or city.
690
+ class Segment
691
+ include Google::Apis::Core::Hashable
748
692
 
749
- # If set to false, the response does not include rows if all the retrieved
750
- # metrics are equal to zero. The default is false which will exclude these
751
- # rows.
752
- # Corresponds to the JSON property `includeEmptyRows`
753
- # @return [Boolean]
754
- attr_accessor :include_empty_rows
755
- alias_method :include_empty_rows?, :include_empty_rows
693
+ # Dynamic segment definition for defining the segment within the request.
694
+ # A segment can select users, sessions or both.
695
+ # Corresponds to the JSON property `dynamicSegment`
696
+ # @return [Google::Apis::AnalyticsreportingV4::DynamicSegment]
697
+ attr_accessor :dynamic_segment
698
+
699
+ # The segment ID of a built-in or custom segment, for example `gaid::-3`.
700
+ # Corresponds to the JSON property `segmentId`
701
+ # @return [String]
702
+ attr_accessor :segment_id
756
703
 
757
704
  def initialize(**args)
758
705
  update!(**args)
@@ -760,66 +707,26 @@ module Google
760
707
 
761
708
  # Update properties of this object
762
709
  def update!(**args)
763
- @metric_filter_clauses = args[:metric_filter_clauses] if args.key?(:metric_filter_clauses)
764
- @page_size = args[:page_size] if args.key?(:page_size)
765
- @hide_totals = args[:hide_totals] if args.key?(:hide_totals)
766
- @hide_value_ranges = args[:hide_value_ranges] if args.key?(:hide_value_ranges)
767
- @filters_expression = args[:filters_expression] if args.key?(:filters_expression)
768
- @cohort_group = args[:cohort_group] if args.key?(:cohort_group)
769
- @view_id = args[:view_id] if args.key?(:view_id)
770
- @metrics = args[:metrics] if args.key?(:metrics)
771
- @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
772
- @order_bys = args[:order_bys] if args.key?(:order_bys)
773
- @segments = args[:segments] if args.key?(:segments)
774
- @sampling_level = args[:sampling_level] if args.key?(:sampling_level)
775
- @dimensions = args[:dimensions] if args.key?(:dimensions)
776
- @date_ranges = args[:date_ranges] if args.key?(:date_ranges)
777
- @page_token = args[:page_token] if args.key?(:page_token)
778
- @pivots = args[:pivots] if args.key?(:pivots)
779
- @include_empty_rows = args[:include_empty_rows] if args.key?(:include_empty_rows)
710
+ @dynamic_segment = args[:dynamic_segment] if args.key?(:dynamic_segment)
711
+ @segment_id = args[:segment_id] if args.key?(:segment_id)
780
712
  end
781
713
  end
782
714
 
783
- # [Dimensions](https://support.google.com/analytics/answer/1033861)
784
- # are attributes of your data. For example, the dimension `ga:city`
785
- # indicates the city, for example, "Paris" or "New York", from which
786
- # a session originates.
787
- class Dimension
715
+ # A segment sequence definition.
716
+ class SegmentSequenceStep
788
717
  include Google::Apis::Core::Hashable
789
718
 
790
- # If non-empty, we place dimension values into buckets after string to
791
- # int64. Dimension values that are not the string representation of an
792
- # integral value will be converted to zero. The bucket values have to be in
793
- # increasing order. Each bucket is closed on the lower end, and open on the
794
- # upper end. The "first" bucket includes all values less than the first
795
- # boundary, the "last" bucket includes all values up to infinity. Dimension
796
- # values that fall in a bucket get transformed to a new dimension value. For
797
- # example, if one gives a list of "0, 1, 3, 4, 7", then we return the
798
- # following buckets:
799
- # - bucket #1: values < 0, dimension value "<0"
800
- # - bucket #2: values in [0,1), dimension value "0"
801
- # - bucket #3: values in [1,3), dimension value "1-2"
802
- # - bucket #4: values in [3,4), dimension value "3"
803
- # - bucket #5: values in [4,7), dimension value "4-6"
804
- # - bucket #6: values >= 7, dimension value "7+"
805
- # NOTE: If you are applying histogram mutation on any dimension, and using
806
- # that dimension in sort, you will want to use the sort type
807
- # `HISTOGRAM_BUCKET` for that purpose. Without that the dimension values
808
- # will be sorted according to dictionary
809
- # (lexicographic) order. For example the ascending dictionary order is:
810
- # "<50", "1001+", "121-1000", "50-120"
811
- # And the ascending `HISTOGRAM_BUCKET` order is:
812
- # "<50", "50-120", "121-1000", "1001+"
813
- # The client has to explicitly request `"orderType": "HISTOGRAM_BUCKET"`
814
- # for a histogram-mutated dimension.
815
- # Corresponds to the JSON property `histogramBuckets`
816
- # @return [Array<Fixnum>]
817
- attr_accessor :histogram_buckets
719
+ # A sequence is specified with a list of Or grouped filters which are
720
+ # combined with `AND` operator.
721
+ # Corresponds to the JSON property `orFiltersForSegment`
722
+ # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
723
+ attr_accessor :or_filters_for_segment
818
724
 
819
- # Name of the dimension to fetch, for example `ga:browser`.
820
- # Corresponds to the JSON property `name`
725
+ # Specifies if the step immediately precedes or can be any time before the
726
+ # next step.
727
+ # Corresponds to the JSON property `matchType`
821
728
  # @return [String]
822
- attr_accessor :name
729
+ attr_accessor :match_type
823
730
 
824
731
  def initialize(**args)
825
732
  update!(**args)
@@ -827,32 +734,43 @@ module Google
827
734
 
828
735
  # Update properties of this object
829
736
  def update!(**args)
830
- @histogram_buckets = args[:histogram_buckets] if args.key?(:histogram_buckets)
831
- @name = args[:name] if args.key?(:name)
737
+ @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
738
+ @match_type = args[:match_type] if args.key?(:match_type)
832
739
  end
833
740
  end
834
741
 
835
- # Dynamic segment definition for defining the segment within the request.
836
- # A segment can select users, sessions or both.
837
- class DynamicSegment
742
+ # [Metrics](https://support.google.com/analytics/answer/1033861)
743
+ # are the quantitative measurements. For example, the metric `ga:users`
744
+ # indicates the total number of users for the requested time period.
745
+ class Metric
838
746
  include Google::Apis::Core::Hashable
839
747
 
840
- # The name of the dynamic segment.
841
- # Corresponds to the JSON property `name`
748
+ # A metric expression in the request. An expression is constructed from one
749
+ # or more metrics and numbers. Accepted operators include: Plus (+), Minus
750
+ # (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,
751
+ # Positive cardinal numbers (0-9), can include decimals and is limited to
752
+ # 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the
753
+ # metric expression is just a single metric name like `ga:users`.
754
+ # Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics
755
+ # will result in unexpected results.
756
+ # Corresponds to the JSON property `expression`
842
757
  # @return [String]
843
- attr_accessor :name
758
+ attr_accessor :expression
844
759
 
845
- # SegmentDefinition defines the segment to be a set of SegmentFilters which
846
- # are combined together with a logical `AND` operation.
847
- # Corresponds to the JSON property `userSegment`
848
- # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
849
- attr_accessor :user_segment
760
+ # Specifies how the metric expression should be formatted, for example
761
+ # `INTEGER`.
762
+ # Corresponds to the JSON property `formattingType`
763
+ # @return [String]
764
+ attr_accessor :formatting_type
850
765
 
851
- # SegmentDefinition defines the segment to be a set of SegmentFilters which
852
- # are combined together with a logical `AND` operation.
853
- # Corresponds to the JSON property `sessionSegment`
854
- # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
855
- attr_accessor :session_segment
766
+ # An alias for the metric expression is an alternate name for the
767
+ # expression. The alias can be used for filtering and sorting. This field
768
+ # is optional and is useful if the expression is not a single metric but
769
+ # a complex expression which cannot be used in filtering and sorting.
770
+ # The alias is also used in the response column header.
771
+ # Corresponds to the JSON property `alias`
772
+ # @return [String]
773
+ attr_accessor :alias
856
774
 
857
775
  def initialize(**args)
858
776
  update!(**args)
@@ -860,22 +778,20 @@ module Google
860
778
 
861
779
  # Update properties of this object
862
780
  def update!(**args)
863
- @name = args[:name] if args.key?(:name)
864
- @user_segment = args[:user_segment] if args.key?(:user_segment)
865
- @session_segment = args[:session_segment] if args.key?(:session_segment)
781
+ @expression = args[:expression] if args.key?(:expression)
782
+ @formatting_type = args[:formatting_type] if args.key?(:formatting_type)
783
+ @alias = args[:alias] if args.key?(:alias)
866
784
  end
867
785
  end
868
786
 
869
- # A Simple segment conditions consist of one or more dimension/metric
870
- # conditions that can be combined.
871
- class SimpleSegment
787
+ # The metric values in the pivot region.
788
+ class PivotValueRegion
872
789
  include Google::Apis::Core::Hashable
873
790
 
874
- # A list of segment filters groups which are combined with logical `AND`
875
- # operator.
876
- # Corresponds to the JSON property `orFiltersForSegment`
877
- # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
878
- attr_accessor :or_filters_for_segment
791
+ # The values of the metrics in each of the pivot regions.
792
+ # Corresponds to the JSON property `values`
793
+ # @return [Array<String>]
794
+ attr_accessor :values
879
795
 
880
796
  def initialize(**args)
881
797
  update!(**args)
@@ -883,23 +799,28 @@ module Google
883
799
 
884
800
  # Update properties of this object
885
801
  def update!(**args)
886
- @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
802
+ @values = args[:values] if args.key?(:values)
887
803
  end
888
804
  end
889
805
 
890
- # Column headers.
891
- class ColumnHeader
806
+ # The data response corresponding to the request.
807
+ class Report
892
808
  include Google::Apis::Core::Hashable
893
809
 
894
- # The headers for the metrics.
895
- # Corresponds to the JSON property `metricHeader`
896
- # @return [Google::Apis::AnalyticsreportingV4::MetricHeader]
897
- attr_accessor :metric_header
810
+ # Column headers.
811
+ # Corresponds to the JSON property `columnHeader`
812
+ # @return [Google::Apis::AnalyticsreportingV4::ColumnHeader]
813
+ attr_accessor :column_header
898
814
 
899
- # The dimension names in the response.
900
- # Corresponds to the JSON property `dimensions`
901
- # @return [Array<String>]
902
- attr_accessor :dimensions
815
+ # The data part of the report.
816
+ # Corresponds to the JSON property `data`
817
+ # @return [Google::Apis::AnalyticsreportingV4::ReportData]
818
+ attr_accessor :data
819
+
820
+ # Page token to retrieve the next page of results in the list.
821
+ # Corresponds to the JSON property `nextPageToken`
822
+ # @return [String]
823
+ attr_accessor :next_page_token
903
824
 
904
825
  def initialize(**args)
905
826
  update!(**args)
@@ -907,31 +828,25 @@ module Google
907
828
 
908
829
  # Update properties of this object
909
830
  def update!(**args)
910
- @metric_header = args[:metric_header] if args.key?(:metric_header)
911
- @dimensions = args[:dimensions] if args.key?(:dimensions)
831
+ @column_header = args[:column_header] if args.key?(:column_header)
832
+ @data = args[:data] if args.key?(:data)
833
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
912
834
  end
913
835
  end
914
836
 
915
- # Filter Clause to be used in a segment definition, can be wither a metric or
916
- # a dimension filter.
917
- class SegmentFilterClause
837
+ # The headers for each of the pivot sections defined in the request.
838
+ class PivotHeader
918
839
  include Google::Apis::Core::Hashable
919
840
 
920
- # Matches the complement (`!`) of the filter.
921
- # Corresponds to the JSON property `not`
922
- # @return [Boolean]
923
- attr_accessor :not
924
- alias_method :not?, :not
925
-
926
- # Dimension filter specifies the filtering options on a dimension.
927
- # Corresponds to the JSON property `dimensionFilter`
928
- # @return [Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter]
929
- attr_accessor :dimension_filter
841
+ # A single pivot section header.
842
+ # Corresponds to the JSON property `pivotHeaderEntries`
843
+ # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeaderEntry>]
844
+ attr_accessor :pivot_header_entries
930
845
 
931
- # Metric filter to be used in a segment filter clause.
932
- # Corresponds to the JSON property `metricFilter`
933
- # @return [Google::Apis::AnalyticsreportingV4::SegmentMetricFilter]
934
- attr_accessor :metric_filter
846
+ # The total number of groups for this pivot.
847
+ # Corresponds to the JSON property `totalPivotGroupsCount`
848
+ # @return [Fixnum]
849
+ attr_accessor :total_pivot_groups_count
935
850
 
936
851
  def initialize(**args)
937
852
  update!(**args)
@@ -939,37 +854,26 @@ module Google
939
854
 
940
855
  # Update properties of this object
941
856
  def update!(**args)
942
- @not = args[:not] if args.key?(:not)
943
- @dimension_filter = args[:dimension_filter] if args.key?(:dimension_filter)
944
- @metric_filter = args[:metric_filter] if args.key?(:metric_filter)
857
+ @pivot_header_entries = args[:pivot_header_entries] if args.key?(:pivot_header_entries)
858
+ @total_pivot_groups_count = args[:total_pivot_groups_count] if args.key?(:total_pivot_groups_count)
945
859
  end
946
860
  end
947
861
 
948
- # Defines a cohort. A cohort is a group of users who share a common
949
- # characteristic. For example, all users with the same acquisition date
950
- # belong to the same cohort.
951
- class Cohort
862
+ # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
863
+ # The start and end dates are specified in
864
+ # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
865
+ class DateRange
952
866
  include Google::Apis::Core::Hashable
953
867
 
954
- # A unique name for the cohort. If not defined name will be auto-generated
955
- # with values cohort_[1234...].
956
- # Corresponds to the JSON property `name`
868
+ # The end date for the query in the format `YYYY-MM-DD`.
869
+ # Corresponds to the JSON property `endDate`
957
870
  # @return [String]
958
- attr_accessor :name
959
-
960
- # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
961
- # The start and end dates are specified in
962
- # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
963
- # Corresponds to the JSON property `dateRange`
964
- # @return [Google::Apis::AnalyticsreportingV4::DateRange]
965
- attr_accessor :date_range
871
+ attr_accessor :end_date
966
872
 
967
- # Type of the cohort. The only supported type as of now is
968
- # `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated
969
- # as `FIRST_VISIT_DATE` type cohort.
970
- # Corresponds to the JSON property `type`
873
+ # The start date for the query in the format `YYYY-MM-DD`.
874
+ # Corresponds to the JSON property `startDate`
971
875
  # @return [String]
972
- attr_accessor :type
876
+ attr_accessor :start_date
973
877
 
974
878
  def initialize(**args)
975
879
  update!(**args)
@@ -977,28 +881,41 @@ module Google
977
881
 
978
882
  # Update properties of this object
979
883
  def update!(**args)
980
- @name = args[:name] if args.key?(:name)
981
- @date_range = args[:date_range] if args.key?(:date_range)
982
- @type = args[:type] if args.key?(:type)
884
+ @end_date = args[:end_date] if args.key?(:end_date)
885
+ @start_date = args[:start_date] if args.key?(:start_date)
983
886
  end
984
887
  end
985
888
 
986
- # Represents a group of metric filters.
987
- # Set the operator value to specify how the filters are logically combined.
988
- class MetricFilterClause
889
+ # MetricFilter specifies the filter on a metric.
890
+ class MetricFilter
989
891
  include Google::Apis::Core::Hashable
990
892
 
991
- # The operator for combining multiple metric filters. If unspecified, it is
992
- # treated as an `OR`.
893
+ # The metric that will be filtered on. A metricFilter must contain a metric
894
+ # name. A metric name can be an alias earlier defined as a metric or it can
895
+ # also be a metric expression.
896
+ # Corresponds to the JSON property `metricName`
897
+ # @return [String]
898
+ attr_accessor :metric_name
899
+
900
+ # The value to compare against.
901
+ # Corresponds to the JSON property `comparisonValue`
902
+ # @return [String]
903
+ attr_accessor :comparison_value
904
+
905
+ # Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the
906
+ # comparisonValue, the default is `EQUAL`. If the operator is
907
+ # `IS_MISSING`, checks if the metric is missing and would ignore the
908
+ # comparisonValue.
993
909
  # Corresponds to the JSON property `operator`
994
910
  # @return [String]
995
911
  attr_accessor :operator
996
912
 
997
- # The repeated set of filters. They are logically combined based on the
998
- # operator specified.
999
- # Corresponds to the JSON property `filters`
1000
- # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilter>]
1001
- attr_accessor :filters
913
+ # Logical `NOT` operator. If this boolean is set to true, then the matching
914
+ # metric values will be excluded in the report. The default is false.
915
+ # Corresponds to the JSON property `not`
916
+ # @return [Boolean]
917
+ attr_accessor :not
918
+ alias_method :not?, :not
1002
919
 
1003
920
  def initialize(**args)
1004
921
  update!(**args)
@@ -1006,69 +923,171 @@ module Google
1006
923
 
1007
924
  # Update properties of this object
1008
925
  def update!(**args)
926
+ @metric_name = args[:metric_name] if args.key?(:metric_name)
927
+ @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
1009
928
  @operator = args[:operator] if args.key?(:operator)
1010
- @filters = args[:filters] if args.key?(:filters)
929
+ @not = args[:not] if args.key?(:not)
1011
930
  end
1012
931
  end
1013
932
 
1014
- # A row in the report.
1015
- class ReportRow
933
+ # The main request class which specifies the Reporting API request.
934
+ class ReportRequest
1016
935
  include Google::Apis::Core::Hashable
1017
936
 
1018
- # List of metrics for each requested DateRange.
1019
- # Corresponds to the JSON property `metrics`
1020
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
1021
- attr_accessor :metrics
937
+ # Page size is for paging and specifies the maximum number of returned rows.
938
+ # Page size should be >= 0. A query returns the default of 1,000 rows.
939
+ # The Analytics Core Reporting API returns a maximum of 10,000 rows per
940
+ # request, no matter how many you ask for. It can also return fewer rows
941
+ # than requested, if there aren't as many dimension segments as you expect.
942
+ # For instance, there are fewer than 300 possible values for `ga:country`,
943
+ # so when segmenting only by country, you can't get more than 300 rows,
944
+ # even if you set `pageSize` to a higher value.
945
+ # Corresponds to the JSON property `pageSize`
946
+ # @return [Fixnum]
947
+ attr_accessor :page_size
948
+
949
+ # If set to true, hides the total of all metrics for all the matching rows,
950
+ # for every date range. The default false and will return the totals.
951
+ # Corresponds to the JSON property `hideTotals`
952
+ # @return [Boolean]
953
+ attr_accessor :hide_totals
954
+ alias_method :hide_totals?, :hide_totals
955
+
956
+ # If set to true, hides the minimum and maximum across all matching rows.
957
+ # The default is false and the value ranges are returned.
958
+ # Corresponds to the JSON property `hideValueRanges`
959
+ # @return [Boolean]
960
+ attr_accessor :hide_value_ranges
961
+ alias_method :hide_value_ranges?, :hide_value_ranges
962
+
963
+ # Defines a cohort group.
964
+ # For example:
965
+ # "cohortGroup": `
966
+ # "cohorts": [`
967
+ # "name": "cohort 1",
968
+ # "type": "FIRST_VISIT_DATE",
969
+ # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
970
+ # `,`
971
+ # "name": "cohort 2"
972
+ # "type": "FIRST_VISIT_DATE"
973
+ # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
974
+ # `]
975
+ # `
976
+ # Corresponds to the JSON property `cohortGroup`
977
+ # @return [Google::Apis::AnalyticsreportingV4::CohortGroup]
978
+ attr_accessor :cohort_group
979
+
980
+ # Dimension or metric filters that restrict the data returned for your
981
+ # request. To use the `filtersExpression`, supply a dimension or metric on
982
+ # which to filter, followed by the filter expression. For example, the
983
+ # following expression selects `ga:browser` dimension which starts with
984
+ # Firefox; `ga:browser=~^Firefox`. For more information on dimensions
985
+ # and metric filters, see
986
+ # [Filters reference](https://developers.google.com/analytics/devguides/
987
+ # reporting/core/v3/reference#filters).
988
+ # Corresponds to the JSON property `filtersExpression`
989
+ # @return [String]
990
+ attr_accessor :filters_expression
991
+
992
+ # The Analytics
993
+ # [view ID](https://support.google.com/analytics/answer/1009618)
994
+ # from which to retrieve data. Every [ReportRequest](#ReportRequest)
995
+ # within a `batchGet` method must contain the same `viewId`.
996
+ # Corresponds to the JSON property `viewId`
997
+ # @return [String]
998
+ attr_accessor :view_id
999
+
1000
+ # The metrics requested.
1001
+ # Requests must specify at least one metric. Requests can have a
1002
+ # total of 10 metrics.
1003
+ # Corresponds to the JSON property `metrics`
1004
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
1005
+ attr_accessor :metrics
1006
+
1007
+ # The dimension filter clauses for filtering Dimension Values. They are
1008
+ # logically combined with the `AND` operator. Note that filtering occurs
1009
+ # before any dimensions are aggregated, so that the returned metrics
1010
+ # represent the total for only the relevant dimensions.
1011
+ # Corresponds to the JSON property `dimensionFilterClauses`
1012
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
1013
+ attr_accessor :dimension_filter_clauses
1014
+
1015
+ # Sort order on output rows. To compare two rows, the elements of the
1016
+ # following are applied in order until a difference is found. All date
1017
+ # ranges in the output get the same row order.
1018
+ # Corresponds to the JSON property `orderBys`
1019
+ # @return [Array<Google::Apis::AnalyticsreportingV4::OrderBy>]
1020
+ attr_accessor :order_bys
1021
+
1022
+ # Segment the data returned for the request. A segment definition helps look
1023
+ # at a subset of the segment request. A request can contain up to four
1024
+ # segments. Every [ReportRequest](#ReportRequest) within a
1025
+ # `batchGet` method must contain the same `segments` definition. Requests
1026
+ # with segments must have the `ga:segment` dimension.
1027
+ # Corresponds to the JSON property `segments`
1028
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Segment>]
1029
+ attr_accessor :segments
1030
+
1031
+ # The desired report
1032
+ # [sample](https://support.google.com/analytics/answer/2637192) size.
1033
+ # If the the `samplingLevel` field is unspecified the `DEFAULT` sampling
1034
+ # level is used. Every [ReportRequest](#ReportRequest) within a
1035
+ # `batchGet` method must contain the same `samplingLevel` definition. See
1036
+ # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
1037
+ # for details.
1038
+ # Corresponds to the JSON property `samplingLevel`
1039
+ # @return [String]
1040
+ attr_accessor :sampling_level
1022
1041
 
1023
- # List of requested dimensions.
1042
+ # The dimensions requested.
1043
+ # Requests can have a total of 7 dimensions.
1024
1044
  # Corresponds to the JSON property `dimensions`
1025
- # @return [Array<String>]
1045
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
1026
1046
  attr_accessor :dimensions
1027
1047
 
1028
- def initialize(**args)
1029
- update!(**args)
1030
- end
1031
-
1032
- # Update properties of this object
1033
- def update!(**args)
1034
- @metrics = args[:metrics] if args.key?(:metrics)
1035
- @dimensions = args[:dimensions] if args.key?(:dimensions)
1036
- end
1037
- end
1038
-
1039
- # A list of segment filters in the `OR` group are combined with the logical OR
1040
- # operator.
1041
- class OrFiltersForSegment
1042
- include Google::Apis::Core::Hashable
1043
-
1044
- # List of segment filters to be combined with a `OR` operator.
1045
- # Corresponds to the JSON property `segmentFilterClauses`
1046
- # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilterClause>]
1047
- attr_accessor :segment_filter_clauses
1048
-
1049
- def initialize(**args)
1050
- update!(**args)
1051
- end
1048
+ # Date ranges in the request. The request can have a maximum of 2 date
1049
+ # ranges. The response will contain a set of metric values for each
1050
+ # combination of the dimensions for each date range in the request. So, if
1051
+ # there are two date ranges, there will be two set of metric values, one for
1052
+ # the original date range and one for the second date range.
1053
+ # The `reportRequest.dateRanges` field should not be specified for cohorts
1054
+ # or Lifetime value requests.
1055
+ # If a date range is not provided, the default date range is (startDate:
1056
+ # current date - 7 days, endDate: current date - 1 day). Every
1057
+ # [ReportRequest](#ReportRequest) within a `batchGet` method must
1058
+ # contain the same `dateRanges` definition.
1059
+ # Corresponds to the JSON property `dateRanges`
1060
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRange>]
1061
+ attr_accessor :date_ranges
1052
1062
 
1053
- # Update properties of this object
1054
- def update!(**args)
1055
- @segment_filter_clauses = args[:segment_filter_clauses] if args.key?(:segment_filter_clauses)
1056
- end
1057
- end
1063
+ # A continuation token to get the next page of the results. Adding this to
1064
+ # the request will return the rows after the pageToken. The pageToken should
1065
+ # be the value returned in the nextPageToken parameter in the response to
1066
+ # the GetReports request.
1067
+ # Corresponds to the JSON property `pageToken`
1068
+ # @return [String]
1069
+ attr_accessor :page_token
1058
1070
 
1059
- # The headers for the metrics.
1060
- class MetricHeader
1061
- include Google::Apis::Core::Hashable
1071
+ # The pivot definitions. Requests can have a maximum of 2 pivots.
1072
+ # Corresponds to the JSON property `pivots`
1073
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Pivot>]
1074
+ attr_accessor :pivots
1062
1075
 
1063
- # Headers for the pivots in the response.
1064
- # Corresponds to the JSON property `pivotHeaders`
1065
- # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeader>]
1066
- attr_accessor :pivot_headers
1076
+ # If set to false, the response does not include rows if all the retrieved
1077
+ # metrics are equal to zero. The default is false which will exclude these
1078
+ # rows.
1079
+ # Corresponds to the JSON property `includeEmptyRows`
1080
+ # @return [Boolean]
1081
+ attr_accessor :include_empty_rows
1082
+ alias_method :include_empty_rows?, :include_empty_rows
1067
1083
 
1068
- # Headers for the metrics in the response.
1069
- # Corresponds to the JSON property `metricHeaderEntries`
1070
- # @return [Array<Google::Apis::AnalyticsreportingV4::MetricHeaderEntry>]
1071
- attr_accessor :metric_header_entries
1084
+ # The metric filter clauses. They are logically combined with the `AND`
1085
+ # operator. Metric filters look at only the first date range and not the
1086
+ # comparing date range. Note that filtering on metrics occurs after the
1087
+ # metrics are aggregated.
1088
+ # Corresponds to the JSON property `metricFilterClauses`
1089
+ # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilterClause>]
1090
+ attr_accessor :metric_filter_clauses
1072
1091
 
1073
1092
  def initialize(**args)
1074
1093
  update!(**args)
@@ -1076,27 +1095,66 @@ module Google
1076
1095
 
1077
1096
  # Update properties of this object
1078
1097
  def update!(**args)
1079
- @pivot_headers = args[:pivot_headers] if args.key?(:pivot_headers)
1080
- @metric_header_entries = args[:metric_header_entries] if args.key?(:metric_header_entries)
1098
+ @page_size = args[:page_size] if args.key?(:page_size)
1099
+ @hide_totals = args[:hide_totals] if args.key?(:hide_totals)
1100
+ @hide_value_ranges = args[:hide_value_ranges] if args.key?(:hide_value_ranges)
1101
+ @cohort_group = args[:cohort_group] if args.key?(:cohort_group)
1102
+ @filters_expression = args[:filters_expression] if args.key?(:filters_expression)
1103
+ @view_id = args[:view_id] if args.key?(:view_id)
1104
+ @metrics = args[:metrics] if args.key?(:metrics)
1105
+ @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
1106
+ @order_bys = args[:order_bys] if args.key?(:order_bys)
1107
+ @segments = args[:segments] if args.key?(:segments)
1108
+ @sampling_level = args[:sampling_level] if args.key?(:sampling_level)
1109
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
1110
+ @date_ranges = args[:date_ranges] if args.key?(:date_ranges)
1111
+ @page_token = args[:page_token] if args.key?(:page_token)
1112
+ @pivots = args[:pivots] if args.key?(:pivots)
1113
+ @include_empty_rows = args[:include_empty_rows] if args.key?(:include_empty_rows)
1114
+ @metric_filter_clauses = args[:metric_filter_clauses] if args.key?(:metric_filter_clauses)
1081
1115
  end
1082
1116
  end
1083
1117
 
1084
- # A group of dimension filters. Set the operator value to specify how
1085
- # the filters are logically combined.
1086
- class DimensionFilterClause
1118
+ # [Dimensions](https://support.google.com/analytics/answer/1033861)
1119
+ # are attributes of your data. For example, the dimension `ga:city`
1120
+ # indicates the city, for example, "Paris" or "New York", from which
1121
+ # a session originates.
1122
+ class Dimension
1087
1123
  include Google::Apis::Core::Hashable
1088
1124
 
1089
- # The operator for combining multiple dimension filters. If unspecified, it
1090
- # is treated as an `OR`.
1091
- # Corresponds to the JSON property `operator`
1092
- # @return [String]
1093
- attr_accessor :operator
1125
+ # If non-empty, we place dimension values into buckets after string to
1126
+ # int64. Dimension values that are not the string representation of an
1127
+ # integral value will be converted to zero. The bucket values have to be in
1128
+ # increasing order. Each bucket is closed on the lower end, and open on the
1129
+ # upper end. The "first" bucket includes all values less than the first
1130
+ # boundary, the "last" bucket includes all values up to infinity. Dimension
1131
+ # values that fall in a bucket get transformed to a new dimension value. For
1132
+ # example, if one gives a list of "0, 1, 3, 4, 7", then we return the
1133
+ # following buckets:
1134
+ # - bucket #1: values < 0, dimension value "<0"
1135
+ # - bucket #2: values in [0,1), dimension value "0"
1136
+ # - bucket #3: values in [1,3), dimension value "1-2"
1137
+ # - bucket #4: values in [3,4), dimension value "3"
1138
+ # - bucket #5: values in [4,7), dimension value "4-6"
1139
+ # - bucket #6: values >= 7, dimension value "7+"
1140
+ # NOTE: If you are applying histogram mutation on any dimension, and using
1141
+ # that dimension in sort, you will want to use the sort type
1142
+ # `HISTOGRAM_BUCKET` for that purpose. Without that the dimension values
1143
+ # will be sorted according to dictionary
1144
+ # (lexicographic) order. For example the ascending dictionary order is:
1145
+ # "<50", "1001+", "121-1000", "50-120"
1146
+ # And the ascending `HISTOGRAM_BUCKET` order is:
1147
+ # "<50", "50-120", "121-1000", "1001+"
1148
+ # The client has to explicitly request `"orderType": "HISTOGRAM_BUCKET"`
1149
+ # for a histogram-mutated dimension.
1150
+ # Corresponds to the JSON property `histogramBuckets`
1151
+ # @return [Array<Fixnum>]
1152
+ attr_accessor :histogram_buckets
1094
1153
 
1095
- # The repeated set of filters. They are logically combined based on the
1096
- # operator specified.
1097
- # Corresponds to the JSON property `filters`
1098
- # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilter>]
1099
- attr_accessor :filters
1154
+ # Name of the dimension to fetch, for example `ga:browser`.
1155
+ # Corresponds to the JSON property `name`
1156
+ # @return [String]
1157
+ attr_accessor :name
1100
1158
 
1101
1159
  def initialize(**args)
1102
1160
  update!(**args)
@@ -1104,20 +1162,21 @@ module Google
1104
1162
 
1105
1163
  # Update properties of this object
1106
1164
  def update!(**args)
1107
- @operator = args[:operator] if args.key?(:operator)
1108
- @filters = args[:filters] if args.key?(:filters)
1165
+ @histogram_buckets = args[:histogram_buckets] if args.key?(:histogram_buckets)
1166
+ @name = args[:name] if args.key?(:name)
1109
1167
  end
1110
1168
  end
1111
1169
 
1112
- # The main response class which holds the reports from the Reporting API
1113
- # `batchGet` call.
1114
- class GetReportsResponse
1170
+ # A Simple segment conditions consist of one or more dimension/metric
1171
+ # conditions that can be combined.
1172
+ class SimpleSegment
1115
1173
  include Google::Apis::Core::Hashable
1116
1174
 
1117
- # Responses corresponding to each of the request.
1118
- # Corresponds to the JSON property `reports`
1119
- # @return [Array<Google::Apis::AnalyticsreportingV4::Report>]
1120
- attr_accessor :reports
1175
+ # A list of segment filters groups which are combined with logical `AND`
1176
+ # operator.
1177
+ # Corresponds to the JSON property `orFiltersForSegment`
1178
+ # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
1179
+ attr_accessor :or_filters_for_segment
1121
1180
 
1122
1181
  def initialize(**args)
1123
1182
  update!(**args)
@@ -1125,27 +1184,31 @@ module Google
1125
1184
 
1126
1185
  # Update properties of this object
1127
1186
  def update!(**args)
1128
- @reports = args[:reports] if args.key?(:reports)
1187
+ @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
1129
1188
  end
1130
1189
  end
1131
1190
 
1132
- # Sequence conditions consist of one or more steps, where each step is defined
1133
- # by one or more dimension/metric conditions. Multiple steps can be combined
1134
- # with special sequence operators.
1135
- class SequenceSegment
1191
+ # Dynamic segment definition for defining the segment within the request.
1192
+ # A segment can select users, sessions or both.
1193
+ class DynamicSegment
1136
1194
  include Google::Apis::Core::Hashable
1137
1195
 
1138
- # The list of steps in the sequence.
1139
- # Corresponds to the JSON property `segmentSequenceSteps`
1140
- # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentSequenceStep>]
1141
- attr_accessor :segment_sequence_steps
1196
+ # SegmentDefinition defines the segment to be a set of SegmentFilters which
1197
+ # are combined together with a logical `AND` operation.
1198
+ # Corresponds to the JSON property `sessionSegment`
1199
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
1200
+ attr_accessor :session_segment
1142
1201
 
1143
- # If set, first step condition must match the first hit of the visitor (in
1144
- # the date range).
1145
- # Corresponds to the JSON property `firstStepShouldMatchFirstHit`
1146
- # @return [Boolean]
1147
- attr_accessor :first_step_should_match_first_hit
1148
- alias_method :first_step_should_match_first_hit?, :first_step_should_match_first_hit
1202
+ # The name of the dynamic segment.
1203
+ # Corresponds to the JSON property `name`
1204
+ # @return [String]
1205
+ attr_accessor :name
1206
+
1207
+ # SegmentDefinition defines the segment to be a set of SegmentFilters which
1208
+ # are combined together with a logical `AND` operation.
1209
+ # Corresponds to the JSON property `userSegment`
1210
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
1211
+ attr_accessor :user_segment
1149
1212
 
1150
1213
  def initialize(**args)
1151
1214
  update!(**args)
@@ -1153,45 +1216,25 @@ module Google
1153
1216
 
1154
1217
  # Update properties of this object
1155
1218
  def update!(**args)
1156
- @segment_sequence_steps = args[:segment_sequence_steps] if args.key?(:segment_sequence_steps)
1157
- @first_step_should_match_first_hit = args[:first_step_should_match_first_hit] if args.key?(:first_step_should_match_first_hit)
1219
+ @session_segment = args[:session_segment] if args.key?(:session_segment)
1220
+ @name = args[:name] if args.key?(:name)
1221
+ @user_segment = args[:user_segment] if args.key?(:user_segment)
1158
1222
  end
1159
1223
  end
1160
1224
 
1161
- # Metric filter to be used in a segment filter clause.
1162
- class SegmentMetricFilter
1225
+ # Column headers.
1226
+ class ColumnHeader
1163
1227
  include Google::Apis::Core::Hashable
1164
1228
 
1165
- # Scope for a metric defines the level at which that metric is defined. The
1166
- # specified metric scope must be equal to or greater than its primary scope
1167
- # as defined in the data model. The primary scope is defined by if the
1168
- # segment is selecting users or sessions.
1169
- # Corresponds to the JSON property `scope`
1170
- # @return [String]
1171
- attr_accessor :scope
1172
-
1173
- # Max comparison value is only used for `BETWEEN` operator.
1174
- # Corresponds to the JSON property `maxComparisonValue`
1175
- # @return [String]
1176
- attr_accessor :max_comparison_value
1177
-
1178
- # The value to compare against. If the operator is `BETWEEN`, this value is
1179
- # treated as minimum comparison value.
1180
- # Corresponds to the JSON property `comparisonValue`
1181
- # @return [String]
1182
- attr_accessor :comparison_value
1183
-
1184
- # Specifies is the operation to perform to compare the metric. The default
1185
- # is `EQUAL`.
1186
- # Corresponds to the JSON property `operator`
1187
- # @return [String]
1188
- attr_accessor :operator
1229
+ # The dimension names in the response.
1230
+ # Corresponds to the JSON property `dimensions`
1231
+ # @return [Array<String>]
1232
+ attr_accessor :dimensions
1189
1233
 
1190
- # The metric that will be filtered on. A `metricFilter` must contain a
1191
- # metric name.
1192
- # Corresponds to the JSON property `metricName`
1193
- # @return [String]
1194
- attr_accessor :metric_name
1234
+ # The headers for the metrics.
1235
+ # Corresponds to the JSON property `metricHeader`
1236
+ # @return [Google::Apis::AnalyticsreportingV4::MetricHeader]
1237
+ attr_accessor :metric_header
1195
1238
 
1196
1239
  def initialize(**args)
1197
1240
  update!(**args)
@@ -1199,28 +1242,31 @@ module Google
1199
1242
 
1200
1243
  # Update properties of this object
1201
1244
  def update!(**args)
1202
- @scope = args[:scope] if args.key?(:scope)
1203
- @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
1204
- @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
1205
- @operator = args[:operator] if args.key?(:operator)
1206
- @metric_name = args[:metric_name] if args.key?(:metric_name)
1245
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
1246
+ @metric_header = args[:metric_header] if args.key?(:metric_header)
1207
1247
  end
1208
1248
  end
1209
1249
 
1210
- # Used to return a list of metrics for a single DateRange / dimension
1211
- # combination
1212
- class DateRangeValues
1250
+ # Filter Clause to be used in a segment definition, can be wither a metric or
1251
+ # a dimension filter.
1252
+ class SegmentFilterClause
1213
1253
  include Google::Apis::Core::Hashable
1214
1254
 
1215
- # The values of each pivot region.
1216
- # Corresponds to the JSON property `pivotValueRegions`
1217
- # @return [Array<Google::Apis::AnalyticsreportingV4::PivotValueRegion>]
1218
- attr_accessor :pivot_value_regions
1255
+ # Metric filter to be used in a segment filter clause.
1256
+ # Corresponds to the JSON property `metricFilter`
1257
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentMetricFilter]
1258
+ attr_accessor :metric_filter
1219
1259
 
1220
- # Each value corresponds to each Metric in the request.
1221
- # Corresponds to the JSON property `values`
1222
- # @return [Array<String>]
1223
- attr_accessor :values
1260
+ # Matches the complement (`!`) of the filter.
1261
+ # Corresponds to the JSON property `not`
1262
+ # @return [Boolean]
1263
+ attr_accessor :not
1264
+ alias_method :not?, :not
1265
+
1266
+ # Dimension filter specifies the filtering options on a dimension.
1267
+ # Corresponds to the JSON property `dimensionFilter`
1268
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter]
1269
+ attr_accessor :dimension_filter
1224
1270
 
1225
1271
  def initialize(**args)
1226
1272
  update!(**args)
@@ -1228,63 +1274,28 @@ module Google
1228
1274
 
1229
1275
  # Update properties of this object
1230
1276
  def update!(**args)
1231
- @pivot_value_regions = args[:pivot_value_regions] if args.key?(:pivot_value_regions)
1232
- @values = args[:values] if args.key?(:values)
1277
+ @metric_filter = args[:metric_filter] if args.key?(:metric_filter)
1278
+ @not = args[:not] if args.key?(:not)
1279
+ @dimension_filter = args[:dimension_filter] if args.key?(:dimension_filter)
1233
1280
  end
1234
1281
  end
1235
1282
 
1236
- # Defines a cohort group.
1237
- # For example:
1238
- # "cohortGroup": `
1239
- # "cohorts": [`
1240
- # "name": "cohort 1",
1241
- # "type": "FIRST_VISIT_DATE",
1242
- # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
1243
- # `,`
1244
- # "name": "cohort 2"
1245
- # "type": "FIRST_VISIT_DATE"
1246
- # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
1247
- # `]
1248
- # `
1249
- class CohortGroup
1283
+ # Represents a group of metric filters.
1284
+ # Set the operator value to specify how the filters are logically combined.
1285
+ class MetricFilterClause
1250
1286
  include Google::Apis::Core::Hashable
1251
1287
 
1252
- # The definition for the cohort.
1253
- # Corresponds to the JSON property `cohorts`
1254
- # @return [Array<Google::Apis::AnalyticsreportingV4::Cohort>]
1255
- attr_accessor :cohorts
1288
+ # The operator for combining multiple metric filters. If unspecified, it is
1289
+ # treated as an `OR`.
1290
+ # Corresponds to the JSON property `operator`
1291
+ # @return [String]
1292
+ attr_accessor :operator
1256
1293
 
1257
- # Enable Life Time Value (LTV). LTV measures lifetime value for users
1258
- # acquired through different channels.
1259
- # Please see:
1260
- # [Cohort Analysis](https://support.google.com/analytics/answer/6074676) and
1261
- # [Lifetime Value](https://support.google.com/analytics/answer/6182550)
1262
- # If the value of lifetimeValue is false:
1263
- # - The metric values are similar to the values in the web interface cohort
1264
- # report.
1265
- # - The cohort definition date ranges must be aligned to the calendar week
1266
- # and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in
1267
- # the cohort definition should be a Sunday and the `endDate` should be the
1268
- # following Saturday, and for `ga:cohortNthMonth`, the `startDate`
1269
- # should be the 1st of the month and `endDate` should be the last day
1270
- # of the month.
1271
- # When the lifetimeValue is true:
1272
- # - The metric values will correspond to the values in the web interface
1273
- # LifeTime value report.
1274
- # - The Lifetime Value report shows you how user value (Revenue) and
1275
- # engagement (Appviews, Goal Completions, Sessions, and Session Duration)
1276
- # grow during the 90 days after a user is acquired.
1277
- # - The metrics are calculated as a cumulative average per user per the time
1278
- # increment.
1279
- # - The cohort definition date ranges need not be aligned to the calendar
1280
- # week and month boundaries.
1281
- # - The `viewId` must be an
1282
- # [app view ID](https://support.google.com/analytics/answer/2649553#
1283
- # WebVersusAppViews)
1284
- # Corresponds to the JSON property `lifetimeValue`
1285
- # @return [Boolean]
1286
- attr_accessor :lifetime_value
1287
- alias_method :lifetime_value?, :lifetime_value
1294
+ # The repeated set of filters. They are logically combined based on the
1295
+ # operator specified.
1296
+ # Corresponds to the JSON property `filters`
1297
+ # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilter>]
1298
+ attr_accessor :filters
1288
1299
 
1289
1300
  def initialize(**args)
1290
1301
  update!(**args)
@@ -1292,21 +1303,36 @@ module Google
1292
1303
 
1293
1304
  # Update properties of this object
1294
1305
  def update!(**args)
1295
- @cohorts = args[:cohorts] if args.key?(:cohorts)
1296
- @lifetime_value = args[:lifetime_value] if args.key?(:lifetime_value)
1306
+ @operator = args[:operator] if args.key?(:operator)
1307
+ @filters = args[:filters] if args.key?(:filters)
1297
1308
  end
1298
1309
  end
1299
1310
 
1300
- # The batch request containing multiple report request.
1301
- class GetReportsRequest
1311
+ # Defines a cohort. A cohort is a group of users who share a common
1312
+ # characteristic. For example, all users with the same acquisition date
1313
+ # belong to the same cohort.
1314
+ class Cohort
1302
1315
  include Google::Apis::Core::Hashable
1303
1316
 
1304
- # Requests, each request will have a separate response.
1305
- # There can be a maximum of 5 requests. All requests should have the same
1306
- # `dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.
1307
- # Corresponds to the JSON property `reportRequests`
1308
- # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRequest>]
1309
- attr_accessor :report_requests
1317
+ # A unique name for the cohort. If not defined name will be auto-generated
1318
+ # with values cohort_[1234...].
1319
+ # Corresponds to the JSON property `name`
1320
+ # @return [String]
1321
+ attr_accessor :name
1322
+
1323
+ # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
1324
+ # The start and end dates are specified in
1325
+ # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
1326
+ # Corresponds to the JSON property `dateRange`
1327
+ # @return [Google::Apis::AnalyticsreportingV4::DateRange]
1328
+ attr_accessor :date_range
1329
+
1330
+ # Type of the cohort. The only supported type as of now is
1331
+ # `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated
1332
+ # as `FIRST_VISIT_DATE` type cohort.
1333
+ # Corresponds to the JSON property `type`
1334
+ # @return [String]
1335
+ attr_accessor :type
1310
1336
 
1311
1337
  def initialize(**args)
1312
1338
  update!(**args)
@@ -1314,95 +1340,70 @@ module Google
1314
1340
 
1315
1341
  # Update properties of this object
1316
1342
  def update!(**args)
1317
- @report_requests = args[:report_requests] if args.key?(:report_requests)
1343
+ @name = args[:name] if args.key?(:name)
1344
+ @date_range = args[:date_range] if args.key?(:date_range)
1345
+ @type = args[:type] if args.key?(:type)
1318
1346
  end
1319
1347
  end
1320
1348
 
1321
- # The Pivot describes the pivot section in the request.
1322
- # The Pivot helps rearrange the information in the table for certain reports
1323
- # by pivoting your data on a second dimension.
1324
- class Pivot
1349
+ # A row in the report.
1350
+ class ReportRow
1325
1351
  include Google::Apis::Core::Hashable
1326
1352
 
1327
- # Specifies the maximum number of groups to return.
1328
- # The default value is 10, also the maximum value is 1,000.
1329
- # Corresponds to the JSON property `maxGroupCount`
1330
- # @return [Fixnum]
1331
- attr_accessor :max_group_count
1332
-
1333
- # If k metrics were requested, then the response will contain some
1334
- # data-dependent multiple of k columns in the report. E.g., if you pivoted
1335
- # on the dimension `ga:browser` then you'd get k columns for "Firefox", k
1336
- # columns for "IE", k columns for "Chrome", etc. The ordering of the groups
1337
- # of columns is determined by descending order of "total" for the first of
1338
- # the k values. Ties are broken by lexicographic ordering of the first
1339
- # pivot dimension, then lexicographic ordering of the second pivot
1340
- # dimension, and so on. E.g., if the totals for the first value for
1341
- # Firefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns
1342
- # would be Chrome, Firefox, IE.
1343
- # The following let you choose which of the groups of k columns are
1344
- # included in the response.
1345
- # Corresponds to the JSON property `startGroup`
1346
- # @return [Fixnum]
1347
- attr_accessor :start_group
1348
-
1349
- # The pivot metrics. Pivot metrics are part of the
1350
- # restriction on total number of metrics allowed in the request.
1353
+ # List of metrics for each requested DateRange.
1351
1354
  # Corresponds to the JSON property `metrics`
1352
- # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
1355
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
1353
1356
  attr_accessor :metrics
1354
1357
 
1355
- # A list of dimensions to show as pivot columns. A Pivot can have a maximum
1356
- # of 4 dimensions. Pivot dimensions are part of the restriction on the
1357
- # total number of dimensions allowed in the request.
1358
+ # List of requested dimensions.
1358
1359
  # Corresponds to the JSON property `dimensions`
1359
- # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
1360
+ # @return [Array<String>]
1360
1361
  attr_accessor :dimensions
1361
1362
 
1362
- # DimensionFilterClauses are logically combined with an `AND` operator: only
1363
- # data that is included by all these DimensionFilterClauses contributes to
1364
- # the values in this pivot region. Dimension filters can be used to restrict
1365
- # the columns shown in the pivot region. For example if you have
1366
- # `ga:browser` as the requested dimension in the pivot region, and you
1367
- # specify key filters to restrict `ga:browser` to only "IE" or "Firefox",
1368
- # then only those two browsers would show up as columns.
1369
- # Corresponds to the JSON property `dimensionFilterClauses`
1370
- # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
1371
- attr_accessor :dimension_filter_clauses
1372
-
1373
1363
  def initialize(**args)
1374
1364
  update!(**args)
1375
1365
  end
1376
1366
 
1377
1367
  # Update properties of this object
1378
1368
  def update!(**args)
1379
- @max_group_count = args[:max_group_count] if args.key?(:max_group_count)
1380
- @start_group = args[:start_group] if args.key?(:start_group)
1381
1369
  @metrics = args[:metrics] if args.key?(:metrics)
1382
1370
  @dimensions = args[:dimensions] if args.key?(:dimensions)
1383
- @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
1384
1371
  end
1385
1372
  end
1386
1373
 
1387
- # The headers for the each of the metric column corresponding to the metrics
1388
- # requested in the pivots section of the response.
1389
- class PivotHeaderEntry
1374
+ # A list of segment filters in the `OR` group are combined with the logical OR
1375
+ # operator.
1376
+ class OrFiltersForSegment
1390
1377
  include Google::Apis::Core::Hashable
1391
1378
 
1392
- # The name of the dimensions in the pivot response.
1393
- # Corresponds to the JSON property `dimensionNames`
1394
- # @return [Array<String>]
1395
- attr_accessor :dimension_names
1379
+ # List of segment filters to be combined with a `OR` operator.
1380
+ # Corresponds to the JSON property `segmentFilterClauses`
1381
+ # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilterClause>]
1382
+ attr_accessor :segment_filter_clauses
1396
1383
 
1397
- # Header for the metrics.
1398
- # Corresponds to the JSON property `metric`
1399
- # @return [Google::Apis::AnalyticsreportingV4::MetricHeaderEntry]
1400
- attr_accessor :metric
1384
+ def initialize(**args)
1385
+ update!(**args)
1386
+ end
1401
1387
 
1402
- # The values for the dimensions in the pivot.
1403
- # Corresponds to the JSON property `dimensionValues`
1404
- # @return [Array<String>]
1405
- attr_accessor :dimension_values
1388
+ # Update properties of this object
1389
+ def update!(**args)
1390
+ @segment_filter_clauses = args[:segment_filter_clauses] if args.key?(:segment_filter_clauses)
1391
+ end
1392
+ end
1393
+
1394
+ # The headers for the metrics.
1395
+ class MetricHeader
1396
+ include Google::Apis::Core::Hashable
1397
+
1398
+ # Headers for the pivots in the response.
1399
+ # Corresponds to the JSON property `pivotHeaders`
1400
+ # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeader>]
1401
+ attr_accessor :pivot_headers
1402
+
1403
+ # Headers for the metrics in the response.
1404
+ # Corresponds to the JSON property `metricHeaderEntries`
1405
+ # @return [Array<Google::Apis::AnalyticsreportingV4::MetricHeaderEntry>]
1406
+ attr_accessor :metric_header_entries
1406
1407
 
1407
1408
  def initialize(**args)
1408
1409
  update!(**args)
@@ -1410,9 +1411,8 @@ module Google
1410
1411
 
1411
1412
  # Update properties of this object
1412
1413
  def update!(**args)
1413
- @dimension_names = args[:dimension_names] if args.key?(:dimension_names)
1414
- @metric = args[:metric] if args.key?(:metric)
1415
- @dimension_values = args[:dimension_values] if args.key?(:dimension_values)
1414
+ @pivot_headers = args[:pivot_headers] if args.key?(:pivot_headers)
1415
+ @metric_header_entries = args[:metric_header_entries] if args.key?(:metric_header_entries)
1416
1416
  end
1417
1417
  end
1418
1418
  end