google-api-client 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/api_names.yaml +395 -0
  4. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +254 -254
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +65 -65
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +220 -220
  8. data/generated/google/apis/admin_directory_v1.rb +1 -1
  9. data/generated/google/apis/admin_directory_v1/classes.rb +106 -0
  10. data/generated/google/apis/admin_directory_v1/representations.rb +37 -0
  11. data/generated/google/apis/admin_reports_v1.rb +3 -3
  12. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  13. data/generated/google/apis/adsense_v1_4.rb +1 -1
  14. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  15. data/generated/google/apis/analytics_v3.rb +1 -1
  16. data/generated/google/apis/analytics_v3/service.rb +39 -0
  17. data/generated/google/apis/analyticsreporting_v4/classes.rb +920 -920
  18. data/generated/google/apis/analyticsreporting_v4/representations.rb +197 -197
  19. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  20. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  21. data/generated/google/apis/androidenterprise_v1/classes.rb +8 -13
  22. data/generated/google/apis/androidenterprise_v1/service.rb +3 -3
  23. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  24. data/generated/google/apis/appengine_v1beta5/classes.rb +115 -5
  25. data/generated/google/apis/appengine_v1beta5/representations.rb +37 -0
  26. data/generated/google/apis/appengine_v1beta5/service.rb +12 -9
  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 +32 -37
  30. data/generated/google/apis/bigquery_v2/service.rb +10 -2
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/calendar_v3/classes.rb +205 -0
  33. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  34. data/generated/google/apis/classroom_v1.rb +22 -25
  35. data/generated/google/apis/classroom_v1/classes.rb +998 -907
  36. data/generated/google/apis/classroom_v1/representations.rb +240 -240
  37. data/generated/google/apis/classroom_v1/service.rb +1269 -1061
  38. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  39. data/generated/google/apis/cloudbuild_v1/classes.rb +164 -163
  40. data/generated/google/apis/cloudbuild_v1/representations.rb +31 -31
  41. data/generated/google/apis/cloudbuild_v1/service.rb +114 -114
  42. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  43. data/generated/google/apis/clouddebugger_v2/classes.rb +687 -687
  44. data/generated/google/apis/clouddebugger_v2/representations.rb +147 -147
  45. data/generated/google/apis/clouddebugger_v2/service.rb +132 -132
  46. data/generated/google/apis/cloudkms_v1.rb +1 -1
  47. data/generated/google/apis/cloudkms_v1/classes.rb +231 -248
  48. data/generated/google/apis/cloudkms_v1/representations.rb +74 -74
  49. data/generated/google/apis/cloudkms_v1/service.rb +228 -228
  50. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  51. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  52. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +738 -128
  53. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +245 -23
  54. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1293 -249
  55. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  56. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +982 -372
  57. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +293 -71
  58. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +626 -277
  59. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  60. data/generated/google/apis/cloudtrace_v1/classes.rb +19 -19
  61. data/generated/google/apis/cloudtrace_v1/representations.rb +2 -2
  62. data/generated/google/apis/cloudtrace_v1/service.rb +30 -30
  63. data/generated/google/apis/compute_beta.rb +1 -1
  64. data/generated/google/apis/compute_beta/classes.rb +116 -0
  65. data/generated/google/apis/compute_beta/representations.rb +48 -0
  66. data/generated/google/apis/compute_beta/service.rb +46 -1
  67. data/generated/google/apis/compute_v1.rb +1 -1
  68. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  69. data/generated/google/apis/dataflow_v1b3/classes.rb +3276 -3320
  70. data/generated/google/apis/dataflow_v1b3/representations.rb +779 -781
  71. data/generated/google/apis/dataflow_v1b3/service.rb +225 -225
  72. data/generated/google/apis/dataproc_v1.rb +1 -1
  73. data/generated/google/apis/dataproc_v1/classes.rb +1221 -1207
  74. data/generated/google/apis/dataproc_v1/representations.rb +255 -253
  75. data/generated/google/apis/dataproc_v1/service.rb +100 -100
  76. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  77. data/generated/google/apis/deploymentmanager_v2/classes.rb +5 -5
  78. data/generated/google/apis/dns_v1.rb +1 -1
  79. data/generated/google/apis/dns_v2beta1.rb +1 -1
  80. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  81. data/generated/google/apis/drive_v2.rb +1 -1
  82. data/generated/google/apis/drive_v2/classes.rb +3 -1
  83. data/generated/google/apis/drive_v3.rb +1 -1
  84. data/generated/google/apis/drive_v3/classes.rb +3 -1
  85. data/generated/google/apis/fusiontables_v2.rb +1 -1
  86. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  87. data/generated/google/apis/games_management_v1management.rb +1 -1
  88. data/generated/google/apis/games_v1.rb +1 -1
  89. data/generated/google/apis/genomics_v1.rb +7 -7
  90. data/generated/google/apis/genomics_v1/classes.rb +959 -959
  91. data/generated/google/apis/genomics_v1/representations.rb +238 -238
  92. data/generated/google/apis/genomics_v1/service.rb +996 -996
  93. data/generated/google/apis/iam_v1.rb +1 -1
  94. data/generated/google/apis/iam_v1/classes.rb +440 -440
  95. data/generated/google/apis/iam_v1/representations.rb +94 -94
  96. data/generated/google/apis/iam_v1/service.rb +170 -173
  97. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  98. data/generated/google/apis/identitytoolkit_v3/classes.rb +55 -0
  99. data/generated/google/apis/identitytoolkit_v3/representations.rb +8 -0
  100. data/generated/google/apis/kgsearch_v1/service.rb +4 -4
  101. data/generated/google/apis/language_v1beta1.rb +1 -1
  102. data/generated/google/apis/language_v1beta1/classes.rb +427 -427
  103. data/generated/google/apis/language_v1beta1/representations.rb +113 -113
  104. data/generated/google/apis/language_v1beta1/service.rb +25 -24
  105. data/generated/google/apis/licensing_v1.rb +2 -2
  106. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  107. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  108. data/generated/google/apis/licensing_v1/service.rb +1 -1
  109. data/generated/google/apis/logging_v2beta1.rb +1 -1
  110. data/generated/google/apis/logging_v2beta1/classes.rb +864 -864
  111. data/generated/google/apis/logging_v2beta1/representations.rb +168 -168
  112. data/generated/google/apis/logging_v2beta1/service.rb +261 -261
  113. data/generated/google/apis/manufacturers_v1.rb +1 -1
  114. data/generated/google/apis/manufacturers_v1/classes.rb +452 -105
  115. data/generated/google/apis/manufacturers_v1/representations.rb +138 -18
  116. data/generated/google/apis/manufacturers_v1/service.rb +11 -11
  117. data/generated/google/apis/mirror_v1.rb +1 -1
  118. data/generated/google/apis/monitoring_v3.rb +7 -7
  119. data/generated/google/apis/monitoring_v3/classes.rb +668 -670
  120. data/generated/google/apis/monitoring_v3/representations.rb +140 -140
  121. data/generated/google/apis/monitoring_v3/service.rb +208 -208
  122. data/generated/google/apis/partners_v2.rb +1 -1
  123. data/generated/google/apis/partners_v2/classes.rb +505 -505
  124. data/generated/google/apis/partners_v2/representations.rb +118 -118
  125. data/generated/google/apis/partners_v2/service.rb +275 -275
  126. data/generated/google/apis/people_v1.rb +1 -1
  127. data/generated/google/apis/people_v1/classes.rb +1037 -1031
  128. data/generated/google/apis/people_v1/representations.rb +247 -246
  129. data/generated/google/apis/people_v1/service.rb +20 -20
  130. data/generated/google/apis/plus_domains_v1.rb +1 -1
  131. data/generated/google/apis/plus_v1.rb +1 -1
  132. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  133. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +392 -392
  134. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +93 -93
  135. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +381 -381
  136. data/generated/google/apis/pubsub_v1.rb +4 -4
  137. data/generated/google/apis/pubsub_v1/classes.rb +131 -132
  138. data/generated/google/apis/pubsub_v1/representations.rb +35 -35
  139. data/generated/google/apis/pubsub_v1/service.rb +399 -408
  140. data/generated/google/apis/reseller_v1.rb +1 -1
  141. data/generated/google/apis/reseller_v1/classes.rb +9 -0
  142. data/generated/google/apis/reseller_v1/representations.rb +1 -0
  143. data/generated/google/apis/script_v1.rb +9 -9
  144. data/generated/google/apis/script_v1/classes.rb +110 -110
  145. data/generated/google/apis/script_v1/representations.rb +26 -26
  146. data/generated/google/apis/sheets_v4.rb +4 -4
  147. data/generated/google/apis/sheets_v4/classes.rb +4329 -4329
  148. data/generated/google/apis/sheets_v4/representations.rb +856 -856
  149. data/generated/google/apis/sheets_v4/service.rb +106 -106
  150. data/generated/google/apis/slides_v1.rb +4 -4
  151. data/generated/google/apis/slides_v1/classes.rb +2923 -2841
  152. data/generated/google/apis/slides_v1/representations.rb +722 -691
  153. data/generated/google/apis/slides_v1/service.rb +58 -15
  154. data/generated/google/apis/speech_v1beta1.rb +1 -1
  155. data/generated/google/apis/speech_v1beta1/classes.rb +191 -191
  156. data/generated/google/apis/speech_v1beta1/representations.rb +57 -57
  157. data/generated/google/apis/speech_v1beta1/service.rb +70 -70
  158. data/generated/google/apis/storage_v1.rb +1 -1
  159. data/generated/google/apis/storage_v1/classes.rb +151 -0
  160. data/generated/google/apis/storage_v1/representations.rb +45 -0
  161. data/generated/google/apis/storage_v1/service.rb +248 -0
  162. data/generated/google/apis/vision_v1.rb +1 -1
  163. data/generated/google/apis/vision_v1/classes.rb +1227 -1221
  164. data/generated/google/apis/vision_v1/representations.rb +217 -215
  165. data/generated/google/apis/webmasters_v3.rb +1 -1
  166. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  167. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  168. data/generated/google/apis/youtube_partner_v1/classes.rb +78 -0
  169. data/generated/google/apis/youtube_partner_v1/representations.rb +34 -0
  170. data/generated/google/apis/youtube_partner_v1/service.rb +40 -0
  171. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  172. data/generated/google/apis/youtubereporting_v1/classes.rb +65 -65
  173. data/generated/google/apis/youtubereporting_v1/representations.rb +18 -18
  174. data/generated/google/apis/youtubereporting_v1/service.rb +111 -111
  175. data/lib/google/apis/version.rb +1 -1
  176. metadata +2 -2
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://developers.google.com/admin-sdk/directory/
27
27
  module AdminDirectoryV1
28
28
  VERSION = 'DirectoryV1'
29
- REVISION = '20161214'
29
+ REVISION = '20170216'
30
30
 
31
31
  # View and manage customer related information
32
32
  AUTH_ADMIN_DIRECTORY_CUSTOMER = 'https://www.googleapis.com/auth/admin.directory.customer'
@@ -2463,6 +2463,11 @@ module Google
2463
2463
  # @return [Object]
2464
2464
  attr_accessor :phones
2465
2465
 
2466
+ #
2467
+ # Corresponds to the JSON property `posixAccounts`
2468
+ # @return [Object]
2469
+ attr_accessor :posix_accounts
2470
+
2466
2471
  # username of User
2467
2472
  # Corresponds to the JSON property `primaryEmail`
2468
2473
  # @return [String]
@@ -2473,6 +2478,11 @@ module Google
2473
2478
  # @return [Object]
2474
2479
  attr_accessor :relations
2475
2480
 
2481
+ #
2482
+ # Corresponds to the JSON property `sshPublicKeys`
2483
+ # @return [Object]
2484
+ attr_accessor :ssh_public_keys
2485
+
2476
2486
  # Indicates if user is suspended
2477
2487
  # Corresponds to the JSON property `suspended`
2478
2488
  # @return [Boolean]
@@ -2535,8 +2545,10 @@ module Google
2535
2545
  @organizations = args[:organizations] if args.key?(:organizations)
2536
2546
  @password = args[:password] if args.key?(:password)
2537
2547
  @phones = args[:phones] if args.key?(:phones)
2548
+ @posix_accounts = args[:posix_accounts] if args.key?(:posix_accounts)
2538
2549
  @primary_email = args[:primary_email] if args.key?(:primary_email)
2539
2550
  @relations = args[:relations] if args.key?(:relations)
2551
+ @ssh_public_keys = args[:ssh_public_keys] if args.key?(:ssh_public_keys)
2540
2552
  @suspended = args[:suspended] if args.key?(:suspended)
2541
2553
  @suspension_reason = args[:suspension_reason] if args.key?(:suspension_reason)
2542
2554
  @thumbnail_photo_etag = args[:thumbnail_photo_etag] if args.key?(:thumbnail_photo_etag)
@@ -3033,6 +3045,69 @@ module Google
3033
3045
  end
3034
3046
  end
3035
3047
 
3048
+ # JSON template for a POSIX account entry. Description of the field family: go/
3049
+ # fbs-posix.
3050
+ class UserPosixAccount
3051
+ include Google::Apis::Core::Hashable
3052
+
3053
+ # The GECOS (user information) entry for this account.
3054
+ # Corresponds to the JSON property `gecos`
3055
+ # @return [String]
3056
+ attr_accessor :gecos
3057
+
3058
+ # The default group ID.
3059
+ # Corresponds to the JSON property `gid`
3060
+ # @return [Fixnum]
3061
+ attr_accessor :gid
3062
+
3063
+ # The path to the home directory for this account.
3064
+ # Corresponds to the JSON property `homeDirectory`
3065
+ # @return [String]
3066
+ attr_accessor :home_directory
3067
+
3068
+ # If this is user's primary account within the SystemId.
3069
+ # Corresponds to the JSON property `primary`
3070
+ # @return [Boolean]
3071
+ attr_accessor :primary
3072
+ alias_method :primary?, :primary
3073
+
3074
+ # The path to the login shell for this account.
3075
+ # Corresponds to the JSON property `shell`
3076
+ # @return [String]
3077
+ attr_accessor :shell
3078
+
3079
+ # System identifier for which account Username or Uid apply to.
3080
+ # Corresponds to the JSON property `systemId`
3081
+ # @return [String]
3082
+ attr_accessor :system_id
3083
+
3084
+ # The user ID.
3085
+ # Corresponds to the JSON property `uid`
3086
+ # @return [Fixnum]
3087
+ attr_accessor :uid
3088
+
3089
+ # The username of the account.
3090
+ # Corresponds to the JSON property `username`
3091
+ # @return [String]
3092
+ attr_accessor :username
3093
+
3094
+ def initialize(**args)
3095
+ update!(**args)
3096
+ end
3097
+
3098
+ # Update properties of this object
3099
+ def update!(**args)
3100
+ @gecos = args[:gecos] if args.key?(:gecos)
3101
+ @gid = args[:gid] if args.key?(:gid)
3102
+ @home_directory = args[:home_directory] if args.key?(:home_directory)
3103
+ @primary = args[:primary] if args.key?(:primary)
3104
+ @shell = args[:shell] if args.key?(:shell)
3105
+ @system_id = args[:system_id] if args.key?(:system_id)
3106
+ @uid = args[:uid] if args.key?(:uid)
3107
+ @username = args[:username] if args.key?(:username)
3108
+ end
3109
+ end
3110
+
3036
3111
  # JSON template for a relation entry.
3037
3112
  class UserRelation
3038
3113
  include Google::Apis::Core::Hashable
@@ -3065,6 +3140,37 @@ module Google
3065
3140
  end
3066
3141
  end
3067
3142
 
