google-analytics-data-v1beta 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,6 +24,23 @@ module Google
24
24
  module AnalyticsData
25
25
  # Path helper methods for the AnalyticsData API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified AudienceExport resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `properties/{property}/audienceExports/{audience_export}`
33
+ #
34
+ # @param property [String]
35
+ # @param audience_export [String]
36
+ #
37
+ # @return [::String]
38
+ def audience_export_path property:, audience_export:
39
+ raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"
40
+
41
+ "properties/#{property}/audienceExports/#{audience_export}"
42
+ end
43
+
27
44
  ##
28
45
  # Create a fully-qualified Metadata resource string.
29
46
  #
@@ -38,6 +55,20 @@ module Google
38
55
  "properties/#{property}/metadata"
39
56
  end
40
57
 
58
+ ##
59
+ # Create a fully-qualified Property resource string.
60
+ #
61
+ # The resource will be in the following format:
62
+ #
63
+ # `properties/{property}`
64
+ #
65
+ # @param property [String]
66
+ #
67
+ # @return [::String]
68
+ def property_path property:
69
+ "properties/#{property}"
70
+ end
71
+
41
72
  extend self
42
73
  end
43
74
  end
@@ -149,9 +149,22 @@ module Google
149
149
  @quota_project_id = @config.quota_project
150
150
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
151
151
 
152
+ @operations_client = ::Google::Analytics::Data::V1beta::AnalyticsData::Rest::Operations.new do |config|
153
+ config.credentials = credentials
154
+ config.quota_project = @quota_project_id
155
+ config.endpoint = @config.endpoint
156
+ end
157
+
152
158
  @analytics_data_stub = ::Google::Analytics::Data::V1beta::AnalyticsData::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
153
159
  end
154
160
 
161
+ ##
162
+ # Get the associated client for long-running operations.
163
+ #
164
+ # @return [::Google::Analytics::Data::V1beta::AnalyticsData::Rest::Operations]
165
+ #
166
+ attr_reader :operations_client
167
+
155
168
  # Service calls
156
169
 
157
170
  ##
@@ -958,6 +971,436 @@ module Google
958
971
  raise ::Google::Cloud::Error.from_error(e)
959
972
  end
960
973
 
