blob: 7784bbc690f2f001c236fc1eb30f2f4315470664 [file] [log] [blame]
Kevin Moore0946dce2021-02-04 09:58:04 -08001// This is a generated file (see the discoveryapis_generator project).
2
3// ignore_for_file: camel_case_types
4// ignore_for_file: comment_references
5// ignore_for_file: file_names
6// ignore_for_file: library_names
7// ignore_for_file: lines_longer_than_80_chars
8// ignore_for_file: non_constant_identifier_names
9// ignore_for_file: prefer_expression_function_bodies
Kevin Moore0946dce2021-02-04 09:58:04 -080010// ignore_for_file: prefer_interpolation_to_compose_strings
11// ignore_for_file: unnecessary_brace_in_string_interps
12// ignore_for_file: unnecessary_cast
13// ignore_for_file: unnecessary_lambdas
Kevin Moore0946dce2021-02-04 09:58:04 -080014// ignore_for_file: unnecessary_string_interpolations
15
16/// Google Analytics Admin API - v1alpha
17///
18/// For more information, see
19/// <http://code.google.com/apis/analytics/docs/mgmt/home.html>
20///
21/// Create an instance of [GoogleAnalyticsAdminApi] to access these resources:
22///
23/// - [AccountSummariesResource]
24/// - [AccountsResource]
25/// - [AccountsUserLinksResource]
26/// - [PropertiesResource]
27/// - [PropertiesAndroidAppDataStreamsResource]
28/// - [PropertiesFirebaseLinksResource]
29/// - [PropertiesGoogleAdsLinksResource]
30/// - [PropertiesIosAppDataStreamsResource]
31/// - [PropertiesUserLinksResource]
32/// - [PropertiesWebDataStreamsResource]
33library analyticsadmin.v1alpha;
34
35import 'dart:async' as async;
36import 'dart:convert' as convert;
37import 'dart:core' as core;
38
39import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
40import 'package:http/http.dart' as http;
41
42import '../src/user_agent.dart';
43
44export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
45 show ApiRequestError, DetailedApiRequestError;
46
47class GoogleAnalyticsAdminApi {
48 /// Edit Google Analytics management entities
49 static const analyticsEditScope =
50 'https://www.googleapis.com/auth/analytics.edit';
51
52 /// Manage Google Analytics Account users by email address
53 static const analyticsManageUsersScope =
54 'https://www.googleapis.com/auth/analytics.manage.users';
55
56 /// View Google Analytics user permissions
57 static const analyticsManageUsersReadonlyScope =
58 'https://www.googleapis.com/auth/analytics.manage.users.readonly';
59
60 /// See and download your Google Analytics data
61 static const analyticsReadonlyScope =
62 'https://www.googleapis.com/auth/analytics.readonly';
63
64 final commons.ApiRequester _requester;
65
66 AccountSummariesResource get accountSummaries =>
67 AccountSummariesResource(_requester);
68 AccountsResource get accounts => AccountsResource(_requester);
69 PropertiesResource get properties => PropertiesResource(_requester);
70
71 GoogleAnalyticsAdminApi(http.Client client,
72 {core.String rootUrl = 'https://analyticsadmin.googleapis.com/',
73 core.String servicePath = ''})
74 : _requester =
75 commons.ApiRequester(client, rootUrl, servicePath, userAgent);
76}
77
78class AccountSummariesResource {
79 final commons.ApiRequester _requester;
80
81 AccountSummariesResource(commons.ApiRequester client) : _requester = client;
82
83 /// Returns summaries of all accounts accessible by the caller.
84 ///
85 /// Request parameters:
86 ///
87 /// [pageSize] - The maximum number of AccountSummary resources to return. The
88 /// service may return fewer than this value, even if there are additional
89 /// pages. If unspecified, at most 50 resources will be returned. The maximum
90 /// value is 200; (higher values will be coerced to the maximum)
91 ///
92 /// [pageToken] - A page token, received from a previous
93 /// `ListAccountSummaries` call. Provide this to retrieve the subsequent page.
94 /// When paginating, all other parameters provided to `ListAccountSummaries`
95 /// must match the call that provided the page token.
96 ///
97 /// [$fields] - Selector specifying which fields to include in a partial
98 /// response.
99 ///
100 /// Completes with a
101 /// [GoogleAnalyticsAdminV1alphaListAccountSummariesResponse].
102 ///
103 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
104 /// error.
105 ///
106 /// If the used [http.Client] completes with an error when making a REST call,
107 /// this method will complete with the same error.
108 async.Future<GoogleAnalyticsAdminV1alphaListAccountSummariesResponse> list({
Kevin Moore58e22332021-02-25 10:11:41 -0800109 core.int? pageSize,
110 core.String? pageToken,
111 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800112 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800113 final _queryParams = <core.String, core.List<core.String>>{
114 if (pageSize != null) 'pageSize': ['${pageSize}'],
115 if (pageToken != null) 'pageToken': [pageToken],
116 if ($fields != null) 'fields': [$fields],
117 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800118
Kevin Moore0c926a62021-02-05 11:30:57 -0800119 const _url = 'v1alpha/accountSummaries';
Kevin Moore0946dce2021-02-04 09:58:04 -0800120
Kevin Mooredc994e82021-02-05 09:36:45 -0800121 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800122 _url,
123 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -0800124 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800125 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800126 return GoogleAnalyticsAdminV1alphaListAccountSummariesResponse.fromJson(
127 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800128 }
129}
130
131class AccountsResource {
132 final commons.ApiRequester _requester;
133
134 AccountsUserLinksResource get userLinks =>
135 AccountsUserLinksResource(_requester);
136
137 AccountsResource(commons.ApiRequester client) : _requester = client;
138
139 /// Marks target Account as soft-deleted (ie: "trashed") and returns it.
140 ///
141 /// This API does not have a method to restore soft-deleted accounts. However,
142 /// they can be restored using the Trash Can UI. If the accounts are not
143 /// restored before the expiration time, the account and all child resources
144 /// (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently
145 /// purged. https://support.google.com/analytics/answer/6154772 Returns an
146 /// error if the target is not found.
147 ///
148 /// Request parameters:
149 ///
150 /// [name] - Required. The name of the Account to soft-delete. Format:
151 /// accounts/{account} Example: "accounts/100"
152 /// Value must have pattern `^accounts/\[^/\]+$`.
153 ///
154 /// [$fields] - Selector specifying which fields to include in a partial
155 /// response.
156 ///
157 /// Completes with a [GoogleProtobufEmpty].
158 ///
159 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
160 /// error.
161 ///
162 /// If the used [http.Client] completes with an error when making a REST call,
163 /// this method will complete with the same error.
164 async.Future<GoogleProtobufEmpty> delete(
165 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -0800166 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800167 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800168 final _queryParams = <core.String, core.List<core.String>>{
169 if ($fields != null) 'fields': [$fields],
170 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800171
Kevin Moore0c926a62021-02-05 11:30:57 -0800172 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -0800173
Kevin Mooredc994e82021-02-05 09:36:45 -0800174 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800175 _url,
176 'DELETE',
Kevin Moore0946dce2021-02-04 09:58:04 -0800177 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800178 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800179 return GoogleProtobufEmpty.fromJson(
180 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800181 }
182
183 /// Lookup for a single Account.
184 ///
185 /// Request parameters:
186 ///
187 /// [name] - Required. The name of the account to lookup. Format:
188 /// accounts/{account} Example: "accounts/100"
189 /// Value must have pattern `^accounts/\[^/\]+$`.
190 ///
191 /// [$fields] - Selector specifying which fields to include in a partial
192 /// response.
193 ///
194 /// Completes with a [GoogleAnalyticsAdminV1alphaAccount].
195 ///
196 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
197 /// error.
198 ///
199 /// If the used [http.Client] completes with an error when making a REST call,
200 /// this method will complete with the same error.
201 async.Future<GoogleAnalyticsAdminV1alphaAccount> get(
202 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -0800203 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800204 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800205 final _queryParams = <core.String, core.List<core.String>>{
206 if ($fields != null) 'fields': [$fields],
207 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800208
Kevin Moore0c926a62021-02-05 11:30:57 -0800209 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -0800210
Kevin Mooredc994e82021-02-05 09:36:45 -0800211 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800212 _url,
213 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -0800214 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800215 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800216 return GoogleAnalyticsAdminV1alphaAccount.fromJson(
217 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800218 }
219
220 /// Get data sharing settings on an account.
221 ///
222 /// Data sharing settings are singletons.
223 ///
224 /// Request parameters:
225 ///
226 /// [name] - Required. The name of the settings to lookup. Format:
227 /// accounts/{account}/dataSharingSettings Example:
228 /// "accounts/1000/dataSharingSettings"
229 /// Value must have pattern `^accounts/\[^/\]+/dataSharingSettings$`.
230 ///
231 /// [$fields] - Selector specifying which fields to include in a partial
232 /// response.
233 ///
234 /// Completes with a [GoogleAnalyticsAdminV1alphaDataSharingSettings].
235 ///
236 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
237 /// error.
238 ///
239 /// If the used [http.Client] completes with an error when making a REST call,
240 /// this method will complete with the same error.
241 async.Future<GoogleAnalyticsAdminV1alphaDataSharingSettings>
242 getDataSharingSettings(
243 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -0800244 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800245 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800246 final _queryParams = <core.String, core.List<core.String>>{
247 if ($fields != null) 'fields': [$fields],
248 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800249
Kevin Moore0c926a62021-02-05 11:30:57 -0800250 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -0800251
Kevin Mooredc994e82021-02-05 09:36:45 -0800252 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800253 _url,
254 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -0800255 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800256 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800257 return GoogleAnalyticsAdminV1alphaDataSharingSettings.fromJson(
258 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800259 }
260
261 /// Returns all accounts accessible by the caller.
262 ///
263 /// Note that these accounts might not currently have GA4 properties.
264 /// Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an
265 /// empty list if no relevant accounts are found.
266 ///
267 /// Request parameters:
268 ///
269 /// [pageSize] - The maximum number of resources to return. The service may
270 /// return fewer than this value, even if there are additional pages. If
271 /// unspecified, at most 50 resources will be returned. The maximum value is
272 /// 200; (higher values will be coerced to the maximum)
273 ///
274 /// [pageToken] - A page token, received from a previous `ListAccounts` call.
275 /// Provide this to retrieve the subsequent page. When paginating, all other
276 /// parameters provided to `ListAccounts` must match the call that provided
277 /// the page token.
278 ///
279 /// [showDeleted] - Whether to include soft-deleted (ie: "trashed") Accounts
280 /// in the results. Accounts can be inspected to determine whether they are
281 /// deleted or not.
282 ///
283 /// [$fields] - Selector specifying which fields to include in a partial
284 /// response.
285 ///
286 /// Completes with a [GoogleAnalyticsAdminV1alphaListAccountsResponse].
287 ///
288 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
289 /// error.
290 ///
291 /// If the used [http.Client] completes with an error when making a REST call,
292 /// this method will complete with the same error.
293 async.Future<GoogleAnalyticsAdminV1alphaListAccountsResponse> list({
Kevin Moore58e22332021-02-25 10:11:41 -0800294 core.int? pageSize,
295 core.String? pageToken,
296 core.bool? showDeleted,
297 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800298 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800299 final _queryParams = <core.String, core.List<core.String>>{
300 if (pageSize != null) 'pageSize': ['${pageSize}'],
301 if (pageToken != null) 'pageToken': [pageToken],
302 if (showDeleted != null) 'showDeleted': ['${showDeleted}'],
303 if ($fields != null) 'fields': [$fields],
304 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800305
Kevin Moore0c926a62021-02-05 11:30:57 -0800306 const _url = 'v1alpha/accounts';
Kevin Moore0946dce2021-02-04 09:58:04 -0800307
Kevin Mooredc994e82021-02-05 09:36:45 -0800308 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800309 _url,
310 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -0800311 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800312 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800313 return GoogleAnalyticsAdminV1alphaListAccountsResponse.fromJson(
314 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800315 }
316
317 /// Updates an account.
318 ///
319 /// [request] - The metadata request object.
320 ///
321 /// Request parameters:
322 ///
323 /// [name] - Output only. Resource name of this account. Format:
324 /// accounts/{account} Example: "accounts/100"
325 /// Value must have pattern `^accounts/\[^/\]+$`.
326 ///
Kevin Mooreb3758bc2021-02-25 10:03:59 -0800327 /// [updateMask] - Required. The list of fields to be updated. Field names
328 /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
329 /// be updated. To replace the entire entity, use one path with the string "*"
330 /// to match all fields.
Kevin Moore0946dce2021-02-04 09:58:04 -0800331 ///
332 /// [$fields] - Selector specifying which fields to include in a partial
333 /// response.
334 ///
335 /// Completes with a [GoogleAnalyticsAdminV1alphaAccount].
336 ///
337 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
338 /// error.
339 ///
340 /// If the used [http.Client] completes with an error when making a REST call,
341 /// this method will complete with the same error.
342 async.Future<GoogleAnalyticsAdminV1alphaAccount> patch(
343 GoogleAnalyticsAdminV1alphaAccount request,
344 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -0800345 core.String? updateMask,
346 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800347 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -0800348 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -0800349 final _queryParams = <core.String, core.List<core.String>>{
350 if (updateMask != null) 'updateMask': [updateMask],
351 if ($fields != null) 'fields': [$fields],
352 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800353
Kevin Moore0c926a62021-02-05 11:30:57 -0800354 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -0800355
Kevin Mooredc994e82021-02-05 09:36:45 -0800356 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800357 _url,
358 'PATCH',
359 body: _body,
360 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800361 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800362 return GoogleAnalyticsAdminV1alphaAccount.fromJson(
363 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800364 }
365
366 /// Requests a ticket for creating an account.
367 ///
368 /// [request] - The metadata request object.
369 ///
370 /// Request parameters:
371 ///
372 /// [$fields] - Selector specifying which fields to include in a partial
373 /// response.
374 ///
375 /// Completes with a
376 /// [GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse].
377 ///
378 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
379 /// error.
380 ///
381 /// If the used [http.Client] completes with an error when making a REST call,
382 /// this method will complete with the same error.
383 async.Future<GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse>
384 provisionAccountTicket(
385 GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest request, {
Kevin Moore58e22332021-02-25 10:11:41 -0800386 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800387 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -0800388 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -0800389 final _queryParams = <core.String, core.List<core.String>>{
390 if ($fields != null) 'fields': [$fields],
391 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800392
Kevin Moore0c926a62021-02-05 11:30:57 -0800393 const _url = 'v1alpha/accounts:provisionAccountTicket';
Kevin Moore0946dce2021-02-04 09:58:04 -0800394
Kevin Mooredc994e82021-02-05 09:36:45 -0800395 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800396 _url,
397 'POST',
398 body: _body,
399 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800400 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800401 return GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse.fromJson(
402 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800403 }
404}
405
406class AccountsUserLinksResource {
407 final commons.ApiRequester _requester;
408
409 AccountsUserLinksResource(commons.ApiRequester client) : _requester = client;
410
411 /// Lists all user links on an account or property, including implicit ones
412 /// that come from effective permissions granted by groups or organization
413 /// admin roles.
414 ///
415 /// If a returned user link does not have direct permissions, they cannot be
416 /// removed from the account or property directly with the DeleteUserLink
417 /// command. They have to be removed from the group/etc that gives them
418 /// permissions, which is currently only usable/discoverable in the GA or GMP
419 /// UIs.
420 ///
421 /// [request] - The metadata request object.
422 ///
423 /// Request parameters:
424 ///
425 /// [parent] - Required. Example format: accounts/1234
426 /// Value must have pattern `^accounts/\[^/\]+$`.
427 ///
428 /// [$fields] - Selector specifying which fields to include in a partial
429 /// response.
430 ///
431 /// Completes with a [GoogleAnalyticsAdminV1alphaAuditUserLinksResponse].
432 ///
433 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
434 /// error.
435 ///
436 /// If the used [http.Client] completes with an error when making a REST call,
437 /// this method will complete with the same error.
438 async.Future<GoogleAnalyticsAdminV1alphaAuditUserLinksResponse> audit(
439 GoogleAnalyticsAdminV1alphaAuditUserLinksRequest request,
440 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -0800441 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800442 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -0800443 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -0800444 final _queryParams = <core.String, core.List<core.String>>{
445 if ($fields != null) 'fields': [$fields],
446 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800447
Kevin Moore0c926a62021-02-05 11:30:57 -0800448 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -0800449 commons.Escaper.ecapeVariableReserved('$parent') +
450 '/userLinks:audit';
451
Kevin Mooredc994e82021-02-05 09:36:45 -0800452 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800453 _url,
454 'POST',
455 body: _body,
456 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800457 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800458 return GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.fromJson(
459 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800460 }
461
462 /// Creates information about multiple users' links to an account or property.
463 ///
464 /// This method is transactional. If any UserLink cannot be created, none of
465 /// the UserLinks will be created.
466 ///
467 /// [request] - The metadata request object.
468 ///
469 /// Request parameters:
470 ///
471 /// [parent] - Required. The account or property that all user links in the
472 /// request are for. This field is required. The parent field in the
473 /// CreateUserLinkRequest messages must either be empty or match this field.
474 /// Example format: accounts/1234
475 /// Value must have pattern `^accounts/\[^/\]+$`.
476 ///
477 /// [$fields] - Selector specifying which fields to include in a partial
478 /// response.
479 ///
480 /// Completes with a
481 /// [GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse].
482 ///
483 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
484 /// error.
485 ///
486 /// If the used [http.Client] completes with an error when making a REST call,
487 /// this method will complete with the same error.
488 async.Future<GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse>
489 batchCreate(
490 GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest request,
491 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -0800492 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800493 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -0800494 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -0800495 final _queryParams = <core.String, core.List<core.String>>{
496 if ($fields != null) 'fields': [$fields],
497 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800498
Kevin Moore0c926a62021-02-05 11:30:57 -0800499 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -0800500 commons.Escaper.ecapeVariableReserved('$parent') +
501 '/userLinks:batchCreate';
502
Kevin Mooredc994e82021-02-05 09:36:45 -0800503 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800504 _url,
505 'POST',
506 body: _body,
507 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800508 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800509 return GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse.fromJson(
510 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800511 }
512
513 /// Deletes information about multiple users' links to an account or property.
514 ///
515 /// [request] - The metadata request object.
516 ///
517 /// Request parameters:
518 ///
519 /// [parent] - Required. The account or property that all user links in the
520 /// request are for. The parent of all values for user link names to delete
521 /// must match this field. Example format: accounts/1234
522 /// Value must have pattern `^accounts/\[^/\]+$`.
523 ///
524 /// [$fields] - Selector specifying which fields to include in a partial
525 /// response.
526 ///
527 /// Completes with a [GoogleProtobufEmpty].
528 ///
529 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
530 /// error.
531 ///
532 /// If the used [http.Client] completes with an error when making a REST call,
533 /// this method will complete with the same error.
534 async.Future<GoogleProtobufEmpty> batchDelete(
535 GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest request,
536 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -0800537 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800538 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -0800539 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -0800540 final _queryParams = <core.String, core.List<core.String>>{
541 if ($fields != null) 'fields': [$fields],
542 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800543
Kevin Moore0c926a62021-02-05 11:30:57 -0800544 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -0800545 commons.Escaper.ecapeVariableReserved('$parent') +
546 '/userLinks:batchDelete';
547
Kevin Mooredc994e82021-02-05 09:36:45 -0800548 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800549 _url,
550 'POST',
551 body: _body,
552 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800553 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800554 return GoogleProtobufEmpty.fromJson(
555 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800556 }
557
558 /// Gets information about multiple users' links to an account or property.
559 ///
560 /// Request parameters:
561 ///
562 /// [parent] - Required. The account or property that all user links in the
563 /// request are for. The parent of all provided values for the 'names' field
564 /// must match this field. Example format: accounts/1234
565 /// Value must have pattern `^accounts/\[^/\]+$`.
566 ///
567 /// [names] - Required. The names of the user links to retrieve. A maximum of
568 /// 1000 user links can be retrieved in a batch. Format:
569 /// accounts/{accountId}/userLinks/{userLinkId}
570 ///
571 /// [$fields] - Selector specifying which fields to include in a partial
572 /// response.
573 ///
574 /// Completes with a [GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse].
575 ///
576 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
577 /// error.
578 ///
579 /// If the used [http.Client] completes with an error when making a REST call,
580 /// this method will complete with the same error.
581 async.Future<GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse> batchGet(
582 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -0800583 core.List<core.String>? names,
584 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800585 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800586 final _queryParams = <core.String, core.List<core.String>>{
587 if (names != null) 'names': names,
588 if ($fields != null) 'fields': [$fields],
589 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800590
Kevin Moore0c926a62021-02-05 11:30:57 -0800591 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -0800592 commons.Escaper.ecapeVariableReserved('$parent') +
593 '/userLinks:batchGet';
594
Kevin Mooredc994e82021-02-05 09:36:45 -0800595 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800596 _url,
597 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -0800598 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800599 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800600 return GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse.fromJson(
601 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800602 }
603
604 /// Updates information about multiple users' links to an account or property.
605 ///
606 /// [request] - The metadata request object.
607 ///
608 /// Request parameters:
609 ///
610 /// [parent] - Required. The account or property that all user links in the
611 /// request are for. The parent field in the UpdateUserLinkRequest messages
612 /// must either be empty or match this field. Example format: accounts/1234
613 /// Value must have pattern `^accounts/\[^/\]+$`.
614 ///
615 /// [$fields] - Selector specifying which fields to include in a partial
616 /// response.
617 ///
618 /// Completes with a
619 /// [GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse].
620 ///
621 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
622 /// error.
623 ///
624 /// If the used [http.Client] completes with an error when making a REST call,
625 /// this method will complete with the same error.
626 async.Future<GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse>
627 batchUpdate(
628 GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest request,
629 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -0800630 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800631 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -0800632 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -0800633 final _queryParams = <core.String, core.List<core.String>>{
634 if ($fields != null) 'fields': [$fields],
635 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800636
Kevin Moore0c926a62021-02-05 11:30:57 -0800637 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -0800638 commons.Escaper.ecapeVariableReserved('$parent') +
639 '/userLinks:batchUpdate';
640
Kevin Mooredc994e82021-02-05 09:36:45 -0800641 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800642 _url,
643 'POST',
644 body: _body,
645 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800646 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800647 return GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse.fromJson(
648 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800649 }
650
651 /// Creates a user link on an account or property.
652 ///
653 /// If the user with the specified email already has permissions on the
654 /// account or property, then the user's existing permissions will be unioned
655 /// with the permissions specified in the new UserLink.
656 ///
657 /// [request] - The metadata request object.
658 ///
659 /// Request parameters:
660 ///
661 /// [parent] - Required. Example format: accounts/1234
662 /// Value must have pattern `^accounts/\[^/\]+$`.
663 ///
664 /// [notifyNewUser] - Optional. If set, then email the new user notifying them
665 /// that they've been granted permissions to the resource.
666 ///
667 /// [$fields] - Selector specifying which fields to include in a partial
668 /// response.
669 ///
670 /// Completes with a [GoogleAnalyticsAdminV1alphaUserLink].
671 ///
672 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
673 /// error.
674 ///
675 /// If the used [http.Client] completes with an error when making a REST call,
676 /// this method will complete with the same error.
677 async.Future<GoogleAnalyticsAdminV1alphaUserLink> create(
678 GoogleAnalyticsAdminV1alphaUserLink request,
679 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -0800680 core.bool? notifyNewUser,
681 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800682 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -0800683 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -0800684 final _queryParams = <core.String, core.List<core.String>>{
685 if (notifyNewUser != null) 'notifyNewUser': ['${notifyNewUser}'],
686 if ($fields != null) 'fields': [$fields],
687 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800688
Kevin Moore0c926a62021-02-05 11:30:57 -0800689 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -0800690 commons.Escaper.ecapeVariableReserved('$parent') +
691 '/userLinks';
692
Kevin Mooredc994e82021-02-05 09:36:45 -0800693 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800694 _url,
695 'POST',
696 body: _body,
697 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800698 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800699 return GoogleAnalyticsAdminV1alphaUserLink.fromJson(
700 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800701 }
702
703 /// Deletes a user link on an account or property.
704 ///
705 /// Request parameters:
706 ///
707 /// [name] - Required. Example format: accounts/1234/userLinks/5678
708 /// Value must have pattern `^accounts/\[^/\]+/userLinks/\[^/\]+$`.
709 ///
710 /// [$fields] - Selector specifying which fields to include in a partial
711 /// response.
712 ///
713 /// Completes with a [GoogleProtobufEmpty].
714 ///
715 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
716 /// error.
717 ///
718 /// If the used [http.Client] completes with an error when making a REST call,
719 /// this method will complete with the same error.
720 async.Future<GoogleProtobufEmpty> delete(
721 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -0800722 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800723 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800724 final _queryParams = <core.String, core.List<core.String>>{
725 if ($fields != null) 'fields': [$fields],
726 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800727
Kevin Moore0c926a62021-02-05 11:30:57 -0800728 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -0800729
Kevin Mooredc994e82021-02-05 09:36:45 -0800730 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800731 _url,
732 'DELETE',
Kevin Moore0946dce2021-02-04 09:58:04 -0800733 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800734 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800735 return GoogleProtobufEmpty.fromJson(
736 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800737 }
738
739 /// Gets information about a user's link to an account or property.
740 ///
741 /// Request parameters:
742 ///
743 /// [name] - Required. Example format: accounts/1234/userLinks/5678
744 /// Value must have pattern `^accounts/\[^/\]+/userLinks/\[^/\]+$`.
745 ///
746 /// [$fields] - Selector specifying which fields to include in a partial
747 /// response.
748 ///
749 /// Completes with a [GoogleAnalyticsAdminV1alphaUserLink].
750 ///
751 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
752 /// error.
753 ///
754 /// If the used [http.Client] completes with an error when making a REST call,
755 /// this method will complete with the same error.
756 async.Future<GoogleAnalyticsAdminV1alphaUserLink> get(
757 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -0800758 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800759 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800760 final _queryParams = <core.String, core.List<core.String>>{
761 if ($fields != null) 'fields': [$fields],
762 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800763
Kevin Moore0c926a62021-02-05 11:30:57 -0800764 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -0800765
Kevin Mooredc994e82021-02-05 09:36:45 -0800766 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800767 _url,
768 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -0800769 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800770 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800771 return GoogleAnalyticsAdminV1alphaUserLink.fromJson(
772 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800773 }
774
775 /// Lists all user links on an account or property.
776 ///
777 /// Request parameters:
778 ///
779 /// [parent] - Required. Example format: accounts/1234
780 /// Value must have pattern `^accounts/\[^/\]+$`.
781 ///
782 /// [pageSize] - The maximum number of user links to return. The service may
783 /// return fewer than this value. If unspecified, at most 200 user links will
784 /// be returned. The maximum value is 500; values above 500 will be coerced to
785 /// 500.
786 ///
787 /// [pageToken] - A page token, received from a previous `ListUserLinks` call.
788 /// Provide this to retrieve the subsequent page. When paginating, all other
789 /// parameters provided to `ListUserLinks` must match the call that provided
790 /// the page token.
791 ///
792 /// [$fields] - Selector specifying which fields to include in a partial
793 /// response.
794 ///
795 /// Completes with a [GoogleAnalyticsAdminV1alphaListUserLinksResponse].
796 ///
797 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
798 /// error.
799 ///
800 /// If the used [http.Client] completes with an error when making a REST call,
801 /// this method will complete with the same error.
802 async.Future<GoogleAnalyticsAdminV1alphaListUserLinksResponse> list(
803 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -0800804 core.int? pageSize,
805 core.String? pageToken,
806 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800807 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800808 final _queryParams = <core.String, core.List<core.String>>{
809 if (pageSize != null) 'pageSize': ['${pageSize}'],
810 if (pageToken != null) 'pageToken': [pageToken],
811 if ($fields != null) 'fields': [$fields],
812 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800813
Kevin Moore0c926a62021-02-05 11:30:57 -0800814 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -0800815 commons.Escaper.ecapeVariableReserved('$parent') +
816 '/userLinks';
817
Kevin Mooredc994e82021-02-05 09:36:45 -0800818 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800819 _url,
820 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -0800821 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800822 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800823 return GoogleAnalyticsAdminV1alphaListUserLinksResponse.fromJson(
824 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800825 }
826
827 /// Updates a user link on an account or property.
828 ///
829 /// [request] - The metadata request object.
830 ///
831 /// Request parameters:
832 ///
833 /// [name] - Example format: properties/1234/userLinks/5678
834 /// Value must have pattern `^accounts/\[^/\]+/userLinks/\[^/\]+$`.
835 ///
836 /// [$fields] - Selector specifying which fields to include in a partial
837 /// response.
838 ///
839 /// Completes with a [GoogleAnalyticsAdminV1alphaUserLink].
840 ///
841 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
842 /// error.
843 ///
844 /// If the used [http.Client] completes with an error when making a REST call,
845 /// this method will complete with the same error.
846 async.Future<GoogleAnalyticsAdminV1alphaUserLink> patch(
847 GoogleAnalyticsAdminV1alphaUserLink request,
848 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -0800849 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800850 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -0800851 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -0800852 final _queryParams = <core.String, core.List<core.String>>{
853 if ($fields != null) 'fields': [$fields],
854 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800855
Kevin Moore0c926a62021-02-05 11:30:57 -0800856 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -0800857
Kevin Mooredc994e82021-02-05 09:36:45 -0800858 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800859 _url,
860 'PATCH',
861 body: _body,
862 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800863 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800864 return GoogleAnalyticsAdminV1alphaUserLink.fromJson(
865 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800866 }
867}
868
869class PropertiesResource {
870 final commons.ApiRequester _requester;
871
872 PropertiesAndroidAppDataStreamsResource get androidAppDataStreams =>
873 PropertiesAndroidAppDataStreamsResource(_requester);
874 PropertiesFirebaseLinksResource get firebaseLinks =>
875 PropertiesFirebaseLinksResource(_requester);
876 PropertiesGoogleAdsLinksResource get googleAdsLinks =>
877 PropertiesGoogleAdsLinksResource(_requester);
878 PropertiesIosAppDataStreamsResource get iosAppDataStreams =>
879 PropertiesIosAppDataStreamsResource(_requester);
880 PropertiesUserLinksResource get userLinks =>
881 PropertiesUserLinksResource(_requester);
882 PropertiesWebDataStreamsResource get webDataStreams =>
883 PropertiesWebDataStreamsResource(_requester);
884
885 PropertiesResource(commons.ApiRequester client) : _requester = client;
886
887 /// Creates an "GA4" property with the specified location and attributes.
888 ///
889 /// [request] - The metadata request object.
890 ///
891 /// Request parameters:
892 ///
893 /// [$fields] - Selector specifying which fields to include in a partial
894 /// response.
895 ///
896 /// Completes with a [GoogleAnalyticsAdminV1alphaProperty].
897 ///
898 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
899 /// error.
900 ///
901 /// If the used [http.Client] completes with an error when making a REST call,
902 /// this method will complete with the same error.
903 async.Future<GoogleAnalyticsAdminV1alphaProperty> create(
904 GoogleAnalyticsAdminV1alphaProperty request, {
Kevin Moore58e22332021-02-25 10:11:41 -0800905 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800906 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -0800907 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -0800908 final _queryParams = <core.String, core.List<core.String>>{
909 if ($fields != null) 'fields': [$fields],
910 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800911
Kevin Moore0c926a62021-02-05 11:30:57 -0800912 const _url = 'v1alpha/properties';
Kevin Moore0946dce2021-02-04 09:58:04 -0800913
Kevin Mooredc994e82021-02-05 09:36:45 -0800914 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800915 _url,
916 'POST',
917 body: _body,
918 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800919 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800920 return GoogleAnalyticsAdminV1alphaProperty.fromJson(
921 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800922 }
923
924 /// Marks target Property as soft-deleted (ie: "trashed") and returns it.
925 ///
926 /// This API does not have a method to restore soft-deleted properties.
927 /// However, they can be restored using the Trash Can UI. If the properties
928 /// are not restored before the expiration time, the Property and all child
929 /// resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently
930 /// purged. https://support.google.com/analytics/answer/6154772 Returns an
931 /// error if the target is not found, or is not an GA4 Property.
932 ///
933 /// Request parameters:
934 ///
935 /// [name] - Required. The name of the Property to soft-delete. Format:
936 /// properties/{property_id} Example: "properties/1000"
937 /// Value must have pattern `^properties/\[^/\]+$`.
938 ///
939 /// [$fields] - Selector specifying which fields to include in a partial
940 /// response.
941 ///
942 /// Completes with a [GoogleProtobufEmpty].
943 ///
944 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
945 /// error.
946 ///
947 /// If the used [http.Client] completes with an error when making a REST call,
948 /// this method will complete with the same error.
949 async.Future<GoogleProtobufEmpty> delete(
950 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -0800951 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800952 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800953 final _queryParams = <core.String, core.List<core.String>>{
954 if ($fields != null) 'fields': [$fields],
955 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800956
Kevin Moore0c926a62021-02-05 11:30:57 -0800957 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -0800958
Kevin Mooredc994e82021-02-05 09:36:45 -0800959 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800960 _url,
961 'DELETE',
Kevin Moore0946dce2021-02-04 09:58:04 -0800962 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -0800963 );
Kevin Mooredc994e82021-02-05 09:36:45 -0800964 return GoogleProtobufEmpty.fromJson(
965 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -0800966 }
967
968 /// Lookup for a single "GA4" Property.
969 ///
970 /// Request parameters:
971 ///
972 /// [name] - Required. The name of the property to lookup. Format:
973 /// properties/{property_id} Example: "properties/1000"
974 /// Value must have pattern `^properties/\[^/\]+$`.
975 ///
976 /// [$fields] - Selector specifying which fields to include in a partial
977 /// response.
978 ///
979 /// Completes with a [GoogleAnalyticsAdminV1alphaProperty].
980 ///
981 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
982 /// error.
983 ///
984 /// If the used [http.Client] completes with an error when making a REST call,
985 /// this method will complete with the same error.
986 async.Future<GoogleAnalyticsAdminV1alphaProperty> get(
987 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -0800988 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -0800989 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -0800990 final _queryParams = <core.String, core.List<core.String>>{
991 if ($fields != null) 'fields': [$fields],
992 };
Kevin Moore0946dce2021-02-04 09:58:04 -0800993
Kevin Moore0c926a62021-02-05 11:30:57 -0800994 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -0800995
Kevin Mooredc994e82021-02-05 09:36:45 -0800996 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -0800997 _url,
998 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -0800999 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001000 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001001 return GoogleAnalyticsAdminV1alphaProperty.fromJson(
1002 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001003 }
1004
1005 /// Returns child Properties under the specified parent Account.
1006 ///
1007 /// Only "GA4" properties will be returned. Properties will be excluded if the
1008 /// caller does not have access. Soft-deleted (ie: "trashed") properties are
1009 /// excluded by default. Returns an empty list if no relevant properties are
1010 /// found.
1011 ///
1012 /// Request parameters:
1013 ///
1014 /// [filter] - Required. An expression for filtering the results of the
1015 /// request. Fields eligible for filtering are: `parent:`(The resource name of
1016 /// the parent account) or `firebase_project:`(The id or number of the linked
1017 /// firebase project). Some examples of filters: ``` | Filter | Description |
1018 /// |-----------------------------|-------------------------------------------|
1019 /// | parent:accounts/123 | The account with account id: 123. | |
1020 /// firebase_project:project-id | The firebase project with id: project-id. |
1021 /// | firebase_project:123 | The firebase project with number: 123. | ```
1022 ///
1023 /// [pageSize] - The maximum number of resources to return. The service may
1024 /// return fewer than this value, even if there are additional pages. If
1025 /// unspecified, at most 50 resources will be returned. The maximum value is
1026 /// 200; (higher values will be coerced to the maximum)
1027 ///
1028 /// [pageToken] - A page token, received from a previous `ListProperties`
1029 /// call. Provide this to retrieve the subsequent page. When paginating, all
1030 /// other parameters provided to `ListProperties` must match the call that
1031 /// provided the page token.
1032 ///
1033 /// [showDeleted] - Whether to include soft-deleted (ie: "trashed") Properties
1034 /// in the results. Properties can be inspected to determine whether they are
1035 /// deleted or not.
1036 ///
1037 /// [$fields] - Selector specifying which fields to include in a partial
1038 /// response.
1039 ///
1040 /// Completes with a [GoogleAnalyticsAdminV1alphaListPropertiesResponse].
1041 ///
1042 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1043 /// error.
1044 ///
1045 /// If the used [http.Client] completes with an error when making a REST call,
1046 /// this method will complete with the same error.
1047 async.Future<GoogleAnalyticsAdminV1alphaListPropertiesResponse> list({
Kevin Moore58e22332021-02-25 10:11:41 -08001048 core.String? filter,
1049 core.int? pageSize,
1050 core.String? pageToken,
1051 core.bool? showDeleted,
1052 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001053 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001054 final _queryParams = <core.String, core.List<core.String>>{
1055 if (filter != null) 'filter': [filter],
1056 if (pageSize != null) 'pageSize': ['${pageSize}'],
1057 if (pageToken != null) 'pageToken': [pageToken],
1058 if (showDeleted != null) 'showDeleted': ['${showDeleted}'],
1059 if ($fields != null) 'fields': [$fields],
1060 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001061
Kevin Moore0c926a62021-02-05 11:30:57 -08001062 const _url = 'v1alpha/properties';
Kevin Moore0946dce2021-02-04 09:58:04 -08001063
Kevin Mooredc994e82021-02-05 09:36:45 -08001064 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001065 _url,
1066 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08001067 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001068 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001069 return GoogleAnalyticsAdminV1alphaListPropertiesResponse.fromJson(
1070 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001071 }
1072
1073 /// Updates a property.
1074 ///
1075 /// [request] - The metadata request object.
1076 ///
1077 /// Request parameters:
1078 ///
1079 /// [name] - Output only. Resource name of this property. Format:
1080 /// properties/{property_id} Example: "properties/1000"
1081 /// Value must have pattern `^properties/\[^/\]+$`.
1082 ///
Kevin Mooreb3758bc2021-02-25 10:03:59 -08001083 /// [updateMask] - Required. The list of fields to be updated. Field names
1084 /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
1085 /// be updated. To replace the entire entity, use one path with the string "*"
1086 /// to match all fields.
Kevin Moore0946dce2021-02-04 09:58:04 -08001087 ///
1088 /// [$fields] - Selector specifying which fields to include in a partial
1089 /// response.
1090 ///
1091 /// Completes with a [GoogleAnalyticsAdminV1alphaProperty].
1092 ///
1093 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1094 /// error.
1095 ///
1096 /// If the used [http.Client] completes with an error when making a REST call,
1097 /// this method will complete with the same error.
1098 async.Future<GoogleAnalyticsAdminV1alphaProperty> patch(
1099 GoogleAnalyticsAdminV1alphaProperty request,
1100 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001101 core.String? updateMask,
1102 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001103 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08001104 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08001105 final _queryParams = <core.String, core.List<core.String>>{
1106 if (updateMask != null) 'updateMask': [updateMask],
1107 if ($fields != null) 'fields': [$fields],
1108 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001109
Kevin Moore0c926a62021-02-05 11:30:57 -08001110 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001111
Kevin Mooredc994e82021-02-05 09:36:45 -08001112 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001113 _url,
1114 'PATCH',
1115 body: _body,
1116 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001117 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001118 return GoogleAnalyticsAdminV1alphaProperty.fromJson(
1119 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001120 }
1121}
1122
1123class PropertiesAndroidAppDataStreamsResource {
1124 final commons.ApiRequester _requester;
1125
1126 PropertiesAndroidAppDataStreamsResource(commons.ApiRequester client)
1127 : _requester = client;
1128
1129 /// Creates an Android app stream with the specified location and attributes.
1130 ///
1131 /// Note that an Android app stream must be linked to a Firebase app to
1132 /// receive traffic. To create a working app stream, make sure your property
1133 /// is linked to a Firebase project. Then, use the Firebase API to create a
1134 /// Firebase app, which will also create an appropriate data stream in
1135 /// Analytics (may take up to 24 hours).
1136 ///
1137 /// [request] - The metadata request object.
1138 ///
1139 /// Request parameters:
1140 ///
1141 /// [parent] - Required. The parent resource where this android app data
1142 /// stream will be created. Format: properties/123
1143 /// Value must have pattern `^properties/\[^/\]+$`.
1144 ///
1145 /// [$fields] - Selector specifying which fields to include in a partial
1146 /// response.
1147 ///
1148 /// Completes with a [GoogleAnalyticsAdminV1alphaAndroidAppDataStream].
1149 ///
1150 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1151 /// error.
1152 ///
1153 /// If the used [http.Client] completes with an error when making a REST call,
1154 /// this method will complete with the same error.
1155 async.Future<GoogleAnalyticsAdminV1alphaAndroidAppDataStream> create(
1156 GoogleAnalyticsAdminV1alphaAndroidAppDataStream request,
1157 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08001158 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001159 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08001160 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08001161 final _queryParams = <core.String, core.List<core.String>>{
1162 if ($fields != null) 'fields': [$fields],
1163 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001164
Kevin Moore0c926a62021-02-05 11:30:57 -08001165 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08001166 commons.Escaper.ecapeVariableReserved('$parent') +
1167 '/androidAppDataStreams';
1168
Kevin Mooredc994e82021-02-05 09:36:45 -08001169 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001170 _url,
1171 'POST',
1172 body: _body,
1173 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001174 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001175 return GoogleAnalyticsAdminV1alphaAndroidAppDataStream.fromJson(
1176 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001177 }
1178
1179 /// Deletes an android app stream on a property.
1180 ///
1181 /// Request parameters:
1182 ///
1183 /// [name] - Required. The name of the android app data stream to delete.
1184 /// Format: properties/{property_id}/androidAppDataStreams/{stream_id}
1185 /// Example: "properties/123/androidAppDataStreams/456"
1186 /// Value must have pattern
1187 /// `^properties/\[^/\]+/androidAppDataStreams/\[^/\]+$`.
1188 ///
1189 /// [$fields] - Selector specifying which fields to include in a partial
1190 /// response.
1191 ///
1192 /// Completes with a [GoogleProtobufEmpty].
1193 ///
1194 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1195 /// error.
1196 ///
1197 /// If the used [http.Client] completes with an error when making a REST call,
1198 /// this method will complete with the same error.
1199 async.Future<GoogleProtobufEmpty> delete(
1200 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001201 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001202 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001203 final _queryParams = <core.String, core.List<core.String>>{
1204 if ($fields != null) 'fields': [$fields],
1205 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001206
Kevin Moore0c926a62021-02-05 11:30:57 -08001207 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001208
Kevin Mooredc994e82021-02-05 09:36:45 -08001209 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001210 _url,
1211 'DELETE',
Kevin Moore0946dce2021-02-04 09:58:04 -08001212 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001213 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001214 return GoogleProtobufEmpty.fromJson(
1215 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001216 }
1217
1218 /// Lookup for a single AndroidAppDataStream
1219 ///
1220 /// Request parameters:
1221 ///
1222 /// [name] - Required. The name of the android app data stream to lookup.
1223 /// Format: properties/{property_id}/androidAppDataStreams/{stream_id}
1224 /// Example: "properties/123/androidAppDataStreams/456"
1225 /// Value must have pattern
1226 /// `^properties/\[^/\]+/androidAppDataStreams/\[^/\]+$`.
1227 ///
1228 /// [$fields] - Selector specifying which fields to include in a partial
1229 /// response.
1230 ///
1231 /// Completes with a [GoogleAnalyticsAdminV1alphaAndroidAppDataStream].
1232 ///
1233 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1234 /// error.
1235 ///
1236 /// If the used [http.Client] completes with an error when making a REST call,
1237 /// this method will complete with the same error.
1238 async.Future<GoogleAnalyticsAdminV1alphaAndroidAppDataStream> get(
1239 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001240 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001241 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001242 final _queryParams = <core.String, core.List<core.String>>{
1243 if ($fields != null) 'fields': [$fields],
1244 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001245
Kevin Moore0c926a62021-02-05 11:30:57 -08001246 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001247
Kevin Mooredc994e82021-02-05 09:36:45 -08001248 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001249 _url,
1250 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08001251 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001252 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001253 return GoogleAnalyticsAdminV1alphaAndroidAppDataStream.fromJson(
1254 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001255 }
1256
1257 /// Returns child android app streams under the specified parent property.
1258 ///
1259 /// Android app streams will be excluded if the caller does not have access.
1260 /// Returns an empty list if no relevant android app streams are found.
1261 ///
1262 /// Request parameters:
1263 ///
1264 /// [parent] - Required. The name of the parent property. For example, to
1265 /// limit results to app streams under the property with Id 123:
1266 /// "properties/123"
1267 /// Value must have pattern `^properties/\[^/\]+$`.
1268 ///
1269 /// [pageSize] - The maximum number of resources to return. If unspecified, at
1270 /// most 50 resources will be returned. The maximum value is 200; (higher
1271 /// values will be coerced to the maximum)
1272 ///
1273 /// [pageToken] - A page token, received from a previous call. Provide this to
1274 /// retrieve the subsequent page. When paginating, all other parameters
1275 /// provided to `ListAndroidAppDataStreams` must match the call that provided
1276 /// the page token.
1277 ///
1278 /// [$fields] - Selector specifying which fields to include in a partial
1279 /// response.
1280 ///
1281 /// Completes with a
1282 /// [GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse].
1283 ///
1284 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1285 /// error.
1286 ///
1287 /// If the used [http.Client] completes with an error when making a REST call,
1288 /// this method will complete with the same error.
1289 async.Future<GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse>
1290 list(
1291 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08001292 core.int? pageSize,
1293 core.String? pageToken,
1294 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001295 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001296 final _queryParams = <core.String, core.List<core.String>>{
1297 if (pageSize != null) 'pageSize': ['${pageSize}'],
1298 if (pageToken != null) 'pageToken': [pageToken],
1299 if ($fields != null) 'fields': [$fields],
1300 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001301
Kevin Moore0c926a62021-02-05 11:30:57 -08001302 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08001303 commons.Escaper.ecapeVariableReserved('$parent') +
1304 '/androidAppDataStreams';
1305
Kevin Mooredc994e82021-02-05 09:36:45 -08001306 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001307 _url,
1308 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08001309 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001310 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001311 return GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse
1312 .fromJson(_response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001313 }
1314
1315 /// Updates an android app stream on a property.
1316 ///
1317 /// [request] - The metadata request object.
1318 ///
1319 /// Request parameters:
1320 ///
1321 /// [name] - Output only. Resource name of this Data Stream. Format:
1322 /// properties/{property_id}/androidAppDataStreams/{stream_id} Example:
1323 /// "properties/1000/androidAppDataStreams/2000"
1324 /// Value must have pattern
1325 /// `^properties/\[^/\]+/androidAppDataStreams/\[^/\]+$`.
1326 ///
Kevin Mooreb3758bc2021-02-25 10:03:59 -08001327 /// [updateMask] - Required. The list of fields to be updated. Field names
1328 /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
1329 /// be updated. To replace the entire entity, use one path with the string "*"
1330 /// to match all fields.
Kevin Moore0946dce2021-02-04 09:58:04 -08001331 ///
1332 /// [$fields] - Selector specifying which fields to include in a partial
1333 /// response.
1334 ///
1335 /// Completes with a [GoogleAnalyticsAdminV1alphaAndroidAppDataStream].
1336 ///
1337 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1338 /// error.
1339 ///
1340 /// If the used [http.Client] completes with an error when making a REST call,
1341 /// this method will complete with the same error.
1342 async.Future<GoogleAnalyticsAdminV1alphaAndroidAppDataStream> patch(
1343 GoogleAnalyticsAdminV1alphaAndroidAppDataStream request,
1344 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001345 core.String? updateMask,
1346 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001347 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08001348 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08001349 final _queryParams = <core.String, core.List<core.String>>{
1350 if (updateMask != null) 'updateMask': [updateMask],
1351 if ($fields != null) 'fields': [$fields],
1352 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001353
Kevin Moore0c926a62021-02-05 11:30:57 -08001354 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001355
Kevin Mooredc994e82021-02-05 09:36:45 -08001356 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001357 _url,
1358 'PATCH',
1359 body: _body,
1360 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001361 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001362 return GoogleAnalyticsAdminV1alphaAndroidAppDataStream.fromJson(
1363 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001364 }
1365}
1366
1367class PropertiesFirebaseLinksResource {
1368 final commons.ApiRequester _requester;
1369
1370 PropertiesFirebaseLinksResource(commons.ApiRequester client)
1371 : _requester = client;
1372
1373 /// Creates a FirebaseLink.
1374 ///
1375 /// Properties can have at most one FirebaseLink.
1376 ///
1377 /// [request] - The metadata request object.
1378 ///
1379 /// Request parameters:
1380 ///
1381 /// [parent] - Required. Format: properties/{property_id} Example:
1382 /// properties/1234
1383 /// Value must have pattern `^properties/\[^/\]+$`.
1384 ///
1385 /// [$fields] - Selector specifying which fields to include in a partial
1386 /// response.
1387 ///
1388 /// Completes with a [GoogleAnalyticsAdminV1alphaFirebaseLink].
1389 ///
1390 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1391 /// error.
1392 ///
1393 /// If the used [http.Client] completes with an error when making a REST call,
1394 /// this method will complete with the same error.
1395 async.Future<GoogleAnalyticsAdminV1alphaFirebaseLink> create(
1396 GoogleAnalyticsAdminV1alphaFirebaseLink request,
1397 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08001398 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001399 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08001400 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08001401 final _queryParams = <core.String, core.List<core.String>>{
1402 if ($fields != null) 'fields': [$fields],
1403 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001404
Kevin Moore0c926a62021-02-05 11:30:57 -08001405 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08001406 commons.Escaper.ecapeVariableReserved('$parent') +
1407 '/firebaseLinks';
1408
Kevin Mooredc994e82021-02-05 09:36:45 -08001409 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001410 _url,
1411 'POST',
1412 body: _body,
1413 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001414 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001415 return GoogleAnalyticsAdminV1alphaFirebaseLink.fromJson(
1416 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001417 }
1418
1419 /// Deletes a FirebaseLink on a property
1420 ///
1421 /// Request parameters:
1422 ///
1423 /// [name] - Required. Format:
1424 /// properties/{property_id}/firebaseLinks/{firebase_link_id} Example:
1425 /// properties/1234/firebaseLinks/5678
1426 /// Value must have pattern `^properties/\[^/\]+/firebaseLinks/\[^/\]+$`.
1427 ///
1428 /// [$fields] - Selector specifying which fields to include in a partial
1429 /// response.
1430 ///
1431 /// Completes with a [GoogleProtobufEmpty].
1432 ///
1433 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1434 /// error.
1435 ///
1436 /// If the used [http.Client] completes with an error when making a REST call,
1437 /// this method will complete with the same error.
1438 async.Future<GoogleProtobufEmpty> delete(
1439 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001440 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001441 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001442 final _queryParams = <core.String, core.List<core.String>>{
1443 if ($fields != null) 'fields': [$fields],
1444 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001445
Kevin Moore0c926a62021-02-05 11:30:57 -08001446 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001447
Kevin Mooredc994e82021-02-05 09:36:45 -08001448 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001449 _url,
1450 'DELETE',
Kevin Moore0946dce2021-02-04 09:58:04 -08001451 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001452 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001453 return GoogleProtobufEmpty.fromJson(
1454 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001455 }
1456
1457 /// Lists FirebaseLinks on a property.
1458 ///
1459 /// Properties can have at most one FirebaseLink.
1460 ///
1461 /// Request parameters:
1462 ///
1463 /// [parent] - Required. Format: properties/{property_id} Example:
1464 /// properties/1234
1465 /// Value must have pattern `^properties/\[^/\]+$`.
1466 ///
1467 /// [pageSize] - The maximum number of resources to return. The service may
1468 /// return fewer than this value, even if there are additional pages. If
1469 /// unspecified, at most 50 resources will be returned. The maximum value is
1470 /// 200; (higher values will be coerced to the maximum)
1471 ///
1472 /// [pageToken] - A page token, received from a previous `ListFirebaseLinks`
1473 /// call. Provide this to retrieve the subsequent page. When paginating, all
1474 /// other parameters provided to `ListProperties` must match the call that
1475 /// provided the page token.
1476 ///
1477 /// [$fields] - Selector specifying which fields to include in a partial
1478 /// response.
1479 ///
1480 /// Completes with a [GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse].
1481 ///
1482 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1483 /// error.
1484 ///
1485 /// If the used [http.Client] completes with an error when making a REST call,
1486 /// this method will complete with the same error.
1487 async.Future<GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse> list(
1488 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08001489 core.int? pageSize,
1490 core.String? pageToken,
1491 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001492 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001493 final _queryParams = <core.String, core.List<core.String>>{
1494 if (pageSize != null) 'pageSize': ['${pageSize}'],
1495 if (pageToken != null) 'pageToken': [pageToken],
1496 if ($fields != null) 'fields': [$fields],
1497 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001498
Kevin Moore0c926a62021-02-05 11:30:57 -08001499 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08001500 commons.Escaper.ecapeVariableReserved('$parent') +
1501 '/firebaseLinks';
1502
Kevin Mooredc994e82021-02-05 09:36:45 -08001503 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001504 _url,
1505 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08001506 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001507 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001508 return GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse.fromJson(
1509 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001510 }
1511
1512 /// Updates a FirebaseLink on a property
1513 ///
1514 /// [request] - The metadata request object.
1515 ///
1516 /// Request parameters:
1517 ///
1518 /// [name] - Output only. Example format: properties/1234/firebaseLinks/5678
1519 /// Value must have pattern `^properties/\[^/\]+/firebaseLinks/\[^/\]+$`.
1520 ///
Kevin Mooreb3758bc2021-02-25 10:03:59 -08001521 /// [updateMask] - Required. The list of fields to be updated. Field names
1522 /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
1523 /// be updated. To replace the entire entity, use one path with the string "*"
1524 /// to match all fields.
Kevin Moore0946dce2021-02-04 09:58:04 -08001525 ///
1526 /// [$fields] - Selector specifying which fields to include in a partial
1527 /// response.
1528 ///
1529 /// Completes with a [GoogleAnalyticsAdminV1alphaFirebaseLink].
1530 ///
1531 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1532 /// error.
1533 ///
1534 /// If the used [http.Client] completes with an error when making a REST call,
1535 /// this method will complete with the same error.
1536 async.Future<GoogleAnalyticsAdminV1alphaFirebaseLink> patch(
1537 GoogleAnalyticsAdminV1alphaFirebaseLink request,
1538 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001539 core.String? updateMask,
1540 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001541 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08001542 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08001543 final _queryParams = <core.String, core.List<core.String>>{
1544 if (updateMask != null) 'updateMask': [updateMask],
1545 if ($fields != null) 'fields': [$fields],
1546 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001547
Kevin Moore0c926a62021-02-05 11:30:57 -08001548 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001549
Kevin Mooredc994e82021-02-05 09:36:45 -08001550 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001551 _url,
1552 'PATCH',
1553 body: _body,
1554 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001555 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001556 return GoogleAnalyticsAdminV1alphaFirebaseLink.fromJson(
1557 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001558 }
1559}
1560
1561class PropertiesGoogleAdsLinksResource {
1562 final commons.ApiRequester _requester;
1563
1564 PropertiesGoogleAdsLinksResource(commons.ApiRequester client)
1565 : _requester = client;
1566
1567 /// Creates a GoogleAdsLink.
1568 ///
1569 /// [request] - The metadata request object.
1570 ///
1571 /// Request parameters:
1572 ///
1573 /// [parent] - Required. Example format: properties/1234
1574 /// Value must have pattern `^properties/\[^/\]+$`.
1575 ///
1576 /// [$fields] - Selector specifying which fields to include in a partial
1577 /// response.
1578 ///
1579 /// Completes with a [GoogleAnalyticsAdminV1alphaGoogleAdsLink].
1580 ///
1581 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1582 /// error.
1583 ///
1584 /// If the used [http.Client] completes with an error when making a REST call,
1585 /// this method will complete with the same error.
1586 async.Future<GoogleAnalyticsAdminV1alphaGoogleAdsLink> create(
1587 GoogleAnalyticsAdminV1alphaGoogleAdsLink request,
1588 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08001589 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001590 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08001591 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08001592 final _queryParams = <core.String, core.List<core.String>>{
1593 if ($fields != null) 'fields': [$fields],
1594 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001595
Kevin Moore0c926a62021-02-05 11:30:57 -08001596 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08001597 commons.Escaper.ecapeVariableReserved('$parent') +
1598 '/googleAdsLinks';
1599
Kevin Mooredc994e82021-02-05 09:36:45 -08001600 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001601 _url,
1602 'POST',
1603 body: _body,
1604 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001605 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001606 return GoogleAnalyticsAdminV1alphaGoogleAdsLink.fromJson(
1607 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001608 }
1609
1610 /// Deletes a GoogleAdsLink on a property
1611 ///
1612 /// Request parameters:
1613 ///
1614 /// [name] - Required. Example format: properties/1234/googleAdsLinks/5678
1615 /// Value must have pattern `^properties/\[^/\]+/googleAdsLinks/\[^/\]+$`.
1616 ///
1617 /// [$fields] - Selector specifying which fields to include in a partial
1618 /// response.
1619 ///
1620 /// Completes with a [GoogleProtobufEmpty].
1621 ///
1622 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1623 /// error.
1624 ///
1625 /// If the used [http.Client] completes with an error when making a REST call,
1626 /// this method will complete with the same error.
1627 async.Future<GoogleProtobufEmpty> delete(
1628 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001629 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001630 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001631 final _queryParams = <core.String, core.List<core.String>>{
1632 if ($fields != null) 'fields': [$fields],
1633 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001634
Kevin Moore0c926a62021-02-05 11:30:57 -08001635 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001636
Kevin Mooredc994e82021-02-05 09:36:45 -08001637 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001638 _url,
1639 'DELETE',
Kevin Moore0946dce2021-02-04 09:58:04 -08001640 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001641 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001642 return GoogleProtobufEmpty.fromJson(
1643 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001644 }
1645
1646 /// Lists GoogleAdsLinks on a property.
1647 ///
1648 /// Request parameters:
1649 ///
1650 /// [parent] - Required. Example format: properties/1234
1651 /// Value must have pattern `^properties/\[^/\]+$`.
1652 ///
1653 /// [pageSize] - The maximum number of resources to return. If unspecified, at
1654 /// most 50 resources will be returned. The maximum value is 200 (higher
1655 /// values will be coerced to the maximum).
1656 ///
1657 /// [pageToken] - A page token, received from a previous `ListGoogleAdsLinks`
1658 /// call. Provide this to retrieve the subsequent page. When paginating, all
1659 /// other parameters provided to `ListGoogleAdsLinks` must match the call that
1660 /// provided the page token.
1661 ///
1662 /// [$fields] - Selector specifying which fields to include in a partial
1663 /// response.
1664 ///
1665 /// Completes with a [GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse].
1666 ///
1667 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1668 /// error.
1669 ///
1670 /// If the used [http.Client] completes with an error when making a REST call,
1671 /// this method will complete with the same error.
1672 async.Future<GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse> list(
1673 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08001674 core.int? pageSize,
1675 core.String? pageToken,
1676 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001677 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001678 final _queryParams = <core.String, core.List<core.String>>{
1679 if (pageSize != null) 'pageSize': ['${pageSize}'],
1680 if (pageToken != null) 'pageToken': [pageToken],
1681 if ($fields != null) 'fields': [$fields],
1682 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001683
Kevin Moore0c926a62021-02-05 11:30:57 -08001684 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08001685 commons.Escaper.ecapeVariableReserved('$parent') +
1686 '/googleAdsLinks';
1687
Kevin Mooredc994e82021-02-05 09:36:45 -08001688 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001689 _url,
1690 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08001691 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001692 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001693 return GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse.fromJson(
1694 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001695 }
1696
1697 /// Updates a GoogleAdsLink on a property
1698 ///
1699 /// [request] - The metadata request object.
1700 ///
1701 /// Request parameters:
1702 ///
1703 /// [name] - Output only. Format:
1704 /// properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note:
1705 /// googleAdsLinkId is not the Google Ads customer ID.
1706 /// Value must have pattern `^properties/\[^/\]+/googleAdsLinks/\[^/\]+$`.
1707 ///
Kevin Mooreb3758bc2021-02-25 10:03:59 -08001708 /// [updateMask] - Required. The list of fields to be updated. Field names
1709 /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
1710 /// be updated. To replace the entire entity, use one path with the string "*"
1711 /// to match all fields.
Kevin Moore0946dce2021-02-04 09:58:04 -08001712 ///
1713 /// [$fields] - Selector specifying which fields to include in a partial
1714 /// response.
1715 ///
1716 /// Completes with a [GoogleAnalyticsAdminV1alphaGoogleAdsLink].
1717 ///
1718 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1719 /// error.
1720 ///
1721 /// If the used [http.Client] completes with an error when making a REST call,
1722 /// this method will complete with the same error.
1723 async.Future<GoogleAnalyticsAdminV1alphaGoogleAdsLink> patch(
1724 GoogleAnalyticsAdminV1alphaGoogleAdsLink request,
1725 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001726 core.String? updateMask,
1727 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001728 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08001729 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08001730 final _queryParams = <core.String, core.List<core.String>>{
1731 if (updateMask != null) 'updateMask': [updateMask],
1732 if ($fields != null) 'fields': [$fields],
1733 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001734
Kevin Moore0c926a62021-02-05 11:30:57 -08001735 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001736
Kevin Mooredc994e82021-02-05 09:36:45 -08001737 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001738 _url,
1739 'PATCH',
1740 body: _body,
1741 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001742 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001743 return GoogleAnalyticsAdminV1alphaGoogleAdsLink.fromJson(
1744 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001745 }
1746}
1747
1748class PropertiesIosAppDataStreamsResource {
1749 final commons.ApiRequester _requester;
1750
1751 PropertiesIosAppDataStreamsResource(commons.ApiRequester client)
1752 : _requester = client;
1753
1754 /// Creates an iOS app stream with the specified location and attributes.
1755 ///
1756 /// Note that an iOS app stream must be linked to a Firebase app to receive
1757 /// traffic. To create a working app stream, make sure your property is linked
1758 /// to a Firebase project. Then, use the Firebase API to create a Firebase
1759 /// app, which will also create an appropriate data stream in Analytics (may
1760 /// take up to 24 hours).
1761 ///
1762 /// [request] - The metadata request object.
1763 ///
1764 /// Request parameters:
1765 ///
1766 /// [parent] - Required. The parent resource where this ios app data stream
1767 /// will be created. Format: properties/123
1768 /// Value must have pattern `^properties/\[^/\]+$`.
1769 ///
1770 /// [$fields] - Selector specifying which fields to include in a partial
1771 /// response.
1772 ///
1773 /// Completes with a [GoogleAnalyticsAdminV1alphaIosAppDataStream].
1774 ///
1775 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1776 /// error.
1777 ///
1778 /// If the used [http.Client] completes with an error when making a REST call,
1779 /// this method will complete with the same error.
1780 async.Future<GoogleAnalyticsAdminV1alphaIosAppDataStream> create(
1781 GoogleAnalyticsAdminV1alphaIosAppDataStream request,
1782 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08001783 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001784 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08001785 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08001786 final _queryParams = <core.String, core.List<core.String>>{
1787 if ($fields != null) 'fields': [$fields],
1788 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001789
Kevin Moore0c926a62021-02-05 11:30:57 -08001790 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08001791 commons.Escaper.ecapeVariableReserved('$parent') +
1792 '/iosAppDataStreams';
1793
Kevin Mooredc994e82021-02-05 09:36:45 -08001794 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001795 _url,
1796 'POST',
1797 body: _body,
1798 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001799 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001800 return GoogleAnalyticsAdminV1alphaIosAppDataStream.fromJson(
1801 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001802 }
1803
1804 /// Deletes an iOS app stream on a property.
1805 ///
1806 /// Request parameters:
1807 ///
1808 /// [name] - Required. The name of the iOS app data stream to delete. Format:
1809 /// properties/{property_id}/iosAppDataStreams/{stream_id} Example:
1810 /// "properties/123/iosAppDataStreams/456"
1811 /// Value must have pattern `^properties/\[^/\]+/iosAppDataStreams/\[^/\]+$`.
1812 ///
1813 /// [$fields] - Selector specifying which fields to include in a partial
1814 /// response.
1815 ///
1816 /// Completes with a [GoogleProtobufEmpty].
1817 ///
1818 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1819 /// error.
1820 ///
1821 /// If the used [http.Client] completes with an error when making a REST call,
1822 /// this method will complete with the same error.
1823 async.Future<GoogleProtobufEmpty> delete(
1824 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001825 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001826 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001827 final _queryParams = <core.String, core.List<core.String>>{
1828 if ($fields != null) 'fields': [$fields],
1829 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001830
Kevin Moore0c926a62021-02-05 11:30:57 -08001831 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001832
Kevin Mooredc994e82021-02-05 09:36:45 -08001833 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001834 _url,
1835 'DELETE',
Kevin Moore0946dce2021-02-04 09:58:04 -08001836 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001837 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001838 return GoogleProtobufEmpty.fromJson(
1839 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001840 }
1841
1842 /// Lookup for a single IosAppDataStream
1843 ///
1844 /// Request parameters:
1845 ///
1846 /// [name] - Required. The name of the iOS app data stream to lookup. Format:
1847 /// properties/{property_id}/iosAppDataStreams/{stream_id} Example:
1848 /// "properties/123/iosAppDataStreams/456"
1849 /// Value must have pattern `^properties/\[^/\]+/iosAppDataStreams/\[^/\]+$`.
1850 ///
1851 /// [$fields] - Selector specifying which fields to include in a partial
1852 /// response.
1853 ///
1854 /// Completes with a [GoogleAnalyticsAdminV1alphaIosAppDataStream].
1855 ///
1856 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1857 /// error.
1858 ///
1859 /// If the used [http.Client] completes with an error when making a REST call,
1860 /// this method will complete with the same error.
1861 async.Future<GoogleAnalyticsAdminV1alphaIosAppDataStream> get(
1862 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001863 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001864 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001865 final _queryParams = <core.String, core.List<core.String>>{
1866 if ($fields != null) 'fields': [$fields],
1867 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001868
Kevin Moore0c926a62021-02-05 11:30:57 -08001869 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001870
Kevin Mooredc994e82021-02-05 09:36:45 -08001871 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001872 _url,
1873 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08001874 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001875 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001876 return GoogleAnalyticsAdminV1alphaIosAppDataStream.fromJson(
1877 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001878 }
1879
1880 /// Returns child iOS app data streams under the specified parent property.
1881 ///
1882 /// iOS app data streams will be excluded if the caller does not have access.
1883 /// Returns an empty list if no relevant iOS app data streams are found.
1884 ///
1885 /// Request parameters:
1886 ///
1887 /// [parent] - Required. The name of the parent property. For example, to list
1888 /// results of app streams under the property with Id 123: "properties/123"
1889 /// Value must have pattern `^properties/\[^/\]+$`.
1890 ///
1891 /// [pageSize] - The maximum number of resources to return. If unspecified, at
1892 /// most 50 resources will be returned. The maximum value is 200; (higher
1893 /// values will be coerced to the maximum)
1894 ///
1895 /// [pageToken] - A page token, received from a previous
1896 /// `ListIosAppDataStreams` call. Provide this to retrieve the subsequent
1897 /// page. When paginating, all other parameters provided to
1898 /// `ListIosAppDataStreams` must match the call that provided the page token.
1899 ///
1900 /// [$fields] - Selector specifying which fields to include in a partial
1901 /// response.
1902 ///
1903 /// Completes with a
1904 /// [GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse].
1905 ///
1906 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1907 /// error.
1908 ///
1909 /// If the used [http.Client] completes with an error when making a REST call,
1910 /// this method will complete with the same error.
1911 async.Future<GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse> list(
1912 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08001913 core.int? pageSize,
1914 core.String? pageToken,
1915 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001916 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08001917 final _queryParams = <core.String, core.List<core.String>>{
1918 if (pageSize != null) 'pageSize': ['${pageSize}'],
1919 if (pageToken != null) 'pageToken': [pageToken],
1920 if ($fields != null) 'fields': [$fields],
1921 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001922
Kevin Moore0c926a62021-02-05 11:30:57 -08001923 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08001924 commons.Escaper.ecapeVariableReserved('$parent') +
1925 '/iosAppDataStreams';
1926
Kevin Mooredc994e82021-02-05 09:36:45 -08001927 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001928 _url,
1929 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08001930 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001931 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001932 return GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse.fromJson(
1933 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001934 }
1935
1936 /// Updates an iOS app stream on a property.
1937 ///
1938 /// [request] - The metadata request object.
1939 ///
1940 /// Request parameters:
1941 ///
1942 /// [name] - Output only. Resource name of this Data Stream. Format:
1943 /// properties/{property_id}/iosAppDataStreams/{stream_id} Example:
1944 /// "properties/1000/iosAppDataStreams/2000"
1945 /// Value must have pattern `^properties/\[^/\]+/iosAppDataStreams/\[^/\]+$`.
1946 ///
Kevin Mooreb3758bc2021-02-25 10:03:59 -08001947 /// [updateMask] - Required. The list of fields to be updated. Field names
1948 /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
1949 /// be updated. To replace the entire entity, use one path with the string "*"
1950 /// to match all fields.
Kevin Moore0946dce2021-02-04 09:58:04 -08001951 ///
1952 /// [$fields] - Selector specifying which fields to include in a partial
1953 /// response.
1954 ///
1955 /// Completes with a [GoogleAnalyticsAdminV1alphaIosAppDataStream].
1956 ///
1957 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
1958 /// error.
1959 ///
1960 /// If the used [http.Client] completes with an error when making a REST call,
1961 /// this method will complete with the same error.
1962 async.Future<GoogleAnalyticsAdminV1alphaIosAppDataStream> patch(
1963 GoogleAnalyticsAdminV1alphaIosAppDataStream request,
1964 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08001965 core.String? updateMask,
1966 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08001967 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08001968 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08001969 final _queryParams = <core.String, core.List<core.String>>{
1970 if (updateMask != null) 'updateMask': [updateMask],
1971 if ($fields != null) 'fields': [$fields],
1972 };
Kevin Moore0946dce2021-02-04 09:58:04 -08001973
Kevin Moore0c926a62021-02-05 11:30:57 -08001974 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08001975
Kevin Mooredc994e82021-02-05 09:36:45 -08001976 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08001977 _url,
1978 'PATCH',
1979 body: _body,
1980 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08001981 );
Kevin Mooredc994e82021-02-05 09:36:45 -08001982 return GoogleAnalyticsAdminV1alphaIosAppDataStream.fromJson(
1983 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08001984 }
1985}
1986
1987class PropertiesUserLinksResource {
1988 final commons.ApiRequester _requester;
1989
1990 PropertiesUserLinksResource(commons.ApiRequester client)
1991 : _requester = client;
1992
1993 /// Lists all user links on an account or property, including implicit ones
1994 /// that come from effective permissions granted by groups or organization
1995 /// admin roles.
1996 ///
1997 /// If a returned user link does not have direct permissions, they cannot be
1998 /// removed from the account or property directly with the DeleteUserLink
1999 /// command. They have to be removed from the group/etc that gives them
2000 /// permissions, which is currently only usable/discoverable in the GA or GMP
2001 /// UIs.
2002 ///
2003 /// [request] - The metadata request object.
2004 ///
2005 /// Request parameters:
2006 ///
2007 /// [parent] - Required. Example format: accounts/1234
2008 /// Value must have pattern `^properties/\[^/\]+$`.
2009 ///
2010 /// [$fields] - Selector specifying which fields to include in a partial
2011 /// response.
2012 ///
2013 /// Completes with a [GoogleAnalyticsAdminV1alphaAuditUserLinksResponse].
2014 ///
2015 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2016 /// error.
2017 ///
2018 /// If the used [http.Client] completes with an error when making a REST call,
2019 /// this method will complete with the same error.
2020 async.Future<GoogleAnalyticsAdminV1alphaAuditUserLinksResponse> audit(
2021 GoogleAnalyticsAdminV1alphaAuditUserLinksRequest request,
2022 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08002023 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002024 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08002025 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08002026 final _queryParams = <core.String, core.List<core.String>>{
2027 if ($fields != null) 'fields': [$fields],
2028 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002029
Kevin Moore0c926a62021-02-05 11:30:57 -08002030 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08002031 commons.Escaper.ecapeVariableReserved('$parent') +
2032 '/userLinks:audit';
2033
Kevin Mooredc994e82021-02-05 09:36:45 -08002034 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002035 _url,
2036 'POST',
2037 body: _body,
2038 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002039 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002040 return GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.fromJson(
2041 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002042 }
2043
2044 /// Creates information about multiple users' links to an account or property.
2045 ///
2046 /// This method is transactional. If any UserLink cannot be created, none of
2047 /// the UserLinks will be created.
2048 ///
2049 /// [request] - The metadata request object.
2050 ///
2051 /// Request parameters:
2052 ///
2053 /// [parent] - Required. The account or property that all user links in the
2054 /// request are for. This field is required. The parent field in the
2055 /// CreateUserLinkRequest messages must either be empty or match this field.
2056 /// Example format: accounts/1234
2057 /// Value must have pattern `^properties/\[^/\]+$`.
2058 ///
2059 /// [$fields] - Selector specifying which fields to include in a partial
2060 /// response.
2061 ///
2062 /// Completes with a
2063 /// [GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse].
2064 ///
2065 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2066 /// error.
2067 ///
2068 /// If the used [http.Client] completes with an error when making a REST call,
2069 /// this method will complete with the same error.
2070 async.Future<GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse>
2071 batchCreate(
2072 GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest request,
2073 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08002074 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002075 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08002076 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08002077 final _queryParams = <core.String, core.List<core.String>>{
2078 if ($fields != null) 'fields': [$fields],
2079 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002080
Kevin Moore0c926a62021-02-05 11:30:57 -08002081 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08002082 commons.Escaper.ecapeVariableReserved('$parent') +
2083 '/userLinks:batchCreate';
2084
Kevin Mooredc994e82021-02-05 09:36:45 -08002085 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002086 _url,
2087 'POST',
2088 body: _body,
2089 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002090 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002091 return GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse.fromJson(
2092 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002093 }
2094
2095 /// Deletes information about multiple users' links to an account or property.
2096 ///
2097 /// [request] - The metadata request object.
2098 ///
2099 /// Request parameters:
2100 ///
2101 /// [parent] - Required. The account or property that all user links in the
2102 /// request are for. The parent of all values for user link names to delete
2103 /// must match this field. Example format: accounts/1234
2104 /// Value must have pattern `^properties/\[^/\]+$`.
2105 ///
2106 /// [$fields] - Selector specifying which fields to include in a partial
2107 /// response.
2108 ///
2109 /// Completes with a [GoogleProtobufEmpty].
2110 ///
2111 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2112 /// error.
2113 ///
2114 /// If the used [http.Client] completes with an error when making a REST call,
2115 /// this method will complete with the same error.
2116 async.Future<GoogleProtobufEmpty> batchDelete(
2117 GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest request,
2118 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08002119 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002120 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08002121 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08002122 final _queryParams = <core.String, core.List<core.String>>{
2123 if ($fields != null) 'fields': [$fields],
2124 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002125
Kevin Moore0c926a62021-02-05 11:30:57 -08002126 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08002127 commons.Escaper.ecapeVariableReserved('$parent') +
2128 '/userLinks:batchDelete';
2129
Kevin Mooredc994e82021-02-05 09:36:45 -08002130 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002131 _url,
2132 'POST',
2133 body: _body,
2134 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002135 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002136 return GoogleProtobufEmpty.fromJson(
2137 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002138 }
2139
2140 /// Gets information about multiple users' links to an account or property.
2141 ///
2142 /// Request parameters:
2143 ///
2144 /// [parent] - Required. The account or property that all user links in the
2145 /// request are for. The parent of all provided values for the 'names' field
2146 /// must match this field. Example format: accounts/1234
2147 /// Value must have pattern `^properties/\[^/\]+$`.
2148 ///
2149 /// [names] - Required. The names of the user links to retrieve. A maximum of
2150 /// 1000 user links can be retrieved in a batch. Format:
2151 /// accounts/{accountId}/userLinks/{userLinkId}
2152 ///
2153 /// [$fields] - Selector specifying which fields to include in a partial
2154 /// response.
2155 ///
2156 /// Completes with a [GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse].
2157 ///
2158 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2159 /// error.
2160 ///
2161 /// If the used [http.Client] completes with an error when making a REST call,
2162 /// this method will complete with the same error.
2163 async.Future<GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse> batchGet(
2164 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08002165 core.List<core.String>? names,
2166 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002167 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08002168 final _queryParams = <core.String, core.List<core.String>>{
2169 if (names != null) 'names': names,
2170 if ($fields != null) 'fields': [$fields],
2171 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002172
Kevin Moore0c926a62021-02-05 11:30:57 -08002173 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08002174 commons.Escaper.ecapeVariableReserved('$parent') +
2175 '/userLinks:batchGet';
2176
Kevin Mooredc994e82021-02-05 09:36:45 -08002177 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002178 _url,
2179 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08002180 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002181 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002182 return GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse.fromJson(
2183 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002184 }
2185
2186 /// Updates information about multiple users' links to an account or property.
2187 ///
2188 /// [request] - The metadata request object.
2189 ///
2190 /// Request parameters:
2191 ///
2192 /// [parent] - Required. The account or property that all user links in the
2193 /// request are for. The parent field in the UpdateUserLinkRequest messages
2194 /// must either be empty or match this field. Example format: accounts/1234
2195 /// Value must have pattern `^properties/\[^/\]+$`.
2196 ///
2197 /// [$fields] - Selector specifying which fields to include in a partial
2198 /// response.
2199 ///
2200 /// Completes with a
2201 /// [GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse].
2202 ///
2203 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2204 /// error.
2205 ///
2206 /// If the used [http.Client] completes with an error when making a REST call,
2207 /// this method will complete with the same error.
2208 async.Future<GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse>
2209 batchUpdate(
2210 GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest request,
2211 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08002212 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002213 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08002214 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08002215 final _queryParams = <core.String, core.List<core.String>>{
2216 if ($fields != null) 'fields': [$fields],
2217 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002218
Kevin Moore0c926a62021-02-05 11:30:57 -08002219 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08002220 commons.Escaper.ecapeVariableReserved('$parent') +
2221 '/userLinks:batchUpdate';
2222
Kevin Mooredc994e82021-02-05 09:36:45 -08002223 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002224 _url,
2225 'POST',
2226 body: _body,
2227 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002228 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002229 return GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse.fromJson(
2230 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002231 }
2232
2233 /// Creates a user link on an account or property.
2234 ///
2235 /// If the user with the specified email already has permissions on the
2236 /// account or property, then the user's existing permissions will be unioned
2237 /// with the permissions specified in the new UserLink.
2238 ///
2239 /// [request] - The metadata request object.
2240 ///
2241 /// Request parameters:
2242 ///
2243 /// [parent] - Required. Example format: accounts/1234
2244 /// Value must have pattern `^properties/\[^/\]+$`.
2245 ///
2246 /// [notifyNewUser] - Optional. If set, then email the new user notifying them
2247 /// that they've been granted permissions to the resource.
2248 ///
2249 /// [$fields] - Selector specifying which fields to include in a partial
2250 /// response.
2251 ///
2252 /// Completes with a [GoogleAnalyticsAdminV1alphaUserLink].
2253 ///
2254 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2255 /// error.
2256 ///
2257 /// If the used [http.Client] completes with an error when making a REST call,
2258 /// this method will complete with the same error.
2259 async.Future<GoogleAnalyticsAdminV1alphaUserLink> create(
2260 GoogleAnalyticsAdminV1alphaUserLink request,
2261 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08002262 core.bool? notifyNewUser,
2263 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002264 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08002265 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08002266 final _queryParams = <core.String, core.List<core.String>>{
2267 if (notifyNewUser != null) 'notifyNewUser': ['${notifyNewUser}'],
2268 if ($fields != null) 'fields': [$fields],
2269 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002270
Kevin Moore0c926a62021-02-05 11:30:57 -08002271 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08002272 commons.Escaper.ecapeVariableReserved('$parent') +
2273 '/userLinks';
2274
Kevin Mooredc994e82021-02-05 09:36:45 -08002275 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002276 _url,
2277 'POST',
2278 body: _body,
2279 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002280 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002281 return GoogleAnalyticsAdminV1alphaUserLink.fromJson(
2282 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002283 }
2284
2285 /// Deletes a user link on an account or property.
2286 ///
2287 /// Request parameters:
2288 ///
2289 /// [name] - Required. Example format: accounts/1234/userLinks/5678
2290 /// Value must have pattern `^properties/\[^/\]+/userLinks/\[^/\]+$`.
2291 ///
2292 /// [$fields] - Selector specifying which fields to include in a partial
2293 /// response.
2294 ///
2295 /// Completes with a [GoogleProtobufEmpty].
2296 ///
2297 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2298 /// error.
2299 ///
2300 /// If the used [http.Client] completes with an error when making a REST call,
2301 /// this method will complete with the same error.
2302 async.Future<GoogleProtobufEmpty> delete(
2303 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08002304 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002305 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08002306 final _queryParams = <core.String, core.List<core.String>>{
2307 if ($fields != null) 'fields': [$fields],
2308 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002309
Kevin Moore0c926a62021-02-05 11:30:57 -08002310 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08002311
Kevin Mooredc994e82021-02-05 09:36:45 -08002312 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002313 _url,
2314 'DELETE',
Kevin Moore0946dce2021-02-04 09:58:04 -08002315 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002316 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002317 return GoogleProtobufEmpty.fromJson(
2318 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002319 }
2320
2321 /// Gets information about a user's link to an account or property.
2322 ///
2323 /// Request parameters:
2324 ///
2325 /// [name] - Required. Example format: accounts/1234/userLinks/5678
2326 /// Value must have pattern `^properties/\[^/\]+/userLinks/\[^/\]+$`.
2327 ///
2328 /// [$fields] - Selector specifying which fields to include in a partial
2329 /// response.
2330 ///
2331 /// Completes with a [GoogleAnalyticsAdminV1alphaUserLink].
2332 ///
2333 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2334 /// error.
2335 ///
2336 /// If the used [http.Client] completes with an error when making a REST call,
2337 /// this method will complete with the same error.
2338 async.Future<GoogleAnalyticsAdminV1alphaUserLink> get(
2339 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08002340 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002341 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08002342 final _queryParams = <core.String, core.List<core.String>>{
2343 if ($fields != null) 'fields': [$fields],
2344 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002345
Kevin Moore0c926a62021-02-05 11:30:57 -08002346 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08002347
Kevin Mooredc994e82021-02-05 09:36:45 -08002348 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002349 _url,
2350 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08002351 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002352 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002353 return GoogleAnalyticsAdminV1alphaUserLink.fromJson(
2354 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002355 }
2356
2357 /// Lists all user links on an account or property.
2358 ///
2359 /// Request parameters:
2360 ///
2361 /// [parent] - Required. Example format: accounts/1234
2362 /// Value must have pattern `^properties/\[^/\]+$`.
2363 ///
2364 /// [pageSize] - The maximum number of user links to return. The service may
2365 /// return fewer than this value. If unspecified, at most 200 user links will
2366 /// be returned. The maximum value is 500; values above 500 will be coerced to
2367 /// 500.
2368 ///
2369 /// [pageToken] - A page token, received from a previous `ListUserLinks` call.
2370 /// Provide this to retrieve the subsequent page. When paginating, all other
2371 /// parameters provided to `ListUserLinks` must match the call that provided
2372 /// the page token.
2373 ///
2374 /// [$fields] - Selector specifying which fields to include in a partial
2375 /// response.
2376 ///
2377 /// Completes with a [GoogleAnalyticsAdminV1alphaListUserLinksResponse].
2378 ///
2379 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2380 /// error.
2381 ///
2382 /// If the used [http.Client] completes with an error when making a REST call,
2383 /// this method will complete with the same error.
2384 async.Future<GoogleAnalyticsAdminV1alphaListUserLinksResponse> list(
2385 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08002386 core.int? pageSize,
2387 core.String? pageToken,
2388 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002389 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08002390 final _queryParams = <core.String, core.List<core.String>>{
2391 if (pageSize != null) 'pageSize': ['${pageSize}'],
2392 if (pageToken != null) 'pageToken': [pageToken],
2393 if ($fields != null) 'fields': [$fields],
2394 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002395
Kevin Moore0c926a62021-02-05 11:30:57 -08002396 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08002397 commons.Escaper.ecapeVariableReserved('$parent') +
2398 '/userLinks';
2399
Kevin Mooredc994e82021-02-05 09:36:45 -08002400 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002401 _url,
2402 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08002403 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002404 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002405 return GoogleAnalyticsAdminV1alphaListUserLinksResponse.fromJson(
2406 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002407 }
2408
2409 /// Updates a user link on an account or property.
2410 ///
2411 /// [request] - The metadata request object.
2412 ///
2413 /// Request parameters:
2414 ///
2415 /// [name] - Example format: properties/1234/userLinks/5678
2416 /// Value must have pattern `^properties/\[^/\]+/userLinks/\[^/\]+$`.
2417 ///
2418 /// [$fields] - Selector specifying which fields to include in a partial
2419 /// response.
2420 ///
2421 /// Completes with a [GoogleAnalyticsAdminV1alphaUserLink].
2422 ///
2423 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2424 /// error.
2425 ///
2426 /// If the used [http.Client] completes with an error when making a REST call,
2427 /// this method will complete with the same error.
2428 async.Future<GoogleAnalyticsAdminV1alphaUserLink> patch(
2429 GoogleAnalyticsAdminV1alphaUserLink request,
2430 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08002431 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002432 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08002433 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08002434 final _queryParams = <core.String, core.List<core.String>>{
2435 if ($fields != null) 'fields': [$fields],
2436 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002437
Kevin Moore0c926a62021-02-05 11:30:57 -08002438 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08002439
Kevin Mooredc994e82021-02-05 09:36:45 -08002440 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002441 _url,
2442 'PATCH',
2443 body: _body,
2444 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002445 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002446 return GoogleAnalyticsAdminV1alphaUserLink.fromJson(
2447 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002448 }
2449}
2450
2451class PropertiesWebDataStreamsResource {
2452 final commons.ApiRequester _requester;
2453
2454 PropertiesWebDataStreamsResource(commons.ApiRequester client)
2455 : _requester = client;
2456
2457 /// Creates a web stream with the specified location and attributes.
2458 ///
2459 /// [request] - The metadata request object.
2460 ///
2461 /// Request parameters:
2462 ///
2463 /// [parent] - Required. The parent resource where this web data stream will
2464 /// be created. Format: properties/123
2465 /// Value must have pattern `^properties/\[^/\]+$`.
2466 ///
2467 /// [$fields] - Selector specifying which fields to include in a partial
2468 /// response.
2469 ///
2470 /// Completes with a [GoogleAnalyticsAdminV1alphaWebDataStream].
2471 ///
2472 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2473 /// error.
2474 ///
2475 /// If the used [http.Client] completes with an error when making a REST call,
2476 /// this method will complete with the same error.
2477 async.Future<GoogleAnalyticsAdminV1alphaWebDataStream> create(
2478 GoogleAnalyticsAdminV1alphaWebDataStream request,
2479 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08002480 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002481 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08002482 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08002483 final _queryParams = <core.String, core.List<core.String>>{
2484 if ($fields != null) 'fields': [$fields],
2485 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002486
Kevin Moore0c926a62021-02-05 11:30:57 -08002487 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08002488 commons.Escaper.ecapeVariableReserved('$parent') +
2489 '/webDataStreams';
2490
Kevin Mooredc994e82021-02-05 09:36:45 -08002491 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002492 _url,
2493 'POST',
2494 body: _body,
2495 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002496 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002497 return GoogleAnalyticsAdminV1alphaWebDataStream.fromJson(
2498 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002499 }
2500
2501 /// Deletes a web stream on a property.
2502 ///
2503 /// Request parameters:
2504 ///
2505 /// [name] - Required. The name of the web data stream to delete. Format:
2506 /// properties/{property_id}/webDataStreams/{stream_id} Example:
2507 /// "properties/123/webDataStreams/456"
2508 /// Value must have pattern `^properties/\[^/\]+/webDataStreams/\[^/\]+$`.
2509 ///
2510 /// [$fields] - Selector specifying which fields to include in a partial
2511 /// response.
2512 ///
2513 /// Completes with a [GoogleProtobufEmpty].
2514 ///
2515 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2516 /// error.
2517 ///
2518 /// If the used [http.Client] completes with an error when making a REST call,
2519 /// this method will complete with the same error.
2520 async.Future<GoogleProtobufEmpty> delete(
2521 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08002522 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002523 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08002524 final _queryParams = <core.String, core.List<core.String>>{
2525 if ($fields != null) 'fields': [$fields],
2526 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002527
Kevin Moore0c926a62021-02-05 11:30:57 -08002528 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08002529
Kevin Mooredc994e82021-02-05 09:36:45 -08002530 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002531 _url,
2532 'DELETE',
Kevin Moore0946dce2021-02-04 09:58:04 -08002533 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002534 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002535 return GoogleProtobufEmpty.fromJson(
2536 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002537 }
2538
2539 /// Lookup for a single WebDataStream
2540 ///
2541 /// Request parameters:
2542 ///
2543 /// [name] - Required. The name of the web data stream to lookup. Format:
2544 /// properties/{property_id}/webDataStreams/{stream_id} Example:
2545 /// "properties/123/webDataStreams/456"
2546 /// Value must have pattern `^properties/\[^/\]+/webDataStreams/\[^/\]+$`.
2547 ///
2548 /// [$fields] - Selector specifying which fields to include in a partial
2549 /// response.
2550 ///
2551 /// Completes with a [GoogleAnalyticsAdminV1alphaWebDataStream].
2552 ///
2553 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2554 /// error.
2555 ///
2556 /// If the used [http.Client] completes with an error when making a REST call,
2557 /// this method will complete with the same error.
2558 async.Future<GoogleAnalyticsAdminV1alphaWebDataStream> get(
2559 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08002560 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002561 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08002562 final _queryParams = <core.String, core.List<core.String>>{
2563 if ($fields != null) 'fields': [$fields],
2564 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002565
Kevin Moore0c926a62021-02-05 11:30:57 -08002566 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08002567
Kevin Mooredc994e82021-02-05 09:36:45 -08002568 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002569 _url,
2570 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08002571 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002572 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002573 return GoogleAnalyticsAdminV1alphaWebDataStream.fromJson(
2574 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002575 }
2576
2577 /// Returns the singleton enhanced measurement settings for this web stream.
2578 ///
2579 /// Note that the stream must enable enhanced measurement for these settings
2580 /// to take effect.
2581 ///
2582 /// Request parameters:
2583 ///
2584 /// [name] - Required. The name of the settings to lookup. Format:
2585 /// properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings
2586 /// Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"
2587 /// Value must have pattern
2588 /// `^properties/\[^/\]+/webDataStreams/\[^/\]+/enhancedMeasurementSettings$`.
2589 ///
2590 /// [$fields] - Selector specifying which fields to include in a partial
2591 /// response.
2592 ///
2593 /// Completes with a [GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings].
2594 ///
2595 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2596 /// error.
2597 ///
2598 /// If the used [http.Client] completes with an error when making a REST call,
2599 /// this method will complete with the same error.
2600 async.Future<GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings>
2601 getEnhancedMeasurementSettings(
2602 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08002603 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002604 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08002605 final _queryParams = <core.String, core.List<core.String>>{
2606 if ($fields != null) 'fields': [$fields],
2607 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002608
Kevin Moore0c926a62021-02-05 11:30:57 -08002609 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08002610
Kevin Mooredc994e82021-02-05 09:36:45 -08002611 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002612 _url,
2613 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08002614 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002615 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002616 return GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.fromJson(
2617 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002618 }
2619
2620 /// Returns the Site Tag for the specified web stream.
2621 ///
2622 /// Site Tags are immutable singletons.
2623 ///
2624 /// Request parameters:
2625 ///
2626 /// [name] - Required. The name of the site tag to lookup. Note that site tags
2627 /// are singletons and do not have unique IDs. Format:
2628 /// properties/{property_id}/webDataStreams/{stream_id}/globalSiteTag Example:
2629 /// "properties/123/webDataStreams/456/globalSiteTag"
2630 /// Value must have pattern
2631 /// `^properties/\[^/\]+/webDataStreams/\[^/\]+/globalSiteTag$`.
2632 ///
2633 /// [$fields] - Selector specifying which fields to include in a partial
2634 /// response.
2635 ///
2636 /// Completes with a [GoogleAnalyticsAdminV1alphaGlobalSiteTag].
2637 ///
2638 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2639 /// error.
2640 ///
2641 /// If the used [http.Client] completes with an error when making a REST call,
2642 /// this method will complete with the same error.
2643 async.Future<GoogleAnalyticsAdminV1alphaGlobalSiteTag> getGlobalSiteTag(
2644 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08002645 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002646 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08002647 final _queryParams = <core.String, core.List<core.String>>{
2648 if ($fields != null) 'fields': [$fields],
2649 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002650
Kevin Moore0c926a62021-02-05 11:30:57 -08002651 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08002652
Kevin Mooredc994e82021-02-05 09:36:45 -08002653 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002654 _url,
2655 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08002656 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002657 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002658 return GoogleAnalyticsAdminV1alphaGlobalSiteTag.fromJson(
2659 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002660 }
2661
2662 /// Returns child web data streams under the specified parent property.
2663 ///
2664 /// Web data streams will be excluded if the caller does not have access.
2665 /// Returns an empty list if no relevant web data streams are found.
2666 ///
2667 /// Request parameters:
2668 ///
2669 /// [parent] - Required. The name of the parent property. For example, to list
2670 /// results of web streams under the property with Id 123: "properties/123"
2671 /// Value must have pattern `^properties/\[^/\]+$`.
2672 ///
2673 /// [pageSize] - The maximum number of resources to return. If unspecified, at
2674 /// most 50 resources will be returned. The maximum value is 200; (higher
2675 /// values will be coerced to the maximum)
2676 ///
2677 /// [pageToken] - A page token, received from a previous `ListWebDataStreams`
2678 /// call. Provide this to retrieve the subsequent page. When paginating, all
2679 /// other parameters provided to `ListWebDataStreams` must match the call that
2680 /// provided the page token.
2681 ///
2682 /// [$fields] - Selector specifying which fields to include in a partial
2683 /// response.
2684 ///
2685 /// Completes with a [GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse].
2686 ///
2687 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2688 /// error.
2689 ///
2690 /// If the used [http.Client] completes with an error when making a REST call,
2691 /// this method will complete with the same error.
2692 async.Future<GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse> list(
2693 core.String parent, {
Kevin Moore58e22332021-02-25 10:11:41 -08002694 core.int? pageSize,
2695 core.String? pageToken,
2696 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002697 }) async {
Kevin Moore6485d5a2021-02-08 14:56:40 -08002698 final _queryParams = <core.String, core.List<core.String>>{
2699 if (pageSize != null) 'pageSize': ['${pageSize}'],
2700 if (pageToken != null) 'pageToken': [pageToken],
2701 if ($fields != null) 'fields': [$fields],
2702 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002703
Kevin Moore0c926a62021-02-05 11:30:57 -08002704 final _url = 'v1alpha/' +
Kevin Moore0946dce2021-02-04 09:58:04 -08002705 commons.Escaper.ecapeVariableReserved('$parent') +
2706 '/webDataStreams';
2707
Kevin Mooredc994e82021-02-05 09:36:45 -08002708 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002709 _url,
2710 'GET',
Kevin Moore0946dce2021-02-04 09:58:04 -08002711 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002712 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002713 return GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse.fromJson(
2714 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002715 }
2716
2717 /// Updates a web stream on a property.
2718 ///
2719 /// [request] - The metadata request object.
2720 ///
2721 /// Request parameters:
2722 ///
2723 /// [name] - Output only. Resource name of this Data Stream. Format:
2724 /// properties/{property_id}/webDataStreams/{stream_id} Example:
2725 /// "properties/1000/webDataStreams/2000"
2726 /// Value must have pattern `^properties/\[^/\]+/webDataStreams/\[^/\]+$`.
2727 ///
Kevin Mooreb3758bc2021-02-25 10:03:59 -08002728 /// [updateMask] - Required. The list of fields to be updated. Field names
2729 /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
2730 /// be updated. To replace the entire entity, use one path with the string "*"
2731 /// to match all fields.
Kevin Moore0946dce2021-02-04 09:58:04 -08002732 ///
2733 /// [$fields] - Selector specifying which fields to include in a partial
2734 /// response.
2735 ///
2736 /// Completes with a [GoogleAnalyticsAdminV1alphaWebDataStream].
2737 ///
2738 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2739 /// error.
2740 ///
2741 /// If the used [http.Client] completes with an error when making a REST call,
2742 /// this method will complete with the same error.
2743 async.Future<GoogleAnalyticsAdminV1alphaWebDataStream> patch(
2744 GoogleAnalyticsAdminV1alphaWebDataStream request,
2745 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08002746 core.String? updateMask,
2747 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002748 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08002749 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08002750 final _queryParams = <core.String, core.List<core.String>>{
2751 if (updateMask != null) 'updateMask': [updateMask],
2752 if ($fields != null) 'fields': [$fields],
2753 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002754
Kevin Moore0c926a62021-02-05 11:30:57 -08002755 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08002756
Kevin Mooredc994e82021-02-05 09:36:45 -08002757 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002758 _url,
2759 'PATCH',
2760 body: _body,
2761 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002762 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002763 return GoogleAnalyticsAdminV1alphaWebDataStream.fromJson(
2764 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002765 }
2766
2767 /// Updates the singleton enhanced measurement settings for this web stream.
2768 ///
2769 /// Note that the stream must enable enhanced measurement for these settings
2770 /// to take effect.
2771 ///
2772 /// [request] - The metadata request object.
2773 ///
2774 /// Request parameters:
2775 ///
2776 /// [name] - Output only. Resource name of this Data Stream. Format:
2777 /// properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings
2778 /// Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"
2779 /// Value must have pattern
2780 /// `^properties/\[^/\]+/webDataStreams/\[^/\]+/enhancedMeasurementSettings$`.
2781 ///
Kevin Mooreb3758bc2021-02-25 10:03:59 -08002782 /// [updateMask] - Required. The list of fields to be updated. Field names
2783 /// must be in snake case (e.g., "field_to_update"). Omitted fields will not
2784 /// be updated. To replace the entire entity, use one path with the string "*"
2785 /// to match all fields.
Kevin Moore0946dce2021-02-04 09:58:04 -08002786 ///
2787 /// [$fields] - Selector specifying which fields to include in a partial
2788 /// response.
2789 ///
2790 /// Completes with a [GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings].
2791 ///
2792 /// Completes with a [commons.ApiRequestError] if the API endpoint returned an
2793 /// error.
2794 ///
2795 /// If the used [http.Client] completes with an error when making a REST call,
2796 /// this method will complete with the same error.
2797 async.Future<GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings>
2798 updateEnhancedMeasurementSettings(
2799 GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings request,
2800 core.String name, {
Kevin Moore58e22332021-02-25 10:11:41 -08002801 core.String? updateMask,
2802 core.String? $fields,
Kevin Mooredc994e82021-02-05 09:36:45 -08002803 }) async {
Kevin Moore58e22332021-02-25 10:11:41 -08002804 final _body = convert.json.encode(request.toJson());
Kevin Moore6485d5a2021-02-08 14:56:40 -08002805 final _queryParams = <core.String, core.List<core.String>>{
2806 if (updateMask != null) 'updateMask': [updateMask],
2807 if ($fields != null) 'fields': [$fields],
2808 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002809
Kevin Moore0c926a62021-02-05 11:30:57 -08002810 final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
Kevin Moore0946dce2021-02-04 09:58:04 -08002811
Kevin Mooredc994e82021-02-05 09:36:45 -08002812 final _response = await _requester.request(
Kevin Moore0946dce2021-02-04 09:58:04 -08002813 _url,
2814 'PATCH',
2815 body: _body,
2816 queryParams: _queryParams,
Kevin Moore0946dce2021-02-04 09:58:04 -08002817 );
Kevin Mooredc994e82021-02-05 09:36:45 -08002818 return GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.fromJson(
2819 _response as core.Map<core.String, core.dynamic>);
Kevin Moore0946dce2021-02-04 09:58:04 -08002820 }
2821}
2822
2823/// A resource message representing a Google Analytics account.
2824class GoogleAnalyticsAdminV1alphaAccount {
2825 /// Time when this account was originally created.
2826 ///
2827 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08002828 core.String? createTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08002829
2830 /// Indicates whether this Account is soft-deleted or not.
2831 ///
2832 /// Deleted accounts are excluded from List results unless specifically
2833 /// requested.
2834 ///
2835 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08002836 core.bool? deleted;
Kevin Moore0946dce2021-02-04 09:58:04 -08002837
2838 /// Human-readable display name for this account.
2839 ///
2840 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08002841 core.String? displayName;
Kevin Moore0946dce2021-02-04 09:58:04 -08002842
2843 /// Resource name of this account.
2844 ///
2845 /// Format: accounts/{account} Example: "accounts/100"
2846 ///
2847 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08002848 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08002849
2850 /// Country of business.
2851 ///
2852 /// Must be a Unicode CLDR region code.
Kevin Moore58e22332021-02-25 10:11:41 -08002853 core.String? regionCode;
Kevin Moore0946dce2021-02-04 09:58:04 -08002854
2855 /// Time when account payload fields were last updated.
2856 ///
2857 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08002858 core.String? updateTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08002859
2860 GoogleAnalyticsAdminV1alphaAccount();
2861
2862 GoogleAnalyticsAdminV1alphaAccount.fromJson(core.Map _json) {
2863 if (_json.containsKey('createTime')) {
2864 createTime = _json['createTime'] as core.String;
2865 }
2866 if (_json.containsKey('deleted')) {
2867 deleted = _json['deleted'] as core.bool;
2868 }
2869 if (_json.containsKey('displayName')) {
2870 displayName = _json['displayName'] as core.String;
2871 }
2872 if (_json.containsKey('name')) {
2873 name = _json['name'] as core.String;
2874 }
2875 if (_json.containsKey('regionCode')) {
2876 regionCode = _json['regionCode'] as core.String;
2877 }
2878 if (_json.containsKey('updateTime')) {
2879 updateTime = _json['updateTime'] as core.String;
2880 }
2881 }
2882
Kevin Moore58e22332021-02-25 10:11:41 -08002883 core.Map<core.String, core.Object?> toJson() => {
2884 if (createTime != null) 'createTime': createTime!,
2885 if (deleted != null) 'deleted': deleted!,
2886 if (displayName != null) 'displayName': displayName!,
2887 if (name != null) 'name': name!,
2888 if (regionCode != null) 'regionCode': regionCode!,
2889 if (updateTime != null) 'updateTime': updateTime!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08002890 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002891}
2892
2893/// A virtual resource representing an overview of an account and all its child
2894/// GA4 properties.
2895class GoogleAnalyticsAdminV1alphaAccountSummary {
2896 /// Resource name of account referred to by this account summary Format:
2897 /// accounts/{account_id} Example: "accounts/1000"
Kevin Moore58e22332021-02-25 10:11:41 -08002898 core.String? account;
Kevin Moore0946dce2021-02-04 09:58:04 -08002899
2900 /// Display name for the account referred to in this account summary.
Kevin Moore58e22332021-02-25 10:11:41 -08002901 core.String? displayName;
Kevin Moore0946dce2021-02-04 09:58:04 -08002902
2903 /// Resource name for this account summary.
2904 ///
2905 /// Format: accountSummaries/{account_id} Example: "accountSummaries/1000"
Kevin Moore58e22332021-02-25 10:11:41 -08002906 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08002907
2908 /// List of summaries for child accounts of this account.
Kevin Moore58e22332021-02-25 10:11:41 -08002909 core.List<GoogleAnalyticsAdminV1alphaPropertySummary>? propertySummaries;
Kevin Moore0946dce2021-02-04 09:58:04 -08002910
2911 GoogleAnalyticsAdminV1alphaAccountSummary();
2912
2913 GoogleAnalyticsAdminV1alphaAccountSummary.fromJson(core.Map _json) {
2914 if (_json.containsKey('account')) {
2915 account = _json['account'] as core.String;
2916 }
2917 if (_json.containsKey('displayName')) {
2918 displayName = _json['displayName'] as core.String;
2919 }
2920 if (_json.containsKey('name')) {
2921 name = _json['name'] as core.String;
2922 }
2923 if (_json.containsKey('propertySummaries')) {
2924 propertySummaries = (_json['propertySummaries'] as core.List)
2925 .map<GoogleAnalyticsAdminV1alphaPropertySummary>((value) =>
2926 GoogleAnalyticsAdminV1alphaPropertySummary.fromJson(
2927 value as core.Map<core.String, core.dynamic>))
2928 .toList();
2929 }
2930 }
2931
Kevin Moore58e22332021-02-25 10:11:41 -08002932 core.Map<core.String, core.Object?> toJson() => {
2933 if (account != null) 'account': account!,
2934 if (displayName != null) 'displayName': displayName!,
2935 if (name != null) 'name': name!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08002936 if (propertySummaries != null)
2937 'propertySummaries':
Kevin Moore58e22332021-02-25 10:11:41 -08002938 propertySummaries!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08002939 };
Kevin Moore0946dce2021-02-04 09:58:04 -08002940}
2941
2942/// A resource message representing a Google Analytics Android app stream.
2943class GoogleAnalyticsAdminV1alphaAndroidAppDataStream {
2944 /// Time when this stream was originally created.
2945 ///
2946 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08002947 core.String? createTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08002948
2949 /// Human-readable display name for the Data Stream.
2950 ///
2951 /// The max allowed display name length is 255 UTF-16 code units.
Kevin Moore58e22332021-02-25 10:11:41 -08002952 core.String? displayName;
Kevin Moore0946dce2021-02-04 09:58:04 -08002953
2954 /// ID of the corresponding Android app in Firebase, if any.
2955 ///
2956 /// This ID can change if the Android app is deleted and recreated.
2957 ///
2958 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08002959 core.String? firebaseAppId;
Kevin Moore0946dce2021-02-04 09:58:04 -08002960
2961 /// Resource name of this Data Stream.
2962 ///
2963 /// Format: properties/{property_id}/androidAppDataStreams/{stream_id}
2964 /// Example: "properties/1000/androidAppDataStreams/2000"
2965 ///
2966 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08002967 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08002968
2969 /// The package name for the app being measured.
2970 ///
2971 /// Example: "com.example.myandroidapp"
2972 ///
2973 /// Immutable.
Kevin Moore58e22332021-02-25 10:11:41 -08002974 core.String? packageName;
Kevin Moore0946dce2021-02-04 09:58:04 -08002975
2976 /// Time when stream payload fields were last updated.
2977 ///
2978 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08002979 core.String? updateTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08002980
2981 GoogleAnalyticsAdminV1alphaAndroidAppDataStream();
2982
2983 GoogleAnalyticsAdminV1alphaAndroidAppDataStream.fromJson(core.Map _json) {
2984 if (_json.containsKey('createTime')) {
2985 createTime = _json['createTime'] as core.String;
2986 }
2987 if (_json.containsKey('displayName')) {
2988 displayName = _json['displayName'] as core.String;
2989 }
2990 if (_json.containsKey('firebaseAppId')) {
2991 firebaseAppId = _json['firebaseAppId'] as core.String;
2992 }
2993 if (_json.containsKey('name')) {
2994 name = _json['name'] as core.String;
2995 }
2996 if (_json.containsKey('packageName')) {
2997 packageName = _json['packageName'] as core.String;
2998 }
2999 if (_json.containsKey('updateTime')) {
3000 updateTime = _json['updateTime'] as core.String;
3001 }
3002 }
3003
Kevin Moore58e22332021-02-25 10:11:41 -08003004 core.Map<core.String, core.Object?> toJson() => {
3005 if (createTime != null) 'createTime': createTime!,
3006 if (displayName != null) 'displayName': displayName!,
3007 if (firebaseAppId != null) 'firebaseAppId': firebaseAppId!,
3008 if (name != null) 'name': name!,
3009 if (packageName != null) 'packageName': packageName!,
3010 if (updateTime != null) 'updateTime': updateTime!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003011 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003012}
3013
3014/// Read-only resource used to summarize a principal's effective roles.
3015class GoogleAnalyticsAdminV1alphaAuditUserLink {
3016 /// Roles directly assigned to this user for this entity.
3017 ///
3018 /// Format: predefinedRoles/read Excludes roles that are inherited from an
3019 /// account (if this is for a property), group, or organization admin role.
Kevin Moore58e22332021-02-25 10:11:41 -08003020 core.List<core.String>? directRoles;
Kevin Moore0946dce2021-02-04 09:58:04 -08003021
3022 /// Union of all permissions a user has at this account or property (includes
3023 /// direct permissions, group-inherited permissions, etc.).
3024 ///
3025 /// Format: predefinedRoles/read
Kevin Moore58e22332021-02-25 10:11:41 -08003026 core.List<core.String>? effectiveRoles;
Kevin Moore0946dce2021-02-04 09:58:04 -08003027
3028 /// Email address of the linked user
Kevin Moore58e22332021-02-25 10:11:41 -08003029 core.String? emailAddress;
Kevin Moore0946dce2021-02-04 09:58:04 -08003030
3031 /// Example format: properties/1234/userLinks/5678
Kevin Moore58e22332021-02-25 10:11:41 -08003032 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08003033
3034 GoogleAnalyticsAdminV1alphaAuditUserLink();
3035
3036 GoogleAnalyticsAdminV1alphaAuditUserLink.fromJson(core.Map _json) {
3037 if (_json.containsKey('directRoles')) {
3038 directRoles = (_json['directRoles'] as core.List)
3039 .map<core.String>((value) => value as core.String)
3040 .toList();
3041 }
3042 if (_json.containsKey('effectiveRoles')) {
3043 effectiveRoles = (_json['effectiveRoles'] as core.List)
3044 .map<core.String>((value) => value as core.String)
3045 .toList();
3046 }
3047 if (_json.containsKey('emailAddress')) {
3048 emailAddress = _json['emailAddress'] as core.String;
3049 }
3050 if (_json.containsKey('name')) {
3051 name = _json['name'] as core.String;
3052 }
3053 }
3054
Kevin Moore58e22332021-02-25 10:11:41 -08003055 core.Map<core.String, core.Object?> toJson() => {
3056 if (directRoles != null) 'directRoles': directRoles!,
3057 if (effectiveRoles != null) 'effectiveRoles': effectiveRoles!,
3058 if (emailAddress != null) 'emailAddress': emailAddress!,
3059 if (name != null) 'name': name!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003060 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003061}
3062
3063/// Request message for AuditUserLinks RPC.
3064class GoogleAnalyticsAdminV1alphaAuditUserLinksRequest {
3065 /// The maximum number of user links to return.
3066 ///
3067 /// The service may return fewer than this value. If unspecified, at most 1000
3068 /// user links will be returned. The maximum value is 5000; values above 5000
3069 /// will be coerced to 5000.
Kevin Moore58e22332021-02-25 10:11:41 -08003070 core.int? pageSize;
Kevin Moore0946dce2021-02-04 09:58:04 -08003071
3072 /// A page token, received from a previous `AuditUserLinks` call.
3073 ///
3074 /// Provide this to retrieve the subsequent page. When paginating, all other
3075 /// parameters provided to `AuditUserLinks` must match the call that provided
3076 /// the page token.
Kevin Moore58e22332021-02-25 10:11:41 -08003077 core.String? pageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08003078
3079 GoogleAnalyticsAdminV1alphaAuditUserLinksRequest();
3080
3081 GoogleAnalyticsAdminV1alphaAuditUserLinksRequest.fromJson(core.Map _json) {
3082 if (_json.containsKey('pageSize')) {
3083 pageSize = _json['pageSize'] as core.int;
3084 }
3085 if (_json.containsKey('pageToken')) {
3086 pageToken = _json['pageToken'] as core.String;
3087 }
3088 }
3089
Kevin Moore58e22332021-02-25 10:11:41 -08003090 core.Map<core.String, core.Object?> toJson() => {
3091 if (pageSize != null) 'pageSize': pageSize!,
3092 if (pageToken != null) 'pageToken': pageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003093 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003094}
3095
3096/// Response message for AuditUserLinks RPC.
3097class GoogleAnalyticsAdminV1alphaAuditUserLinksResponse {
3098 /// A token, which can be sent as `page_token` to retrieve the next page.
3099 ///
3100 /// If this field is omitted, there are no subsequent pages.
Kevin Moore58e22332021-02-25 10:11:41 -08003101 core.String? nextPageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08003102
3103 /// List of AuditUserLinks.
3104 ///
3105 /// These will be ordered stably, but in an arbitrary order.
Kevin Moore58e22332021-02-25 10:11:41 -08003106 core.List<GoogleAnalyticsAdminV1alphaAuditUserLink>? userLinks;
Kevin Moore0946dce2021-02-04 09:58:04 -08003107
3108 GoogleAnalyticsAdminV1alphaAuditUserLinksResponse();
3109
3110 GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.fromJson(core.Map _json) {
3111 if (_json.containsKey('nextPageToken')) {
3112 nextPageToken = _json['nextPageToken'] as core.String;
3113 }
3114 if (_json.containsKey('userLinks')) {
3115 userLinks = (_json['userLinks'] as core.List)
3116 .map<GoogleAnalyticsAdminV1alphaAuditUserLink>((value) =>
3117 GoogleAnalyticsAdminV1alphaAuditUserLink.fromJson(
3118 value as core.Map<core.String, core.dynamic>))
3119 .toList();
3120 }
3121 }
3122
Kevin Moore58e22332021-02-25 10:11:41 -08003123 core.Map<core.String, core.Object?> toJson() => {
3124 if (nextPageToken != null) 'nextPageToken': nextPageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003125 if (userLinks != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003126 'userLinks': userLinks!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08003127 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003128}
3129
3130/// Request message for BatchCreateUserLinks RPC.
3131class GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest {
3132 /// If set, then email the new users notifying them that they've been granted
3133 /// permissions to the resource.
3134 ///
3135 /// Regardless of whether this is set or not, notify_new_user field inside
3136 /// each individual request is ignored.
3137 ///
3138 /// Optional.
Kevin Moore58e22332021-02-25 10:11:41 -08003139 core.bool? notifyNewUsers;
Kevin Moore0946dce2021-02-04 09:58:04 -08003140
3141 /// The requests specifying the user links to create.
3142 ///
3143 /// A maximum of 1000 user links can be created in a batch.
3144 ///
3145 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08003146 core.List<GoogleAnalyticsAdminV1alphaCreateUserLinkRequest>? requests;
Kevin Moore0946dce2021-02-04 09:58:04 -08003147
3148 GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest();
3149
3150 GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest.fromJson(
3151 core.Map _json) {
3152 if (_json.containsKey('notifyNewUsers')) {
3153 notifyNewUsers = _json['notifyNewUsers'] as core.bool;
3154 }
3155 if (_json.containsKey('requests')) {
3156 requests = (_json['requests'] as core.List)
3157 .map<GoogleAnalyticsAdminV1alphaCreateUserLinkRequest>((value) =>
3158 GoogleAnalyticsAdminV1alphaCreateUserLinkRequest.fromJson(
3159 value as core.Map<core.String, core.dynamic>))
3160 .toList();
3161 }
3162 }
3163
Kevin Moore58e22332021-02-25 10:11:41 -08003164 core.Map<core.String, core.Object?> toJson() => {
3165 if (notifyNewUsers != null) 'notifyNewUsers': notifyNewUsers!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003166 if (requests != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003167 'requests': requests!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08003168 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003169}
3170
3171/// Response message for BatchCreateUserLinks RPC.
3172class GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse {
3173 /// The user links created.
Kevin Moore58e22332021-02-25 10:11:41 -08003174 core.List<GoogleAnalyticsAdminV1alphaUserLink>? userLinks;
Kevin Moore0946dce2021-02-04 09:58:04 -08003175
3176 GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse();
3177
3178 GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse.fromJson(
3179 core.Map _json) {
3180 if (_json.containsKey('userLinks')) {
3181 userLinks = (_json['userLinks'] as core.List)
3182 .map<GoogleAnalyticsAdminV1alphaUserLink>((value) =>
3183 GoogleAnalyticsAdminV1alphaUserLink.fromJson(
3184 value as core.Map<core.String, core.dynamic>))
3185 .toList();
3186 }
3187 }
3188
Kevin Moore58e22332021-02-25 10:11:41 -08003189 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003190 if (userLinks != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003191 'userLinks': userLinks!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08003192 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003193}
3194
3195/// Request message for BatchDeleteUserLinks RPC.
3196class GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest {
3197 /// The requests specifying the user links to update.
3198 ///
3199 /// A maximum of 1000 user links can be updated in a batch.
3200 ///
3201 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08003202 core.List<GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest>? requests;
Kevin Moore0946dce2021-02-04 09:58:04 -08003203
3204 GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest();
3205
3206 GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest.fromJson(
3207 core.Map _json) {
3208 if (_json.containsKey('requests')) {
3209 requests = (_json['requests'] as core.List)
3210 .map<GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest>((value) =>
3211 GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest.fromJson(
3212 value as core.Map<core.String, core.dynamic>))
3213 .toList();
3214 }
3215 }
3216
Kevin Moore58e22332021-02-25 10:11:41 -08003217 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003218 if (requests != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003219 'requests': requests!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08003220 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003221}
3222
3223/// Response message for BatchGetUserLinks RPC.
3224class GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse {
3225 /// The requested user links.
Kevin Moore58e22332021-02-25 10:11:41 -08003226 core.List<GoogleAnalyticsAdminV1alphaUserLink>? userLinks;
Kevin Moore0946dce2021-02-04 09:58:04 -08003227
3228 GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse();
3229
3230 GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse.fromJson(
3231 core.Map _json) {
3232 if (_json.containsKey('userLinks')) {
3233 userLinks = (_json['userLinks'] as core.List)
3234 .map<GoogleAnalyticsAdminV1alphaUserLink>((value) =>
3235 GoogleAnalyticsAdminV1alphaUserLink.fromJson(
3236 value as core.Map<core.String, core.dynamic>))
3237 .toList();
3238 }
3239 }
3240
Kevin Moore58e22332021-02-25 10:11:41 -08003241 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003242 if (userLinks != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003243 'userLinks': userLinks!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08003244 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003245}
3246
3247/// Request message for BatchUpdateUserLinks RPC.
3248class GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest {
3249 /// The requests specifying the user links to update.
3250 ///
3251 /// A maximum of 1000 user links can be updated in a batch.
3252 ///
3253 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08003254 core.List<GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest>? requests;
Kevin Moore0946dce2021-02-04 09:58:04 -08003255
3256 GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest();
3257
3258 GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest.fromJson(
3259 core.Map _json) {
3260 if (_json.containsKey('requests')) {
3261 requests = (_json['requests'] as core.List)
3262 .map<GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest>((value) =>
3263 GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest.fromJson(
3264 value as core.Map<core.String, core.dynamic>))
3265 .toList();
3266 }
3267 }
3268
Kevin Moore58e22332021-02-25 10:11:41 -08003269 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003270 if (requests != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003271 'requests': requests!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08003272 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003273}
3274
3275/// Response message for BatchUpdateUserLinks RPC.
3276class GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse {
3277 /// The user links updated.
Kevin Moore58e22332021-02-25 10:11:41 -08003278 core.List<GoogleAnalyticsAdminV1alphaUserLink>? userLinks;
Kevin Moore0946dce2021-02-04 09:58:04 -08003279
3280 GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse();
3281
3282 GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse.fromJson(
3283 core.Map _json) {
3284 if (_json.containsKey('userLinks')) {
3285 userLinks = (_json['userLinks'] as core.List)
3286 .map<GoogleAnalyticsAdminV1alphaUserLink>((value) =>
3287 GoogleAnalyticsAdminV1alphaUserLink.fromJson(
3288 value as core.Map<core.String, core.dynamic>))
3289 .toList();
3290 }
3291 }
3292
Kevin Moore58e22332021-02-25 10:11:41 -08003293 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003294 if (userLinks != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003295 'userLinks': userLinks!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08003296 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003297}
3298
3299/// Request message for CreateUserLink RPC.
3300///
3301/// Users can have multiple email addresses associated with their Google
3302/// account, and one of these email addresses is the "primary" email address.
3303/// Any of the email addresses associated with a Google account may be used for
3304/// a new UserLink, but the returned UserLink will always contain the "primary"
3305/// email address. As a result, the input and output email address for this
3306/// request may differ.
3307class GoogleAnalyticsAdminV1alphaCreateUserLinkRequest {
3308 /// If set, then email the new user notifying them that they've been granted
3309 /// permissions to the resource.
3310 ///
3311 /// Optional.
Kevin Moore58e22332021-02-25 10:11:41 -08003312 core.bool? notifyNewUser;
Kevin Moore0946dce2021-02-04 09:58:04 -08003313
3314 /// Example format: accounts/1234
3315 ///
3316 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08003317 core.String? parent;
Kevin Moore0946dce2021-02-04 09:58:04 -08003318
3319 /// The user link to create.
3320 ///
3321 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08003322 GoogleAnalyticsAdminV1alphaUserLink? userLink;
Kevin Moore0946dce2021-02-04 09:58:04 -08003323
3324 GoogleAnalyticsAdminV1alphaCreateUserLinkRequest();
3325
3326 GoogleAnalyticsAdminV1alphaCreateUserLinkRequest.fromJson(core.Map _json) {
3327 if (_json.containsKey('notifyNewUser')) {
3328 notifyNewUser = _json['notifyNewUser'] as core.bool;
3329 }
3330 if (_json.containsKey('parent')) {
3331 parent = _json['parent'] as core.String;
3332 }
3333 if (_json.containsKey('userLink')) {
3334 userLink = GoogleAnalyticsAdminV1alphaUserLink.fromJson(
3335 _json['userLink'] as core.Map<core.String, core.dynamic>);
3336 }
3337 }
3338
Kevin Moore58e22332021-02-25 10:11:41 -08003339 core.Map<core.String, core.Object?> toJson() => {
3340 if (notifyNewUser != null) 'notifyNewUser': notifyNewUser!,
3341 if (parent != null) 'parent': parent!,
3342 if (userLink != null) 'userLink': userLink!.toJson(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08003343 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003344}
3345
3346/// A resource message representing data sharing settings of a Google Analytics
3347/// account.
3348class GoogleAnalyticsAdminV1alphaDataSharingSettings {
3349 /// Resource name.
3350 ///
3351 /// Format: accounts/{account}/dataSharingSettings Example:
3352 /// "accounts/1000/dataSharingSettings"
3353 ///
3354 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003355 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08003356
3357 /// Allows any of Google sales to access the data in order to suggest
3358 /// configuration changes to improve results.
Kevin Moore58e22332021-02-25 10:11:41 -08003359 core.bool? sharingWithGoogleAnySalesEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003360
3361 /// Allows Google sales teams that are assigned to the customer to access the
3362 /// data in order to suggest configuration changes to improve results.
3363 ///
3364 /// Sales team restrictions still apply when enabled.
Kevin Moore58e22332021-02-25 10:11:41 -08003365 core.bool? sharingWithGoogleAssignedSalesEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003366
3367 /// Allows Google to use the data to improve other Google products or
3368 /// services.
Kevin Moore58e22332021-02-25 10:11:41 -08003369 core.bool? sharingWithGoogleProductsEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003370
3371 /// Allows Google support to access the data in order to help troubleshoot
3372 /// issues.
Kevin Moore58e22332021-02-25 10:11:41 -08003373 core.bool? sharingWithGoogleSupportEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003374
3375 /// Allows Google to share the data anonymously in aggregate form with others.
Kevin Moore58e22332021-02-25 10:11:41 -08003376 core.bool? sharingWithOthersEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003377
3378 GoogleAnalyticsAdminV1alphaDataSharingSettings();
3379
3380 GoogleAnalyticsAdminV1alphaDataSharingSettings.fromJson(core.Map _json) {
3381 if (_json.containsKey('name')) {
3382 name = _json['name'] as core.String;
3383 }
3384 if (_json.containsKey('sharingWithGoogleAnySalesEnabled')) {
3385 sharingWithGoogleAnySalesEnabled =
3386 _json['sharingWithGoogleAnySalesEnabled'] as core.bool;
3387 }
3388 if (_json.containsKey('sharingWithGoogleAssignedSalesEnabled')) {
3389 sharingWithGoogleAssignedSalesEnabled =
3390 _json['sharingWithGoogleAssignedSalesEnabled'] as core.bool;
3391 }
3392 if (_json.containsKey('sharingWithGoogleProductsEnabled')) {
3393 sharingWithGoogleProductsEnabled =
3394 _json['sharingWithGoogleProductsEnabled'] as core.bool;
3395 }
3396 if (_json.containsKey('sharingWithGoogleSupportEnabled')) {
3397 sharingWithGoogleSupportEnabled =
3398 _json['sharingWithGoogleSupportEnabled'] as core.bool;
3399 }
3400 if (_json.containsKey('sharingWithOthersEnabled')) {
3401 sharingWithOthersEnabled = _json['sharingWithOthersEnabled'] as core.bool;
3402 }
3403 }
3404
Kevin Moore58e22332021-02-25 10:11:41 -08003405 core.Map<core.String, core.Object?> toJson() => {
3406 if (name != null) 'name': name!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003407 if (sharingWithGoogleAnySalesEnabled != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003408 'sharingWithGoogleAnySalesEnabled': sharingWithGoogleAnySalesEnabled!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003409 if (sharingWithGoogleAssignedSalesEnabled != null)
3410 'sharingWithGoogleAssignedSalesEnabled':
Kevin Moore58e22332021-02-25 10:11:41 -08003411 sharingWithGoogleAssignedSalesEnabled!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003412 if (sharingWithGoogleProductsEnabled != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003413 'sharingWithGoogleProductsEnabled': sharingWithGoogleProductsEnabled!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003414 if (sharingWithGoogleSupportEnabled != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003415 'sharingWithGoogleSupportEnabled': sharingWithGoogleSupportEnabled!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003416 if (sharingWithOthersEnabled != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003417 'sharingWithOthersEnabled': sharingWithOthersEnabled!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003418 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003419}
3420
3421/// Request message for DeleteUserLink RPC.
3422class GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest {
3423 /// Example format: accounts/1234/userLinks/5678
3424 ///
3425 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08003426 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08003427
3428 GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest();
3429
3430 GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest.fromJson(core.Map _json) {
3431 if (_json.containsKey('name')) {
3432 name = _json['name'] as core.String;
3433 }
3434 }
3435
Kevin Moore58e22332021-02-25 10:11:41 -08003436 core.Map<core.String, core.Object?> toJson() => {
3437 if (name != null) 'name': name!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003438 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003439}
3440
3441/// Singleton resource under a WebDataStream, configuring measurement of
3442/// additional site interactions and content.
3443class GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings {
3444 /// If enabled, capture a file download event each time a link is clicked with
3445 /// a common document, compressed file, application, video, or audio
3446 /// extension.
Kevin Moore58e22332021-02-25 10:11:41 -08003447 core.bool? fileDownloadsEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003448
3449 /// Resource name of this Data Stream.
3450 ///
3451 /// Format:
3452 /// properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings
3453 /// Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"
3454 ///
3455 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003456 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08003457
3458 /// If enabled, capture an outbound click event each time a visitor clicks a
3459 /// link that leads them away from your domain.
Kevin Moore58e22332021-02-25 10:11:41 -08003460 core.bool? outboundClicksEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003461
3462 /// If enabled, capture a page view event each time the website changes the
3463 /// browser history state.
Kevin Moore58e22332021-02-25 10:11:41 -08003464 core.bool? pageChangesEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003465
3466 /// If enabled, capture a page view event each time a page loads.
3467 ///
3468 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003469 core.bool? pageLoadsEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003470
3471 /// If enabled, capture a page view event each time a page loads or the
3472 /// website changes the browser history state.
3473 ///
3474 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003475 core.bool? pageViewsEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003476
3477 /// If enabled, capture scroll events each time a visitor gets to the bottom
3478 /// of a page.
Kevin Moore58e22332021-02-25 10:11:41 -08003479 core.bool? scrollsEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003480
3481 /// URL query parameters to interpret as site search parameters.
3482 ///
3483 /// Max length is 1024 characters. Must not be empty.
3484 ///
3485 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08003486 core.String? searchQueryParameter;
Kevin Moore0946dce2021-02-04 09:58:04 -08003487
3488 /// If enabled, capture a view search results event each time a visitor
3489 /// performs a search on your site (based on a query parameter).
Kevin Moore58e22332021-02-25 10:11:41 -08003490 core.bool? siteSearchEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003491
3492 /// Indicates whether Enhanced Measurement Settings will be used to
3493 /// automatically measure interactions and content on this web stream.
3494 ///
3495 /// Changing this value does not affect the settings themselves, but
3496 /// determines whether they are respected.
Kevin Moore58e22332021-02-25 10:11:41 -08003497 core.bool? streamEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003498
3499 /// Additional URL query parameters.
3500 ///
3501 /// Max length is 1024 characters.
Kevin Moore58e22332021-02-25 10:11:41 -08003502 core.String? uriQueryParameter;
Kevin Moore0946dce2021-02-04 09:58:04 -08003503
3504 /// If enabled, capture video play, progress, and complete events as visitors
3505 /// view embedded videos on your site.
Kevin Moore58e22332021-02-25 10:11:41 -08003506 core.bool? videoEngagementEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003507
3508 GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings();
3509
3510 GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.fromJson(
3511 core.Map _json) {
3512 if (_json.containsKey('fileDownloadsEnabled')) {
3513 fileDownloadsEnabled = _json['fileDownloadsEnabled'] as core.bool;
3514 }
3515 if (_json.containsKey('name')) {
3516 name = _json['name'] as core.String;
3517 }
3518 if (_json.containsKey('outboundClicksEnabled')) {
3519 outboundClicksEnabled = _json['outboundClicksEnabled'] as core.bool;
3520 }
3521 if (_json.containsKey('pageChangesEnabled')) {
3522 pageChangesEnabled = _json['pageChangesEnabled'] as core.bool;
3523 }
3524 if (_json.containsKey('pageLoadsEnabled')) {
3525 pageLoadsEnabled = _json['pageLoadsEnabled'] as core.bool;
3526 }
3527 if (_json.containsKey('pageViewsEnabled')) {
3528 pageViewsEnabled = _json['pageViewsEnabled'] as core.bool;
3529 }
3530 if (_json.containsKey('scrollsEnabled')) {
3531 scrollsEnabled = _json['scrollsEnabled'] as core.bool;
3532 }
3533 if (_json.containsKey('searchQueryParameter')) {
3534 searchQueryParameter = _json['searchQueryParameter'] as core.String;
3535 }
3536 if (_json.containsKey('siteSearchEnabled')) {
3537 siteSearchEnabled = _json['siteSearchEnabled'] as core.bool;
3538 }
3539 if (_json.containsKey('streamEnabled')) {
3540 streamEnabled = _json['streamEnabled'] as core.bool;
3541 }
3542 if (_json.containsKey('uriQueryParameter')) {
3543 uriQueryParameter = _json['uriQueryParameter'] as core.String;
3544 }
3545 if (_json.containsKey('videoEngagementEnabled')) {
3546 videoEngagementEnabled = _json['videoEngagementEnabled'] as core.bool;
3547 }
3548 }
3549
Kevin Moore58e22332021-02-25 10:11:41 -08003550 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003551 if (fileDownloadsEnabled != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003552 'fileDownloadsEnabled': fileDownloadsEnabled!,
3553 if (name != null) 'name': name!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003554 if (outboundClicksEnabled != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003555 'outboundClicksEnabled': outboundClicksEnabled!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003556 if (pageChangesEnabled != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003557 'pageChangesEnabled': pageChangesEnabled!,
3558 if (pageLoadsEnabled != null) 'pageLoadsEnabled': pageLoadsEnabled!,
3559 if (pageViewsEnabled != null) 'pageViewsEnabled': pageViewsEnabled!,
3560 if (scrollsEnabled != null) 'scrollsEnabled': scrollsEnabled!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003561 if (searchQueryParameter != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003562 'searchQueryParameter': searchQueryParameter!,
3563 if (siteSearchEnabled != null) 'siteSearchEnabled': siteSearchEnabled!,
3564 if (streamEnabled != null) 'streamEnabled': streamEnabled!,
3565 if (uriQueryParameter != null) 'uriQueryParameter': uriQueryParameter!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003566 if (videoEngagementEnabled != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003567 'videoEngagementEnabled': videoEngagementEnabled!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003568 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003569}
3570
3571/// A link between an GA4 property and a Firebase project.
3572class GoogleAnalyticsAdminV1alphaFirebaseLink {
3573 /// Time when this FirebaseLink was originally created.
3574 ///
3575 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003576 core.String? createTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08003577
3578 /// Maximum user access to the GA4 property allowed to admins of the linked
3579 /// Firebase project.
3580 /// Possible string values are:
3581 /// - "MAXIMUM_USER_ACCESS_UNSPECIFIED" : Unspecified maximum user access.
3582 /// - "NO_ACCESS" : Firebase users have no access to the Analytics property.
3583 /// - "READ_AND_ANALYZE" : Firebase users have Read & Analyze access to the
3584 /// Analytics property.
3585 /// - "EDITOR_WITHOUT_LINK_MANAGEMENT" : Firebase users have edit access to
3586 /// the Analytics property, but may not manage the Firebase link.
3587 /// - "EDITOR_INCLUDING_LINK_MANAGEMENT" : Firebase users have edit access to
3588 /// the Analytics property and may manage the Firebase link.
Kevin Moore58e22332021-02-25 10:11:41 -08003589 core.String? maximumUserAccess;
Kevin Moore0946dce2021-02-04 09:58:04 -08003590
3591 /// Example format: properties/1234/firebaseLinks/5678
3592 ///
3593 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003594 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08003595
3596 /// Firebase project resource name.
3597 ///
3598 /// When creating a FirebaseLink, you may provide this resource name using
3599 /// either a project number or project ID. Once this resource has been
3600 /// created, returned FirebaseLinks will always have a project_name that
3601 /// contains a project number. Format: 'projects/{project number}' Example:
3602 /// 'projects/1234'
3603 ///
3604 /// Immutable.
Kevin Moore58e22332021-02-25 10:11:41 -08003605 core.String? project;
Kevin Moore0946dce2021-02-04 09:58:04 -08003606
3607 GoogleAnalyticsAdminV1alphaFirebaseLink();
3608
3609 GoogleAnalyticsAdminV1alphaFirebaseLink.fromJson(core.Map _json) {
3610 if (_json.containsKey('createTime')) {
3611 createTime = _json['createTime'] as core.String;
3612 }
3613 if (_json.containsKey('maximumUserAccess')) {
3614 maximumUserAccess = _json['maximumUserAccess'] as core.String;
3615 }
3616 if (_json.containsKey('name')) {
3617 name = _json['name'] as core.String;
3618 }
3619 if (_json.containsKey('project')) {
3620 project = _json['project'] as core.String;
3621 }
3622 }
3623
Kevin Moore58e22332021-02-25 10:11:41 -08003624 core.Map<core.String, core.Object?> toJson() => {
3625 if (createTime != null) 'createTime': createTime!,
3626 if (maximumUserAccess != null) 'maximumUserAccess': maximumUserAccess!,
3627 if (name != null) 'name': name!,
3628 if (project != null) 'project': project!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003629 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003630}
3631
3632/// Read-only resource with the tag for sending data from a website to a
3633/// WebDataStream.
3634class GoogleAnalyticsAdminV1alphaGlobalSiteTag {
3635 /// Resource name for this GlobalSiteTag resource.
3636 ///
3637 /// Format: properties/{propertyId}/globalSiteTag
3638 ///
3639 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003640 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08003641
3642 /// JavaScript code snippet to be pasted as the first item into the head tag
3643 /// of every webpage to measure.
3644 ///
3645 /// Immutable.
Kevin Moore58e22332021-02-25 10:11:41 -08003646 core.String? snippet;
Kevin Moore0946dce2021-02-04 09:58:04 -08003647
3648 GoogleAnalyticsAdminV1alphaGlobalSiteTag();
3649
3650 GoogleAnalyticsAdminV1alphaGlobalSiteTag.fromJson(core.Map _json) {
3651 if (_json.containsKey('name')) {
3652 name = _json['name'] as core.String;
3653 }
3654 if (_json.containsKey('snippet')) {
3655 snippet = _json['snippet'] as core.String;
3656 }
3657 }
3658
Kevin Moore58e22332021-02-25 10:11:41 -08003659 core.Map<core.String, core.Object?> toJson() => {
3660 if (name != null) 'name': name!,
3661 if (snippet != null) 'snippet': snippet!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003662 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003663}
3664
3665/// A link between an GA4 property and a Google Ads account.
3666class GoogleAnalyticsAdminV1alphaGoogleAdsLink {
3667 /// Enable personalized advertising features with this integration.
3668 ///
3669 /// Automatically publish my Google Analytics audience lists and Google
3670 /// Analytics remarketing events/parameters to the linked Google Ads account.
3671 /// If this field is not set on create/update it will be defaulted to true.
Kevin Moore58e22332021-02-25 10:11:41 -08003672 core.bool? adsPersonalizationEnabled;
Kevin Moore0946dce2021-02-04 09:58:04 -08003673
3674 /// If true, this link is for a Google Ads manager account.
3675 ///
3676 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003677 core.bool? canManageClients;
Kevin Moore0946dce2021-02-04 09:58:04 -08003678
3679 /// Time when this link was originally created.
3680 ///
3681 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003682 core.String? createTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08003683
3684 /// Google Ads customer ID.
3685 ///
3686 /// Immutable.
Kevin Moore58e22332021-02-25 10:11:41 -08003687 core.String? customerId;
Kevin Moore0946dce2021-02-04 09:58:04 -08003688
3689 /// Email address of the user that created the link.
3690 ///
3691 /// An empty string will be returned if the email address can't be retrieved.
3692 ///
3693 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003694 core.String? emailAddress;
Kevin Moore0946dce2021-02-04 09:58:04 -08003695
3696 /// Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note:
3697 /// googleAdsLinkId is not the Google Ads customer ID.
3698 ///
3699 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003700 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08003701
3702 /// Time when this link was last updated.
3703 ///
3704 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003705 core.String? updateTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08003706
3707 GoogleAnalyticsAdminV1alphaGoogleAdsLink();
3708
3709 GoogleAnalyticsAdminV1alphaGoogleAdsLink.fromJson(core.Map _json) {
3710 if (_json.containsKey('adsPersonalizationEnabled')) {
3711 adsPersonalizationEnabled =
3712 _json['adsPersonalizationEnabled'] as core.bool;
3713 }
3714 if (_json.containsKey('canManageClients')) {
3715 canManageClients = _json['canManageClients'] as core.bool;
3716 }
3717 if (_json.containsKey('createTime')) {
3718 createTime = _json['createTime'] as core.String;
3719 }
3720 if (_json.containsKey('customerId')) {
3721 customerId = _json['customerId'] as core.String;
3722 }
3723 if (_json.containsKey('emailAddress')) {
3724 emailAddress = _json['emailAddress'] as core.String;
3725 }
3726 if (_json.containsKey('name')) {
3727 name = _json['name'] as core.String;
3728 }
3729 if (_json.containsKey('updateTime')) {
3730 updateTime = _json['updateTime'] as core.String;
3731 }
3732 }
3733
Kevin Moore58e22332021-02-25 10:11:41 -08003734 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003735 if (adsPersonalizationEnabled != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003736 'adsPersonalizationEnabled': adsPersonalizationEnabled!,
3737 if (canManageClients != null) 'canManageClients': canManageClients!,
3738 if (createTime != null) 'createTime': createTime!,
3739 if (customerId != null) 'customerId': customerId!,
3740 if (emailAddress != null) 'emailAddress': emailAddress!,
3741 if (name != null) 'name': name!,
3742 if (updateTime != null) 'updateTime': updateTime!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003743 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003744}
3745
3746/// A resource message representing a Google Analytics IOS app stream.
3747class GoogleAnalyticsAdminV1alphaIosAppDataStream {
3748 /// The Apple App Store Bundle ID for the app Example: "com.example.myiosapp"
3749 ///
3750 /// Required. Immutable.
Kevin Moore58e22332021-02-25 10:11:41 -08003751 core.String? bundleId;
Kevin Moore0946dce2021-02-04 09:58:04 -08003752
3753 /// Time when this stream was originally created.
3754 ///
3755 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003756 core.String? createTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08003757
3758 /// Human-readable display name for the Data Stream.
3759 ///
3760 /// The max allowed display name length is 255 UTF-16 code units.
Kevin Moore58e22332021-02-25 10:11:41 -08003761 core.String? displayName;
Kevin Moore0946dce2021-02-04 09:58:04 -08003762
3763 /// ID of the corresponding iOS app in Firebase, if any.
3764 ///
3765 /// This ID can change if the iOS app is deleted and recreated.
3766 ///
3767 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003768 core.String? firebaseAppId;
Kevin Moore0946dce2021-02-04 09:58:04 -08003769
3770 /// Resource name of this Data Stream.
3771 ///
3772 /// Format: properties/{property_id}/iosAppDataStreams/{stream_id} Example:
3773 /// "properties/1000/iosAppDataStreams/2000"
3774 ///
3775 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003776 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08003777
3778 /// Time when stream payload fields were last updated.
3779 ///
3780 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08003781 core.String? updateTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08003782
3783 GoogleAnalyticsAdminV1alphaIosAppDataStream();
3784
3785 GoogleAnalyticsAdminV1alphaIosAppDataStream.fromJson(core.Map _json) {
3786 if (_json.containsKey('bundleId')) {
3787 bundleId = _json['bundleId'] as core.String;
3788 }
3789 if (_json.containsKey('createTime')) {
3790 createTime = _json['createTime'] as core.String;
3791 }
3792 if (_json.containsKey('displayName')) {
3793 displayName = _json['displayName'] as core.String;
3794 }
3795 if (_json.containsKey('firebaseAppId')) {
3796 firebaseAppId = _json['firebaseAppId'] as core.String;
3797 }
3798 if (_json.containsKey('name')) {
3799 name = _json['name'] as core.String;
3800 }
3801 if (_json.containsKey('updateTime')) {
3802 updateTime = _json['updateTime'] as core.String;
3803 }
3804 }
3805
Kevin Moore58e22332021-02-25 10:11:41 -08003806 core.Map<core.String, core.Object?> toJson() => {
3807 if (bundleId != null) 'bundleId': bundleId!,
3808 if (createTime != null) 'createTime': createTime!,
3809 if (displayName != null) 'displayName': displayName!,
3810 if (firebaseAppId != null) 'firebaseAppId': firebaseAppId!,
3811 if (name != null) 'name': name!,
3812 if (updateTime != null) 'updateTime': updateTime!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003813 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003814}
3815
3816/// Response message for ListAccountSummaries RPC.
3817class GoogleAnalyticsAdminV1alphaListAccountSummariesResponse {
3818 /// Account summaries of all accounts the caller has access to.
Kevin Moore58e22332021-02-25 10:11:41 -08003819 core.List<GoogleAnalyticsAdminV1alphaAccountSummary>? accountSummaries;
Kevin Moore0946dce2021-02-04 09:58:04 -08003820
3821 /// A token, which can be sent as `page_token` to retrieve the next page.
3822 ///
3823 /// If this field is omitted, there are no subsequent pages.
Kevin Moore58e22332021-02-25 10:11:41 -08003824 core.String? nextPageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08003825
3826 GoogleAnalyticsAdminV1alphaListAccountSummariesResponse();
3827
3828 GoogleAnalyticsAdminV1alphaListAccountSummariesResponse.fromJson(
3829 core.Map _json) {
3830 if (_json.containsKey('accountSummaries')) {
3831 accountSummaries = (_json['accountSummaries'] as core.List)
3832 .map<GoogleAnalyticsAdminV1alphaAccountSummary>((value) =>
3833 GoogleAnalyticsAdminV1alphaAccountSummary.fromJson(
3834 value as core.Map<core.String, core.dynamic>))
3835 .toList();
3836 }
3837 if (_json.containsKey('nextPageToken')) {
3838 nextPageToken = _json['nextPageToken'] as core.String;
3839 }
3840 }
3841
Kevin Moore58e22332021-02-25 10:11:41 -08003842 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003843 if (accountSummaries != null)
3844 'accountSummaries':
Kevin Moore58e22332021-02-25 10:11:41 -08003845 accountSummaries!.map((value) => value.toJson()).toList(),
3846 if (nextPageToken != null) 'nextPageToken': nextPageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003847 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003848}
3849
3850/// Request message for ListAccounts RPC.
3851class GoogleAnalyticsAdminV1alphaListAccountsResponse {
3852 /// Results that were accessible to the caller.
Kevin Moore58e22332021-02-25 10:11:41 -08003853 core.List<GoogleAnalyticsAdminV1alphaAccount>? accounts;
Kevin Moore0946dce2021-02-04 09:58:04 -08003854
3855 /// A token, which can be sent as `page_token` to retrieve the next page.
3856 ///
3857 /// If this field is omitted, there are no subsequent pages.
Kevin Moore58e22332021-02-25 10:11:41 -08003858 core.String? nextPageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08003859
3860 GoogleAnalyticsAdminV1alphaListAccountsResponse();
3861
3862 GoogleAnalyticsAdminV1alphaListAccountsResponse.fromJson(core.Map _json) {
3863 if (_json.containsKey('accounts')) {
3864 accounts = (_json['accounts'] as core.List)
3865 .map<GoogleAnalyticsAdminV1alphaAccount>((value) =>
3866 GoogleAnalyticsAdminV1alphaAccount.fromJson(
3867 value as core.Map<core.String, core.dynamic>))
3868 .toList();
3869 }
3870 if (_json.containsKey('nextPageToken')) {
3871 nextPageToken = _json['nextPageToken'] as core.String;
3872 }
3873 }
3874
Kevin Moore58e22332021-02-25 10:11:41 -08003875 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003876 if (accounts != null)
Kevin Moore58e22332021-02-25 10:11:41 -08003877 'accounts': accounts!.map((value) => value.toJson()).toList(),
3878 if (nextPageToken != null) 'nextPageToken': nextPageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003879 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003880}
3881
3882/// Request message for ListAndroidDataStreams RPC.
3883class GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse {
3884 /// Results that matched the filter criteria and were accessible to the
3885 /// caller.
Kevin Moore58e22332021-02-25 10:11:41 -08003886 core.List<GoogleAnalyticsAdminV1alphaAndroidAppDataStream>?
Kevin Moore0946dce2021-02-04 09:58:04 -08003887 androidAppDataStreams;
3888
3889 /// A token, which can be sent as `page_token` to retrieve the next page.
3890 ///
3891 /// If this field is omitted, there are no subsequent pages.
Kevin Moore58e22332021-02-25 10:11:41 -08003892 core.String? nextPageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08003893
3894 GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse();
3895
3896 GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse.fromJson(
3897 core.Map _json) {
3898 if (_json.containsKey('androidAppDataStreams')) {
3899 androidAppDataStreams = (_json['androidAppDataStreams'] as core.List)
3900 .map<GoogleAnalyticsAdminV1alphaAndroidAppDataStream>((value) =>
3901 GoogleAnalyticsAdminV1alphaAndroidAppDataStream.fromJson(
3902 value as core.Map<core.String, core.dynamic>))
3903 .toList();
3904 }
3905 if (_json.containsKey('nextPageToken')) {
3906 nextPageToken = _json['nextPageToken'] as core.String;
3907 }
3908 }
3909
Kevin Moore58e22332021-02-25 10:11:41 -08003910 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003911 if (androidAppDataStreams != null)
3912 'androidAppDataStreams':
Kevin Moore58e22332021-02-25 10:11:41 -08003913 androidAppDataStreams!.map((value) => value.toJson()).toList(),
3914 if (nextPageToken != null) 'nextPageToken': nextPageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003915 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003916}
3917
3918/// Response message for ListFirebaseLinks RPC
3919class GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse {
3920 /// List of FirebaseLinks.
3921 ///
3922 /// This will have at most one value.
Kevin Moore58e22332021-02-25 10:11:41 -08003923 core.List<GoogleAnalyticsAdminV1alphaFirebaseLink>? firebaseLinks;
Kevin Moore0946dce2021-02-04 09:58:04 -08003924
3925 /// A token, which can be sent as `page_token` to retrieve the next page.
3926 ///
3927 /// If this field is omitted, there are no subsequent pages. Currently, Google
3928 /// Analytics supports only one FirebaseLink per property, so this will never
3929 /// be populated.
Kevin Moore58e22332021-02-25 10:11:41 -08003930 core.String? nextPageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08003931
3932 GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse();
3933
3934 GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse.fromJson(
3935 core.Map _json) {
3936 if (_json.containsKey('firebaseLinks')) {
3937 firebaseLinks = (_json['firebaseLinks'] as core.List)
3938 .map<GoogleAnalyticsAdminV1alphaFirebaseLink>((value) =>
3939 GoogleAnalyticsAdminV1alphaFirebaseLink.fromJson(
3940 value as core.Map<core.String, core.dynamic>))
3941 .toList();
3942 }
3943 if (_json.containsKey('nextPageToken')) {
3944 nextPageToken = _json['nextPageToken'] as core.String;
3945 }
3946 }
3947
Kevin Moore58e22332021-02-25 10:11:41 -08003948 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003949 if (firebaseLinks != null)
3950 'firebaseLinks':
Kevin Moore58e22332021-02-25 10:11:41 -08003951 firebaseLinks!.map((value) => value.toJson()).toList(),
3952 if (nextPageToken != null) 'nextPageToken': nextPageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003953 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003954}
3955
3956/// Response message for ListGoogleAdsLinks RPC.
3957class GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse {
3958 /// List of GoogleAdsLinks.
Kevin Moore58e22332021-02-25 10:11:41 -08003959 core.List<GoogleAnalyticsAdminV1alphaGoogleAdsLink>? googleAdsLinks;
Kevin Moore0946dce2021-02-04 09:58:04 -08003960
3961 /// A token, which can be sent as `page_token` to retrieve the next page.
3962 ///
3963 /// If this field is omitted, there are no subsequent pages.
Kevin Moore58e22332021-02-25 10:11:41 -08003964 core.String? nextPageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08003965
3966 GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse();
3967
3968 GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse.fromJson(
3969 core.Map _json) {
3970 if (_json.containsKey('googleAdsLinks')) {
3971 googleAdsLinks = (_json['googleAdsLinks'] as core.List)
3972 .map<GoogleAnalyticsAdminV1alphaGoogleAdsLink>((value) =>
3973 GoogleAnalyticsAdminV1alphaGoogleAdsLink.fromJson(
3974 value as core.Map<core.String, core.dynamic>))
3975 .toList();
3976 }
3977 if (_json.containsKey('nextPageToken')) {
3978 nextPageToken = _json['nextPageToken'] as core.String;
3979 }
3980 }
3981
Kevin Moore58e22332021-02-25 10:11:41 -08003982 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08003983 if (googleAdsLinks != null)
3984 'googleAdsLinks':
Kevin Moore58e22332021-02-25 10:11:41 -08003985 googleAdsLinks!.map((value) => value.toJson()).toList(),
3986 if (nextPageToken != null) 'nextPageToken': nextPageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08003987 };
Kevin Moore0946dce2021-02-04 09:58:04 -08003988}
3989
3990/// Request message for ListIosAppDataStreams RPC.
3991class GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse {
3992 /// Results that matched the filter criteria and were accessible to the
3993 /// caller.
Kevin Moore58e22332021-02-25 10:11:41 -08003994 core.List<GoogleAnalyticsAdminV1alphaIosAppDataStream>? iosAppDataStreams;
Kevin Moore0946dce2021-02-04 09:58:04 -08003995
3996 /// A token, which can be sent as `page_token` to retrieve the next page.
3997 ///
3998 /// If this field is omitted, there are no subsequent pages.
Kevin Moore58e22332021-02-25 10:11:41 -08003999 core.String? nextPageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08004000
4001 GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse();
4002
4003 GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse.fromJson(
4004 core.Map _json) {
4005 if (_json.containsKey('iosAppDataStreams')) {
4006 iosAppDataStreams = (_json['iosAppDataStreams'] as core.List)
4007 .map<GoogleAnalyticsAdminV1alphaIosAppDataStream>((value) =>
4008 GoogleAnalyticsAdminV1alphaIosAppDataStream.fromJson(
4009 value as core.Map<core.String, core.dynamic>))
4010 .toList();
4011 }
4012 if (_json.containsKey('nextPageToken')) {
4013 nextPageToken = _json['nextPageToken'] as core.String;
4014 }
4015 }
4016
Kevin Moore58e22332021-02-25 10:11:41 -08004017 core.Map<core.String, core.Object?> toJson() => {
Kevin Moorec321b0a2021-02-08 12:27:09 -08004018 if (iosAppDataStreams != null)
4019 'iosAppDataStreams':
Kevin Moore58e22332021-02-25 10:11:41 -08004020 iosAppDataStreams!.map((value) => value.toJson()).toList(),
4021 if (nextPageToken != null) 'nextPageToken': nextPageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08004022 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004023}
4024
4025/// Response message for ListProperties RPC.
4026class GoogleAnalyticsAdminV1alphaListPropertiesResponse {
4027 /// A token, which can be sent as `page_token` to retrieve the next page.
4028 ///
4029 /// If this field is omitted, there are no subsequent pages.
Kevin Moore58e22332021-02-25 10:11:41 -08004030 core.String? nextPageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08004031
4032 /// Results that matched the filter criteria and were accessible to the
4033 /// caller.
Kevin Moore58e22332021-02-25 10:11:41 -08004034 core.List<GoogleAnalyticsAdminV1alphaProperty>? properties;
Kevin Moore0946dce2021-02-04 09:58:04 -08004035
4036 GoogleAnalyticsAdminV1alphaListPropertiesResponse();
4037
4038 GoogleAnalyticsAdminV1alphaListPropertiesResponse.fromJson(core.Map _json) {
4039 if (_json.containsKey('nextPageToken')) {
4040 nextPageToken = _json['nextPageToken'] as core.String;
4041 }
4042 if (_json.containsKey('properties')) {
4043 properties = (_json['properties'] as core.List)
4044 .map<GoogleAnalyticsAdminV1alphaProperty>((value) =>
4045 GoogleAnalyticsAdminV1alphaProperty.fromJson(
4046 value as core.Map<core.String, core.dynamic>))
4047 .toList();
4048 }
4049 }
4050
Kevin Moore58e22332021-02-25 10:11:41 -08004051 core.Map<core.String, core.Object?> toJson() => {
4052 if (nextPageToken != null) 'nextPageToken': nextPageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08004053 if (properties != null)
Kevin Moore58e22332021-02-25 10:11:41 -08004054 'properties': properties!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08004055 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004056}
4057
4058/// Response message for ListUserLinks RPC.
4059class GoogleAnalyticsAdminV1alphaListUserLinksResponse {
4060 /// A token, which can be sent as `page_token` to retrieve the next page.
4061 ///
4062 /// If this field is omitted, there are no subsequent pages.
Kevin Moore58e22332021-02-25 10:11:41 -08004063 core.String? nextPageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08004064
4065 /// List of UserLinks.
4066 ///
4067 /// These will be ordered stably, but in an arbitrary order.
Kevin Moore58e22332021-02-25 10:11:41 -08004068 core.List<GoogleAnalyticsAdminV1alphaUserLink>? userLinks;
Kevin Moore0946dce2021-02-04 09:58:04 -08004069
4070 GoogleAnalyticsAdminV1alphaListUserLinksResponse();
4071
4072 GoogleAnalyticsAdminV1alphaListUserLinksResponse.fromJson(core.Map _json) {
4073 if (_json.containsKey('nextPageToken')) {
4074 nextPageToken = _json['nextPageToken'] as core.String;
4075 }
4076 if (_json.containsKey('userLinks')) {
4077 userLinks = (_json['userLinks'] as core.List)
4078 .map<GoogleAnalyticsAdminV1alphaUserLink>((value) =>
4079 GoogleAnalyticsAdminV1alphaUserLink.fromJson(
4080 value as core.Map<core.String, core.dynamic>))
4081 .toList();
4082 }
4083 }
4084
Kevin Moore58e22332021-02-25 10:11:41 -08004085 core.Map<core.String, core.Object?> toJson() => {
4086 if (nextPageToken != null) 'nextPageToken': nextPageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08004087 if (userLinks != null)
Kevin Moore58e22332021-02-25 10:11:41 -08004088 'userLinks': userLinks!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08004089 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004090}
4091
4092/// Request message for ListWebDataStreams RPC.
4093class GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse {
4094 /// A token, which can be sent as `page_token` to retrieve the next page.
4095 ///
4096 /// If this field is omitted, there are no subsequent pages.
Kevin Moore58e22332021-02-25 10:11:41 -08004097 core.String? nextPageToken;
Kevin Moore0946dce2021-02-04 09:58:04 -08004098
4099 /// Results that matched the filter criteria and were accessible to the
4100 /// caller.
Kevin Moore58e22332021-02-25 10:11:41 -08004101 core.List<GoogleAnalyticsAdminV1alphaWebDataStream>? webDataStreams;
Kevin Moore0946dce2021-02-04 09:58:04 -08004102
4103 GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse();
4104
4105 GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse.fromJson(
4106 core.Map _json) {
4107 if (_json.containsKey('nextPageToken')) {
4108 nextPageToken = _json['nextPageToken'] as core.String;
4109 }
4110 if (_json.containsKey('webDataStreams')) {
4111 webDataStreams = (_json['webDataStreams'] as core.List)
4112 .map<GoogleAnalyticsAdminV1alphaWebDataStream>((value) =>
4113 GoogleAnalyticsAdminV1alphaWebDataStream.fromJson(
4114 value as core.Map<core.String, core.dynamic>))
4115 .toList();
4116 }
4117 }
4118
Kevin Moore58e22332021-02-25 10:11:41 -08004119 core.Map<core.String, core.Object?> toJson() => {
4120 if (nextPageToken != null) 'nextPageToken': nextPageToken!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08004121 if (webDataStreams != null)
4122 'webDataStreams':
Kevin Moore58e22332021-02-25 10:11:41 -08004123 webDataStreams!.map((value) => value.toJson()).toList(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08004124 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004125}
4126
4127/// A resource message representing a Google Analytics GA4 property.
4128class GoogleAnalyticsAdminV1alphaProperty {
4129 /// Time when the entity was originally created.
4130 ///
4131 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08004132 core.String? createTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08004133
4134 /// The currency type used in reports involving monetary values.
4135 ///
4136 /// Format: https://en.wikipedia.org/wiki/ISO_4217 Examples: "USD", "EUR",
4137 /// "JPY"
Kevin Moore58e22332021-02-25 10:11:41 -08004138 core.String? currencyCode;
Kevin Moore0946dce2021-02-04 09:58:04 -08004139
4140 /// Indicates whether this Property is soft-deleted or not.
4141 ///
4142 /// Deleted properties are excluded from List results unless specifically
4143 /// requested.
4144 ///
4145 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08004146 core.bool? deleted;
Kevin Moore0946dce2021-02-04 09:58:04 -08004147
4148 /// Human-readable display name for this property.
4149 ///
4150 /// The max allowed display name length is 100 UTF-16 code units.
4151 ///
4152 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08004153 core.String? displayName;
Kevin Moore0946dce2021-02-04 09:58:04 -08004154
4155 /// Industry associated with this property Example: AUTOMOTIVE, FOOD_AND_DRINK
4156 /// Possible string values are:
4157 /// - "INDUSTRY_CATEGORY_UNSPECIFIED" : Industry category unspecified
4158 /// - "AUTOMOTIVE" : Automotive
4159 /// - "BUSINESS_AND_INDUSTRIAL_MARKETS" : Business and industrial markets
4160 /// - "FINANCE" : Finance
4161 /// - "HEALTHCARE" : Healthcare
4162 /// - "TECHNOLOGY" : Technology
4163 /// - "TRAVEL" : Travel
4164 /// - "OTHER" : Other
4165 /// - "ARTS_AND_ENTERTAINMENT" : Arts and entertainment
4166 /// - "BEAUTY_AND_FITNESS" : Beauty and fitness
4167 /// - "BOOKS_AND_LITERATURE" : Books and literature
4168 /// - "FOOD_AND_DRINK" : Food and drink
4169 /// - "GAMES" : Games
4170 /// - "HOBBIES_AND_LEISURE" : Hobbies and leisure
4171 /// - "HOME_AND_GARDEN" : Home and garden
4172 /// - "INTERNET_AND_TELECOM" : Internet and telecom
4173 /// - "LAW_AND_GOVERNMENT" : Law and government
4174 /// - "NEWS" : News
4175 /// - "ONLINE_COMMUNITIES" : Online communities
4176 /// - "PEOPLE_AND_SOCIETY" : People and society
4177 /// - "PETS_AND_ANIMALS" : Pets and animals
4178 /// - "REAL_ESTATE" : Real estate
4179 /// - "REFERENCE" : Reference
4180 /// - "SCIENCE" : Science
4181 /// - "SPORTS" : Sports
4182 /// - "JOBS_AND_EDUCATION" : Jobs and education
4183 /// - "SHOPPING" : Shopping
Kevin Moore58e22332021-02-25 10:11:41 -08004184 core.String? industryCategory;
Kevin Moore0946dce2021-02-04 09:58:04 -08004185
4186 /// Resource name of this property.
4187 ///
4188 /// Format: properties/{property_id} Example: "properties/1000"
4189 ///
4190 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08004191 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08004192
4193 /// Resource name of this property's logical parent.
4194 ///
4195 /// Note: The Property-Moving UI can be used to change the parent. Format:
4196 /// accounts/{account} Example: "accounts/100"
4197 ///
4198 /// Immutable.
Kevin Moore58e22332021-02-25 10:11:41 -08004199 core.String? parent;
Kevin Moore0946dce2021-02-04 09:58:04 -08004200
4201 /// Reporting Time Zone, used as the day boundary for reports, regardless of
4202 /// where the data originates.
4203 ///
4204 /// If the time zone honors DST, Analytics will automatically adjust for the
4205 /// changes. NOTE: Changing the time zone only affects data going forward, and
4206 /// is not applied retroactively. Format: https://www.iana.org/time-zones
4207 /// Example: "America/Los_Angeles"
Kevin Moore58e22332021-02-25 10:11:41 -08004208 core.String? timeZone;
Kevin Moore0946dce2021-02-04 09:58:04 -08004209
4210 /// Time when entity payload fields were last updated.
4211 ///
4212 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08004213 core.String? updateTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08004214
4215 GoogleAnalyticsAdminV1alphaProperty();
4216
4217 GoogleAnalyticsAdminV1alphaProperty.fromJson(core.Map _json) {
4218 if (_json.containsKey('createTime')) {
4219 createTime = _json['createTime'] as core.String;
4220 }
4221 if (_json.containsKey('currencyCode')) {
4222 currencyCode = _json['currencyCode'] as core.String;
4223 }
4224 if (_json.containsKey('deleted')) {
4225 deleted = _json['deleted'] as core.bool;
4226 }
4227 if (_json.containsKey('displayName')) {
4228 displayName = _json['displayName'] as core.String;
4229 }
4230 if (_json.containsKey('industryCategory')) {
4231 industryCategory = _json['industryCategory'] as core.String;
4232 }
4233 if (_json.containsKey('name')) {
4234 name = _json['name'] as core.String;
4235 }
4236 if (_json.containsKey('parent')) {
4237 parent = _json['parent'] as core.String;
4238 }
4239 if (_json.containsKey('timeZone')) {
4240 timeZone = _json['timeZone'] as core.String;
4241 }
4242 if (_json.containsKey('updateTime')) {
4243 updateTime = _json['updateTime'] as core.String;
4244 }
4245 }
4246
Kevin Moore58e22332021-02-25 10:11:41 -08004247 core.Map<core.String, core.Object?> toJson() => {
4248 if (createTime != null) 'createTime': createTime!,
4249 if (currencyCode != null) 'currencyCode': currencyCode!,
4250 if (deleted != null) 'deleted': deleted!,
4251 if (displayName != null) 'displayName': displayName!,
4252 if (industryCategory != null) 'industryCategory': industryCategory!,
4253 if (name != null) 'name': name!,
4254 if (parent != null) 'parent': parent!,
4255 if (timeZone != null) 'timeZone': timeZone!,
4256 if (updateTime != null) 'updateTime': updateTime!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08004257 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004258}
4259
4260/// A virtual resource representing metadata for an GA4 property.
4261class GoogleAnalyticsAdminV1alphaPropertySummary {
4262 /// Display name for the property referred to in this account summary.
Kevin Moore58e22332021-02-25 10:11:41 -08004263 core.String? displayName;
Kevin Moore0946dce2021-02-04 09:58:04 -08004264
4265 /// Resource name of property referred to by this property summary Format:
4266 /// properties/{property_id} Example: "properties/1000"
Kevin Moore58e22332021-02-25 10:11:41 -08004267 core.String? property;
Kevin Moore0946dce2021-02-04 09:58:04 -08004268
4269 GoogleAnalyticsAdminV1alphaPropertySummary();
4270
4271 GoogleAnalyticsAdminV1alphaPropertySummary.fromJson(core.Map _json) {
4272 if (_json.containsKey('displayName')) {
4273 displayName = _json['displayName'] as core.String;
4274 }
4275 if (_json.containsKey('property')) {
4276 property = _json['property'] as core.String;
4277 }
4278 }
4279
Kevin Moore58e22332021-02-25 10:11:41 -08004280 core.Map<core.String, core.Object?> toJson() => {
4281 if (displayName != null) 'displayName': displayName!,
4282 if (property != null) 'property': property!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08004283 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004284}
4285
4286/// Request message for ProvisionAccountTicket RPC.
4287class GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest {
4288 /// The account to create.
Kevin Moore58e22332021-02-25 10:11:41 -08004289 GoogleAnalyticsAdminV1alphaAccount? account;
Kevin Moore0946dce2021-02-04 09:58:04 -08004290
4291 /// Redirect URI where the user will be sent after accepting Terms of Service.
4292 ///
4293 /// Must be configured in Developers Console as a Redirect URI
Kevin Moore58e22332021-02-25 10:11:41 -08004294 core.String? redirectUri;
Kevin Moore0946dce2021-02-04 09:58:04 -08004295
4296 GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest();
4297
4298 GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest.fromJson(
4299 core.Map _json) {
4300 if (_json.containsKey('account')) {
4301 account = GoogleAnalyticsAdminV1alphaAccount.fromJson(
4302 _json['account'] as core.Map<core.String, core.dynamic>);
4303 }
4304 if (_json.containsKey('redirectUri')) {
4305 redirectUri = _json['redirectUri'] as core.String;
4306 }
4307 }
4308
Kevin Moore58e22332021-02-25 10:11:41 -08004309 core.Map<core.String, core.Object?> toJson() => {
4310 if (account != null) 'account': account!.toJson(),
4311 if (redirectUri != null) 'redirectUri': redirectUri!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08004312 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004313}
4314
4315/// Response message for ProvisionAccountTicket RPC.
4316class GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse {
4317 /// The param to be passed in the ToS link.
Kevin Moore58e22332021-02-25 10:11:41 -08004318 core.String? accountTicketId;
Kevin Moore0946dce2021-02-04 09:58:04 -08004319
4320 GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse();
4321
4322 GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse.fromJson(
4323 core.Map _json) {
4324 if (_json.containsKey('accountTicketId')) {
4325 accountTicketId = _json['accountTicketId'] as core.String;
4326 }
4327 }
4328
Kevin Moore58e22332021-02-25 10:11:41 -08004329 core.Map<core.String, core.Object?> toJson() => {
4330 if (accountTicketId != null) 'accountTicketId': accountTicketId!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08004331 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004332}
4333
4334/// Request message for UpdateUserLink RPC.
4335class GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest {
4336 /// The user link to update.
4337 ///
4338 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08004339 GoogleAnalyticsAdminV1alphaUserLink? userLink;
Kevin Moore0946dce2021-02-04 09:58:04 -08004340
4341 GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest();
4342
4343 GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest.fromJson(core.Map _json) {
4344 if (_json.containsKey('userLink')) {
4345 userLink = GoogleAnalyticsAdminV1alphaUserLink.fromJson(
4346 _json['userLink'] as core.Map<core.String, core.dynamic>);
4347 }
4348 }
4349
Kevin Moore58e22332021-02-25 10:11:41 -08004350 core.Map<core.String, core.Object?> toJson() => {
4351 if (userLink != null) 'userLink': userLink!.toJson(),
Kevin Moorec321b0a2021-02-08 12:27:09 -08004352 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004353}
4354
4355/// A resource message representing a user's permissions on an Account or
4356/// Property resource.
4357class GoogleAnalyticsAdminV1alphaUserLink {
4358 /// Roles directly assigned to this user for this account or property.
4359 ///
4360 /// Valid values: predefinedRoles/read predefinedRoles/collaborate
4361 /// predefinedRoles/edit predefinedRoles/manage-users Excludes roles that are
4362 /// inherited from a higher-level entity, group, or organization admin role. A
4363 /// UserLink that is updated to have an empty list of direct_roles will be
4364 /// deleted.
Kevin Moore58e22332021-02-25 10:11:41 -08004365 core.List<core.String>? directRoles;
Kevin Moore0946dce2021-02-04 09:58:04 -08004366
4367 /// Email address of the user to link
Kevin Moore58e22332021-02-25 10:11:41 -08004368 core.String? emailAddress;
Kevin Moore0946dce2021-02-04 09:58:04 -08004369
4370 /// Example format: properties/1234/userLinks/5678
Kevin Moore58e22332021-02-25 10:11:41 -08004371 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08004372
4373 GoogleAnalyticsAdminV1alphaUserLink();
4374
4375 GoogleAnalyticsAdminV1alphaUserLink.fromJson(core.Map _json) {
4376 if (_json.containsKey('directRoles')) {
4377 directRoles = (_json['directRoles'] as core.List)
4378 .map<core.String>((value) => value as core.String)
4379 .toList();
4380 }
4381 if (_json.containsKey('emailAddress')) {
4382 emailAddress = _json['emailAddress'] as core.String;
4383 }
4384 if (_json.containsKey('name')) {
4385 name = _json['name'] as core.String;
4386 }
4387 }
4388
Kevin Moore58e22332021-02-25 10:11:41 -08004389 core.Map<core.String, core.Object?> toJson() => {
4390 if (directRoles != null) 'directRoles': directRoles!,
4391 if (emailAddress != null) 'emailAddress': emailAddress!,
4392 if (name != null) 'name': name!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08004393 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004394}
4395
4396/// A resource message representing a Google Analytics web stream.
4397class GoogleAnalyticsAdminV1alphaWebDataStream {
4398 /// Time when this stream was originally created.
4399 ///
4400 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08004401 core.String? createTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08004402
4403 /// Domain name of the web app being measured, or empty.
4404 ///
4405 /// Example: "http://www.google.com", "https://www.google.com"
4406 ///
4407 /// Immutable.
Kevin Moore58e22332021-02-25 10:11:41 -08004408 core.String? defaultUri;
Kevin Moore0946dce2021-02-04 09:58:04 -08004409
4410 /// Human-readable display name for the Data Stream.
4411 ///
4412 /// The max allowed display name length is 100 UTF-16 code units.
4413 ///
4414 /// Required.
Kevin Moore58e22332021-02-25 10:11:41 -08004415 core.String? displayName;
Kevin Moore0946dce2021-02-04 09:58:04 -08004416
4417 /// ID of the corresponding web app in Firebase, if any.
4418 ///
4419 /// This ID can change if the web app is deleted and recreated.
4420 ///
4421 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08004422 core.String? firebaseAppId;
Kevin Moore0946dce2021-02-04 09:58:04 -08004423
4424 /// Analytics "Measurement ID", without the "G-" prefix.
4425 ///
4426 /// Example: "G-1A2BCD345E" would just be "1A2BCD345E"
4427 ///
4428 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08004429 core.String? measurementId;
Kevin Moore0946dce2021-02-04 09:58:04 -08004430
4431 /// Resource name of this Data Stream.
4432 ///
4433 /// Format: properties/{property_id}/webDataStreams/{stream_id} Example:
4434 /// "properties/1000/webDataStreams/2000"
4435 ///
4436 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08004437 core.String? name;
Kevin Moore0946dce2021-02-04 09:58:04 -08004438
4439 /// Time when stream payload fields were last updated.
4440 ///
4441 /// Output only.
Kevin Moore58e22332021-02-25 10:11:41 -08004442 core.String? updateTime;
Kevin Moore0946dce2021-02-04 09:58:04 -08004443
4444 GoogleAnalyticsAdminV1alphaWebDataStream();
4445
4446 GoogleAnalyticsAdminV1alphaWebDataStream.fromJson(core.Map _json) {
4447 if (_json.containsKey('createTime')) {
4448 createTime = _json['createTime'] as core.String;
4449 }
4450 if (_json.containsKey('defaultUri')) {
4451 defaultUri = _json['defaultUri'] as core.String;
4452 }
4453 if (_json.containsKey('displayName')) {
4454 displayName = _json['displayName'] as core.String;
4455 }
4456 if (_json.containsKey('firebaseAppId')) {
4457 firebaseAppId = _json['firebaseAppId'] as core.String;
4458 }
4459 if (_json.containsKey('measurementId')) {
4460 measurementId = _json['measurementId'] as core.String;
4461 }
4462 if (_json.containsKey('name')) {
4463 name = _json['name'] as core.String;
4464 }
4465 if (_json.containsKey('updateTime')) {
4466 updateTime = _json['updateTime'] as core.String;
4467 }
4468 }
4469
Kevin Moore58e22332021-02-25 10:11:41 -08004470 core.Map<core.String, core.Object?> toJson() => {
4471 if (createTime != null) 'createTime': createTime!,
4472 if (defaultUri != null) 'defaultUri': defaultUri!,
4473 if (displayName != null) 'displayName': displayName!,
4474 if (firebaseAppId != null) 'firebaseAppId': firebaseAppId!,
4475 if (measurementId != null) 'measurementId': measurementId!,
4476 if (name != null) 'name': name!,
4477 if (updateTime != null) 'updateTime': updateTime!,
Kevin Moorec321b0a2021-02-08 12:27:09 -08004478 };
Kevin Moore0946dce2021-02-04 09:58:04 -08004479}
4480
4481/// A generic empty message that you can re-use to avoid defining duplicated
4482/// empty messages in your APIs.
4483///
4484/// A typical example is to use it as the request or the response type of an API
4485/// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns
4486/// (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON
4487/// object `{}`.
4488class GoogleProtobufEmpty {
4489 GoogleProtobufEmpty();
4490
4491 GoogleProtobufEmpty.fromJson(
4492 // ignore: avoid_unused_constructor_parameters
4493 core.Map _json);
4494
Kevin Moore58e22332021-02-25 10:11:41 -08004495 core.Map<core.String, core.Object?> toJson() => {};
Kevin Moore0946dce2021-02-04 09:58:04 -08004496}