3143
+ # JSON template for a POSIX account entry.
3144
+ class UserSshPublicKey
3145
+ include Google::Apis::Core::Hashable
3146
+
3147
+ # An expiration time in microseconds since epoch.
3148
+ # Corresponds to the JSON property `expirationTimeUsec`
3149
+ # @return [String]
3150
+ attr_accessor :expiration_time_usec
3151
+
3152
+ # A SHA-256 fingerprint of the SSH public key. (Read-only)
3153
+ # Corresponds to the JSON property `fingerprint`
3154
+ # @return [String]
3155
+ attr_accessor :fingerprint
3156
+
3157
+ # An SSH public key.
3158
+ # Corresponds to the JSON property `key`
3159
+ # @return [String]
3160
+ attr_accessor :key
3161
+
3162
+ def initialize(**args)
3163
+ update!(**args)
3164
+ end
3165
+
3166
+ # Update properties of this object
3167
+ def update!(**args)
3168
+ @expiration_time_usec = args[:expiration_time_usec] if args.key?(:expiration_time_usec)
3169
+ @fingerprint = args[:fingerprint] if args.key?(:fingerprint)
3170
+ @key = args[:key] if args.key?(:key)
3171
+ end
3172
+ end
3173
+
3068
3174
  # JSON request template to undelete a user in Directory API.
3069
3175
  class UserUndelete
3070
3176
  include Google::Apis::Core::Hashable
@@ -346,12 +346,24 @@ module Google
346
346
  include Google::Apis::Core::JsonObjectSupport
347
347
  end
348
348
 
349
+ class UserPosixAccount
350
+ class Representation < Google::Apis::Core::JsonRepresentation; end
351
+
352
+ include Google::Apis::Core::JsonObjectSupport
353
+ end
354
+
349
355
  class UserRelation
350
356
  class Representation < Google::Apis::Core::JsonRepresentation; end
351
357
 
352
358
  include Google::Apis::Core::JsonObjectSupport
353
359
  end
354
360
 
361
+ class UserSshPublicKey
362
+ class Representation < Google::Apis::Core::JsonRepresentation; end
363
+
364
+ include Google::Apis::Core::JsonObjectSupport
365
+ end
366
+
355
367
  class UserUndelete
356
368
  class Representation < Google::Apis::Core::JsonRepresentation; end
357
369
 
@@ -985,8 +997,10 @@ module Google
985
997
  property :organizations, as: 'organizations'
986
998
  property :password, as: 'password'
987
999
  property :phones, as: 'phones'
1000
+ property :posix_accounts, as: 'posixAccounts'
988
1001
  property :primary_email, as: 'primaryEmail'
989
1002
  property :relations, as: 'relations'
1003
+ property :ssh_public_keys, as: 'sshPublicKeys'
990
1004
  property :suspended, as: 'suspended'
991
1005
  property :suspension_reason, as: 'suspensionReason'
992
1006
  property :thumbnail_photo_etag, as: 'thumbnailPhotoEtag'
@@ -1110,6 +1124,20 @@ module Google
1110
1124
  end
1111
1125
  end
1112
1126
 
1127
+ class UserPosixAccount
1128
+ # @private
1129
+ class Representation < Google::Apis::Core::JsonRepresentation
1130
+ property :gecos, as: 'gecos'
1131
+ property :gid, as: 'gid'
1132
+ property :home_directory, as: 'homeDirectory'
1133
+ property :primary, as: 'primary'
1134
+ property :shell, as: 'shell'
1135
+ property :system_id, as: 'systemId'
1136
+ property :uid, as: 'uid'
1137
+ property :username, as: 'username'
1138
+ end
1139
+ end
1140
+
1113
1141
  class UserRelation
1114
1142
  # @private
1115
1143
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1119,6 +1147,15 @@ module Google
1119
1147
  end
1120
1148
  end
1121
1149
 
1150
+ class UserSshPublicKey
1151
+ # @private
1152
+ class Representation < Google::Apis::Core::JsonRepresentation
1153
+ property :expiration_time_usec, as: 'expirationTimeUsec'
1154
+ property :fingerprint, as: 'fingerprint'
1155
+ property :key, as: 'key'
1156
+ end
1157
+ end
1158
+
1122
1159
  class UserUndelete
1123
1160
  # @private
1124
1161
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -20,13 +20,13 @@ module Google
20
20
  module Apis
21
21
  # Admin Reports API
22
22
  #
23
- # Fetches reports for the administrators of Google Apps customers about the
24
- # usage, collaboration, security, and risk for their users.
23
+ # Fetches reports for the administrators of G Suite customers about the usage,
24
+ # collaboration, security, and risk for their users.
25
25
  #
26
26
  # @see https://developers.google.com/admin-sdk/reports/
27
27
  module AdminReportsV1
28
28
  VERSION = 'ReportsV1'
29
- REVISION = '20160704'
29
+ REVISION = '20170315'
30
30
 
31
31
  # View audit reports for your G Suite domain
32
32
  AUTH_ADMIN_REPORTS_AUDIT_READONLY = 'https://www.googleapis.com/auth/admin.reports.audit.readonly'
@@ -22,8 +22,8 @@ module Google
22
22
  module AdminReportsV1
23
23
  # Admin Reports API
24
24
  #
25
- # Fetches reports for the administrators of Google Apps customers about the
26
- # usage, collaboration, security, and risk for their users.
25
+ # Fetches reports for the administrators of G Suite customers about the usage,
26
+ # collaboration, security, and risk for their users.
27
27
  #
28
28
  # @example
29
29
  # require 'google/apis/admin_reports_v1'
@@ -66,7 +66,7 @@ module Google
66
66
  # @param [String] customer_id
67
67
  # Represents the customer for which the data is to be fetched.
68
68
  # @param [String] end_time
69
- # Return events which occured at or before this time.
69
+ # Return events which occurred at or before this time.
70
70
  # @param [String] event_name
71
71
  # Name of the event being queried.
72
72
  # @param [String] filters
@@ -77,7 +77,7 @@ module Google
77
77
  # @param [String] page_token
78
78
  # Token to specify next page.
79
79
  # @param [String] start_time
80
- # Return events which occured at or after this time.
80
+ # Return events which occurred at or after this time.
81
81
  # @param [String] fields
82
82
  # Selector specifying which fields to include in a partial response.
83
83
  # @param [String] quota_user
@@ -133,7 +133,7 @@ module Google
133
133
  # @param [String] customer_id
134
134
  # Represents the customer for which the data is to be fetched.
135
135
  # @param [String] end_time
136
- # Return events which occured at or before this time.
136
+ # Return events which occurred at or before this time.
137
137
  # @param [String] event_name
138
138
  # Name of the event being queried.
139
139
  # @param [String] filters
@@ -144,7 +144,7 @@ module Google
144
144
  # @param [String] page_token
145
145
  # Token to specify next page.
146
146
  # @param [String] start_time
147
- # Return events which occured at or after this time.
147
+ # Return events which occurred at or after this time.
148
148
  # @param [String] fields
149
149
  # Selector specifying which fields to include in a partial response.
150
150
  # @param [String] quota_user
@@ -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 = '20170304'
28
+ REVISION = '20170325'
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 = '20170304'
29
+ REVISION = '20170325'
30
30
 
31
31
  # View and manage your AdSense host data and associated accounts
32
32
  AUTH_ADSENSEHOST = 'https://www.googleapis.com/auth/adsensehost'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/analytics/
26
26
  module AnalyticsV3
27
27
  VERSION = 'V3'
28
- REVISION = '20170302'
28
+ REVISION = '20170321'
29
29
 
30
30
  # View and manage your Google Analytics data
31
31
  AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics'
@@ -2450,6 +2450,45 @@ module Google
2450
2450
  execute_or_queue_command(command, &block)
2451
2451
  end
2452
2452
 
2453
+ # Delete a remarketing audience.
2454
+ # @param [String] account_id
2455
+ # Account ID to which the remarketing audience belongs.
2456
+ # @param [String] web_property_id
2457
+ # Web property ID to which the remarketing audience belongs.
2458
+ # @param [String] remarketing_audience_id
2459
+ # The ID of the remarketing audience to delete.
2460
+ # @param [String] fields
2461
+ # Selector specifying which fields to include in a partial response.
2462
+ # @param [String] quota_user
2463
+ # Available to use for quota purposes for server-side applications. Can be any
2464
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2465
+ # Overrides userIp if both are provided.
2466
+ # @param [String] user_ip
2467
+ # IP address of the site where the request originates. Use this if you want to
2468
+ # enforce per-user limits.
2469
+ # @param [Google::Apis::RequestOptions] options
2470
+ # Request-specific options
2471
+ #
2472
+ # @yield [result, err] Result & error if block supplied
2473
+ # @yieldparam result [NilClass] No result returned for this method
2474
+ # @yieldparam err [StandardError] error object if request failed
2475
+ #
2476
+ # @return [void]
2477
+ #
2478
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2479
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2480
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2481
+ def delete_management_remarketing_audience(account_id, web_property_id, remarketing_audience_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2482
+ command = make_simple_command(:delete, 'management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}', options)
2483
+ command.params['accountId'] = account_id unless account_id.nil?
2484
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2485
+ command.params['remarketingAudienceId'] = remarketing_audience_id unless remarketing_audience_id.nil?
2486
+ command.query['fields'] = fields unless fields.nil?
2487
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2488
+ command.query['userIp'] = user_ip unless user_ip.nil?
2489
+ execute_or_queue_command(command, &block)
2490
+ end
2491
+
2453
2492
  # Gets a remarketing audience to which the user has access.
2454
2493
  # @param [String] account_id
2455
2494
  # The account ID of the remarketing audience to retrieve.
@@ -22,80 +22,26 @@ module Google
22
22
  module Apis
23
23
  module AnalyticsreportingV4
24
24
 
25
- # The headers for the each of the metric column corresponding to the metrics
26
- # requested in the pivots section of the response.
27
- class PivotHeaderEntry
25
+ # Filter Clause to be used in a segment definition, can be wither a metric or
26
+ # a dimension filter.
27
+ class SegmentFilterClause
28
28
  include Google::Apis::Core::Hashable
29
29
 
30
- # The name of the dimensions in the pivot response.
31
- # Corresponds to the JSON property `dimensionNames`
32
- # @return [Array<String>]
33
- attr_accessor :dimension_names
34
-
35
- # Header for the metrics.
36
- # Corresponds to the JSON property `metric`
37
- # @return [Google::Apis::AnalyticsreportingV4::MetricHeaderEntry]
38
- attr_accessor :metric
39
-
40
- # The values for the dimensions in the pivot.
41
- # Corresponds to the JSON property `dimensionValues`
42
- # @return [Array<String>]
43
- attr_accessor :dimension_values
44
-
45
- def initialize(**args)
46
- update!(**args)
47
- end
48
-
49
- # Update properties of this object
50
- def update!(**args)
51
- @dimension_names = args[:dimension_names] if args.key?(:dimension_names)
52
- @metric = args[:metric] if args.key?(:metric)
53
- @dimension_values = args[:dimension_values] if args.key?(:dimension_values)
54
- end
55
- end
56
-
57
- # SegmentFilter defines the segment to be either a simple or a sequence
58
- # segment. A simple segment condition contains dimension and metric conditions
59
- # to select the sessions or users. A sequence segment condition can be used to
60
- # select users or sessions based on sequential conditions.
61
- class SegmentFilter
62
- include Google::Apis::Core::Hashable
30
+ # Metric filter to be used in a segment filter clause.
31
+ # Corresponds to the JSON property `metricFilter`
32
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentMetricFilter]
33
+ attr_accessor :metric_filter
63
34
 
64
- # If true, match the complement of simple or sequence segment.
65
- # For example, to match all visits not from "New York", we can define the
66
- # segment as follows:
67
- # "sessionSegment": `
68
- # "segmentFilters": [`
69
- # "simpleSegment" :`
70
- # "orFiltersForSegment": [`
71
- # "segmentFilterClauses":[`
72
- # "dimensionFilter": `
73
- # "dimensionName": "ga:city",
74
- # "expressions": ["New York"]
75
- # `
76
- # `]
77
- # `]
78
- # `,
79
- # "not": "True"
80
- # `]
81
- # `,
35
+ # Matches the complement (`!`) of the filter.
82
36
  # Corresponds to the JSON property `not`
83
37
  # @return [Boolean]
84
38
  attr_accessor :not
85
39
  alias_method :not?, :not
86
40
 
87
- # A Simple segment conditions consist of one or more dimension/metric
88
- # conditions that can be combined.
89
- # Corresponds to the JSON property `simpleSegment`
90
- # @return [Google::Apis::AnalyticsreportingV4::SimpleSegment]
91
- attr_accessor :simple_segment
92
-
93
- # Sequence conditions consist of one or more steps, where each step is defined
94
- # by one or more dimension/metric conditions. Multiple steps can be combined
95
- # with special sequence operators.
96
- # Corresponds to the JSON property `sequenceSegment`
97
- # @return [Google::Apis::AnalyticsreportingV4::SequenceSegment]
98
- attr_accessor :sequence_segment
41
+ # Dimension filter specifies the filtering options on a dimension.
42
+ # Corresponds to the JSON property `dimensionFilter`
43
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter]
44
+ attr_accessor :dimension_filter
99
45
 
100
46
  def initialize(**args)
101
47
  update!(**args)
@@ -103,22 +49,28 @@ module Google
103
49
 
104
50
  # Update properties of this object
105
51
  def update!(**args)
52
+ @metric_filter = args[:metric_filter] if args.key?(:metric_filter)
106
53
  @not = args[:not] if args.key?(:not)
107
- @simple_segment = args[:simple_segment] if args.key?(:simple_segment)
108
- @sequence_segment = args[:sequence_segment] if args.key?(:sequence_segment)
54
+ @dimension_filter = args[:dimension_filter] if args.key?(:dimension_filter)
109
55
  end
110
56
  end
111
57
 
112
- # SegmentDefinition defines the segment to be a set of SegmentFilters which
113
- # are combined together with a logical `AND` operation.
114
- class SegmentDefinition
58
+ # Represents a group of metric filters.
59
+ # Set the operator value to specify how the filters are logically combined.
60
+ class MetricFilterClause
115
61
  include Google::Apis::Core::Hashable
116
62
 
117
- # A segment is defined by a set of segment filters which are combined
118
- # together with a logical `AND` operation.
119
- # Corresponds to the JSON property `segmentFilters`
120
- # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilter>]
121
- attr_accessor :segment_filters
63
+ # The operator for combining multiple metric filters. If unspecified, it is
64
+ # treated as an `OR`.
65
+ # Corresponds to the JSON property `operator`
66
+ # @return [String]
67
+ attr_accessor :operator
68
+
69
+ # The repeated set of filters. They are logically combined based on the
70
+ # operator specified.
71
+ # Corresponds to the JSON property `filters`
72
+ # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilter>]
73
+ attr_accessor :filters
122
74
 
123
75
  def initialize(**args)
124
76
  update!(**args)
@@ -126,20 +78,33 @@ module Google
126
78
 
127
79
  # Update properties of this object
128
80
  def update!(**args)
129
- @segment_filters = args[:segment_filters] if args.key?(:segment_filters)
81
+ @operator = args[:operator] if args.key?(:operator)
82
+ @filters = args[:filters] if args.key?(:filters)
130
83
  end
131
84
  end
132
85
 
133
- # Header for the metrics.
134
- class MetricHeaderEntry
86
+ # Defines a cohort. A cohort is a group of users who share a common
87
+ # characteristic. For example, all users with the same acquisition date
88
+ # belong to the same cohort.
89
+ class Cohort
135
90
  include Google::Apis::Core::Hashable
136
91
 
137
- # The name of the header.
92
+ # A unique name for the cohort. If not defined name will be auto-generated
93
+ # with values cohort_[1234...].
138
94
  # Corresponds to the JSON property `name`
139
95
  # @return [String]
140
96
  attr_accessor :name
141
97
 
142
- # The type of the metric, for example `INTEGER`.
98
+ # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
99
+ # The start and end dates are specified in
100
+ # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
101
+ # Corresponds to the JSON property `dateRange`
102
+ # @return [Google::Apis::AnalyticsreportingV4::DateRange]
103
+ attr_accessor :date_range
104
+
105
+ # Type of the cohort. The only supported type as of now is
106
+ # `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated
107
+ # as `FIRST_VISIT_DATE` type cohort.
143
108
  # Corresponds to the JSON property `type`