974
+ ##
975
+ # Creates an audience export for later retrieval. This method quickly returns
976
+ # the audience export's resource name and initiates a long running
977
+ # asynchronous request to form an audience export. To export the users in an
978
+ # audience export, first create the audience export through this method and
979
+ # then send the audience resource name to the `QueryAudienceExport` method.
980
+ #
981
+ # See [Creating an Audience
982
+ # Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
983
+ # for an introduction to Audience Exports with examples.
984
+ #
985
+ # An audience export is a snapshot of the users currently in the audience at
986
+ # the time of audience export creation. Creating audience exports for one
987
+ # audience on different days will return different results as users enter and
988
+ # exit the audience.
989
+ #
990
+ # Audiences in Google Analytics 4 allow you to segment your users in the ways
991
+ # that are important to your business. To learn more, see
992
+ # https://support.google.com/analytics/answer/9267572. Audience exports
993
+ # contain the users in each audience.
994
+ #
995
+ # Audience Export APIs have some methods at alpha and other methods at beta
996
+ # stability. The intention is to advance methods to beta stability after some
997
+ # feedback and adoption. To give your feedback on this API, complete the
998
+ # [Google Analytics Audience Export API
999
+ # Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
1000
+ #
1001
+ # @overload create_audience_export(request, options = nil)
1002
+ # Pass arguments to `create_audience_export` via a request object, either of type
1003
+ # {::Google::Analytics::Data::V1beta::CreateAudienceExportRequest} or an equivalent Hash.
1004
+ #
1005
+ # @param request [::Google::Analytics::Data::V1beta::CreateAudienceExportRequest, ::Hash]
1006
+ # A request object representing the call parameters. Required. To specify no
1007
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1008
+ # @param options [::Gapic::CallOptions, ::Hash]
1009
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1010
+ #
1011
+ # @overload create_audience_export(parent: nil, audience_export: nil)
1012
+ # Pass arguments to `create_audience_export` via keyword arguments. Note that at
1013
+ # least one keyword argument is required. To specify no parameters, or to keep all
1014
+ # the default parameter values, pass an empty Hash as a request object (see above).
1015
+ #
1016
+ # @param parent [::String]
1017
+ # Required. The parent resource where this audience export will be created.
1018
+ # Format: `properties/{property}`
1019
+ # @param audience_export [::Google::Analytics::Data::V1beta::AudienceExport, ::Hash]
1020
+ # Required. The audience export to create.
1021
+ # @yield [result, operation] Access the result along with the TransportOperation object
1022
+ # @yieldparam result [::Gapic::Operation]
1023
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1024
+ #
1025
+ # @return [::Gapic::Operation]
1026
+ #
1027
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1028
+ #
1029
+ # @example Basic example
1030
+ # require "google/analytics/data/v1beta"
1031
+ #
1032
+ # # Create a client object. The client can be reused for multiple calls.
1033
+ # client = Google::Analytics::Data::V1beta::AnalyticsData::Rest::Client.new
1034
+ #
1035
+ # # Create a request. To set request fields, pass in keyword arguments.
1036
+ # request = Google::Analytics::Data::V1beta::CreateAudienceExportRequest.new
1037
+ #
1038
+ # # Call the create_audience_export method.
1039
+ # result = client.create_audience_export request
1040
+ #
1041
+ # # The returned object is of type Gapic::Operation. You can use it to
1042
+ # # check the status of an operation, cancel it, or wait for results.
1043
+ # # Here is how to wait for a response.
1044
+ # result.wait_until_done! timeout: 60
1045
+ # if result.response?
1046
+ # p result.response
1047
+ # else
1048
+ # puts "No response received."
1049
+ # end
1050
+ #
1051
+ def create_audience_export request, options = nil
1052
+ raise ::ArgumentError, "request must be provided" if request.nil?
1053
+
1054
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1beta::CreateAudienceExportRequest
1055
+
1056
+ # Converts hash and nil to an options object
1057
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1058
+
1059
+ # Customize the options with defaults
1060
+ call_metadata = @config.rpcs.create_audience_export.metadata.to_h
1061
+
1062
+ # Set x-goog-api-client and x-goog-user-project headers
1063
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1064
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1065
+ gapic_version: ::Google::Analytics::Data::V1beta::VERSION,
1066
+ transports_version_send: [:rest]
1067
+
1068
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1069
+
1070
+ options.apply_defaults timeout: @config.rpcs.create_audience_export.timeout,
1071
+ metadata: call_metadata,
1072
+ retry_policy: @config.rpcs.create_audience_export.retry_policy
1073
+
1074
+ options.apply_defaults timeout: @config.timeout,
1075
+ metadata: @config.metadata,
1076
+ retry_policy: @config.retry_policy
1077
+
1078
+ @analytics_data_stub.create_audience_export request, options do |result, operation|
1079
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1080
+ yield result, operation if block_given?
1081
+ return result
1082
+ end
1083
+ rescue ::Gapic::Rest::Error => e
1084
+ raise ::Google::Cloud::Error.from_error(e)
1085
+ end
1086
+
1087
+ ##
1088
+ # Retrieves an audience export of users. After creating an audience, the
1089
+ # users are not immediately available for exporting. First, a request to
1090
+ # `CreateAudienceExport` is necessary to create an audience export of users,
1091
+ # and then second, this method is used to retrieve the users in the audience
1092
+ # export.
1093
+ #
1094
+ # See [Creating an Audience
1095
+ # Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
1096
+ # for an introduction to Audience Exports with examples.
1097
+ #
1098
+ # Audiences in Google Analytics 4 allow you to segment your users in the ways
1099
+ # that are important to your business. To learn more, see
1100
+ # https://support.google.com/analytics/answer/9267572.
1101
+ #
1102
+ # Audience Export APIs have some methods at alpha and other methods at beta
1103
+ # stability. The intention is to advance methods to beta stability after some
1104
+ # feedback and adoption. To give your feedback on this API, complete the
1105
+ # [Google Analytics Audience Export API
1106
+ # Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
1107
+ #
1108
+ # @overload query_audience_export(request, options = nil)
1109
+ # Pass arguments to `query_audience_export` via a request object, either of type
1110
+ # {::Google::Analytics::Data::V1beta::QueryAudienceExportRequest} or an equivalent Hash.
1111
+ #
1112
+ # @param request [::Google::Analytics::Data::V1beta::QueryAudienceExportRequest, ::Hash]
1113
+ # A request object representing the call parameters. Required. To specify no
1114
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1115
+ # @param options [::Gapic::CallOptions, ::Hash]
1116
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1117
+ #
1118
+ # @overload query_audience_export(name: nil, offset: nil, limit: nil)
1119
+ # Pass arguments to `query_audience_export` via keyword arguments. Note that at
1120
+ # least one keyword argument is required. To specify no parameters, or to keep all
1121
+ # the default parameter values, pass an empty Hash as a request object (see above).
1122
+ #
1123
+ # @param name [::String]
1124
+ # Required. The name of the audience export to retrieve users from.
1125
+ # Format: `properties/{property}/audienceExports/{audience_export}`
1126
+ # @param offset [::Integer]
1127
+ # Optional. The row count of the start row. The first row is counted as row
1128
+ # 0.
1129
+ #
1130
+ # When paging, the first request does not specify offset; or equivalently,
1131
+ # sets offset to 0; the first request returns the first `limit` of rows. The
1132
+ # second request sets offset to the `limit` of the first request; the second
1133
+ # request returns the second `limit` of rows.
1134
+ #
1135
+ # To learn more about this pagination parameter, see
1136
+ # [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
1137
+ # @param limit [::Integer]
1138
+ # Optional. The number of rows to return. If unspecified, 10,000 rows are
1139
+ # returned. The API returns a maximum of 250,000 rows per request, no matter
1140
+ # how many you ask for. `limit` must be positive.
1141
+ #
1142
+ # The API can also return fewer rows than the requested `limit`, if there
1143
+ # aren't as many dimension values as the `limit`.
1144
+ #
1145
+ # To learn more about this pagination parameter, see
1146
+ # [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
1147
+ # @yield [result, operation] Access the result along with the TransportOperation object
1148
+ # @yieldparam result [::Google::Analytics::Data::V1beta::QueryAudienceExportResponse]
1149
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1150
+ #
1151
+ # @return [::Google::Analytics::Data::V1beta::QueryAudienceExportResponse]
1152
+ #
1153
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1154
+ #
1155
+ # @example Basic example
1156
+ # require "google/analytics/data/v1beta"
1157
+ #
1158
+ # # Create a client object. The client can be reused for multiple calls.
1159
+ # client = Google::Analytics::Data::V1beta::AnalyticsData::Rest::Client.new
1160
+ #
1161
+ # # Create a request. To set request fields, pass in keyword arguments.
1162
+ # request = Google::Analytics::Data::V1beta::QueryAudienceExportRequest.new
1163
+ #
1164
+ # # Call the query_audience_export method.
1165
+ # result = client.query_audience_export request
1166
+ #
1167
+ # # The returned object is of type Google::Analytics::Data::V1beta::QueryAudienceExportResponse.
1168
+ # p result
1169
+ #
1170
+ def query_audience_export request, options = nil
1171
+ raise ::ArgumentError, "request must be provided" if request.nil?
1172
+
1173
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1beta::QueryAudienceExportRequest
1174
+
1175
+ # Converts hash and nil to an options object
1176
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1177
+
1178
+ # Customize the options with defaults
1179
+ call_metadata = @config.rpcs.query_audience_export.metadata.to_h
1180
+
1181
+ # Set x-goog-api-client and x-goog-user-project headers
1182
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1183
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1184
+ gapic_version: ::Google::Analytics::Data::V1beta::VERSION,
1185
+ transports_version_send: [:rest]
1186
+
1187
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1188
+
1189
+ options.apply_defaults timeout: @config.rpcs.query_audience_export.timeout,
1190
+ metadata: call_metadata,
1191
+ retry_policy: @config.rpcs.query_audience_export.retry_policy
1192
+
1193
+ options.apply_defaults timeout: @config.timeout,
1194
+ metadata: @config.metadata,
1195
+ retry_policy: @config.retry_policy
1196
+
1197
+ @analytics_data_stub.query_audience_export request, options do |result, operation|
1198
+ yield result, operation if block_given?
1199
+ return result
1200
+ end
1201
+ rescue ::Gapic::Rest::Error => e
1202
+ raise ::Google::Cloud::Error.from_error(e)
1203
+ end
1204
+
1205
+ ##
1206
+ # Gets configuration metadata about a specific audience export. This method
1207
+ # can be used to understand an audience export after it has been created.
1208
+ #
1209
+ # See [Creating an Audience
1210
+ # Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
1211
+ # for an introduction to Audience Exports with examples.
1212
+ #
1213
+ # Audience Export APIs have some methods at alpha and other methods at beta
1214
+ # stability. The intention is to advance methods to beta stability after some
1215
+ # feedback and adoption. To give your feedback on this API, complete the
1216
+ # [Google Analytics Audience Export API
1217
+ # Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
1218
+ #
1219
+ # @overload get_audience_export(request, options = nil)
1220
+ # Pass arguments to `get_audience_export` via a request object, either of type
1221
+ # {::Google::Analytics::Data::V1beta::GetAudienceExportRequest} or an equivalent Hash.
1222
+ #
1223
+ # @param request [::Google::Analytics::Data::V1beta::GetAudienceExportRequest, ::Hash]
1224
+ # A request object representing the call parameters. Required. To specify no
1225
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1226
+ # @param options [::Gapic::CallOptions, ::Hash]
1227
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1228
+ #
1229
+ # @overload get_audience_export(name: nil)
1230
+ # Pass arguments to `get_audience_export` via keyword arguments. Note that at
1231
+ # least one keyword argument is required. To specify no parameters, or to keep all
1232
+ # the default parameter values, pass an empty Hash as a request object (see above).
1233
+ #
1234
+ # @param name [::String]
1235
+ # Required. The audience export resource name.
1236
+ # Format: `properties/{property}/audienceExports/{audience_export}`
1237
+ # @yield [result, operation] Access the result along with the TransportOperation object
1238
+ # @yieldparam result [::Google::Analytics::Data::V1beta::AudienceExport]
1239
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1240
+ #
1241
+ # @return [::Google::Analytics::Data::V1beta::AudienceExport]
1242
+ #
1243
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1244
+ #
1245
+ # @example Basic example
1246
+ # require "google/analytics/data/v1beta"
1247
+ #
1248
+ # # Create a client object. The client can be reused for multiple calls.
1249
+ # client = Google::Analytics::Data::V1beta::AnalyticsData::Rest::Client.new
1250
+ #
1251
+ # # Create a request. To set request fields, pass in keyword arguments.
1252
+ # request = Google::Analytics::Data::V1beta::GetAudienceExportRequest.new
1253
+ #
1254
+ # # Call the get_audience_export method.
1255
+ # result = client.get_audience_export request
1256
+ #
1257
+ # # The returned object is of type Google::Analytics::Data::V1beta::AudienceExport.
1258
+ # p result
1259
+ #
1260
+ def get_audience_export request, options = nil
1261
+ raise ::ArgumentError, "request must be provided" if request.nil?
1262
+
1263
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1beta::GetAudienceExportRequest
1264
+
1265
+ # Converts hash and nil to an options object
1266
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1267
+
1268
+ # Customize the options with defaults
1269
+ call_metadata = @config.rpcs.get_audience_export.metadata.to_h
1270
+
1271
+ # Set x-goog-api-client and x-goog-user-project headers
1272
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1273
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1274
+ gapic_version: ::Google::Analytics::Data::V1beta::VERSION,
1275
+ transports_version_send: [:rest]
1276
+
1277
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1278
+
1279
+ options.apply_defaults timeout: @config.rpcs.get_audience_export.timeout,
1280
+ metadata: call_metadata,
1281
+ retry_policy: @config.rpcs.get_audience_export.retry_policy
1282
+
1283
+ options.apply_defaults timeout: @config.timeout,
1284
+ metadata: @config.metadata,
1285
+ retry_policy: @config.retry_policy
1286
+
1287
+ @analytics_data_stub.get_audience_export request, options do |result, operation|
1288
+ yield result, operation if block_given?
1289
+ return result
1290
+ end
1291
+ rescue ::Gapic::Rest::Error => e
1292
+ raise ::Google::Cloud::Error.from_error(e)
1293
+ end
1294
+
1295
+ ##
1296
+ # Lists all audience exports for a property. This method can be used for you
1297
+ # to find and reuse existing audience exports rather than creating
1298
+ # unnecessary new audience exports. The same audience can have multiple
1299
+ # audience exports that represent the export of users that were in an
1300
+ # audience on different days.
1301
+ #
1302
+ # See [Creating an Audience
1303
+ # Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
1304
+ # for an introduction to Audience Exports with examples.
1305
+ #
1306
+ # Audience Export APIs have some methods at alpha and other methods at beta
1307
+ # stability. The intention is to advance methods to beta stability after some
1308
+ # feedback and adoption. To give your feedback on this API, complete the
1309
+ # [Google Analytics Audience Export API
1310
+ # Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
1311
+ #
1312
+ # @overload list_audience_exports(request, options = nil)
1313
+ # Pass arguments to `list_audience_exports` via a request object, either of type
1314
+ # {::Google::Analytics::Data::V1beta::ListAudienceExportsRequest} or an equivalent Hash.
1315
+ #
1316
+ # @param request [::Google::Analytics::Data::V1beta::ListAudienceExportsRequest, ::Hash]
1317
+ # A request object representing the call parameters. Required. To specify no
1318
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1319
+ # @param options [::Gapic::CallOptions, ::Hash]
1320
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1321
+ #
1322
+ # @overload list_audience_exports(parent: nil, page_size: nil, page_token: nil)
1323
+ # Pass arguments to `list_audience_exports` via keyword arguments. Note that at
1324
+ # least one keyword argument is required. To specify no parameters, or to keep all
1325
+ # the default parameter values, pass an empty Hash as a request object (see above).
1326
+ #
1327
+ # @param parent [::String]
1328
+ # Required. All audience exports for this property will be listed in the
1329
+ # response. Format: `properties/{property}`
1330
+ # @param page_size [::Integer]
1331
+ # Optional. The maximum number of audience exports to return. The service may
1332
+ # return fewer than this value. If unspecified, at most 200 audience exports
1333
+ # will be returned. The maximum value is 1000 (higher values will be coerced
1334
+ # to the maximum).
1335
+ # @param page_token [::String]
1336
+ # Optional. A page token, received from a previous `ListAudienceExports`
1337
+ # call. Provide this to retrieve the subsequent page.
1338
+ #
1339
+ # When paginating, all other parameters provided to `ListAudienceExports`
1340
+ # must match the call that provided the page token.
1341
+ # @yield [result, operation] Access the result along with the TransportOperation object
1342
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Analytics::Data::V1beta::AudienceExport>]
1343
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1344
+ #
1345
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Analytics::Data::V1beta::AudienceExport>]
1346
+ #
1347
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1348
+ #
1349
+ # @example Basic example
1350
+ # require "google/analytics/data/v1beta"
1351
+ #
1352
+ # # Create a client object. The client can be reused for multiple calls.
1353
+ # client = Google::Analytics::Data::V1beta::AnalyticsData::Rest::Client.new
1354
+ #
1355
+ # # Create a request. To set request fields, pass in keyword arguments.
1356
+ # request = Google::Analytics::Data::V1beta::ListAudienceExportsRequest.new
1357
+ #
1358
+ # # Call the list_audience_exports method.
1359
+ # result = client.list_audience_exports request
1360
+ #
1361
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1362
+ # # over elements, and API calls will be issued to fetch pages as needed.
1363
+ # result.each do |item|
1364
+ # # Each element is of type ::Google::Analytics::Data::V1beta::AudienceExport.
1365
+ # p item
1366
+ # end
1367
+ #
1368
+ def list_audience_exports request, options = nil
1369
+ raise ::ArgumentError, "request must be provided" if request.nil?
1370
+
1371
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1beta::ListAudienceExportsRequest
1372
+
1373
+ # Converts hash and nil to an options object
1374
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1375
+
1376
+ # Customize the options with defaults
1377
+ call_metadata = @config.rpcs.list_audience_exports.metadata.to_h
1378
+
1379
+ # Set x-goog-api-client and x-goog-user-project headers
1380
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1381
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1382
+ gapic_version: ::Google::Analytics::Data::V1beta::VERSION,
1383
+ transports_version_send: [:rest]
1384
+
1385
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1386
+
1387
+ options.apply_defaults timeout: @config.rpcs.list_audience_exports.timeout,
1388
+ metadata: call_metadata,
1389
+ retry_policy: @config.rpcs.list_audience_exports.retry_policy
1390
+
1391
+ options.apply_defaults timeout: @config.timeout,
1392
+ metadata: @config.metadata,
1393
+ retry_policy: @config.retry_policy
1394
+
1395
+ @analytics_data_stub.list_audience_exports request, options do |result, operation|
1396
+ result = ::Gapic::Rest::PagedEnumerable.new @analytics_data_stub, :list_audience_exports, "audience_exports", request, result, options
1397
+ yield result, operation if block_given?
1398
+ return result
1399
+ end
1400
+ rescue ::Gapic::Rest::Error => e
1401
+ raise ::Google::Cloud::Error.from_error(e)
1402
+ end
1403
+
961
1404
  ##
