Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1 | // 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 10 | // 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 14 | // 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] |
| 33 | library analyticsadmin.v1alpha; |
| 34 | |
| 35 | import 'dart:async' as async; |
| 36 | import 'dart:convert' as convert; |
| 37 | import 'dart:core' as core; |
| 38 | |
| 39 | import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 40 | import 'package:http/http.dart' as http; |
| 41 | |
| 42 | import '../src/user_agent.dart'; |
| 43 | |
| 44 | export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| 45 | show ApiRequestError, DetailedApiRequestError; |
| 46 | |
| 47 | class 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 | |
| 78 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 109 | core.int? pageSize, |
| 110 | core.String? pageToken, |
| 111 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 112 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 113 | 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 118 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 119 | const _url = 'v1alpha/accountSummaries'; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 120 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 121 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 122 | _url, |
| 123 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 124 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 125 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 126 | return GoogleAnalyticsAdminV1alphaListAccountSummariesResponse.fromJson( |
| 127 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 128 | } |
| 129 | } |
| 130 | |
| 131 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 166 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 167 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 168 | final _queryParams = <core.String, core.List<core.String>>{ |
| 169 | if ($fields != null) 'fields': [$fields], |
| 170 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 171 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 172 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 173 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 174 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 175 | _url, |
| 176 | 'DELETE', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 177 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 178 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 179 | return GoogleProtobufEmpty.fromJson( |
| 180 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 181 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 203 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 204 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 205 | final _queryParams = <core.String, core.List<core.String>>{ |
| 206 | if ($fields != null) 'fields': [$fields], |
| 207 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 208 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 209 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 210 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 211 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 212 | _url, |
| 213 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 214 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 215 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 216 | return GoogleAnalyticsAdminV1alphaAccount.fromJson( |
| 217 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 218 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 244 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 245 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 246 | final _queryParams = <core.String, core.List<core.String>>{ |
| 247 | if ($fields != null) 'fields': [$fields], |
| 248 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 249 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 250 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 251 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 252 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 253 | _url, |
| 254 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 255 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 256 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 257 | return GoogleAnalyticsAdminV1alphaDataSharingSettings.fromJson( |
| 258 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 259 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 294 | core.int? pageSize, |
| 295 | core.String? pageToken, |
| 296 | core.bool? showDeleted, |
| 297 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 298 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 299 | 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 305 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 306 | const _url = 'v1alpha/accounts'; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 307 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 308 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 309 | _url, |
| 310 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 311 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 312 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 313 | return GoogleAnalyticsAdminV1alphaListAccountsResponse.fromJson( |
| 314 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 315 | } |
| 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 Moore | b3758bc | 2021-02-25 10:03:59 -0800 | [diff] [blame] | 327 | /// [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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 331 | /// |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 345 | core.String? updateMask, |
| 346 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 347 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 348 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 349 | final _queryParams = <core.String, core.List<core.String>>{ |
| 350 | if (updateMask != null) 'updateMask': [updateMask], |
| 351 | if ($fields != null) 'fields': [$fields], |
| 352 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 353 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 354 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 355 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 356 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 357 | _url, |
| 358 | 'PATCH', |
| 359 | body: _body, |
| 360 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 361 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 362 | return GoogleAnalyticsAdminV1alphaAccount.fromJson( |
| 363 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 364 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 386 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 387 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 388 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 389 | final _queryParams = <core.String, core.List<core.String>>{ |
| 390 | if ($fields != null) 'fields': [$fields], |
| 391 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 392 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 393 | const _url = 'v1alpha/accounts:provisionAccountTicket'; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 394 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 395 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 396 | _url, |
| 397 | 'POST', |
| 398 | body: _body, |
| 399 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 400 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 401 | return GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse.fromJson( |
| 402 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 403 | } |
| 404 | } |
| 405 | |
| 406 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 441 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 442 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 443 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 444 | final _queryParams = <core.String, core.List<core.String>>{ |
| 445 | if ($fields != null) 'fields': [$fields], |
| 446 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 447 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 448 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 449 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 450 | '/userLinks:audit'; |
| 451 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 452 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 453 | _url, |
| 454 | 'POST', |
| 455 | body: _body, |
| 456 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 457 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 458 | return GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.fromJson( |
| 459 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 460 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 492 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 493 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 494 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 495 | final _queryParams = <core.String, core.List<core.String>>{ |
| 496 | if ($fields != null) 'fields': [$fields], |
| 497 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 498 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 499 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 500 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 501 | '/userLinks:batchCreate'; |
| 502 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 503 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 504 | _url, |
| 505 | 'POST', |
| 506 | body: _body, |
| 507 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 508 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 509 | return GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse.fromJson( |
| 510 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 511 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 537 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 538 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 539 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 540 | final _queryParams = <core.String, core.List<core.String>>{ |
| 541 | if ($fields != null) 'fields': [$fields], |
| 542 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 543 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 544 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 545 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 546 | '/userLinks:batchDelete'; |
| 547 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 548 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 549 | _url, |
| 550 | 'POST', |
| 551 | body: _body, |
| 552 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 553 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 554 | return GoogleProtobufEmpty.fromJson( |
| 555 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 556 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 583 | core.List<core.String>? names, |
| 584 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 585 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 586 | final _queryParams = <core.String, core.List<core.String>>{ |
| 587 | if (names != null) 'names': names, |
| 588 | if ($fields != null) 'fields': [$fields], |
| 589 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 590 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 591 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 592 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 593 | '/userLinks:batchGet'; |
| 594 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 595 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 596 | _url, |
| 597 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 598 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 599 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 600 | return GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse.fromJson( |
| 601 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 602 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 630 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 631 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 632 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 633 | final _queryParams = <core.String, core.List<core.String>>{ |
| 634 | if ($fields != null) 'fields': [$fields], |
| 635 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 636 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 637 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 638 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 639 | '/userLinks:batchUpdate'; |
| 640 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 641 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 642 | _url, |
| 643 | 'POST', |
| 644 | body: _body, |
| 645 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 646 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 647 | return GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse.fromJson( |
| 648 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 649 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 680 | core.bool? notifyNewUser, |
| 681 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 682 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 683 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 684 | final _queryParams = <core.String, core.List<core.String>>{ |
| 685 | if (notifyNewUser != null) 'notifyNewUser': ['${notifyNewUser}'], |
| 686 | if ($fields != null) 'fields': [$fields], |
| 687 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 688 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 689 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 690 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 691 | '/userLinks'; |
| 692 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 693 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 694 | _url, |
| 695 | 'POST', |
| 696 | body: _body, |
| 697 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 698 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 699 | return GoogleAnalyticsAdminV1alphaUserLink.fromJson( |
| 700 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 701 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 722 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 723 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 724 | final _queryParams = <core.String, core.List<core.String>>{ |
| 725 | if ($fields != null) 'fields': [$fields], |
| 726 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 727 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 728 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 729 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 730 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 731 | _url, |
| 732 | 'DELETE', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 733 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 734 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 735 | return GoogleProtobufEmpty.fromJson( |
| 736 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 737 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 758 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 759 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 760 | final _queryParams = <core.String, core.List<core.String>>{ |
| 761 | if ($fields != null) 'fields': [$fields], |
| 762 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 763 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 764 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 765 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 766 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 767 | _url, |
| 768 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 769 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 770 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 771 | return GoogleAnalyticsAdminV1alphaUserLink.fromJson( |
| 772 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 773 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 804 | core.int? pageSize, |
| 805 | core.String? pageToken, |
| 806 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 807 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 808 | 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 813 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 814 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 815 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 816 | '/userLinks'; |
| 817 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 818 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 819 | _url, |
| 820 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 821 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 822 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 823 | return GoogleAnalyticsAdminV1alphaListUserLinksResponse.fromJson( |
| 824 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 825 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 849 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 850 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 851 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 852 | final _queryParams = <core.String, core.List<core.String>>{ |
| 853 | if ($fields != null) 'fields': [$fields], |
| 854 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 855 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 856 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 857 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 858 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 859 | _url, |
| 860 | 'PATCH', |
| 861 | body: _body, |
| 862 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 863 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 864 | return GoogleAnalyticsAdminV1alphaUserLink.fromJson( |
| 865 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 866 | } |
| 867 | } |
| 868 | |
| 869 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 905 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 906 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 907 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 908 | final _queryParams = <core.String, core.List<core.String>>{ |
| 909 | if ($fields != null) 'fields': [$fields], |
| 910 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 911 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 912 | const _url = 'v1alpha/properties'; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 913 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 914 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 915 | _url, |
| 916 | 'POST', |
| 917 | body: _body, |
| 918 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 919 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 920 | return GoogleAnalyticsAdminV1alphaProperty.fromJson( |
| 921 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 922 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 951 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 952 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 953 | final _queryParams = <core.String, core.List<core.String>>{ |
| 954 | if ($fields != null) 'fields': [$fields], |
| 955 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 956 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 957 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 958 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 959 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 960 | _url, |
| 961 | 'DELETE', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 962 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 963 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 964 | return GoogleProtobufEmpty.fromJson( |
| 965 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 966 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 988 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 989 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 990 | final _queryParams = <core.String, core.List<core.String>>{ |
| 991 | if ($fields != null) 'fields': [$fields], |
| 992 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 993 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 994 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 995 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 996 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 997 | _url, |
| 998 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 999 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1000 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1001 | return GoogleAnalyticsAdminV1alphaProperty.fromJson( |
| 1002 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1003 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1048 | core.String? filter, |
| 1049 | core.int? pageSize, |
| 1050 | core.String? pageToken, |
| 1051 | core.bool? showDeleted, |
| 1052 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1053 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1054 | 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1061 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1062 | const _url = 'v1alpha/properties'; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1063 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1064 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1065 | _url, |
| 1066 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1067 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1068 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1069 | return GoogleAnalyticsAdminV1alphaListPropertiesResponse.fromJson( |
| 1070 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1071 | } |
| 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 Moore | b3758bc | 2021-02-25 10:03:59 -0800 | [diff] [blame] | 1083 | /// [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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1087 | /// |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1101 | core.String? updateMask, |
| 1102 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1103 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1104 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1105 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1106 | if (updateMask != null) 'updateMask': [updateMask], |
| 1107 | if ($fields != null) 'fields': [$fields], |
| 1108 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1109 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1110 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1111 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1112 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1113 | _url, |
| 1114 | 'PATCH', |
| 1115 | body: _body, |
| 1116 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1117 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1118 | return GoogleAnalyticsAdminV1alphaProperty.fromJson( |
| 1119 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1120 | } |
| 1121 | } |
| 1122 | |
| 1123 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1158 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1159 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1160 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1161 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1162 | if ($fields != null) 'fields': [$fields], |
| 1163 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1164 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1165 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1166 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 1167 | '/androidAppDataStreams'; |
| 1168 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1169 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1170 | _url, |
| 1171 | 'POST', |
| 1172 | body: _body, |
| 1173 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1174 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1175 | return GoogleAnalyticsAdminV1alphaAndroidAppDataStream.fromJson( |
| 1176 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1177 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1201 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1202 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1203 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1204 | if ($fields != null) 'fields': [$fields], |
| 1205 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1206 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1207 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1208 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1209 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1210 | _url, |
| 1211 | 'DELETE', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1212 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1213 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1214 | return GoogleProtobufEmpty.fromJson( |
| 1215 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1216 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1240 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1241 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1242 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1243 | if ($fields != null) 'fields': [$fields], |
| 1244 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1245 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1246 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1247 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1248 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1249 | _url, |
| 1250 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1251 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1252 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1253 | return GoogleAnalyticsAdminV1alphaAndroidAppDataStream.fromJson( |
| 1254 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1255 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1292 | core.int? pageSize, |
| 1293 | core.String? pageToken, |
| 1294 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1295 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1296 | 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1301 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1302 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1303 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 1304 | '/androidAppDataStreams'; |
| 1305 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1306 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1307 | _url, |
| 1308 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1309 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1310 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1311 | return GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse |
| 1312 | .fromJson(_response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1313 | } |
| 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 Moore | b3758bc | 2021-02-25 10:03:59 -0800 | [diff] [blame] | 1327 | /// [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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1331 | /// |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1345 | core.String? updateMask, |
| 1346 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1347 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1348 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1349 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1350 | if (updateMask != null) 'updateMask': [updateMask], |
| 1351 | if ($fields != null) 'fields': [$fields], |
| 1352 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1353 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1354 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1355 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1356 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1357 | _url, |
| 1358 | 'PATCH', |
| 1359 | body: _body, |
| 1360 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1361 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1362 | return GoogleAnalyticsAdminV1alphaAndroidAppDataStream.fromJson( |
| 1363 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1364 | } |
| 1365 | } |
| 1366 | |
| 1367 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1398 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1399 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1400 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1401 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1402 | if ($fields != null) 'fields': [$fields], |
| 1403 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1404 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1405 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1406 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 1407 | '/firebaseLinks'; |
| 1408 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1409 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1410 | _url, |
| 1411 | 'POST', |
| 1412 | body: _body, |
| 1413 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1414 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1415 | return GoogleAnalyticsAdminV1alphaFirebaseLink.fromJson( |
| 1416 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1417 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1440 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1441 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1442 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1443 | if ($fields != null) 'fields': [$fields], |
| 1444 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1445 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1446 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1447 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1448 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1449 | _url, |
| 1450 | 'DELETE', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1451 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1452 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1453 | return GoogleProtobufEmpty.fromJson( |
| 1454 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1455 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1489 | core.int? pageSize, |
| 1490 | core.String? pageToken, |
| 1491 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1492 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1493 | 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1498 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1499 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1500 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 1501 | '/firebaseLinks'; |
| 1502 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1503 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1504 | _url, |
| 1505 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1506 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1507 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1508 | return GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse.fromJson( |
| 1509 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1510 | } |
| 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 Moore | b3758bc | 2021-02-25 10:03:59 -0800 | [diff] [blame] | 1521 | /// [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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1525 | /// |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1539 | core.String? updateMask, |
| 1540 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1541 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1542 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1543 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1544 | if (updateMask != null) 'updateMask': [updateMask], |
| 1545 | if ($fields != null) 'fields': [$fields], |
| 1546 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1547 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1548 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1549 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1550 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1551 | _url, |
| 1552 | 'PATCH', |
| 1553 | body: _body, |
| 1554 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1555 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1556 | return GoogleAnalyticsAdminV1alphaFirebaseLink.fromJson( |
| 1557 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1558 | } |
| 1559 | } |
| 1560 | |
| 1561 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1589 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1590 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1591 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1592 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1593 | if ($fields != null) 'fields': [$fields], |
| 1594 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1595 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1596 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1597 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 1598 | '/googleAdsLinks'; |
| 1599 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1600 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1601 | _url, |
| 1602 | 'POST', |
| 1603 | body: _body, |
| 1604 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1605 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1606 | return GoogleAnalyticsAdminV1alphaGoogleAdsLink.fromJson( |
| 1607 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1608 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1629 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1630 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1631 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1632 | if ($fields != null) 'fields': [$fields], |
| 1633 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1634 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1635 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1636 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1637 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1638 | _url, |
| 1639 | 'DELETE', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1640 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1641 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1642 | return GoogleProtobufEmpty.fromJson( |
| 1643 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1644 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1674 | core.int? pageSize, |
| 1675 | core.String? pageToken, |
| 1676 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1677 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1678 | 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1683 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1684 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1685 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 1686 | '/googleAdsLinks'; |
| 1687 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1688 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1689 | _url, |
| 1690 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1691 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1692 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1693 | return GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse.fromJson( |
| 1694 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1695 | } |
| 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 Moore | b3758bc | 2021-02-25 10:03:59 -0800 | [diff] [blame] | 1708 | /// [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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1712 | /// |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1726 | core.String? updateMask, |
| 1727 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1728 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1729 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1730 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1731 | if (updateMask != null) 'updateMask': [updateMask], |
| 1732 | if ($fields != null) 'fields': [$fields], |
| 1733 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1734 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1735 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1736 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1737 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1738 | _url, |
| 1739 | 'PATCH', |
| 1740 | body: _body, |
| 1741 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1742 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1743 | return GoogleAnalyticsAdminV1alphaGoogleAdsLink.fromJson( |
| 1744 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1745 | } |
| 1746 | } |
| 1747 | |
| 1748 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1783 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1784 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1785 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1786 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1787 | if ($fields != null) 'fields': [$fields], |
| 1788 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1789 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1790 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1791 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 1792 | '/iosAppDataStreams'; |
| 1793 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1794 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1795 | _url, |
| 1796 | 'POST', |
| 1797 | body: _body, |
| 1798 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1799 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1800 | return GoogleAnalyticsAdminV1alphaIosAppDataStream.fromJson( |
| 1801 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1802 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1825 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1826 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1827 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1828 | if ($fields != null) 'fields': [$fields], |
| 1829 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1830 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1831 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1832 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1833 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1834 | _url, |
| 1835 | 'DELETE', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1836 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1837 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1838 | return GoogleProtobufEmpty.fromJson( |
| 1839 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1840 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1863 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1864 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1865 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1866 | if ($fields != null) 'fields': [$fields], |
| 1867 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1868 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1869 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1870 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1871 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1872 | _url, |
| 1873 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1874 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1875 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1876 | return GoogleAnalyticsAdminV1alphaIosAppDataStream.fromJson( |
| 1877 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1878 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1913 | core.int? pageSize, |
| 1914 | core.String? pageToken, |
| 1915 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1916 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1917 | 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1922 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1923 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1924 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 1925 | '/iosAppDataStreams'; |
| 1926 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1927 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1928 | _url, |
| 1929 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1930 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1931 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1932 | return GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse.fromJson( |
| 1933 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1934 | } |
| 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 Moore | b3758bc | 2021-02-25 10:03:59 -0800 | [diff] [blame] | 1947 | /// [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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1951 | /// |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1965 | core.String? updateMask, |
| 1966 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1967 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 1968 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 1969 | final _queryParams = <core.String, core.List<core.String>>{ |
| 1970 | if (updateMask != null) 'updateMask': [updateMask], |
| 1971 | if ($fields != null) 'fields': [$fields], |
| 1972 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1973 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 1974 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1975 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1976 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1977 | _url, |
| 1978 | 'PATCH', |
| 1979 | body: _body, |
| 1980 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1981 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 1982 | return GoogleAnalyticsAdminV1alphaIosAppDataStream.fromJson( |
| 1983 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 1984 | } |
| 1985 | } |
| 1986 | |
| 1987 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2023 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2024 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2025 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2026 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2027 | if ($fields != null) 'fields': [$fields], |
| 2028 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2029 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2030 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2031 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 2032 | '/userLinks:audit'; |
| 2033 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2034 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2035 | _url, |
| 2036 | 'POST', |
| 2037 | body: _body, |
| 2038 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2039 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2040 | return GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.fromJson( |
| 2041 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2042 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2074 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2075 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2076 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2077 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2078 | if ($fields != null) 'fields': [$fields], |
| 2079 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2080 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2081 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2082 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 2083 | '/userLinks:batchCreate'; |
| 2084 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2085 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2086 | _url, |
| 2087 | 'POST', |
| 2088 | body: _body, |
| 2089 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2090 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2091 | return GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse.fromJson( |
| 2092 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2093 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2119 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2120 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2121 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2122 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2123 | if ($fields != null) 'fields': [$fields], |
| 2124 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2125 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2126 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2127 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 2128 | '/userLinks:batchDelete'; |
| 2129 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2130 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2131 | _url, |
| 2132 | 'POST', |
| 2133 | body: _body, |
| 2134 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2135 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2136 | return GoogleProtobufEmpty.fromJson( |
| 2137 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2138 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2165 | core.List<core.String>? names, |
| 2166 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2167 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2168 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2169 | if (names != null) 'names': names, |
| 2170 | if ($fields != null) 'fields': [$fields], |
| 2171 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2172 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2173 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2174 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 2175 | '/userLinks:batchGet'; |
| 2176 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2177 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2178 | _url, |
| 2179 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2180 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2181 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2182 | return GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse.fromJson( |
| 2183 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2184 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2212 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2213 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2214 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2215 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2216 | if ($fields != null) 'fields': [$fields], |
| 2217 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2218 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2219 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2220 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 2221 | '/userLinks:batchUpdate'; |
| 2222 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2223 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2224 | _url, |
| 2225 | 'POST', |
| 2226 | body: _body, |
| 2227 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2228 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2229 | return GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse.fromJson( |
| 2230 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2231 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2262 | core.bool? notifyNewUser, |
| 2263 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2264 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2265 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2266 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2267 | if (notifyNewUser != null) 'notifyNewUser': ['${notifyNewUser}'], |
| 2268 | if ($fields != null) 'fields': [$fields], |
| 2269 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2270 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2271 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2272 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 2273 | '/userLinks'; |
| 2274 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2275 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2276 | _url, |
| 2277 | 'POST', |
| 2278 | body: _body, |
| 2279 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2280 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2281 | return GoogleAnalyticsAdminV1alphaUserLink.fromJson( |
| 2282 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2283 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2304 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2305 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2306 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2307 | if ($fields != null) 'fields': [$fields], |
| 2308 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2309 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2310 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2311 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2312 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2313 | _url, |
| 2314 | 'DELETE', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2315 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2316 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2317 | return GoogleProtobufEmpty.fromJson( |
| 2318 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2319 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2340 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2341 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2342 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2343 | if ($fields != null) 'fields': [$fields], |
| 2344 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2345 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2346 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2347 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2348 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2349 | _url, |
| 2350 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2351 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2352 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2353 | return GoogleAnalyticsAdminV1alphaUserLink.fromJson( |
| 2354 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2355 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2386 | core.int? pageSize, |
| 2387 | core.String? pageToken, |
| 2388 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2389 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2390 | 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2395 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2396 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2397 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 2398 | '/userLinks'; |
| 2399 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2400 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2401 | _url, |
| 2402 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2403 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2404 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2405 | return GoogleAnalyticsAdminV1alphaListUserLinksResponse.fromJson( |
| 2406 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2407 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2431 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2432 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2433 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2434 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2435 | if ($fields != null) 'fields': [$fields], |
| 2436 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2437 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2438 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2439 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2440 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2441 | _url, |
| 2442 | 'PATCH', |
| 2443 | body: _body, |
| 2444 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2445 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2446 | return GoogleAnalyticsAdminV1alphaUserLink.fromJson( |
| 2447 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2448 | } |
| 2449 | } |
| 2450 | |
| 2451 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2480 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2481 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2482 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2483 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2484 | if ($fields != null) 'fields': [$fields], |
| 2485 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2486 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2487 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2488 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 2489 | '/webDataStreams'; |
| 2490 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2491 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2492 | _url, |
| 2493 | 'POST', |
| 2494 | body: _body, |
| 2495 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2496 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2497 | return GoogleAnalyticsAdminV1alphaWebDataStream.fromJson( |
| 2498 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2499 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2522 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2523 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2524 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2525 | if ($fields != null) 'fields': [$fields], |
| 2526 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2527 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2528 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2529 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2530 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2531 | _url, |
| 2532 | 'DELETE', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2533 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2534 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2535 | return GoogleProtobufEmpty.fromJson( |
| 2536 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2537 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2560 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2561 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2562 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2563 | if ($fields != null) 'fields': [$fields], |
| 2564 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2565 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2566 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2567 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2568 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2569 | _url, |
| 2570 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2571 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2572 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2573 | return GoogleAnalyticsAdminV1alphaWebDataStream.fromJson( |
| 2574 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2575 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2603 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2604 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2605 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2606 | if ($fields != null) 'fields': [$fields], |
| 2607 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2608 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2609 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2610 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2611 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2612 | _url, |
| 2613 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2614 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2615 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2616 | return GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.fromJson( |
| 2617 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2618 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2645 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2646 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2647 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2648 | if ($fields != null) 'fields': [$fields], |
| 2649 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2650 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2651 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2652 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2653 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2654 | _url, |
| 2655 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2656 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2657 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2658 | return GoogleAnalyticsAdminV1alphaGlobalSiteTag.fromJson( |
| 2659 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2660 | } |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2694 | core.int? pageSize, |
| 2695 | core.String? pageToken, |
| 2696 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2697 | }) async { |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2698 | 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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2703 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2704 | final _url = 'v1alpha/' + |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2705 | commons.Escaper.ecapeVariableReserved('$parent') + |
| 2706 | '/webDataStreams'; |
| 2707 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2708 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2709 | _url, |
| 2710 | 'GET', |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2711 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2712 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2713 | return GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse.fromJson( |
| 2714 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2715 | } |
| 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 Moore | b3758bc | 2021-02-25 10:03:59 -0800 | [diff] [blame] | 2728 | /// [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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2732 | /// |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2746 | core.String? updateMask, |
| 2747 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2748 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2749 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2750 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2751 | if (updateMask != null) 'updateMask': [updateMask], |
| 2752 | if ($fields != null) 'fields': [$fields], |
| 2753 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2754 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2755 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2756 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2757 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2758 | _url, |
| 2759 | 'PATCH', |
| 2760 | body: _body, |
| 2761 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2762 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2763 | return GoogleAnalyticsAdminV1alphaWebDataStream.fromJson( |
| 2764 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2765 | } |
| 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 Moore | b3758bc | 2021-02-25 10:03:59 -0800 | [diff] [blame] | 2782 | /// [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 Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2786 | /// |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2801 | core.String? updateMask, |
| 2802 | core.String? $fields, |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2803 | }) async { |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2804 | final _body = convert.json.encode(request.toJson()); |
Kevin Moore | 6485d5a | 2021-02-08 14:56:40 -0800 | [diff] [blame] | 2805 | final _queryParams = <core.String, core.List<core.String>>{ |
| 2806 | if (updateMask != null) 'updateMask': [updateMask], |
| 2807 | if ($fields != null) 'fields': [$fields], |
| 2808 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2809 | |
Kevin Moore | 0c926a6 | 2021-02-05 11:30:57 -0800 | [diff] [blame] | 2810 | final _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2811 | |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2812 | final _response = await _requester.request( |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2813 | _url, |
| 2814 | 'PATCH', |
| 2815 | body: _body, |
| 2816 | queryParams: _queryParams, |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2817 | ); |
Kevin Moore | dc994e8 | 2021-02-05 09:36:45 -0800 | [diff] [blame] | 2818 | return GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.fromJson( |
| 2819 | _response as core.Map<core.String, core.dynamic>); |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2820 | } |
| 2821 | } |
| 2822 | |
| 2823 | /// A resource message representing a Google Analytics account. |
| 2824 | class GoogleAnalyticsAdminV1alphaAccount { |
| 2825 | /// Time when this account was originally created. |
| 2826 | /// |
| 2827 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2828 | core.String? createTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2829 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2836 | core.bool? deleted; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2837 | |
| 2838 | /// Human-readable display name for this account. |
| 2839 | /// |
| 2840 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2841 | core.String? displayName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2842 | |
| 2843 | /// Resource name of this account. |
| 2844 | /// |
| 2845 | /// Format: accounts/{account} Example: "accounts/100" |
| 2846 | /// |
| 2847 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2848 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2849 | |
| 2850 | /// Country of business. |
| 2851 | /// |
| 2852 | /// Must be a Unicode CLDR region code. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2853 | core.String? regionCode; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2854 | |
| 2855 | /// Time when account payload fields were last updated. |
| 2856 | /// |
| 2857 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2858 | core.String? updateTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2859 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2883 | 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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2890 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2891 | } |
| 2892 | |
| 2893 | /// A virtual resource representing an overview of an account and all its child |
| 2894 | /// GA4 properties. |
| 2895 | class GoogleAnalyticsAdminV1alphaAccountSummary { |
| 2896 | /// Resource name of account referred to by this account summary Format: |
| 2897 | /// accounts/{account_id} Example: "accounts/1000" |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2898 | core.String? account; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2899 | |
| 2900 | /// Display name for the account referred to in this account summary. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2901 | core.String? displayName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2902 | |
| 2903 | /// Resource name for this account summary. |
| 2904 | /// |
| 2905 | /// Format: accountSummaries/{account_id} Example: "accountSummaries/1000" |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2906 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2907 | |
| 2908 | /// List of summaries for child accounts of this account. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2909 | core.List<GoogleAnalyticsAdminV1alphaPropertySummary>? propertySummaries; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2910 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2932 | 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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2936 | if (propertySummaries != null) |
| 2937 | 'propertySummaries': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2938 | propertySummaries!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 2939 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2940 | } |
| 2941 | |
| 2942 | /// A resource message representing a Google Analytics Android app stream. |
| 2943 | class GoogleAnalyticsAdminV1alphaAndroidAppDataStream { |
| 2944 | /// Time when this stream was originally created. |
| 2945 | /// |
| 2946 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2947 | core.String? createTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2948 | |
| 2949 | /// Human-readable display name for the Data Stream. |
| 2950 | /// |
| 2951 | /// The max allowed display name length is 255 UTF-16 code units. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2952 | core.String? displayName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2953 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2959 | core.String? firebaseAppId; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2960 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2967 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2968 | |
| 2969 | /// The package name for the app being measured. |
| 2970 | /// |
| 2971 | /// Example: "com.example.myandroidapp" |
| 2972 | /// |
| 2973 | /// Immutable. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2974 | core.String? packageName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2975 | |
| 2976 | /// Time when stream payload fields were last updated. |
| 2977 | /// |
| 2978 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 2979 | core.String? updateTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 2980 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3004 | 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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3011 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3012 | } |
| 3013 | |
| 3014 | /// Read-only resource used to summarize a principal's effective roles. |
| 3015 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3020 | core.List<core.String>? directRoles; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3021 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3026 | core.List<core.String>? effectiveRoles; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3027 | |
| 3028 | /// Email address of the linked user |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3029 | core.String? emailAddress; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3030 | |
| 3031 | /// Example format: properties/1234/userLinks/5678 |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3032 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3033 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3055 | 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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3060 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3061 | } |
| 3062 | |
| 3063 | /// Request message for AuditUserLinks RPC. |
| 3064 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3070 | core.int? pageSize; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3071 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3077 | core.String? pageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3078 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3090 | core.Map<core.String, core.Object?> toJson() => { |
| 3091 | if (pageSize != null) 'pageSize': pageSize!, |
| 3092 | if (pageToken != null) 'pageToken': pageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3093 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3094 | } |
| 3095 | |
| 3096 | /// Response message for AuditUserLinks RPC. |
| 3097 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3101 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3102 | |
| 3103 | /// List of AuditUserLinks. |
| 3104 | /// |
| 3105 | /// These will be ordered stably, but in an arbitrary order. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3106 | core.List<GoogleAnalyticsAdminV1alphaAuditUserLink>? userLinks; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3107 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3123 | core.Map<core.String, core.Object?> toJson() => { |
| 3124 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3125 | if (userLinks != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3126 | 'userLinks': userLinks!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3127 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3128 | } |
| 3129 | |
| 3130 | /// Request message for BatchCreateUserLinks RPC. |
| 3131 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3139 | core.bool? notifyNewUsers; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3140 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3146 | core.List<GoogleAnalyticsAdminV1alphaCreateUserLinkRequest>? requests; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3147 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3164 | core.Map<core.String, core.Object?> toJson() => { |
| 3165 | if (notifyNewUsers != null) 'notifyNewUsers': notifyNewUsers!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3166 | if (requests != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3167 | 'requests': requests!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3168 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3169 | } |
| 3170 | |
| 3171 | /// Response message for BatchCreateUserLinks RPC. |
| 3172 | class GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse { |
| 3173 | /// The user links created. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3174 | core.List<GoogleAnalyticsAdminV1alphaUserLink>? userLinks; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3175 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3189 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3190 | if (userLinks != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3191 | 'userLinks': userLinks!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3192 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3193 | } |
| 3194 | |
| 3195 | /// Request message for BatchDeleteUserLinks RPC. |
| 3196 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3202 | core.List<GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest>? requests; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3203 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3217 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3218 | if (requests != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3219 | 'requests': requests!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3220 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3221 | } |
| 3222 | |
| 3223 | /// Response message for BatchGetUserLinks RPC. |
| 3224 | class GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse { |
| 3225 | /// The requested user links. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3226 | core.List<GoogleAnalyticsAdminV1alphaUserLink>? userLinks; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3227 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3241 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3242 | if (userLinks != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3243 | 'userLinks': userLinks!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3244 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3245 | } |
| 3246 | |
| 3247 | /// Request message for BatchUpdateUserLinks RPC. |
| 3248 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3254 | core.List<GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest>? requests; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3255 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3269 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3270 | if (requests != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3271 | 'requests': requests!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3272 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3273 | } |
| 3274 | |
| 3275 | /// Response message for BatchUpdateUserLinks RPC. |
| 3276 | class GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse { |
| 3277 | /// The user links updated. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3278 | core.List<GoogleAnalyticsAdminV1alphaUserLink>? userLinks; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3279 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3293 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3294 | if (userLinks != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3295 | 'userLinks': userLinks!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3296 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3297 | } |
| 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. |
| 3307 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3312 | core.bool? notifyNewUser; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3313 | |
| 3314 | /// Example format: accounts/1234 |
| 3315 | /// |
| 3316 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3317 | core.String? parent; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3318 | |
| 3319 | /// The user link to create. |
| 3320 | /// |
| 3321 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3322 | GoogleAnalyticsAdminV1alphaUserLink? userLink; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3323 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3339 | 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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3343 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3344 | } |
| 3345 | |
| 3346 | /// A resource message representing data sharing settings of a Google Analytics |
| 3347 | /// account. |
| 3348 | class GoogleAnalyticsAdminV1alphaDataSharingSettings { |
| 3349 | /// Resource name. |
| 3350 | /// |
| 3351 | /// Format: accounts/{account}/dataSharingSettings Example: |
| 3352 | /// "accounts/1000/dataSharingSettings" |
| 3353 | /// |
| 3354 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3355 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3356 | |
| 3357 | /// Allows any of Google sales to access the data in order to suggest |
| 3358 | /// configuration changes to improve results. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3359 | core.bool? sharingWithGoogleAnySalesEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3360 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3365 | core.bool? sharingWithGoogleAssignedSalesEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3366 | |
| 3367 | /// Allows Google to use the data to improve other Google products or |
| 3368 | /// services. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3369 | core.bool? sharingWithGoogleProductsEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3370 | |
| 3371 | /// Allows Google support to access the data in order to help troubleshoot |
| 3372 | /// issues. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3373 | core.bool? sharingWithGoogleSupportEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3374 | |
| 3375 | /// Allows Google to share the data anonymously in aggregate form with others. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3376 | core.bool? sharingWithOthersEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3377 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3405 | core.Map<core.String, core.Object?> toJson() => { |
| 3406 | if (name != null) 'name': name!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3407 | if (sharingWithGoogleAnySalesEnabled != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3408 | 'sharingWithGoogleAnySalesEnabled': sharingWithGoogleAnySalesEnabled!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3409 | if (sharingWithGoogleAssignedSalesEnabled != null) |
| 3410 | 'sharingWithGoogleAssignedSalesEnabled': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3411 | sharingWithGoogleAssignedSalesEnabled!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3412 | if (sharingWithGoogleProductsEnabled != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3413 | 'sharingWithGoogleProductsEnabled': sharingWithGoogleProductsEnabled!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3414 | if (sharingWithGoogleSupportEnabled != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3415 | 'sharingWithGoogleSupportEnabled': sharingWithGoogleSupportEnabled!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3416 | if (sharingWithOthersEnabled != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3417 | 'sharingWithOthersEnabled': sharingWithOthersEnabled!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3418 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3419 | } |
| 3420 | |
| 3421 | /// Request message for DeleteUserLink RPC. |
| 3422 | class GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest { |
| 3423 | /// Example format: accounts/1234/userLinks/5678 |
| 3424 | /// |
| 3425 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3426 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3427 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3436 | core.Map<core.String, core.Object?> toJson() => { |
| 3437 | if (name != null) 'name': name!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3438 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3439 | } |
| 3440 | |
| 3441 | /// Singleton resource under a WebDataStream, configuring measurement of |
| 3442 | /// additional site interactions and content. |
| 3443 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3447 | core.bool? fileDownloadsEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3448 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3456 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3457 | |
| 3458 | /// If enabled, capture an outbound click event each time a visitor clicks a |
| 3459 | /// link that leads them away from your domain. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3460 | core.bool? outboundClicksEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3461 | |
| 3462 | /// If enabled, capture a page view event each time the website changes the |
| 3463 | /// browser history state. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3464 | core.bool? pageChangesEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3465 | |
| 3466 | /// If enabled, capture a page view event each time a page loads. |
| 3467 | /// |
| 3468 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3469 | core.bool? pageLoadsEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3470 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3475 | core.bool? pageViewsEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3476 | |
| 3477 | /// If enabled, capture scroll events each time a visitor gets to the bottom |
| 3478 | /// of a page. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3479 | core.bool? scrollsEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3480 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3486 | core.String? searchQueryParameter; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3487 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3490 | core.bool? siteSearchEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3491 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3497 | core.bool? streamEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3498 | |
| 3499 | /// Additional URL query parameters. |
| 3500 | /// |
| 3501 | /// Max length is 1024 characters. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3502 | core.String? uriQueryParameter; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3503 | |
| 3504 | /// If enabled, capture video play, progress, and complete events as visitors |
| 3505 | /// view embedded videos on your site. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3506 | core.bool? videoEngagementEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3507 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3550 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3551 | if (fileDownloadsEnabled != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3552 | 'fileDownloadsEnabled': fileDownloadsEnabled!, |
| 3553 | if (name != null) 'name': name!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3554 | if (outboundClicksEnabled != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3555 | 'outboundClicksEnabled': outboundClicksEnabled!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3556 | if (pageChangesEnabled != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3557 | 'pageChangesEnabled': pageChangesEnabled!, |
| 3558 | if (pageLoadsEnabled != null) 'pageLoadsEnabled': pageLoadsEnabled!, |
| 3559 | if (pageViewsEnabled != null) 'pageViewsEnabled': pageViewsEnabled!, |
| 3560 | if (scrollsEnabled != null) 'scrollsEnabled': scrollsEnabled!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3561 | if (searchQueryParameter != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3562 | 'searchQueryParameter': searchQueryParameter!, |
| 3563 | if (siteSearchEnabled != null) 'siteSearchEnabled': siteSearchEnabled!, |
| 3564 | if (streamEnabled != null) 'streamEnabled': streamEnabled!, |
| 3565 | if (uriQueryParameter != null) 'uriQueryParameter': uriQueryParameter!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3566 | if (videoEngagementEnabled != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3567 | 'videoEngagementEnabled': videoEngagementEnabled!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3568 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3569 | } |
| 3570 | |
| 3571 | /// A link between an GA4 property and a Firebase project. |
| 3572 | class GoogleAnalyticsAdminV1alphaFirebaseLink { |
| 3573 | /// Time when this FirebaseLink was originally created. |
| 3574 | /// |
| 3575 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3576 | core.String? createTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3577 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3589 | core.String? maximumUserAccess; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3590 | |
| 3591 | /// Example format: properties/1234/firebaseLinks/5678 |
| 3592 | /// |
| 3593 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3594 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3595 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3605 | core.String? project; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3606 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3624 | 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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3629 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3630 | } |
| 3631 | |
| 3632 | /// Read-only resource with the tag for sending data from a website to a |
| 3633 | /// WebDataStream. |
| 3634 | class GoogleAnalyticsAdminV1alphaGlobalSiteTag { |
| 3635 | /// Resource name for this GlobalSiteTag resource. |
| 3636 | /// |
| 3637 | /// Format: properties/{propertyId}/globalSiteTag |
| 3638 | /// |
| 3639 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3640 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3641 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3646 | core.String? snippet; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3647 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3659 | core.Map<core.String, core.Object?> toJson() => { |
| 3660 | if (name != null) 'name': name!, |
| 3661 | if (snippet != null) 'snippet': snippet!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3662 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3663 | } |
| 3664 | |
| 3665 | /// A link between an GA4 property and a Google Ads account. |
| 3666 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3672 | core.bool? adsPersonalizationEnabled; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3673 | |
| 3674 | /// If true, this link is for a Google Ads manager account. |
| 3675 | /// |
| 3676 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3677 | core.bool? canManageClients; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3678 | |
| 3679 | /// Time when this link was originally created. |
| 3680 | /// |
| 3681 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3682 | core.String? createTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3683 | |
| 3684 | /// Google Ads customer ID. |
| 3685 | /// |
| 3686 | /// Immutable. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3687 | core.String? customerId; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3688 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3694 | core.String? emailAddress; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3695 | |
| 3696 | /// Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: |
| 3697 | /// googleAdsLinkId is not the Google Ads customer ID. |
| 3698 | /// |
| 3699 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3700 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3701 | |
| 3702 | /// Time when this link was last updated. |
| 3703 | /// |
| 3704 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3705 | core.String? updateTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3706 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3734 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3735 | if (adsPersonalizationEnabled != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3736 | '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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3743 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3744 | } |
| 3745 | |
| 3746 | /// A resource message representing a Google Analytics IOS app stream. |
| 3747 | class GoogleAnalyticsAdminV1alphaIosAppDataStream { |
| 3748 | /// The Apple App Store Bundle ID for the app Example: "com.example.myiosapp" |
| 3749 | /// |
| 3750 | /// Required. Immutable. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3751 | core.String? bundleId; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3752 | |
| 3753 | /// Time when this stream was originally created. |
| 3754 | /// |
| 3755 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3756 | core.String? createTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3757 | |
| 3758 | /// Human-readable display name for the Data Stream. |
| 3759 | /// |
| 3760 | /// The max allowed display name length is 255 UTF-16 code units. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3761 | core.String? displayName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3762 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3768 | core.String? firebaseAppId; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3769 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3776 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3777 | |
| 3778 | /// Time when stream payload fields were last updated. |
| 3779 | /// |
| 3780 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3781 | core.String? updateTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3782 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3806 | 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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3813 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3814 | } |
| 3815 | |
| 3816 | /// Response message for ListAccountSummaries RPC. |
| 3817 | class GoogleAnalyticsAdminV1alphaListAccountSummariesResponse { |
| 3818 | /// Account summaries of all accounts the caller has access to. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3819 | core.List<GoogleAnalyticsAdminV1alphaAccountSummary>? accountSummaries; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3820 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3824 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3825 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3842 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3843 | if (accountSummaries != null) |
| 3844 | 'accountSummaries': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3845 | accountSummaries!.map((value) => value.toJson()).toList(), |
| 3846 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3847 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3848 | } |
| 3849 | |
| 3850 | /// Request message for ListAccounts RPC. |
| 3851 | class GoogleAnalyticsAdminV1alphaListAccountsResponse { |
| 3852 | /// Results that were accessible to the caller. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3853 | core.List<GoogleAnalyticsAdminV1alphaAccount>? accounts; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3854 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3858 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3859 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3875 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3876 | if (accounts != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3877 | 'accounts': accounts!.map((value) => value.toJson()).toList(), |
| 3878 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3879 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3880 | } |
| 3881 | |
| 3882 | /// Request message for ListAndroidDataStreams RPC. |
| 3883 | class GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse { |
| 3884 | /// Results that matched the filter criteria and were accessible to the |
| 3885 | /// caller. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3886 | core.List<GoogleAnalyticsAdminV1alphaAndroidAppDataStream>? |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3887 | 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3892 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3893 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3910 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3911 | if (androidAppDataStreams != null) |
| 3912 | 'androidAppDataStreams': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3913 | androidAppDataStreams!.map((value) => value.toJson()).toList(), |
| 3914 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3915 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3916 | } |
| 3917 | |
| 3918 | /// Response message for ListFirebaseLinks RPC |
| 3919 | class GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse { |
| 3920 | /// List of FirebaseLinks. |
| 3921 | /// |
| 3922 | /// This will have at most one value. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3923 | core.List<GoogleAnalyticsAdminV1alphaFirebaseLink>? firebaseLinks; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3924 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3930 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3931 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3948 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3949 | if (firebaseLinks != null) |
| 3950 | 'firebaseLinks': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3951 | firebaseLinks!.map((value) => value.toJson()).toList(), |
| 3952 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3953 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3954 | } |
| 3955 | |
| 3956 | /// Response message for ListGoogleAdsLinks RPC. |
| 3957 | class GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse { |
| 3958 | /// List of GoogleAdsLinks. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3959 | core.List<GoogleAnalyticsAdminV1alphaGoogleAdsLink>? googleAdsLinks; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3960 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3964 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3965 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3982 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3983 | if (googleAdsLinks != null) |
| 3984 | 'googleAdsLinks': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3985 | googleAdsLinks!.map((value) => value.toJson()).toList(), |
| 3986 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 3987 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3988 | } |
| 3989 | |
| 3990 | /// Request message for ListIosAppDataStreams RPC. |
| 3991 | class GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse { |
| 3992 | /// Results that matched the filter criteria and were accessible to the |
| 3993 | /// caller. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3994 | core.List<GoogleAnalyticsAdminV1alphaIosAppDataStream>? iosAppDataStreams; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 3995 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 3999 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4000 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4017 | core.Map<core.String, core.Object?> toJson() => { |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4018 | if (iosAppDataStreams != null) |
| 4019 | 'iosAppDataStreams': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4020 | iosAppDataStreams!.map((value) => value.toJson()).toList(), |
| 4021 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4022 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4023 | } |
| 4024 | |
| 4025 | /// Response message for ListProperties RPC. |
| 4026 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4030 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4031 | |
| 4032 | /// Results that matched the filter criteria and were accessible to the |
| 4033 | /// caller. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4034 | core.List<GoogleAnalyticsAdminV1alphaProperty>? properties; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4035 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4051 | core.Map<core.String, core.Object?> toJson() => { |
| 4052 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4053 | if (properties != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4054 | 'properties': properties!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4055 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4056 | } |
| 4057 | |
| 4058 | /// Response message for ListUserLinks RPC. |
| 4059 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4063 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4064 | |
| 4065 | /// List of UserLinks. |
| 4066 | /// |
| 4067 | /// These will be ordered stably, but in an arbitrary order. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4068 | core.List<GoogleAnalyticsAdminV1alphaUserLink>? userLinks; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4069 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4085 | core.Map<core.String, core.Object?> toJson() => { |
| 4086 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4087 | if (userLinks != null) |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4088 | 'userLinks': userLinks!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4089 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4090 | } |
| 4091 | |
| 4092 | /// Request message for ListWebDataStreams RPC. |
| 4093 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4097 | core.String? nextPageToken; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4098 | |
| 4099 | /// Results that matched the filter criteria and were accessible to the |
| 4100 | /// caller. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4101 | core.List<GoogleAnalyticsAdminV1alphaWebDataStream>? webDataStreams; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4102 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4119 | core.Map<core.String, core.Object?> toJson() => { |
| 4120 | if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4121 | if (webDataStreams != null) |
| 4122 | 'webDataStreams': |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4123 | webDataStreams!.map((value) => value.toJson()).toList(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4124 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4125 | } |
| 4126 | |
| 4127 | /// A resource message representing a Google Analytics GA4 property. |
| 4128 | class GoogleAnalyticsAdminV1alphaProperty { |
| 4129 | /// Time when the entity was originally created. |
| 4130 | /// |
| 4131 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4132 | core.String? createTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4133 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4138 | core.String? currencyCode; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4139 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4146 | core.bool? deleted; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4147 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4153 | core.String? displayName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4154 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4184 | core.String? industryCategory; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4185 | |
| 4186 | /// Resource name of this property. |
| 4187 | /// |
| 4188 | /// Format: properties/{property_id} Example: "properties/1000" |
| 4189 | /// |
| 4190 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4191 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4192 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4199 | core.String? parent; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4200 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4208 | core.String? timeZone; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4209 | |
| 4210 | /// Time when entity payload fields were last updated. |
| 4211 | /// |
| 4212 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4213 | core.String? updateTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4214 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4247 | 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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4257 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4258 | } |
| 4259 | |
| 4260 | /// A virtual resource representing metadata for an GA4 property. |
| 4261 | class GoogleAnalyticsAdminV1alphaPropertySummary { |
| 4262 | /// Display name for the property referred to in this account summary. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4263 | core.String? displayName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4264 | |
| 4265 | /// Resource name of property referred to by this property summary Format: |
| 4266 | /// properties/{property_id} Example: "properties/1000" |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4267 | core.String? property; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4268 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4280 | core.Map<core.String, core.Object?> toJson() => { |
| 4281 | if (displayName != null) 'displayName': displayName!, |
| 4282 | if (property != null) 'property': property!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4283 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4284 | } |
| 4285 | |
| 4286 | /// Request message for ProvisionAccountTicket RPC. |
| 4287 | class GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest { |
| 4288 | /// The account to create. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4289 | GoogleAnalyticsAdminV1alphaAccount? account; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4290 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4294 | core.String? redirectUri; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4295 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4309 | core.Map<core.String, core.Object?> toJson() => { |
| 4310 | if (account != null) 'account': account!.toJson(), |
| 4311 | if (redirectUri != null) 'redirectUri': redirectUri!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4312 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4313 | } |
| 4314 | |
| 4315 | /// Response message for ProvisionAccountTicket RPC. |
| 4316 | class GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse { |
| 4317 | /// The param to be passed in the ToS link. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4318 | core.String? accountTicketId; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4319 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4329 | core.Map<core.String, core.Object?> toJson() => { |
| 4330 | if (accountTicketId != null) 'accountTicketId': accountTicketId!, |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4331 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4332 | } |
| 4333 | |
| 4334 | /// Request message for UpdateUserLink RPC. |
| 4335 | class GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest { |
| 4336 | /// The user link to update. |
| 4337 | /// |
| 4338 | /// Required. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4339 | GoogleAnalyticsAdminV1alphaUserLink? userLink; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4340 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4350 | core.Map<core.String, core.Object?> toJson() => { |
| 4351 | if (userLink != null) 'userLink': userLink!.toJson(), |
Kevin Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4352 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4353 | } |
| 4354 | |
| 4355 | /// A resource message representing a user's permissions on an Account or |
| 4356 | /// Property resource. |
| 4357 | class 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4365 | core.List<core.String>? directRoles; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4366 | |
| 4367 | /// Email address of the user to link |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4368 | core.String? emailAddress; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4369 | |
| 4370 | /// Example format: properties/1234/userLinks/5678 |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4371 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4372 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4389 | 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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4393 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4394 | } |
| 4395 | |
| 4396 | /// A resource message representing a Google Analytics web stream. |
| 4397 | class GoogleAnalyticsAdminV1alphaWebDataStream { |
| 4398 | /// Time when this stream was originally created. |
| 4399 | /// |
| 4400 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4401 | core.String? createTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4402 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4408 | core.String? defaultUri; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4409 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4415 | core.String? displayName; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4416 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4422 | core.String? firebaseAppId; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4423 | |
| 4424 | /// Analytics "Measurement ID", without the "G-" prefix. |
| 4425 | /// |
| 4426 | /// Example: "G-1A2BCD345E" would just be "1A2BCD345E" |
| 4427 | /// |
| 4428 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4429 | core.String? measurementId; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4430 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4437 | core.String? name; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4438 | |
| 4439 | /// Time when stream payload fields were last updated. |
| 4440 | /// |
| 4441 | /// Output only. |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4442 | core.String? updateTime; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4443 | |
| 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 Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4470 | 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 Moore | c321b0a | 2021-02-08 12:27:09 -0800 | [diff] [blame] | 4478 | }; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4479 | } |
| 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 `{}`. |
| 4488 | class GoogleProtobufEmpty { |
| 4489 | GoogleProtobufEmpty(); |
| 4490 | |
| 4491 | GoogleProtobufEmpty.fromJson( |
| 4492 | // ignore: avoid_unused_constructor_parameters |
| 4493 | core.Map _json); |
| 4494 | |
Kevin Moore | 58e2233 | 2021-02-25 10:11:41 -0800 | [diff] [blame] | 4495 | core.Map<core.String, core.Object?> toJson() => {}; |
Kevin Moore | 0946dce | 2021-02-04 09:58:04 -0800 | [diff] [blame] | 4496 | } |