144
109
  # @return [String]
145
110
  attr_accessor :type
@@ -151,84 +116,24 @@ module Google
151
116
  # Update properties of this object
152
117
  def update!(**args)
153
118
  @name = args[:name] if args.key?(:name)
119
+ @date_range = args[:date_range] if args.key?(:date_range)
154
120
  @type = args[:type] if args.key?(:type)
155
121
  end
156
122
  end
157
123
 
158
- # The data part of the report.
159
- class ReportData
124
+ # A row in the report.
125
+ class ReportRow
160
126
  include Google::Apis::Core::Hashable
161
127
 
162
- # If the results are
163
- # [sampled](https://support.google.com/analytics/answer/2637192),
164
- # this returns the total number of
165
- # samples present, one entry per date range. If the results are not sampled
166
- # this field will not be defined. See
167
- # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
168
- # for details.
169
- # Corresponds to the JSON property `samplingSpaceSizes`
170
- # @return [Array<String>]
171
- attr_accessor :sampling_space_sizes
172
-
173
- # Minimum and maximum values seen over all matching rows. These are both
174
- # empty when `hideValueRanges` in the request is false, or when
175
- # rowCount is zero.
176
- # Corresponds to the JSON property `minimums`
177
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
178
- attr_accessor :minimums
179
-
180
- # For each requested date range, for the set of all rows that match
181
- # the query, every requested value format gets a total. The total
182
- # for a value format is computed by first totaling the metrics
183
- # mentioned in the value format and then evaluating the value
184
- # format as a scalar expression. E.g., The "totals" for
185
- # `3 / (ga:sessions + 2)` we compute
186
- # `3 / ((sum of all relevant ga:sessions) + 2)`.
187
- # Totals are computed before pagination.
188
- # Corresponds to the JSON property `totals`
128
+ # List of metrics for each requested DateRange.
129
+ # Corresponds to the JSON property `metrics`
189
130
  # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
190
- attr_accessor :totals
131
+ attr_accessor :metrics
191
132
 
192
- # If the results are
193
- # [sampled](https://support.google.com/analytics/answer/2637192),
194
- # this returns the total number of samples read, one entry per date range.
195
- # If the results are not sampled this field will not be defined. See
196
- # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
197
- # for details.
198
- # Corresponds to the JSON property `samplesReadCounts`
133
+ # List of requested dimensions.
134
+ # Corresponds to the JSON property `dimensions`
199
135
  # @return [Array<String>]
200
- attr_accessor :samples_read_counts
201
-
202
- # Total number of matching rows for this query.
203
- # Corresponds to the JSON property `rowCount`
204
- # @return [Fixnum]
205
- attr_accessor :row_count
206
-
207
- # There's one ReportRow for every unique combination of dimensions.
208
- # Corresponds to the JSON property `rows`
209
- # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRow>]
210
- attr_accessor :rows
211
-
212
- # Indicates if response to this request is golden or not. Data is
213
- # golden when the exact same request will not produce any new results if
214
- # asked at a later point in time.
215
- # Corresponds to the JSON property `isDataGolden`
216
- # @return [Boolean]
217
- attr_accessor :is_data_golden
218
- alias_method :is_data_golden?, :is_data_golden
219
-
220
- # The last time the data in the report was refreshed. All the hits received
221
- # before this timestamp are included in the calculation of the report.
222
- # Corresponds to the JSON property `dataLastRefreshed`
223
- # @return [String]
224
- attr_accessor :data_last_refreshed
225
-
226
- # Minimum and maximum values seen over all matching rows. These are both
227
- # empty when `hideValueRanges` in the request is false, or when
228
- # rowCount is zero.
229
- # Corresponds to the JSON property `maximums`
230
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
231
- attr_accessor :maximums
136
+ attr_accessor :dimensions
232
137
 
233
138
  def initialize(**args)
234
139
  update!(**args)
@@ -236,52 +141,20 @@ module Google
236
141
 
237
142
  # Update properties of this object
238
143
  def update!(**args)
239
- @sampling_space_sizes = args[:sampling_space_sizes] if args.key?(:sampling_space_sizes)
240
- @minimums = args[:minimums] if args.key?(:minimums)
241
- @totals = args[:totals] if args.key?(:totals)
242
- @samples_read_counts = args[:samples_read_counts] if args.key?(:samples_read_counts)
243
- @row_count = args[:row_count] if args.key?(:row_count)
244
- @rows = args[:rows] if args.key?(:rows)
245
- @is_data_golden = args[:is_data_golden] if args.key?(:is_data_golden)
246
- @data_last_refreshed = args[:data_last_refreshed] if args.key?(:data_last_refreshed)
247
- @maximums = args[:maximums] if args.key?(:maximums)
144
+ @metrics = args[:metrics] if args.key?(:metrics)
145
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
248
146
  end
249
147
  end
250
148
 
251
- # Dimension filter specifies the filtering options on a dimension.
252
- class DimensionFilter
149
+ # A list of segment filters in the `OR` group are combined with the logical OR
150
+ # operator.
151
+ class OrFiltersForSegment
253
152
  include Google::Apis::Core::Hashable
254
153
 
255
- # The dimension to filter on. A DimensionFilter must contain a dimension.
256
- # Corresponds to the JSON property `dimensionName`
257
- # @return [String]
258
- attr_accessor :dimension_name
259
-
260
- # How to match the dimension to the expression. The default is REGEXP.
261
- # Corresponds to the JSON property `operator`
262
- # @return [String]
263
- attr_accessor :operator
264
-
265
- # Logical `NOT` operator. If this boolean is set to true, then the matching
266
- # dimension values will be excluded in the report. The default is false.
267
- # Corresponds to the JSON property `not`
268
- # @return [Boolean]
269
- attr_accessor :not
270
- alias_method :not?, :not
271
-
272
- # Strings or regular expression to match against. Only the first value of
273
- # the list is used for comparison unless the operator is `IN_LIST`.
274
- # If `IN_LIST` operator, then the entire list is used to filter the
275
- # dimensions as explained in the description of the `IN_LIST` operator.
276
- # Corresponds to the JSON property `expressions`
277
- # @return [Array<String>]
278
- attr_accessor :expressions
279
-
280
- # Should the match be case sensitive? Default is false.
281
- # Corresponds to the JSON property `caseSensitive`
282
- # @return [Boolean]
283
- attr_accessor :case_sensitive
284
- alias_method :case_sensitive?, :case_sensitive
154
+ # List of segment filters to be combined with a `OR` operator.
155
+ # Corresponds to the JSON property `segmentFilterClauses`
156
+ # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilterClause>]
157
+ attr_accessor :segment_filter_clauses
285
158
 
286
159
  def initialize(**args)
287
160
  update!(**args)
@@ -289,30 +162,23 @@ module Google
289
162
 
290
163
  # Update properties of this object
291
164
  def update!(**args)
292
- @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
293
- @operator = args[:operator] if args.key?(:operator)
294
- @not = args[:not] if args.key?(:not)
295
- @expressions = args[:expressions] if args.key?(:expressions)
296
- @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
165
+ @segment_filter_clauses = args[:segment_filter_clauses] if args.key?(:segment_filter_clauses)
297
166
  end
298
167
  end
299
168
 
300
- # The segment definition, if the report needs to be segmented.
301
- # A Segment is a subset of the Analytics data. For example, of the entire
302
- # set of users, one Segment might be users from a particular country or city.
303
- class Segment
169
+ # The headers for the metrics.
170
+ class MetricHeader
304
171
  include Google::Apis::Core::Hashable
305
172
 
306
- # Dynamic segment definition for defining the segment within the request.
307
- # A segment can select users, sessions or both.
308
- # Corresponds to the JSON property `dynamicSegment`
309
- # @return [Google::Apis::AnalyticsreportingV4::DynamicSegment]
310
- attr_accessor :dynamic_segment
173
+ # Headers for the pivots in the response.
174
+ # Corresponds to the JSON property `pivotHeaders`
175
+ # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeader>]
176
+ attr_accessor :pivot_headers
311
177
 
312
- # The segment ID of a built-in or custom segment, for example `gaid::-3`.
313
- # Corresponds to the JSON property `segmentId`
314
- # @return [String]
315
- attr_accessor :segment_id
178
+ # Headers for the metrics in the response.
179
+ # Corresponds to the JSON property `metricHeaderEntries`
180
+ # @return [Array<Google::Apis::AnalyticsreportingV4::MetricHeaderEntry>]
181
+ attr_accessor :metric_header_entries
316
182
 
317
183
  def initialize(**args)
318
184
  update!(**args)
@@ -320,32 +186,27 @@ module Google
320
186
 
321
187
  # Update properties of this object
322
188
  def update!(**args)
323
- @dynamic_segment = args[:dynamic_segment] if args.key?(:dynamic_segment)
324
- @segment_id = args[:segment_id] if args.key?(:segment_id)
189
+ @pivot_headers = args[:pivot_headers] if args.key?(:pivot_headers)
190
+ @metric_header_entries = args[:metric_header_entries] if args.key?(:metric_header_entries)
325
191
  end
326
192
  end
327
193
 
328
- # Specifies the sorting options.
329
- class OrderBy
194
+ # A group of dimension filters. Set the operator value to specify how
195
+ # the filters are logically combined.
196
+ class DimensionFilterClause
330
197
  include Google::Apis::Core::Hashable
331
198
 
332
- # The field which to sort by. The default sort order is ascending. Example:
333
- # `ga:browser`.
334
- # Note, that you can only specify one field for sort here. For example,
335
- # `ga:browser, ga:city` is not valid.
336
- # Corresponds to the JSON property `fieldName`
337
- # @return [String]
338
- attr_accessor :field_name
339
-
340
- # The order type. The default orderType is `VALUE`.
341
- # Corresponds to the JSON property `orderType`
199
+ # The operator for combining multiple dimension filters. If unspecified, it
200
+ # is treated as an `OR`.
201
+ # Corresponds to the JSON property `operator`
342
202
  # @return [String]
343
- attr_accessor :order_type
203
+ attr_accessor :operator
344
204
 
345
- # The sorting order for the field.
346
- # Corresponds to the JSON property `sortOrder`
347
- # @return [String]
348
- attr_accessor :sort_order
205
+ # The repeated set of filters. They are logically combined based on the
206
+ # operator specified.
207
+ # Corresponds to the JSON property `filters`
208
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilter>]
209
+ attr_accessor :filters
349
210
 
350
211
  def initialize(**args)
351
212
  update!(**args)
@@ -353,46 +214,20 @@ module Google
353
214
 
354
215
  # Update properties of this object
355
216
  def update!(**args)
356
- @field_name = args[:field_name] if args.key?(:field_name)
357
- @order_type = args[:order_type] if args.key?(:order_type)
358
- @sort_order = args[:sort_order] if args.key?(:sort_order)
217
+ @operator = args[:operator] if args.key?(:operator)
218
+ @filters = args[:filters] if args.key?(:filters)
359
219
  end
360
220
  end
361
221
 
362
- # Dimension filter specifies the filtering options on a dimension.
363
- class SegmentDimensionFilter
222
+ # The main response class which holds the reports from the Reporting API
223
+ # `batchGet` call.
224
+ class GetReportsResponse
364
225
  include Google::Apis::Core::Hashable
365
226
 
366
- # Should the match be case sensitive, ignored for `IN_LIST` operator.
367
- # Corresponds to the JSON property `caseSensitive`
368
- # @return [Boolean]
369
- attr_accessor :case_sensitive
370
- alias_method :case_sensitive?, :case_sensitive
371
-
372
- # Minimum comparison values for `BETWEEN` match type.
373
- # Corresponds to the JSON property `minComparisonValue`
374
- # @return [String]
375
- attr_accessor :min_comparison_value
376
-
377
- # Maximum comparison values for `BETWEEN` match type.
378
- # Corresponds to the JSON property `maxComparisonValue`
379
- # @return [String]
380
- attr_accessor :max_comparison_value
381
-
382
- # Name of the dimension for which the filter is being applied.
383
- # Corresponds to the JSON property `dimensionName`
384
- # @return [String]
385
- attr_accessor :dimension_name
386
-
387
- # The operator to use to match the dimension with the expressions.
388
- # Corresponds to the JSON property `operator`
389
- # @return [String]
390
- attr_accessor :operator
391
-
392
- # The list of expressions, only the first element is used for all operators
393
- # Corresponds to the JSON property `expressions`
394
- # @return [Array<String>]
395
- attr_accessor :expressions
227
+ # Responses corresponding to each of the request.
228
+ # Corresponds to the JSON property `reports`
229
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Report>]
230
+ attr_accessor :reports
396
231
 
397
232
  def initialize(**args)
398
233
  update!(**args)
@@ -400,30 +235,27 @@ module Google
400
235
 
401
236
  # Update properties of this object
402
237
  def update!(**args)
403
- @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
404
- @min_comparison_value = args[:min_comparison_value] if args.key?(:min_comparison_value)
405
- @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
406
- @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
407
- @operator = args[:operator] if args.key?(:operator)
408
- @expressions = args[:expressions] if args.key?(:expressions)
238
+ @reports = args[:reports] if args.key?(:reports)
409
239
  end
410
240
  end
411
241
 
412
- # A segment sequence definition.
413
- class SegmentSequenceStep
242
+ # Sequence conditions consist of one or more steps, where each step is defined
243
+ # by one or more dimension/metric conditions. Multiple steps can be combined
244
+ # with special sequence operators.
245
+ class SequenceSegment
414
246
  include Google::Apis::Core::Hashable
415
247
 
416
- # A sequence is specified with a list of Or grouped filters which are
417
- # combined with `AND` operator.
418
- # Corresponds to the JSON property `orFiltersForSegment`
419
- # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
420
- attr_accessor :or_filters_for_segment
248
+ # If set, first step condition must match the first hit of the visitor (in
249
+ # the date range).
250
+ # Corresponds to the JSON property `firstStepShouldMatchFirstHit`
251
+ # @return [Boolean]
252
+ attr_accessor :first_step_should_match_first_hit
253
+ alias_method :first_step_should_match_first_hit?, :first_step_should_match_first_hit
421
254
 
422
- # Specifies if the step immediately precedes or can be any time before the
423
- # next step.
424
- # Corresponds to the JSON property `matchType`
425
- # @return [String]
426
- attr_accessor :match_type
255
+ # The list of steps in the sequence.
256
+ # Corresponds to the JSON property `segmentSequenceSteps`
257
+ # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentSequenceStep>]
258
+ attr_accessor :segment_sequence_steps
427
259
 
428
260
  def initialize(**args)
429
261
  update!(**args)
@@ -431,43 +263,45 @@ module Google
431
263
 
432
264
  # Update properties of this object
433
265
  def update!(**args)
434
- @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
435
- @match_type = args[:match_type] if args.key?(:match_type)
266
+ @first_step_should_match_first_hit = args[:first_step_should_match_first_hit] if args.key?(:first_step_should_match_first_hit)
267
+ @segment_sequence_steps = args[:segment_sequence_steps] if args.key?(:segment_sequence_steps)
436
268
  end
437
269
  end
438
270
 
439
- # [Metrics](https://support.google.com/analytics/answer/1033861)
440
- # are the quantitative measurements. For example, the metric `ga:users`
441
- # indicates the total number of users for the requested time period.
442
- class Metric
271
+ # Metric filter to be used in a segment filter clause.
272
+ class SegmentMetricFilter
443
273
  include Google::Apis::Core::Hashable
444
274
 
445
- # A metric expression in the request. An expression is constructed from one
446
- # or more metrics and numbers. Accepted operators include: Plus (+), Minus
447
- # (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,
448
- # Positive cardinal numbers (0-9), can include decimals and is limited to
449
- # 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the
450
- # metric expression is just a single metric name like `ga:users`.
451
- # Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics
452
- # will result in unexpected results.
453
- # Corresponds to the JSON property `expression`
275
+ # The metric that will be filtered on. A `metricFilter` must contain a
276
+ # metric name.
277
+ # Corresponds to the JSON property `metricName`
454
278
  # @return [String]