962
1405
  # Configuration class for the AnalyticsData REST API.
963
1406
  #
@@ -1118,6 +1561,26 @@ module Google
1118
1561
  # @return [::Gapic::Config::Method]
1119
1562
  #
1120
1563
  attr_reader :check_compatibility
1564
+ ##
1565
+ # RPC-specific configuration for `create_audience_export`
1566
+ # @return [::Gapic::Config::Method]
1567
+ #
1568
+ attr_reader :create_audience_export
1569
+ ##
1570
+ # RPC-specific configuration for `query_audience_export`
1571
+ # @return [::Gapic::Config::Method]
1572
+ #
1573
+ attr_reader :query_audience_export
1574
+ ##
1575
+ # RPC-specific configuration for `get_audience_export`
1576
+ # @return [::Gapic::Config::Method]
1577
+ #
1578
+ attr_reader :get_audience_export
1579
+ ##
1580
+ # RPC-specific configuration for `list_audience_exports`
1581
+ # @return [::Gapic::Config::Method]
1582
+ #
1583
+ attr_reader :list_audience_exports
1121
1584
 
1122
1585
  # @private
1123
1586
  def initialize parent_rpcs = nil
@@ -1135,6 +1598,14 @@ module Google
1135
1598
  @run_realtime_report = ::Gapic::Config::Method.new run_realtime_report_config
1136
1599
  check_compatibility_config = parent_rpcs.check_compatibility if parent_rpcs.respond_to? :check_compatibility
1137
1600
  @check_compatibility = ::Gapic::Config::Method.new check_compatibility_config
1601
+ create_audience_export_config = parent_rpcs.create_audience_export if parent_rpcs.respond_to? :create_audience_export
1602
+ @create_audience_export = ::Gapic::Config::Method.new create_audience_export_config
1603
+ query_audience_export_config = parent_rpcs.query_audience_export if parent_rpcs.respond_to? :query_audience_export
1604
+ @query_audience_export = ::Gapic::Config::Method.new query_audience_export_config
1605
+ get_audience_export_config = parent_rpcs.get_audience_export if parent_rpcs.respond_to? :get_audience_export
1606
+ @get_audience_export = ::Gapic::Config::Method.new get_audience_export_config
1607
+ list_audience_exports_config = parent_rpcs.list_audience_exports if parent_rpcs.respond_to? :list_audience_exports
1608
+ @list_audience_exports = ::Gapic::Config::Method.new list_audience_exports_config
1138
1609
 
1139
1610
  yield self if block_given?
1140
1611
  end