455
- attr_accessor :expression
279
+ attr_accessor :metric_name
456
280
 
457
- # Specifies how the metric expression should be formatted, for example
458
- # `INTEGER`.
459
- # Corresponds to the JSON property `formattingType`
281
+ # Scope for a metric defines the level at which that metric is defined. The
282
+ # specified metric scope must be equal to or greater than its primary scope
283
+ # as defined in the data model. The primary scope is defined by if the
284
+ # segment is selecting users or sessions.
285
+ # Corresponds to the JSON property `scope`
460
286
  # @return [String]
461
- attr_accessor :formatting_type
287
+ attr_accessor :scope
462
288
 
463
- # An alias for the metric expression is an alternate name for the
464
- # expression. The alias can be used for filtering and sorting. This field
465
- # is optional and is useful if the expression is not a single metric but
466
- # a complex expression which cannot be used in filtering and sorting.
467
- # The alias is also used in the response column header.
468
- # Corresponds to the JSON property `alias`
289
+ # Max comparison value is only used for `BETWEEN` operator.
290
+ # Corresponds to the JSON property `maxComparisonValue`
469
291
  # @return [String]
470
- attr_accessor :alias
292
+ attr_accessor :max_comparison_value
293
+
294
+ # The value to compare against. If the operator is `BETWEEN`, this value is
295
+ # treated as minimum comparison value.
296
+ # Corresponds to the JSON property `comparisonValue`
297
+ # @return [String]
298
+ attr_accessor :comparison_value
299
+
300
+ # Specifies is the operation to perform to compare the metric. The default
301
+ # is `EQUAL`.
302
+ # Corresponds to the JSON property `operator`
303
+ # @return [String]
304
+ attr_accessor :operator
471
305
 
472
306
  def initialize(**args)
473
307
  update!(**args)
@@ -475,21 +309,29 @@ module Google
475
309
 
476
310
  # Update properties of this object
477
311
  def update!(**args)
478
- @expression = args[:expression] if args.key?(:expression)
479
- @formatting_type = args[:formatting_type] if args.key?(:formatting_type)
480
- @alias = args[:alias] if args.key?(:alias)
312
+ @metric_name = args[:metric_name] if args.key?(:metric_name)
313
+ @scope = args[:scope] if args.key?(:scope)
314
+ @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
315
+ @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
316
+ @operator = args[:operator] if args.key?(:operator)
481
317
  end
482
318
  end
483
319
 
484
- # The metric values in the pivot region.
485
- class PivotValueRegion
320
+ # Used to return a list of metrics for a single DateRange / dimension
321
+ # combination
322
+ class DateRangeValues
486
323
  include Google::Apis::Core::Hashable
487
324
 
488
- # The values of the metrics in each of the pivot regions.
325
+ # Each value corresponds to each Metric in the request.
489
326
  # Corresponds to the JSON property `values`
490
327
  # @return [Array<String>]
491
328
  attr_accessor :values
492
329
 
330
+ # The values of each pivot region.
331
+ # Corresponds to the JSON property `pivotValueRegions`
332
+ # @return [Array<Google::Apis::AnalyticsreportingV4::PivotValueRegion>]
333
+ attr_accessor :pivot_value_regions
334
+
493
335
  def initialize(**args)
494
336
  update!(**args)
495
337
  end
@@ -497,53 +339,62 @@ module Google
497
339
  # Update properties of this object
498
340
  def update!(**args)
499
341
  @values = args[:values] if args.key?(:values)
342
+ @pivot_value_regions = args[:pivot_value_regions] if args.key?(:pivot_value_regions)
500
343
  end
501
344
  end
502
345
 
503
- # The data response corresponding to the request.
504
- class Report
346
+ # Defines a cohort group.
347
+ # For example:
348
+ # "cohortGroup": `
349
+ # "cohorts": [`
350
+ # "name": "cohort 1",
351
+ # "type": "FIRST_VISIT_DATE",
352
+ # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
353
+ # `,`
354
+ # "name": "cohort 2"
355
+ # "type": "FIRST_VISIT_DATE"
356
+ # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
357
+ # `]
358
+ # `
359
+ class CohortGroup
505
360
  include Google::Apis::Core::Hashable
506
361
 
507
- # Column headers.
508
- # Corresponds to the JSON property `columnHeader`
509
- # @return [Google::Apis::AnalyticsreportingV4::ColumnHeader]
510
- attr_accessor :column_header
511
-
512
- # The data part of the report.
513
- # Corresponds to the JSON property `data`
514
- # @return [Google::Apis::AnalyticsreportingV4::ReportData]
515
- attr_accessor :data
516
-
517
- # Page token to retrieve the next page of results in the list.
518
- # Corresponds to the JSON property `nextPageToken`
519
- # @return [String]
520
- attr_accessor :next_page_token
521
-
522
- def initialize(**args)
523
- update!(**args)
524
- end
362
+ # The definition for the cohort.
363
+ # Corresponds to the JSON property `cohorts`
364
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Cohort>]
365
+ attr_accessor :cohorts
525
366
 
526
- # Update properties of this object
527
- def update!(**args)
528
- @column_header = args[:column_header] if args.key?(:column_header)
529
- @data = args[:data] if args.key?(:data)
530
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
531
- end
532
- end
533
-
534
- # The headers for each of the pivot sections defined in the request.
535
- class PivotHeader
536
- include Google::Apis::Core::Hashable
537
-
538
- # A single pivot section header.
539
- # Corresponds to the JSON property `pivotHeaderEntries`
540
- # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeaderEntry>]
541
- attr_accessor :pivot_header_entries
542
-
543
- # The total number of groups for this pivot.
544
- # Corresponds to the JSON property `totalPivotGroupsCount`
545
- # @return [Fixnum]
546
- attr_accessor :total_pivot_groups_count
367
+ # Enable Life Time Value (LTV). LTV measures lifetime value for users
368
+ # acquired through different channels.
369
+ # Please see:
370
+ # [Cohort Analysis](https://support.google.com/analytics/answer/6074676) and
371
+ # [Lifetime Value](https://support.google.com/analytics/answer/6182550)
372
+ # If the value of lifetimeValue is false:
373
+ # - The metric values are similar to the values in the web interface cohort
374
+ # report.
375
+ # - The cohort definition date ranges must be aligned to the calendar week
376
+ # and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in
377
+ # the cohort definition should be a Sunday and the `endDate` should be the
378
+ # following Saturday, and for `ga:cohortNthMonth`, the `startDate`
379
+ # should be the 1st of the month and `endDate` should be the last day
380
+ # of the month.
381
+ # When the lifetimeValue is true:
382
+ # - The metric values will correspond to the values in the web interface
383
+ # LifeTime value report.
384
+ # - The Lifetime Value report shows you how user value (Revenue) and
385
+ # engagement (Appviews, Goal Completions, Sessions, and Session Duration)
386
+ # grow during the 90 days after a user is acquired.
387
+ # - The metrics are calculated as a cumulative average per user per the time
388
+ # increment.
389
+ # - The cohort definition date ranges need not be aligned to the calendar
390
+ # week and month boundaries.
391
+ # - The `viewId` must be an
392
+ # [app view ID](https://support.google.com/analytics/answer/2649553#
393
+ # WebVersusAppViews)
394
+ # Corresponds to the JSON property `lifetimeValue`
395
+ # @return [Boolean]
396
+ attr_accessor :lifetime_value
397
+ alias_method :lifetime_value?, :lifetime_value
547
398
 
548
399
  def initialize(**args)
549
400
  update!(**args)
@@ -551,26 +402,21 @@ module Google
551
402
 
552
403
  # Update properties of this object
553
404
  def update!(**args)
554
- @pivot_header_entries = args[:pivot_header_entries] if args.key?(:pivot_header_entries)
555
- @total_pivot_groups_count = args[:total_pivot_groups_count] if args.key?(:total_pivot_groups_count)
405
+ @cohorts = args[:cohorts] if args.key?(:cohorts)
406
+ @lifetime_value = args[:lifetime_value] if args.key?(:lifetime_value)
556
407
  end
557
408
  end
558
409
 
559
- # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
560
- # The start and end dates are specified in
561
- # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
562
- class DateRange
410
+ # The batch request containing multiple report request.
411
+ class GetReportsRequest
563
412
  include Google::Apis::Core::Hashable
564
413
 
565
- # The start date for the query in the format `YYYY-MM-DD`.
566
- # Corresponds to the JSON property `startDate`
567
- # @return [String]
568
- attr_accessor :start_date
569
-
570
- # The end date for the query in the format `YYYY-MM-DD`.
571
- # Corresponds to the JSON property `endDate`
572
- # @return [String]
573
- attr_accessor :end_date
414
+ # Requests, each request will have a separate response.
415
+ # There can be a maximum of 5 requests. All requests should have the same
416
+ # `dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.
417
+ # Corresponds to the JSON property `reportRequests`
418
+ # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRequest>]
419
+ attr_accessor :report_requests
574
420
 
575
421
  def initialize(**args)
576
422
  update!(**args)
@@ -578,169 +424,173 @@ module Google
578
424
 
579
425
  # Update properties of this object
580
426
  def update!(**args)
581
- @start_date = args[:start_date] if args.key?(:start_date)
582
- @end_date = args[:end_date] if args.key?(:end_date)
427
+ @report_requests = args[:report_requests] if args.key?(:report_requests)
583
428
  end
584
429
  end
585
430
 
586
- # The main request class which specifies the Reporting API request.
587
- class ReportRequest
431
+ # The Pivot describes the pivot section in the request.
432
+ # The Pivot helps rearrange the information in the table for certain reports
433
+ # by pivoting your data on a second dimension.
434
+ class Pivot
588
435
  include Google::Apis::Core::Hashable
589
436
 
590
- # The metric filter clauses. They are logically combined with the `AND`
591
- # operator. Metric filters look at only the first date range and not the
592
- # comparing date range. Note that filtering on metrics occurs after the
593
- # metrics are aggregated.
594
- # Corresponds to the JSON property `metricFilterClauses`
595
- # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilterClause>]
596
- attr_accessor :metric_filter_clauses
597
-
598
- # Page size is for paging and specifies the maximum number of returned rows.
599
- # Page size should be >= 0. A query returns the default of 1,000 rows.
600
- # The Analytics Core Reporting API returns a maximum of 10,000 rows per
601
- # request, no matter how many you ask for. It can also return fewer rows
602
- # than requested, if there aren't as many dimension segments as you expect.
603
- # For instance, there are fewer than 300 possible values for `ga:country`,
604
- # so when segmenting only by country, you can't get more than 300 rows,
605
- # even if you set `pageSize` to a higher value.
606
- # Corresponds to the JSON property `pageSize`
437
+ # Specifies the maximum number of groups to return.
438
+ # The default value is 10, also the maximum value is 1,000.
439
+ # Corresponds to the JSON property `maxGroupCount`
607
440
  # @return [Fixnum]
608
- attr_accessor :page_size
609
-
610
- # If set to true, hides the minimum and maximum across all matching rows.
611
- # The default is false and the value ranges are returned.
612
- # Corresponds to the JSON property `hideValueRanges`
613
- # @return [Boolean]
614
- attr_accessor :hide_value_ranges
615
- alias_method :hide_value_ranges?, :hide_value_ranges
616
-
617
- # If set to true, hides the total of all metrics for all the matching rows,
618
- # for every date range. The default false and will return the totals.
619
- # Corresponds to the JSON property `hideTotals`
620
- # @return [Boolean]
621
- attr_accessor :hide_totals
622
- alias_method :hide_totals?, :hide_totals
623
-
624
- # Dimension or metric filters that restrict the data returned for your
625
- # request. To use the `filtersExpression`, supply a dimension or metric on
626
- # which to filter, followed by the filter expression. For example, the
627
- # following expression selects `ga:browser` dimension which starts with
628
- # Firefox; `ga:browser=~^Firefox`. For more information on dimensions
629
- # and metric filters, see
630
- # [Filters reference](https://developers.google.com/analytics/devguides/
631
- # reporting/core/v3/reference#filters).
632
- # Corresponds to the JSON property `filtersExpression`
633
- # @return [String]
634
- attr_accessor :filters_expression
635
-
636
- # Defines a cohort group.
637
- # For example:
638
- # "cohortGroup": `
639
- # "cohorts": [`
640
- # "name": "cohort 1",
641
- # "type": "FIRST_VISIT_DATE",
642
- # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
643
- # `,`
644
- # "name": "cohort 2"
645
- # "type": "FIRST_VISIT_DATE"
646
- # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
647
- # `]
648
- # `
649
- # Corresponds to the JSON property `cohortGroup`
650
- # @return [Google::Apis::AnalyticsreportingV4::CohortGroup]
651
- attr_accessor :cohort_group
441
+ attr_accessor :max_group_count
652
442
 
653
- # The Analytics
654
- # [view ID](https://support.google.com/analytics/answer/1009618)
655
- # from which to retrieve data. Every [ReportRequest](#ReportRequest)
656
- # within a `batchGet` method must contain the same `viewId`.
657
- # Corresponds to the JSON property `viewId`
658
- # @return [String]
659
- attr_accessor :view_id
443
+ # If k metrics were requested, then the response will contain some
444
+ # data-dependent multiple of k columns in the report. E.g., if you pivoted
445
+ # on the dimension `ga:browser` then you'd get k columns for "Firefox", k
446
+ # columns for "IE", k columns for "Chrome", etc. The ordering of the groups
447
+ # of columns is determined by descending order of "total" for the first of
448
+ # the k values. Ties are broken by lexicographic ordering of the first
449
+ # pivot dimension, then lexicographic ordering of the second pivot
450
+ # dimension, and so on. E.g., if the totals for the first value for
451
+ # Firefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns
452
+ # would be Chrome, Firefox, IE.
453
+ # The following let you choose which of the groups of k columns are
454
+ # included in the response.
455
+ # Corresponds to the JSON property `startGroup`
456
+ # @return [Fixnum]
457
+ attr_accessor :start_group
660
458
 
661
- # The metrics requested.
662
- # Requests must specify at least one metric. Requests can have a
663
- # total of 10 metrics.
459
+ # The pivot metrics. Pivot metrics are part of the
460
+ # restriction on total number of metrics allowed in the request.
664
461
  # Corresponds to the JSON property `metrics`
665
462
  # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
666
463
  attr_accessor :metrics
667
464
 
668
- # The dimension filter clauses for filtering Dimension Values. They are
669
- # logically combined with the `AND` operator. Note that filtering occurs
670
- # before any dimensions are aggregated, so that the returned metrics
671
- # represent the total for only the relevant dimensions.
465
+ # A list of dimensions to show as pivot columns. A Pivot can have a maximum
466
+ # of 4 dimensions. Pivot dimensions are part of the restriction on the
467
+ # total number of dimensions allowed in the request.
468
+ # Corresponds to the JSON property `dimensions`
469
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
470
+ attr_accessor :dimensions
471
+
472
+ # DimensionFilterClauses are logically combined with an `AND` operator: only
473
+ # data that is included by all these DimensionFilterClauses contributes to
474
+ # the values in this pivot region. Dimension filters can be used to restrict
475
+ # the columns shown in the pivot region. For example if you have
476
+ # `ga:browser` as the requested dimension in the pivot region, and you
477
+ # specify key filters to restrict `ga:browser` to only "IE" or "Firefox",
478
+ # then only those two browsers would show up as columns.
672
479
  # Corresponds to the JSON property `dimensionFilterClauses`
673
480
  # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
674
481
  attr_accessor :dimension_filter_clauses
675
482
 
676
- # Sort order on output rows. To compare two rows, the elements of the
677
- # following are applied in order until a difference is found. All date
678
- # ranges in the output get the same row order.
679
- # Corresponds to the JSON property `orderBys`
680
- # @return [Array<Google::Apis::AnalyticsreportingV4::OrderBy>]
681
- attr_accessor :order_bys
483
+ def initialize(**args)
484
+ update!(**args)
485
+ end
682
486
 
683
- # Segment the data returned for the request. A segment definition helps look
684
- # at a subset of the segment request. A request can contain up to four
685
- # segments. Every [ReportRequest](#ReportRequest) within a
686
- # `batchGet` method must contain the same `segments` definition. Requests
687
- # with segments must have the `ga:segment` dimension.
688
- # Corresponds to the JSON property `segments`
689
- # @return [Array<Google::Apis::AnalyticsreportingV4::Segment>]
690
- attr_accessor :segments
487
+ # Update properties of this object
488
+ def update!(**args)
489
+ @max_group_count = args[:max_group_count] if args.key?(:max_group_count)
490
+ @start_group = args[:start_group] if args.key?(:start_group)
491
+ @metrics = args[:metrics] if args.key?(:metrics)
492
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
493
+ @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
494
+ end
495
+ end
691
496
 
692
- # The desired report
693
- # [sample](https://support.google.com/analytics/answer/2637192) size.
694
- # If the the `samplingLevel` field is unspecified the `DEFAULT` sampling
695
- # level is used. Every [ReportRequest](#ReportRequest) within a
696
- # `batchGet` method must contain the same `samplingLevel` definition. See
697
- # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
698
- # for details.
699
- # Corresponds to the JSON property `samplingLevel`
700
- # @return [String]
701
- attr_accessor :sampling_level
497
+ # The headers for the each of the metric column corresponding to the metrics
498
+ # requested in the pivots section of the response.
499
+ class PivotHeaderEntry
500
+ include Google::Apis::Core::Hashable
702
501
 
703
- # The dimensions requested.
704
- # Requests can have a total of 7 dimensions.
705
- # Corresponds to the JSON property `dimensions`
706
- # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
707
- attr_accessor :dimensions
502
+ # The name of the dimensions in the pivot response.
503
+ # Corresponds to the JSON property `dimensionNames`
504
+ # @return [Array<String>]
505
+ attr_accessor :dimension_names
506
+
507
+ # Header for the metrics.
508
+ # Corresponds to the JSON property `metric`
509
+ # @return [Google::Apis::AnalyticsreportingV4::MetricHeaderEntry]
510
+ attr_accessor :metric
511
+
512
+ # The values for the dimensions in the pivot.
513
+ # Corresponds to the JSON property `dimensionValues`
514
+ # @return [Array<String>]
515
+ attr_accessor :dimension_values
516
+
517
+ def initialize(**args)
518
+ update!(**args)
519
+ end
520
+
521
+ # Update properties of this object
522
+ def update!(**args)
523
+ @dimension_names = args[:dimension_names] if args.key?(:dimension_names)
524
+ @metric = args[:metric] if args.key?(:metric)
525
+ @dimension_values = args[:dimension_values] if args.key?(:dimension_values)
526
+ end
527
+ end
528
+
529
+ # SegmentFilter defines the segment to be either a simple or a sequence
530
+ # segment. A simple segment condition contains dimension and metric conditions
531
+ # to select the sessions or users. A sequence segment condition can be used to
532
+ # select users or sessions based on sequential conditions.
533
+ class SegmentFilter
534
+ include Google::Apis::Core::Hashable
535
+
536
+ # Sequence conditions consist of one or more steps, where each step is defined
537
+ # by one or more dimension/metric conditions. Multiple steps can be combined
538
+ # with special sequence operators.
539
+ # Corresponds to the JSON property `sequenceSegment`
540
+ # @return [Google::Apis::AnalyticsreportingV4::SequenceSegment]
541
+ attr_accessor :sequence_segment
542
+
543
+ # If true, match the complement of simple or sequence segment.
544
+ # For example, to match all visits not from "New York", we can define the
545
+ # segment as follows:
546
+ # "sessionSegment": `
547
+ # "segmentFilters": [`
548
+ # "simpleSegment" :`
549
+ # "orFiltersForSegment": [`
550
+ # "segmentFilterClauses":[`
551
+ # "dimensionFilter": `
552
+ # "dimensionName": "ga:city",
553
+ # "expressions": ["New York"]
554
+ # `
555
+ # `]
556
+ # `]
557
+ # `,
558
+ # "not": "True"
559
+ # `]
560
+ # `,
561
+ # Corresponds to the JSON property `not`
562
+ # @return [Boolean]
563
+ attr_accessor :not
564
+ alias_method :not?, :not
565
+
566
+ # A Simple segment conditions consist of one or more dimension/metric
567
+ # conditions that can be combined.
568
+ # Corresponds to the JSON property `simpleSegment`
569
+ # @return [Google::Apis::AnalyticsreportingV4::SimpleSegment]
570
+ attr_accessor :simple_segment
708
571
 
709
- # A continuation token to get the next page of the results. Adding this to
710
- # the request will return the rows after the pageToken. The pageToken should
711
- # be the value returned in the nextPageToken parameter in the response to
712
- # the GetReports request.
713
- # Corresponds to the JSON property `pageToken`
714
- # @return [String]
715
- attr_accessor :page_token
572
+ def initialize(**args)
573
+ update!(**args)
574
+ end
716
575
 
717
- # Date ranges in the request. The request can have a maximum of 2 date
718
- # ranges. The response will contain a set of metric values for each
719
- # combination of the dimensions for each date range in the request. So, if
720
- # there are two date ranges, there will be two set of metric values, one for
721
- # the original date range and one for the second date range.
722
- # The `reportRequest.dateRanges` field should not be specified for cohorts
723
- # or Lifetime value requests.
724
- # If a date range is not provided, the default date range is (startDate:
725
- # current date - 7 days, endDate: current date - 1 day). Every
726
- # [ReportRequest](#ReportRequest) within a `batchGet` method must
727
- # contain the same `dateRanges` definition.
728
- # Corresponds to the JSON property `dateRanges`
729
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRange>]
730
- attr_accessor :date_ranges
576
+ # Update properties of this object
577
+ def update!(**args)
578
+ @sequence_segment = args[:sequence_segment] if args.key?(:sequence_segment)
579
+ @not = args[:not] if args.key?(:not)
580
+ @simple_segment = args[:simple_segment] if args.key?(:simple_segment)
581
+ end
582
+ end
731
583
 
732
- # The pivot definitions. Requests can have a maximum of 2 pivots.
733
- # Corresponds to the JSON property `pivots`
734
- # @return [Array<Google::Apis::AnalyticsreportingV4::Pivot>]
735
- attr_accessor :pivots
584
+ # SegmentDefinition defines the segment to be a set of SegmentFilters which
585
+ # are combined together with a logical `AND` operation.
586
+ class SegmentDefinition
587
+ include Google::Apis::Core::Hashable
736
588
 
737
- # If set to false, the response does not include rows if all the retrieved
738
- # metrics are equal to zero. The default is false which will exclude these
739
- # rows.
740
- # Corresponds to the JSON property `includeEmptyRows`
741
- # @return [Boolean]
742
- attr_accessor :include_empty_rows
743
- alias_method :include_empty_rows?, :include_empty_rows
589
+ # A segment is defined by a set of segment filters which are combined
590
+ # together with a logical `AND` operation.
591
+ # Corresponds to the JSON property `segmentFilters`
592
+ # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilter>]
593
+ attr_accessor :segment_filters
744
594
 
745
595
  def initialize(**args)
746
596
  update!(**args)
@@ -748,56 +598,23 @@ module Google
748
598
 
749
599
  # Update properties of this object
750
600
  def update!(**args)
751
- @metric_filter_clauses = args[:metric_filter_clauses] if args.key?(:metric_filter_clauses)
752
- @page_size = args[:page_size] if args.key?(:page_size)
753
- @hide_value_ranges = args[:hide_value_ranges] if args.key?(:hide_value_ranges)
754
- @hide_totals = args[:hide_totals] if args.key?(:hide_totals)
755
- @filters_expression = args[:filters_expression] if args.key?(:filters_expression)
756
- @cohort_group = args[:cohort_group] if args.key?(:cohort_group)
757
- @view_id = args[:view_id] if args.key?(:view_id)
758
- @metrics = args[:metrics] if args.key?(:metrics)
759
- @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
760
- @order_bys = args[:order_bys] if args.key?(:order_bys)
761
- @segments = args[:segments] if args.key?(:segments)
762
- @sampling_level = args[:sampling_level] if args.key?(:sampling_level)
763
- @dimensions = args[:dimensions] if args.key?(:dimensions)
764
- @page_token = args[:page_token] if args.key?(:page_token)
765
- @date_ranges = args[:date_ranges] if args.key?(:date_ranges)
766
- @pivots = args[:pivots] if args.key?(:pivots)
767
- @include_empty_rows = args[:include_empty_rows] if args.key?(:include_empty_rows)
601
+ @segment_filters = args[:segment_filters] if args.key?(:segment_filters)
768
602
  end
769
603
  end
770
604
 
771
- # MetricFilter specifies the filter on a metric.
772
- class MetricFilter
605
+ # Header for the metrics.
606
+ class MetricHeaderEntry
773
607
  include Google::Apis::Core::Hashable
774
608
 
775
- # The metric that will be filtered on. A metricFilter must contain a metric
776
- # name. A metric name can be an alias earlier defined as a metric or it can
777
- # also be a metric expression.
778
- # Corresponds to the JSON property `metricName`
779
- # @return [String]
780
- attr_accessor :metric_name
781
-
782
- # The value to compare against.
783
- # Corresponds to the JSON property `comparisonValue`
609
+ # The type of the metric, for example `INTEGER`.
610
+ # Corresponds to the JSON property `type`
784
611
  # @return [String]
785
- attr_accessor :comparison_value
612
+ attr_accessor :type
786
613
 
787
- # Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the
788
- # comparisonValue, the default is `EQUAL`. If the operator is
789
- # `IS_MISSING`, checks if the metric is missing and would ignore the
790
- # comparisonValue.
791
- # Corresponds to the JSON property `operator`
614
+ # The name of the header.
615
+ # Corresponds to the JSON property `name`
792
616
  # @return [String]
793
- attr_accessor :operator
794
-
795
- # Logical `NOT` operator. If this boolean is set to true, then the matching
796
- # metric values will be excluded in the report. The default is false.
797
- # Corresponds to the JSON property `not`
798
- # @return [Boolean]
799
- attr_accessor :not
800
- alias_method :not?, :not
617
+ attr_accessor :name
801
618
 
802
619
  def initialize(**args)
803
620
  update!(**args)
@@ -805,53 +622,85 @@ module Google
805
622
 
806
623
  # Update properties of this object
807
624
  def update!(**args)
808
- @metric_name = args[:metric_name] if args.key?(:metric_name)
809
- @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
810
- @operator = args[:operator] if args.key?(:operator)
811
- @not = args[:not] if args.key?(:not)
625
+ @type = args[:type] if args.key?(:type)
626
+ @name = args[:name] if args.key?(:name)
812
627
  end
813
628
  end
814
629
 
815
- # [Dimensions](https://support.google.com/analytics/answer/1033861)
816
- # are attributes of your data. For example, the dimension `ga:city`
817
- # indicates the city, for example, "Paris" or "New York", from which
818
- # a session originates.
819
- class Dimension
630
+ # The data part of the report.
631
+ class ReportData
820
632
  include Google::Apis::Core::Hashable
821
633
 
822
- # If non-empty, we place dimension values into buckets after string to
823
- # int64. Dimension values that are not the string representation of an
824
- # integral value will be converted to zero. The bucket values have to be in
825
- # increasing order. Each bucket is closed on the lower end, and open on the
826
- # upper end. The "first" bucket includes all values less than the first
827
- # boundary, the "last" bucket includes all values up to infinity. Dimension
828
- # values that fall in a bucket get transformed to a new dimension value. For
829
- # example, if one gives a list of "0, 1, 3, 4, 7", then we return the
830
- # following buckets:
831
- # - bucket #1: values < 0, dimension value "<0"
832
- # - bucket #2: values in [0,1), dimension value "0"
833
- # - bucket #3: values in [1,3), dimension value "1-2"
834
- # - bucket #4: values in [3,4), dimension value "3"
835
- # - bucket #5: values in [4,7), dimension value "4-6"
836
- # - bucket #6: values >= 7, dimension value "7+"
837
- # NOTE: If you are applying histogram mutation on any dimension, and using
838
- # that dimension in sort, you will want to use the sort type
839
- # `HISTOGRAM_BUCKET` for that purpose. Without that the dimension values
840
- # will be sorted according to dictionary
841
- # (lexicographic) order. For example the ascending dictionary order is:
842
- # "<50", "1001+", "121-1000", "50-120"
843
- # And the ascending `HISTOGRAM_BUCKET` order is:
844
- # "<50", "50-120", "121-1000", "1001+"
845
- # The client has to explicitly request `"orderType": "HISTOGRAM_BUCKET"`
846
- # for a histogram-mutated dimension.
847
- # Corresponds to the JSON property `histogramBuckets`
634
+ # Minimum and maximum values seen over all matching rows. These are both
635
+ # empty when `hideValueRanges` in the request is false, or when
636
+ # rowCount is zero.
637
+ # Corresponds to the JSON property `minimums`
638
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
639
+ attr_accessor :minimums
640
+
641
+ # If the results are
642
+ # [sampled](https://support.google.com/analytics/answer/2637192),
643
+ # this returns the total number of
644
+ # samples present, one entry per date range. If the results are not sampled
645
+ # this field will not be defined. See
646
+ # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
647
+ # for details.
648
+ # Corresponds to the JSON property `samplingSpaceSizes`
848
649
  # @return [Array<String>]
849
- attr_accessor :histogram_buckets
650
+ attr_accessor :sampling_space_sizes
850
651
 
851
- # Name of the dimension to fetch, for example `ga:browser`.
852
- # Corresponds to the JSON property `name`
652
+ # For each requested date range, for the set of all rows that match
653
+ # the query, every requested value format gets a total. The total
654
+ # for a value format is computed by first totaling the metrics
655
+ # mentioned in the value format and then evaluating the value
656
+ # format as a scalar expression. E.g., The "totals" for
657
+ # `3 / (ga:sessions + 2)` we compute
658
+ # `3 / ((sum of all relevant ga:sessions) + 2)`.
659
+ # Totals are computed before pagination.
660
+ # Corresponds to the JSON property `totals`
661
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
662
+ attr_accessor :totals
663
+
664
+ # If the results are
665
+ # [sampled](https://support.google.com/analytics/answer/2637192),
666
+ # this returns the total number of samples read, one entry per date range.
667
+ # If the results are not sampled this field will not be defined. See
668
+ # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
669
+ # for details.
670
+ # Corresponds to the JSON property `samplesReadCounts`
671
+ # @return [Array<String>]
672
+ attr_accessor :samples_read_counts
673
+
674
+ # Indicates if response to this request is golden or not. Data is
675
+ # golden when the exact same request will not produce any new results if
676
+ # asked at a later point in time.
677
+ # Corresponds to the JSON property `isDataGolden`
678
+ # @return [Boolean]
679
+ attr_accessor :is_data_golden
680
+ alias_method :is_data_golden?, :is_data_golden
681
+
682
+ # There's one ReportRow for every unique combination of dimensions.
683
+ # Corresponds to the JSON property `rows`
684
+ # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRow>]
685
+ attr_accessor :rows
686
+
687
+ # Total number of matching rows for this query.
688
+ # Corresponds to the JSON property `rowCount`
689
+ # @return [Fixnum]
690
+ attr_accessor :row_count
691
+
692
+ # The last time the data in the report was refreshed. All the hits received
693
+ # before this timestamp are included in the calculation of the report.
694
+ # Corresponds to the JSON property `dataLastRefreshed`
853
695
  # @return [String]
854
- attr_accessor :name
696
+ attr_accessor :data_last_refreshed
697
+
698
+ # Minimum and maximum values seen over all matching rows. These are both
699
+ # empty when `hideValueRanges` in the request is false, or when
700
+ # rowCount is zero.
701
+ # Corresponds to the JSON property `maximums`
702
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
703
+ attr_accessor :maximums
855
704
 
856
705
  def initialize(**args)
857
706
  update!(**args)
@@ -859,32 +708,52 @@ module Google
859
708
 
860
709
  # Update properties of this object
861
710
  def update!(**args)
862
- @histogram_buckets = args[:histogram_buckets] if args.key?(:histogram_buckets)
863
- @name = args[:name] if args.key?(:name)
711
+ @minimums = args[:minimums] if args.key?(:minimums)
712
+ @sampling_space_sizes = args[:sampling_space_sizes] if args.key?(:sampling_space_sizes)
713
+ @totals = args[:totals] if args.key?(:totals)
714
+ @samples_read_counts = args[:samples_read_counts] if args.key?(:samples_read_counts)
715
+ @is_data_golden = args[:is_data_golden] if args.key?(:is_data_golden)
716
+ @rows = args[:rows] if args.key?(:rows)
717
+ @row_count = args[:row_count] if args.key?(:row_count)
718
+ @data_last_refreshed = args[:data_last_refreshed] if args.key?(:data_last_refreshed)
719
+ @maximums = args[:maximums] if args.key?(:maximums)
864
720
  end
865
721
  end
866
722
 
867
- # Dynamic segment definition for defining the segment within the request.
868
- # A segment can select users, sessions or both.
869
- class DynamicSegment
723
+ # Dimension filter specifies the filtering options on a dimension.
724
+ class DimensionFilter
870
725
  include Google::Apis::Core::Hashable
871
726
 
872
- # SegmentDefinition defines the segment to be a set of SegmentFilters which
873
- # are combined together with a logical `AND` operation.
874
- # Corresponds to the JSON property `sessionSegment`
875
- # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
876
- attr_accessor :session_segment
727
+ # Should the match be case sensitive? Default is false.
728
+ # Corresponds to the JSON property `caseSensitive`
729
+ # @return [Boolean]
730
+ attr_accessor :case_sensitive
731
+ alias_method :case_sensitive?, :case_sensitive
877
732
 
878
- # The name of the dynamic segment.
879
- # Corresponds to the JSON property `name`
733
+ # The dimension to filter on. A DimensionFilter must contain a dimension.
734
+ # Corresponds to the JSON property `dimensionName`
880
735
  # @return [String]
881
- attr_accessor :name
736
+ attr_accessor :dimension_name
737
+
738
+ # How to match the dimension to the expression. The default is REGEXP.
739
+ # Corresponds to the JSON property `operator`
740
+ # @return [String]
741
+ attr_accessor :operator
742
+
743
+ # Logical `NOT` operator. If this boolean is set to true, then the matching
744
+ # dimension values will be excluded in the report. The default is false.
745
+ # Corresponds to the JSON property `not`
746
+ # @return [Boolean]
747
+ attr_accessor :not
748
+ alias_method :not?, :not
882
749
 
883
- # SegmentDefinition defines the segment to be a set of SegmentFilters which
884
- # are combined together with a logical `AND` operation.
885
- # Corresponds to the JSON property `userSegment`
886
- # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
887
- attr_accessor :user_segment
750
+ # Strings or regular expression to match against. Only the first value of
751
+ # the list is used for comparison unless the operator is `IN_LIST`.
752
+ # If `IN_LIST` operator, then the entire list is used to filter the
753
+ # dimensions as explained in the description of the `IN_LIST` operator.
754
+ # Corresponds to the JSON property `expressions`
755
+ # @return [Array<String>]
756
+ attr_accessor :expressions
888
757
 
889
758
  def initialize(**args)
890
759
  update!(**args)
@@ -892,22 +761,48 @@ module Google
892
761
 
893
762
  # Update properties of this object
894
763
  def update!(**args)
895
- @session_segment = args[:session_segment] if args.key?(:session_segment)
896
- @name = args[:name] if args.key?(:name)
897
- @user_segment = args[:user_segment] if args.key?(:user_segment)
764
+ @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
765
+ @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
766
+ @operator = args[:operator] if args.key?(:operator)
767
+ @not = args[:not] if args.key?(:not)
768
+ @expressions = args[:expressions] if args.key?(:expressions)
898
769
  end
899
770
  end
900
771
 
901
- # A Simple segment conditions consist of one or more dimension/metric
902
- # conditions that can be combined.
903
- class SimpleSegment
772
+ # Dimension filter specifies the filtering options on a dimension.
773
+ class SegmentDimensionFilter
904
774
  include Google::Apis::Core::Hashable
905
775
 
906
- # A list of segment filters groups which are combined with logical `AND`
907
- # operator.
908
- # Corresponds to the JSON property `orFiltersForSegment`
909
- # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
910
- attr_accessor :or_filters_for_segment
776
+ # Minimum comparison values for `BETWEEN` match type.
777
+ # Corresponds to the JSON property `minComparisonValue`
778
+ # @return [String]
779
+ attr_accessor :min_comparison_value
780
+
781
+ # Maximum comparison values for `BETWEEN` match type.
782
+ # Corresponds to the JSON property `maxComparisonValue`
783
+ # @return [String]
784
+ attr_accessor :max_comparison_value
785
+
786
+ # Name of the dimension for which the filter is being applied.
787
+ # Corresponds to the JSON property `dimensionName`
788
+ # @return [String]
789
+ attr_accessor :dimension_name
790
+
791
+ # The operator to use to match the dimension with the expressions.
792
+ # Corresponds to the JSON property `operator`
793
+ # @return [String]
794
+ attr_accessor :operator
795
+
796
+ # The list of expressions, only the first element is used for all operators
797
+ # Corresponds to the JSON property `expressions`
798
+ # @return [Array<String>]
799
+ attr_accessor :expressions
800
+
801
+ # Should the match be case sensitive, ignored for `IN_LIST` operator.
802
+ # Corresponds to the JSON property `caseSensitive`
803
+ # @return [Boolean]
804
+ attr_accessor :case_sensitive
805
+ alias_method :case_sensitive?, :case_sensitive
911
806
 
912
807
  def initialize(**args)
913
808
  update!(**args)
@@ -915,23 +810,36 @@ module Google
915
810
 
916
811
  # Update properties of this object
917
812
  def update!(**args)
918
- @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
813
+ @min_comparison_value = args[:min_comparison_value] if args.key?(:min_comparison_value)
814
+ @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
815
+ @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
816
+ @operator = args[:operator] if args.key?(:operator)
817
+ @expressions = args[:expressions] if args.key?(:expressions)
818
+ @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
919
819
  end
920
820
  end
921
821
 
922
- # Column headers.
923
- class ColumnHeader
822
+ # Specifies the sorting options.
823
+ class OrderBy
924
824
  include Google::Apis::Core::Hashable
925
825
 
926
- # The headers for the metrics.
927
- # Corresponds to the JSON property `metricHeader`
928
- # @return [Google::Apis::AnalyticsreportingV4::MetricHeader]
929
- attr_accessor :metric_header
826
+ # The field which to sort by. The default sort order is ascending. Example:
827
+ # `ga:browser`.
828
+ # Note, that you can only specify one field for sort here. For example,
829
+ # `ga:browser, ga:city` is not valid.
830
+ # Corresponds to the JSON property `fieldName`
831
+ # @return [String]
832
+ attr_accessor :field_name
930
833
 
931
- # The dimension names in the response.
932
- # Corresponds to the JSON property `dimensions`
933
- # @return [Array<String>]
934
- attr_accessor :dimensions
834
+ # The order type. The default orderType is `VALUE`.
835
+ # Corresponds to the JSON property `orderType`
836
+ # @return [String]
837
+ attr_accessor :order_type
838
+
839
+ # The sorting order for the field.
840
+ # Corresponds to the JSON property `sortOrder`
841
+ # @return [String]
842
+ attr_accessor :sort_order
935
843
 
936
844
  def initialize(**args)
937
845
  update!(**args)
@@ -939,31 +847,28 @@ module Google
939
847
 
940
848
  # Update properties of this object
941
849
  def update!(**args)
942
- @metric_header = args[:metric_header] if args.key?(:metric_header)
943
- @dimensions = args[:dimensions] if args.key?(:dimensions)
850
+ @field_name = args[:field_name] if args.key?(:field_name)
851
+ @order_type = args[:order_type] if args.key?(:order_type)
852
+ @sort_order = args[:sort_order] if args.key?(:sort_order)
944
853
  end
945
854
  end
946
855
 
947
- # Filter Clause to be used in a segment definition, can be wither a metric or
948
- # a dimension filter.
949
- class SegmentFilterClause
856
+ # The segment definition, if the report needs to be segmented.
857
+ # A Segment is a subset of the Analytics data. For example, of the entire
858
+ # set of users, one Segment might be users from a particular country or city.
859
+ class Segment
950
860
  include Google::Apis::Core::Hashable
951
861
 
952
- # Matches the complement (`!`) of the filter.
953
- # Corresponds to the JSON property `not`
954
- # @return [Boolean]
955
- attr_accessor :not
956
- alias_method :not?, :not
957
-
958
- # Dimension filter specifies the filtering options on a dimension.
959
- # Corresponds to the JSON property `dimensionFilter`
960
- # @return [Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter]
961
- attr_accessor :dimension_filter
862
+ # Dynamic segment definition for defining the segment within the request.
863
+ # A segment can select users, sessions or both.
864
+ # Corresponds to the JSON property `dynamicSegment`
865
+ # @return [Google::Apis::AnalyticsreportingV4::DynamicSegment]
866
+ attr_accessor :dynamic_segment
962
867
 
963
- # Metric filter to be used in a segment filter clause.
964
- # Corresponds to the JSON property `metricFilter`
965
- # @return [Google::Apis::AnalyticsreportingV4::SegmentMetricFilter]
966
- attr_accessor :metric_filter
868
+ # The segment ID of a built-in or custom segment, for example `gaid::-3`.
869
+ # Corresponds to the JSON property `segmentId`
870
+ # @return [String]
871
+ attr_accessor :segment_id
967
872
 
968
873
  def initialize(**args)
969
874
  update!(**args)
@@ -971,28 +876,26 @@ module Google
971
876
 
972
877
  # Update properties of this object
973
878
  def update!(**args)
974
- @not = args[:not] if args.key?(:not)
975
- @dimension_filter = args[:dimension_filter] if args.key?(:dimension_filter)
976
- @metric_filter = args[:metric_filter] if args.key?(:metric_filter)
879
+ @dynamic_segment = args[:dynamic_segment] if args.key?(:dynamic_segment)
880
+ @segment_id = args[:segment_id] if args.key?(:segment_id)
977
881
  end
978
882
  end
979
883
 
980
- # Represents a group of metric filters.
981
- # Set the operator value to specify how the filters are logically combined.
982
- class MetricFilterClause
884
+ # A segment sequence definition.
885
+ class SegmentSequenceStep
983
886
  include Google::Apis::Core::Hashable
984
887
 
985
- # The operator for combining multiple metric filters. If unspecified, it is
986
- # treated as an `OR`.
987
- # Corresponds to the JSON property `operator`
988
- # @return [String]
989
- attr_accessor :operator
888
+ # A sequence is specified with a list of Or grouped filters which are
889
+ # combined with `AND` operator.
890
+ # Corresponds to the JSON property `orFiltersForSegment`
891
+ # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
892
+ attr_accessor :or_filters_for_segment
990
893
 
991
- # The repeated set of filters. They are logically combined based on the
992
- # operator specified.
993
- # Corresponds to the JSON property `filters`
994
- # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilter>]
995
- attr_accessor :filters
894
+ # Specifies if the step immediately precedes or can be any time before the
895
+ # next step.
896
+ # Corresponds to the JSON property `matchType`
897
+ # @return [String]
898
+ attr_accessor :match_type
996
899
 
997
900
  def initialize(**args)
998
901
  update!(**args)
@@ -1000,36 +903,43 @@ module Google
1000
903
 
1001
904
  # Update properties of this object
1002
905
  def update!(**args)
1003
- @operator = args[:operator] if args.key?(:operator)
1004
- @filters = args[:filters] if args.key?(:filters)
906
+ @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
907
+ @match_type = args[:match_type] if args.key?(:match_type)
1005
908
  end
1006
909
  end
1007
910
 
1008
- # Defines a cohort. A cohort is a group of users who share a common
1009
- # characteristic. For example, all users with the same acquisition date
1010
- # belong to the same cohort.
1011
- class Cohort
911
+ # [Metrics](https://support.google.com/analytics/answer/1033861)
912
+ # are the quantitative measurements. For example, the metric `ga:users`
913
+ # indicates the total number of users for the requested time period.
914
+ class Metric
1012
915
  include Google::Apis::Core::Hashable
1013
916
 
1014
- # Type of the cohort. The only supported type as of now is
1015
- # `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated
1016
- # as `FIRST_VISIT_DATE` type cohort.
1017
- # Corresponds to the JSON property `type`
917
+ # A metric expression in the request. An expression is constructed from one
918
+ # or more metrics and numbers. Accepted operators include: Plus (+), Minus
919
+ # (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,
920
+ # Positive cardinal numbers (0-9), can include decimals and is limited to
921
+ # 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the
922
+ # metric expression is just a single metric name like `ga:users`.
923
+ # Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics
924
+ # will result in unexpected results.
925
+ # Corresponds to the JSON property `expression`
1018
926
  # @return [String]
1019
- attr_accessor :type
927
+ attr_accessor :expression
1020
928
 
1021
- # A unique name for the cohort. If not defined name will be auto-generated
1022
- # with values cohort_[1234...].
1023
- # Corresponds to the JSON property `name`
929
+ # Specifies how the metric expression should be formatted, for example
930
+ # `INTEGER`.
931
+ # Corresponds to the JSON property `formattingType`
1024
932
  # @return [String]
1025
- attr_accessor :name
933
+ attr_accessor :formatting_type
1026
934
 
1027
- # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
1028
- # The start and end dates are specified in
1029
- # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
1030
- # Corresponds to the JSON property `dateRange`
1031
- # @return [Google::Apis::AnalyticsreportingV4::DateRange]
1032
- attr_accessor :date_range
935
+ # An alias for the metric expression is an alternate name for the
936
+ # expression. The alias can be used for filtering and sorting. This field
937
+ # is optional and is useful if the expression is not a single metric but
938
+ # a complex expression which cannot be used in filtering and sorting.
939
+ # The alias is also used in the response column header.
940
+ # Corresponds to the JSON property `alias`
941
+ # @return [String]
942
+ attr_accessor :alias
1033
943
 
1034
944
  def initialize(**args)
1035
945
  update!(**args)
@@ -1037,25 +947,20 @@ module Google
1037
947
 
1038
948
  # Update properties of this object
1039
949
  def update!(**args)
1040
- @type = args[:type] if args.key?(:type)
1041
- @name = args[:name] if args.key?(:name)
1042
- @date_range = args[:date_range] if args.key?(:date_range)
950
+ @expression = args[:expression] if args.key?(:expression)
951
+ @formatting_type = args[:formatting_type] if args.key?(:formatting_type)
952
+ @alias = args[:alias] if args.key?(:alias)
1043
953
  end
1044
954
  end
1045
955
 
1046
- # A row in the report.
1047
- class ReportRow
956
+ # The metric values in the pivot region.
957
+ class PivotValueRegion
1048
958
  include Google::Apis::Core::Hashable
1049
959
 
1050
- # List of metrics for each requested DateRange.
1051
- # Corresponds to the JSON property `metrics`
1052
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
1053
- attr_accessor :metrics
1054
-
1055
- # List of requested dimensions.
1056
- # Corresponds to the JSON property `dimensions`
960
+ # The values of the metrics in each of the pivot regions.
961
+ # Corresponds to the JSON property `values`
1057
962
  # @return [Array<String>]
1058
- attr_accessor :dimensions
963
+ attr_accessor :values
1059
964
 
1060
965
  def initialize(**args)
1061
966
  update!(**args)
@@ -1063,20 +968,28 @@ module Google
1063
968
 
1064
969
  # Update properties of this object
1065
970
  def update!(**args)
1066
- @metrics = args[:metrics] if args.key?(:metrics)
1067
- @dimensions = args[:dimensions] if args.key?(:dimensions)
971
+ @values = args[:values] if args.key?(:values)
1068
972
  end
1069
973
  end
1070
974
 
1071
- # A list of segment filters in the `OR` group are combined with the logical OR
1072
- # operator.
1073
- class OrFiltersForSegment
975
+ # The data response corresponding to the request.
976
+ class Report
1074
977
  include Google::Apis::Core::Hashable
1075
978
 
1076
- # List of segment filters to be combined with a `OR` operator.
1077
- # Corresponds to the JSON property `segmentFilterClauses`
1078
- # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilterClause>]
1079
- attr_accessor :segment_filter_clauses
979
+ # The data part of the report.
980
+ # Corresponds to the JSON property `data`
981
+ # @return [Google::Apis::AnalyticsreportingV4::ReportData]
982
+ attr_accessor :data
983
+
984
+ # Page token to retrieve the next page of results in the list.
985
+ # Corresponds to the JSON property `nextPageToken`
986
+ # @return [String]
987
+ attr_accessor :next_page_token
988
+
989
+ # Column headers.
990
+ # Corresponds to the JSON property `columnHeader`
991
+ # @return [Google::Apis::AnalyticsreportingV4::ColumnHeader]
992
+ attr_accessor :column_header
1080
993
 
1081
994
  def initialize(**args)
1082
995
  update!(**args)
@@ -1084,23 +997,25 @@ module Google
1084
997
 
1085
998
  # Update properties of this object
1086
999
  def update!(**args)
1087
- @segment_filter_clauses = args[:segment_filter_clauses] if args.key?(:segment_filter_clauses)
1000
+ @data = args[:data] if args.key?(:data)
1001
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1002
+ @column_header = args[:column_header] if args.key?(:column_header)
1088
1003
  end
1089
1004
  end
1090
1005
 
1091
- # The headers for the metrics.
1092
- class MetricHeader
1006
+ # The headers for each of the pivot sections defined in the request.
1007
+ class PivotHeader
1093
1008
  include Google::Apis::Core::Hashable
1094
1009
 
1095
- # Headers for the metrics in the response.
1096
- # Corresponds to the JSON property `metricHeaderEntries`
1097
- # @return [Array<Google::Apis::AnalyticsreportingV4::MetricHeaderEntry>]
1098
- attr_accessor :metric_header_entries
1010
+ # A single pivot section header.
1011
+ # Corresponds to the JSON property `pivotHeaderEntries`
1012
+ # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeaderEntry>]
1013
+ attr_accessor :pivot_header_entries
1099
1014
 
1100
- # Headers for the pivots in the response.
1101
- # Corresponds to the JSON property `pivotHeaders`
1102
- # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeader>]
1103
- attr_accessor :pivot_headers
1015
+ # The total number of groups for this pivot.
1016
+ # Corresponds to the JSON property `totalPivotGroupsCount`
1017
+ # @return [Fixnum]
1018
+ attr_accessor :total_pivot_groups_count
1104
1019
 
1105
1020
  def initialize(**args)
1106
1021
  update!(**args)
@@ -1108,27 +1023,26 @@ module Google
1108
1023
 
1109
1024
  # Update properties of this object
1110
1025
  def update!(**args)
1111
- @metric_header_entries = args[:metric_header_entries] if args.key?(:metric_header_entries)
1112
- @pivot_headers = args[:pivot_headers] if args.key?(:pivot_headers)
1026
+ @pivot_header_entries = args[:pivot_header_entries] if args.key?(:pivot_header_entries)
1027
+ @total_pivot_groups_count = args[:total_pivot_groups_count] if args.key?(:total_pivot_groups_count)
1113
1028
  end
1114
1029
  end
1115
1030
 
1116
- # A group of dimension filters. Set the operator value to specify how
1117
- # the filters are logically combined.
1118
- class DimensionFilterClause
1031
+ # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
1032
+ # The start and end dates are specified in
1033
+ # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
1034
+ class DateRange
1119
1035
  include Google::Apis::Core::Hashable
1120
1036
 
1121
- # The operator for combining multiple dimension filters. If unspecified, it
1122
- # is treated as an `OR`.
1123
- # Corresponds to the JSON property `operator`
1037
+ # The start date for the query in the format `YYYY-MM-DD`.
1038
+ # Corresponds to the JSON property `startDate`
1124
1039
  # @return [String]
1125
- attr_accessor :operator
1040
+ attr_accessor :start_date
1126
1041
 
1127
- # The repeated set of filters. They are logically combined based on the
1128
- # operator specified.
1129
- # Corresponds to the JSON property `filters`
1130
- # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilter>]
1131
- attr_accessor :filters
1042
+ # The end date for the query in the format `YYYY-MM-DD`.
1043
+ # Corresponds to the JSON property `endDate`
1044
+ # @return [String]
1045
+ attr_accessor :end_date
1132
1046
 
1133
1047
  def initialize(**args)
1134
1048
  update!(**args)
@@ -1136,48 +1050,41 @@ module Google
1136
1050
 
1137
1051
  # Update properties of this object
1138
1052
  def update!(**args)
1139
- @operator = args[:operator] if args.key?(:operator)
1140
- @filters = args[:filters] if args.key?(:filters)
1053
+ @start_date = args[:start_date] if args.key?(:start_date)
1054
+ @end_date = args[:end_date] if args.key?(:end_date)
1141
1055
  end
1142
1056
  end
1143
1057
 
1144
- # The main response class which holds the reports from the Reporting API
1145
- # `batchGet` call.
1146
- class GetReportsResponse
1058
+ # MetricFilter specifies the filter on a metric.
1059
+ class MetricFilter
1147
1060
  include Google::Apis::Core::Hashable
1148
1061
 
1149
- # Responses corresponding to each of the request.
1150
- # Corresponds to the JSON property `reports`
1151
- # @return [Array<Google::Apis::AnalyticsreportingV4::Report>]
1152
- attr_accessor :reports
1153
-
1154
- def initialize(**args)
1155
- update!(**args)
1156
- end
1062
+ # The metric that will be filtered on. A metricFilter must contain a metric
1063
+ # name. A metric name can be an alias earlier defined as a metric or it can
1064
+ # also be a metric expression.
1065
+ # Corresponds to the JSON property `metricName`
1066
+ # @return [String]
1067
+ attr_accessor :metric_name
1157
1068
 
1158
- # Update properties of this object
1159
- def update!(**args)
1160
- @reports = args[:reports] if args.key?(:reports)
1161
- end
1162
- end
1069
+ # The value to compare against.
1070
+ # Corresponds to the JSON property `comparisonValue`
1071
+ # @return [String]
1072
+ attr_accessor :comparison_value
1163
1073
 
1164
- # Sequence conditions consist of one or more steps, where each step is defined
1165
- # by one or more dimension/metric conditions. Multiple steps can be combined
1166
- # with special sequence operators.
1167
- class SequenceSegment
1168
- include Google::Apis::Core::Hashable
1074
+ # Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the
1075
+ # comparisonValue, the default is `EQUAL`. If the operator is
1076
+ # `IS_MISSING`, checks if the metric is missing and would ignore the
1077
+ # comparisonValue.
1078
+ # Corresponds to the JSON property `operator`
1079
+ # @return [String]
1080
+ attr_accessor :operator
1169
1081
 
1170
- # If set, first step condition must match the first hit of the visitor (in
1171
- # the date range).
1172
- # Corresponds to the JSON property `firstStepShouldMatchFirstHit`
1082
+ # Logical `NOT` operator. If this boolean is set to true, then the matching
1083
+ # metric values will be excluded in the report. The default is false.
1084
+ # Corresponds to the JSON property `not`
1173
1085
  # @return [Boolean]
1174
- attr_accessor :first_step_should_match_first_hit
1175
- alias_method :first_step_should_match_first_hit?, :first_step_should_match_first_hit
1176
-
1177
- # The list of steps in the sequence.
1178
- # Corresponds to the JSON property `segmentSequenceSteps`
1179
- # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentSequenceStep>]
1180
- attr_accessor :segment_sequence_steps
1086
+ attr_accessor :not
1087
+ alias_method :not?, :not
1181
1088
 
1182
1089
  def initialize(**args)
1183
1090
  update!(**args)
@@ -1185,45 +1092,171 @@ module Google
1185
1092
 
1186
1093
  # Update properties of this object
1187
1094
  def update!(**args)
1188
- @first_step_should_match_first_hit = args[:first_step_should_match_first_hit] if args.key?(:first_step_should_match_first_hit)
1189
- @segment_sequence_steps = args[:segment_sequence_steps] if args.key?(:segment_sequence_steps)
1095
+ @metric_name = args[:metric_name] if args.key?(:metric_name)
1096
+ @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
1097
+ @operator = args[:operator] if args.key?(:operator)
1098
+ @not = args[:not] if args.key?(:not)
1190
1099
  end
1191
1100
  end
1192
1101
 
1193
- # Metric filter to be used in a segment filter clause.
1194
- class SegmentMetricFilter
1102
+ # The main request class which specifies the Reporting API request.
1103
+ class ReportRequest
1195
1104
  include Google::Apis::Core::Hashable
1196
1105
 
1197
- # The metric that will be filtered on. A `metricFilter` must contain a
1198
- # metric name.
1199
- # Corresponds to the JSON property `metricName`
1106
+ # The metric filter clauses. They are logically combined with the `AND`
1107
+ # operator. Metric filters look at only the first date range and not the
1108
+ # comparing date range. Note that filtering on metrics occurs after the
1109
+ # metrics are aggregated.
1110
+ # Corresponds to the JSON property `metricFilterClauses`
1111
+ # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilterClause>]
1112
+ attr_accessor :metric_filter_clauses
1113
+
1114
+ # Page size is for paging and specifies the maximum number of returned rows.
1115
+ # Page size should be >= 0. A query returns the default of 1,000 rows.
1116
+ # The Analytics Core Reporting API returns a maximum of 10,000 rows per
1117
+ # request, no matter how many you ask for. It can also return fewer rows
1118
+ # than requested, if there aren't as many dimension segments as you expect.
1119
+ # For instance, there are fewer than 300 possible values for `ga:country`,
1120
+ # so when segmenting only by country, you can't get more than 300 rows,
1121
+ # even if you set `pageSize` to a higher value.
1122
+ # Corresponds to the JSON property `pageSize`
1123
+ # @return [Fixnum]
1124
+ attr_accessor :page_size
1125
+
1126
+ # If set to true, hides the total of all metrics for all the matching rows,
1127
+ # for every date range. The default false and will return the totals.
1128
+ # Corresponds to the JSON property `hideTotals`
1129
+ # @return [Boolean]
1130
+ attr_accessor :hide_totals
1131
+ alias_method :hide_totals?, :hide_totals
1132
+
1133
+ # If set to true, hides the minimum and maximum across all matching rows.
1134
+ # The default is false and the value ranges are returned.
1135
+ # Corresponds to the JSON property `hideValueRanges`
1136
+ # @return [Boolean]
1137
+ attr_accessor :hide_value_ranges
1138
+ alias_method :hide_value_ranges?, :hide_value_ranges
1139
+
1140
+ # Dimension or metric filters that restrict the data returned for your
1141
+ # request. To use the `filtersExpression`, supply a dimension or metric on
1142
+ # which to filter, followed by the filter expression. For example, the
1143
+ # following expression selects `ga:browser` dimension which starts with
1144
+ # Firefox; `ga:browser=~^Firefox`. For more information on dimensions
1145
+ # and metric filters, see
1146
+ # [Filters reference](https://developers.google.com/analytics/devguides/
1147
+ # reporting/core/v3/reference#filters).
1148
+ # Corresponds to the JSON property `filtersExpression`
1200
1149
  # @return [String]
1201
- attr_accessor :metric_name
1150
+ attr_accessor :filters_expression
1202
1151
 
1203
- # Scope for a metric defines the level at which that metric is defined. The
1204
- # specified metric scope must be equal to or greater than its primary scope
1205
- # as defined in the data model. The primary scope is defined by if the
1206
- # segment is selecting users or sessions.
1207
- # Corresponds to the JSON property `scope`
1152
+ # Defines a cohort group.
1153
+ # For example:
1154
+ # "cohortGroup": `
1155
+ # "cohorts": [`
1156
+ # "name": "cohort 1",
1157
+ # "type": "FIRST_VISIT_DATE",
1158
+ # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
1159
+ # `,`
1160
+ # "name": "cohort 2"
1161
+ # "type": "FIRST_VISIT_DATE"
1162
+ # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
1163
+ # `]
1164
+ # `
1165
+ # Corresponds to the JSON property `cohortGroup`
1166
+ # @return [Google::Apis::AnalyticsreportingV4::CohortGroup]
1167
+ attr_accessor :cohort_group
1168
+
1169
+ # The Analytics
1170
+ # [view ID](https://support.google.com/analytics/answer/1009618)
1171
+ # from which to retrieve data. Every [ReportRequest](#ReportRequest)
1172
+ # within a `batchGet` method must contain the same `viewId`.
1173
+ # Corresponds to the JSON property `viewId`
1208
1174
  # @return [String]
1209
- attr_accessor :scope
1175
+ attr_accessor :view_id
1210
1176
 
1211
- # Max comparison value is only used for `BETWEEN` operator.
1212
- # Corresponds to the JSON property `maxComparisonValue`
1177
+ # The metrics requested.
1178
+ # Requests must specify at least one metric. Requests can have a
1179
+ # total of 10 metrics.
1180
+ # Corresponds to the JSON property `metrics`
1181
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
1182
+ attr_accessor :metrics
1183
+
1184
+ # The dimension filter clauses for filtering Dimension Values. They are
1185
+ # logically combined with the `AND` operator. Note that filtering occurs
1186
+ # before any dimensions are aggregated, so that the returned metrics
1187
+ # represent the total for only the relevant dimensions.
1188
+ # Corresponds to the JSON property `dimensionFilterClauses`
1189
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
1190
+ attr_accessor :dimension_filter_clauses
1191
+
1192
+ # Sort order on output rows. To compare two rows, the elements of the
1193
+ # following are applied in order until a difference is found. All date
1194
+ # ranges in the output get the same row order.
1195
+ # Corresponds to the JSON property `orderBys`
1196
+ # @return [Array<Google::Apis::AnalyticsreportingV4::OrderBy>]
1197
+ attr_accessor :order_bys
1198
+
1199
+ # Segment the data returned for the request. A segment definition helps look
1200
+ # at a subset of the segment request. A request can contain up to four
1201
+ # segments. Every [ReportRequest](#ReportRequest) within a
1202
+ # `batchGet` method must contain the same `segments` definition. Requests
1203
+ # with segments must have the `ga:segment` dimension.
1204
+ # Corresponds to the JSON property `segments`
1205
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Segment>]
1206
+ attr_accessor :segments
1207
+
1208
+ # The desired report
1209
+ # [sample](https://support.google.com/analytics/answer/2637192) size.
1210
+ # If the the `samplingLevel` field is unspecified the `DEFAULT` sampling
1211
+ # level is used. Every [ReportRequest](#ReportRequest) within a
1212
+ # `batchGet` method must contain the same `samplingLevel` definition. See
1213
+ # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
1214
+ # for details.
1215
+ # Corresponds to the JSON property `samplingLevel`
1213
1216
  # @return [String]
1214
- attr_accessor :max_comparison_value
1217
+ attr_accessor :sampling_level
1215
1218
 
1216
- # The value to compare against. If the operator is `BETWEEN`, this value is
1217
- # treated as minimum comparison value.
1218
- # Corresponds to the JSON property `comparisonValue`
1219
+ # The dimensions requested.
1220
+ # Requests can have a total of 7 dimensions.
1221
+ # Corresponds to the JSON property `dimensions`
1222
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
1223
+ attr_accessor :dimensions
1224
+
1225
+ # A continuation token to get the next page of the results. Adding this to
1226
+ # the request will return the rows after the pageToken. The pageToken should
1227
+ # be the value returned in the nextPageToken parameter in the response to
1228
+ # the GetReports request.
1229
+ # Corresponds to the JSON property `pageToken`
1219
1230
  # @return [String]
1220
- attr_accessor :comparison_value
1231
+ attr_accessor :page_token
1221
1232
 
1222
- # Specifies is the operation to perform to compare the metric. The default
1223
- # is `EQUAL`.
1224
- # Corresponds to the JSON property `operator`
1225
- # @return [String]
1226
- attr_accessor :operator
1233
+ # Date ranges in the request. The request can have a maximum of 2 date
1234
+ # ranges. The response will contain a set of metric values for each
1235
+ # combination of the dimensions for each date range in the request. So, if
1236
+ # there are two date ranges, there will be two set of metric values, one for
1237
+ # the original date range and one for the second date range.
1238
+ # The `reportRequest.dateRanges` field should not be specified for cohorts
1239
+ # or Lifetime value requests.
1240
+ # If a date range is not provided, the default date range is (startDate:
1241
+ # current date - 7 days, endDate: current date - 1 day). Every
1242
+ # [ReportRequest](#ReportRequest) within a `batchGet` method must
1243
+ # contain the same `dateRanges` definition.
1244
+ # Corresponds to the JSON property `dateRanges`
1245
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRange>]
1246
+ attr_accessor :date_ranges
1247
+
1248
+ # The pivot definitions. Requests can have a maximum of 2 pivots.
1249
+ # Corresponds to the JSON property `pivots`
1250
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Pivot>]
1251
+ attr_accessor :pivots
1252
+
1253
+ # If set to false, the response does not include rows if all the retrieved
1254
+ # metrics are equal to zero. The default is false which will exclude these
1255
+ # rows.
1256
+ # Corresponds to the JSON property `includeEmptyRows`
1257
+ # @return [Boolean]
1258
+ attr_accessor :include_empty_rows
1259
+ alias_method :include_empty_rows?, :include_empty_rows
1227
1260
 
1228
1261
  def initialize(**args)
1229
1262
  update!(**args)
@@ -1231,28 +1264,66 @@ module Google
1231
1264
 
1232
1265
  # Update properties of this object
1233
1266
  def update!(**args)
1234
- @metric_name = args[:metric_name] if args.key?(:metric_name)
1235
- @scope = args[:scope] if args.key?(:scope)
1236
- @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
1237
- @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
1238
- @operator = args[:operator] if args.key?(:operator)
1267
+ @metric_filter_clauses = args[:metric_filter_clauses] if args.key?(:metric_filter_clauses)
1268
+ @page_size = args[:page_size] if args.key?(:page_size)
1269
+ @hide_totals = args[:hide_totals] if args.key?(:hide_totals)
1270
+ @hide_value_ranges = args[:hide_value_ranges] if args.key?(:hide_value_ranges)
1271
+ @filters_expression = args[:filters_expression] if args.key?(:filters_expression)
1272
+ @cohort_group = args[:cohort_group] if args.key?(:cohort_group)
1273
+ @view_id = args[:view_id] if args.key?(:view_id)
1274
+ @metrics = args[:metrics] if args.key?(:metrics)
1275
+ @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
1276
+ @order_bys = args[:order_bys] if args.key?(:order_bys)
1277
+ @segments = args[:segments] if args.key?(:segments)
1278
+ @sampling_level = args[:sampling_level] if args.key?(:sampling_level)
1279
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
1280
+ @page_token = args[:page_token] if args.key?(:page_token)
1281
+ @date_ranges = args[:date_ranges] if args.key?(:date_ranges)
1282
+ @pivots = args[:pivots] if args.key?(:pivots)
1283
+ @include_empty_rows = args[:include_empty_rows] if args.key?(:include_empty_rows)
1239
1284
  end
1240
1285
  end
1241
1286
 
1242
- # Used to return a list of metrics for a single DateRange / dimension
1243
- # combination
1244
- class DateRangeValues
1287
+ # [Dimensions](https://support.google.com/analytics/answer/1033861)
1288
+ # are attributes of your data. For example, the dimension `ga:city`
1289
+ # indicates the city, for example, "Paris" or "New York", from which
1290
+ # a session originates.
1291
+ class Dimension
1245
1292
  include Google::Apis::Core::Hashable
1246
1293
 
1247
- # Each value corresponds to each Metric in the request.
1248
- # Corresponds to the JSON property `values`
1294
+ # If non-empty, we place dimension values into buckets after string to
1295
+ # int64. Dimension values that are not the string representation of an
1296
+ # integral value will be converted to zero. The bucket values have to be in
1297
+ # increasing order. Each bucket is closed on the lower end, and open on the
1298
+ # upper end. The "first" bucket includes all values less than the first
1299
+ # boundary, the "last" bucket includes all values up to infinity. Dimension
1300
+ # values that fall in a bucket get transformed to a new dimension value. For
1301
+ # example, if one gives a list of "0, 1, 3, 4, 7", then we return the
1302
+ # following buckets:
1303
+ # - bucket #1: values < 0, dimension value "<0"
1304
+ # - bucket #2: values in [0,1), dimension value "0"
1305
+ # - bucket #3: values in [1,3), dimension value "1-2"
1306
+ # - bucket #4: values in [3,4), dimension value "3"
1307
+ # - bucket #5: values in [4,7), dimension value "4-6"
1308
+ # - bucket #6: values >= 7, dimension value "7+"
1309
+ # NOTE: If you are applying histogram mutation on any dimension, and using
1310
+ # that dimension in sort, you will want to use the sort type
1311
+ # `HISTOGRAM_BUCKET` for that purpose. Without that the dimension values
1312
+ # will be sorted according to dictionary
1313
+ # (lexicographic) order. For example the ascending dictionary order is:
1314
+ # "<50", "1001+", "121-1000", "50-120"
1315
+ # And the ascending `HISTOGRAM_BUCKET` order is:
1316
+ # "<50", "50-120", "121-1000", "1001+"
1317
+ # The client has to explicitly request `"orderType": "HISTOGRAM_BUCKET"`
1318
+ # for a histogram-mutated dimension.
1319
+ # Corresponds to the JSON property `histogramBuckets`
1249
1320
  # @return [Array<String>]
1250
- attr_accessor :values
1321
+ attr_accessor :histogram_buckets
1251
1322
 
1252
- # The values of each pivot region.
1253
- # Corresponds to the JSON property `pivotValueRegions`
1254
- # @return [Array<Google::Apis::AnalyticsreportingV4::PivotValueRegion>]
1255
- attr_accessor :pivot_value_regions
1323
+ # Name of the dimension to fetch, for example `ga:browser`.
1324
+ # Corresponds to the JSON property `name`
1325
+ # @return [String]
1326
+ attr_accessor :name
1256
1327
 
1257
1328
  def initialize(**args)
1258
1329
  update!(**args)
@@ -1260,63 +1331,32 @@ module Google
1260
1331
 
1261
1332
  # Update properties of this object
1262
1333
  def update!(**args)
1263
- @values = args[:values] if args.key?(:values)
1264
- @pivot_value_regions = args[:pivot_value_regions] if args.key?(:pivot_value_regions)
1334
+ @histogram_buckets = args[:histogram_buckets] if args.key?(:histogram_buckets)
1335
+ @name = args[:name] if args.key?(:name)
1265
1336
  end
1266
1337
  end
1267
1338
 
1268
- # Defines a cohort group.
1269
- # For example:
1270
- # "cohortGroup": `
1271
- # "cohorts": [`
1272
- # "name": "cohort 1",
1273
- # "type": "FIRST_VISIT_DATE",
1274
- # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
1275
- # `,`
1276
- # "name": "cohort 2"
1277
- # "type": "FIRST_VISIT_DATE"
1278
- # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
1279
- # `]
1280
- # `
1281
- class CohortGroup
1339
+ # Dynamic segment definition for defining the segment within the request.
1340
+ # A segment can select users, sessions or both.
1341
+ class DynamicSegment
1282
1342
  include Google::Apis::Core::Hashable
1283
1343
 
1284
- # The definition for the cohort.
1285
- # Corresponds to the JSON property `cohorts`
1286
- # @return [Array<Google::Apis::AnalyticsreportingV4::Cohort>]
1287
- attr_accessor :cohorts
1344
+ # SegmentDefinition defines the segment to be a set of SegmentFilters which
1345
+ # are combined together with a logical `AND` operation.
1346
+ # Corresponds to the JSON property `sessionSegment`
1347
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
1348
+ attr_accessor :session_segment
1288
1349
 
1289
- # Enable Life Time Value (LTV). LTV measures lifetime value for users
1290
- # acquired through different channels.
1291
- # Please see:
1292
- # [Cohort Analysis](https://support.google.com/analytics/answer/6074676) and
1293
- # [Lifetime Value](https://support.google.com/analytics/answer/6182550)
1294
- # If the value of lifetimeValue is false:
1295
- # - The metric values are similar to the values in the web interface cohort
1296
- # report.
1297
- # - The cohort definition date ranges must be aligned to the calendar week
1298
- # and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in
1299
- # the cohort definition should be a Sunday and the `endDate` should be the
1300
- # following Saturday, and for `ga:cohortNthMonth`, the `startDate`
1301
- # should be the 1st of the month and `endDate` should be the last day
1302
- # of the month.
1303
- # When the lifetimeValue is true:
1304
- # - The metric values will correspond to the values in the web interface
1305
- # LifeTime value report.
1306
- # - The Lifetime Value report shows you how user value (Revenue) and
1307
- # engagement (Appviews, Goal Completions, Sessions, and Session Duration)
1308
- # grow during the 90 days after a user is acquired.
1309
- # - The metrics are calculated as a cumulative average per user per the time
1310
- # increment.
1311
- # - The cohort definition date ranges need not be aligned to the calendar
1312
- # week and month boundaries.
1313
- # - The `viewId` must be an
1314
- # [app view ID](https://support.google.com/analytics/answer/2649553#
1315
- # WebVersusAppViews)
1316
- # Corresponds to the JSON property `lifetimeValue`
1317
- # @return [Boolean]
1318
- attr_accessor :lifetime_value
1319
- alias_method :lifetime_value?, :lifetime_value
1350
+ # The name of the dynamic segment.
1351
+ # Corresponds to the JSON property `name`
1352
+ # @return [String]
1353
+ attr_accessor :name
1354
+
1355
+ # SegmentDefinition defines the segment to be a set of SegmentFilters which
1356
+ # are combined together with a logical `AND` operation.
1357
+ # Corresponds to the JSON property `userSegment`
1358
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
1359
+ attr_accessor :user_segment
1320
1360
 
1321
1361
  def initialize(**args)
1322
1362
  update!(**args)
@@ -1324,21 +1364,22 @@ module Google
1324
1364
 
1325
1365
  # Update properties of this object
1326
1366
  def update!(**args)
1327
- @cohorts = args[:cohorts] if args.key?(:cohorts)
1328
- @lifetime_value = args[:lifetime_value] if args.key?(:lifetime_value)
1367
+ @session_segment = args[:session_segment] if args.key?(:session_segment)
1368
+ @name = args[:name] if args.key?(:name)
1369
+ @user_segment = args[:user_segment] if args.key?(:user_segment)
1329
1370
  end
1330
1371
  end
1331
1372
 
1332
- # The batch request containing multiple report request.
1333
- class GetReportsRequest
1373
+ # A Simple segment conditions consist of one or more dimension/metric
1374
+ # conditions that can be combined.
1375
+ class SimpleSegment
1334
1376
  include Google::Apis::Core::Hashable
1335
1377
 
1336
- # Requests, each request will have a separate response.
1337
- # There can be a maximum of 5 requests. All requests should have the same
1338
- # `dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.
1339
- # Corresponds to the JSON property `reportRequests`
1340
- # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRequest>]
1341
- attr_accessor :report_requests
1378
+ # A list of segment filters groups which are combined with logical `AND`
1379
+ # operator.
1380
+ # Corresponds to the JSON property `orFiltersForSegment`
1381
+ # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
1382
+ attr_accessor :or_filters_for_segment
1342
1383
 
1343
1384
  def initialize(**args)
1344
1385
  update!(**args)
@@ -1346,73 +1387,32 @@ module Google
1346
1387
 
1347
1388
  # Update properties of this object
1348
1389
  def update!(**args)
1349
- @report_requests = args[:report_requests] if args.key?(:report_requests)
1390
+ @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
1350
1391
  end
1351
1392
  end
1352
1393
 
1353
- # The Pivot describes the pivot section in the request.
1354
- # The Pivot helps rearrange the information in the table for certain reports
1355
- # by pivoting your data on a second dimension.
1356
- class Pivot
1394
+ # Column headers.
1395
+ class ColumnHeader
1357
1396
  include Google::Apis::Core::Hashable
1358
1397
 
1359
- # Specifies the maximum number of groups to return.
1360
- # The default value is 10, also the maximum value is 1,000.
1361
- # Corresponds to the JSON property `maxGroupCount`
1362
- # @return [Fixnum]
1363
- attr_accessor :max_group_count
1364
-
1365
- # If k metrics were requested, then the response will contain some
1366
- # data-dependent multiple of k columns in the report. E.g., if you pivoted
1367
- # on the dimension `ga:browser` then you'd get k columns for "Firefox", k
1368
- # columns for "IE", k columns for "Chrome", etc. The ordering of the groups
1369
- # of columns is determined by descending order of "total" for the first of
1370
- # the k values. Ties are broken by lexicographic ordering of the first
1371
- # pivot dimension, then lexicographic ordering of the second pivot
1372
- # dimension, and so on. E.g., if the totals for the first value for
1373
- # Firefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns
1374
- # would be Chrome, Firefox, IE.
1375
- # The following let you choose which of the groups of k columns are
1376
- # included in the response.
1377
- # Corresponds to the JSON property `startGroup`
1378
- # @return [Fixnum]
1379
- attr_accessor :start_group
1380
-
1381
- # The pivot metrics. Pivot metrics are part of the
1382
- # restriction on total number of metrics allowed in the request.
1383
- # Corresponds to the JSON property `metrics`
1384
- # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
1385
- attr_accessor :metrics
1398
+ # The headers for the metrics.
1399
+ # Corresponds to the JSON property `metricHeader`
1400
+ # @return [Google::Apis::AnalyticsreportingV4::MetricHeader]
1401
+ attr_accessor :metric_header
1386
1402
 
1387
- # A list of dimensions to show as pivot columns. A Pivot can have a maximum
1388
- # of 4 dimensions. Pivot dimensions are part of the restriction on the
1389
- # total number of dimensions allowed in the request.
1403
+ # The dimension names in the response.
1390
1404
  # Corresponds to the JSON property `dimensions`
1391
- # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
1405
+ # @return [Array<String>]
1392
1406
  attr_accessor :dimensions
1393
1407
 
1394
- # DimensionFilterClauses are logically combined with an `AND` operator: only
1395
- # data that is included by all these DimensionFilterClauses contributes to
1396
- # the values in this pivot region. Dimension filters can be used to restrict
1397
- # the columns shown in the pivot region. For example if you have
1398
- # `ga:browser` as the requested dimension in the pivot region, and you
1399
- # specify key filters to restrict `ga:browser` to only "IE" or "Firefox",
1400
- # then only those two browsers would show up as columns.
1401
- # Corresponds to the JSON property `dimensionFilterClauses`
1402
- # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
1403
- attr_accessor :dimension_filter_clauses
1404
-
1405
1408
  def initialize(**args)
1406
1409
  update!(**args)
1407
1410
  end
1408
1411
 
1409
1412
  # Update properties of this object
1410
1413
  def update!(**args)
1411
- @max_group_count = args[:max_group_count] if args.key?(:max_group_count)
1412
- @start_group = args[:start_group] if args.key?(:start_group)
1413
- @metrics = args[:metrics] if args.key?(:metrics)
1414
+ @metric_header = args[:metric_header] if args.key?(:metric_header)
1414
1415
  @dimensions = args[:dimensions] if args.key?(:dimensions)
1415
- @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
1416
1416
  end
1417
1417
  end
1418
1418
  end