| // This is a generated file (see the discoveryapis_generator project). |
| |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: comment_references |
| // ignore_for_file: deprecated_member_use_from_same_package |
| // ignore_for_file: doc_directive_unknown |
| // ignore_for_file: lines_longer_than_80_chars |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: prefer_interpolation_to_compose_strings |
| // ignore_for_file: unintended_html_in_doc_comment |
| // ignore_for_file: unnecessary_brace_in_string_interps |
| // ignore_for_file: unnecessary_lambdas |
| // ignore_for_file: unnecessary_string_interpolations |
| |
| /// Google Analytics API - v3 |
| /// |
| /// Views and manages your Google Analytics data. |
| /// |
| /// For more information, see <https://developers.google.com/analytics/> |
| /// |
| /// Create an instance of [AnalyticsApi] to access these resources: |
| /// |
| /// - [DataResource] |
| /// - [DataGaResource] |
| /// - [DataMcfResource] |
| /// - [DataRealtimeResource] |
| /// - [ManagementResource] |
| /// - [ManagementAccountSummariesResource] |
| /// - [ManagementAccountUserLinksResource] |
| /// - [ManagementAccountsResource] |
| /// - [ManagementClientIdResource] |
| /// - [ManagementCustomDataSourcesResource] |
| /// - [ManagementCustomDimensionsResource] |
| /// - [ManagementCustomMetricsResource] |
| /// - [ManagementExperimentsResource] |
| /// - [ManagementFiltersResource] |
| /// - [ManagementGoalsResource] |
| /// - [ManagementProfileFilterLinksResource] |
| /// - [ManagementProfileUserLinksResource] |
| /// - [ManagementProfilesResource] |
| /// - [ManagementRemarketingAudienceResource] |
| /// - [ManagementSegmentsResource] |
| /// - [ManagementUnsampledReportsResource] |
| /// - [ManagementUploadsResource] |
| /// - [ManagementWebPropertyAdWordsLinksResource] |
| /// - [ManagementWebpropertiesResource] |
| /// - [ManagementWebpropertyUserLinksResource] |
| /// - [MetadataResource] |
| /// - [MetadataColumnsResource] |
| /// - [ProvisioningResource] |
| /// - [UserDeletionResource] |
| /// - [UserDeletionUserDeletionRequestResource] |
| library; |
| |
| import 'dart:async' as async; |
| import 'dart:convert' as convert; |
| import 'dart:core' as core; |
| |
| import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| import 'package:http/http.dart' as http; |
| |
| import '../src/user_agent.dart'; |
| |
| export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| show |
| ApiRequestError, |
| ByteRange, |
| DetailedApiRequestError, |
| DownloadOptions, |
| Media, |
| PartialDownloadOptions, |
| ResumableUploadOptions, |
| UploadOptions; |
| |
| /// Views and manages your Google Analytics data. |
| class AnalyticsApi { |
| /// View and manage your Google Analytics data |
| static const analyticsScope = 'https://www.googleapis.com/auth/analytics'; |
| |
| /// Edit Google Analytics management entities |
| static const analyticsEditScope = |
| 'https://www.googleapis.com/auth/analytics.edit'; |
| |
| /// Manage Google Analytics Account users by email address |
| static const analyticsManageUsersScope = |
| 'https://www.googleapis.com/auth/analytics.manage.users'; |
| |
| /// View Google Analytics user permissions |
| static const analyticsManageUsersReadonlyScope = |
| 'https://www.googleapis.com/auth/analytics.manage.users.readonly'; |
| |
| /// Create a new Google Analytics account along with its default property and |
| /// view |
| static const analyticsProvisionScope = |
| 'https://www.googleapis.com/auth/analytics.provision'; |
| |
| /// View your Google Analytics data |
| static const analyticsReadonlyScope = |
| 'https://www.googleapis.com/auth/analytics.readonly'; |
| |
| /// Manage Google Analytics user deletion requests |
| static const analyticsUserDeletionScope = |
| 'https://www.googleapis.com/auth/analytics.user.deletion'; |
| |
| final commons.ApiRequester _requester; |
| |
| DataResource get data => DataResource(_requester); |
| ManagementResource get management => ManagementResource(_requester); |
| MetadataResource get metadata => MetadataResource(_requester); |
| ProvisioningResource get provisioning => ProvisioningResource(_requester); |
| UserDeletionResource get userDeletion => UserDeletionResource(_requester); |
| |
| AnalyticsApi( |
| http.Client client, { |
| core.String rootUrl = 'https://analytics.googleapis.com/', |
| core.String servicePath = 'analytics/v3/', |
| }) : _requester = commons.ApiRequester( |
| client, |
| rootUrl, |
| servicePath, |
| requestHeaders, |
| ); |
| } |
| |
| class DataResource { |
| final commons.ApiRequester _requester; |
| |
| DataGaResource get ga => DataGaResource(_requester); |
| DataMcfResource get mcf => DataMcfResource(_requester); |
| DataRealtimeResource get realtime => DataRealtimeResource(_requester); |
| |
| DataResource(commons.ApiRequester client) : _requester = client; |
| } |
| |
| class DataGaResource { |
| final commons.ApiRequester _requester; |
| |
| DataGaResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Returns Analytics data for a view (profile). |
| /// |
| /// Request parameters: |
| /// |
| /// [ids] - Unique table ID for retrieving Analytics data. Table ID is of the |
| /// form ga:XXXX, where XXXX is the Analytics view (profile) ID. |
| /// Value must have pattern `ga:\[0-9\]+`. |
| /// |
| /// [startDate] - Start date for fetching Analytics data. Requests can specify |
| /// a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, |
| /// yesterday, or 7daysAgo). The default value is 7daysAgo. |
| /// Value must have pattern |
| /// `\[0-9\]{4}-\[0-9\]{2}-\[0-9\]{2}|today|yesterday|\[0-9\]+(daysAgo)`. |
| /// |
| /// [endDate] - End date for fetching Analytics data. Request can should |
| /// specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., |
| /// today, yesterday, or 7daysAgo). The default value is yesterday. |
| /// Value must have pattern |
| /// `\[0-9\]{4}-\[0-9\]{2}-\[0-9\]{2}|today|yesterday|\[0-9\]+(daysAgo)`. |
| /// |
| /// [metrics] - A comma-separated list of Analytics metrics. E.g., |
| /// 'ga:sessions,ga:pageviews'. At least one metric must be specified. |
| /// Value must have pattern `ga:.+`. |
| /// |
| /// [dimensions] - A comma-separated list of Analytics dimensions. E.g., |
| /// 'ga:browser,ga:city'. |
| /// Value must have pattern `(ga:.+)?`. |
| /// |
| /// [filters] - A comma-separated list of dimension or metric filters to be |
| /// applied to Analytics data. |
| /// Value must have pattern `ga:.+`. |
| /// |
| /// [includeEmptyRows] - The response will include empty rows if this |
| /// parameter is set to true, the default is true |
| /// |
| /// [maxResults] - The maximum number of entries to include in this feed. |
| /// |
| /// [output] - The selected format for the response. Default format is JSON. |
| /// Possible string values are: |
| /// - "dataTable" : Returns the response in Google Charts Data Table format. |
| /// This is useful in creating visualization using Google Charts. |
| /// - "json" : Returns the response in standard JSON format. |
| /// |
| /// [samplingLevel] - The desired sampling level. |
| /// Possible string values are: |
| /// - "DEFAULT" : Returns response with a sample size that balances speed and |
| /// accuracy. |
| /// - "FASTER" : Returns a fast response with a smaller sample size. |
| /// - "HIGHER_PRECISION" : Returns a more accurate response using a large |
| /// sample size, but this may result in the response being slower. |
| /// |
| /// [segment] - An Analytics segment to be applied to data. |
| /// |
| /// [sort] - A comma-separated list of dimensions or metrics that determine |
| /// the sort order for Analytics data. |
| /// Value must have pattern `(-)?ga:.+`. |
| /// |
| /// [startIndex] - An index of the first entity to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [GaData]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<GaData> get( |
| core.String ids, |
| core.String startDate, |
| core.String endDate, |
| core.String metrics, { |
| core.String? dimensions, |
| core.String? filters, |
| core.bool? includeEmptyRows, |
| core.int? maxResults, |
| core.String? output, |
| core.String? samplingLevel, |
| core.String? segment, |
| core.String? sort, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'ids': [ids], |
| 'start-date': [startDate], |
| 'end-date': [endDate], |
| 'metrics': [metrics], |
| 'dimensions': ?dimensions == null ? null : [dimensions], |
| 'filters': ?filters == null ? null : [filters], |
| 'include-empty-rows': ?includeEmptyRows == null |
| ? null |
| : ['${includeEmptyRows}'], |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'output': ?output == null ? null : [output], |
| 'samplingLevel': ?samplingLevel == null ? null : [samplingLevel], |
| 'segment': ?segment == null ? null : [segment], |
| 'sort': ?sort == null ? null : [sort], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| const url_ = 'data/ga'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return GaData.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class DataMcfResource { |
| final commons.ApiRequester _requester; |
| |
| DataMcfResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Returns Analytics Multi-Channel Funnels data for a view (profile). |
| /// |
| /// Request parameters: |
| /// |
| /// [ids] - Unique table ID for retrieving Analytics data. Table ID is of the |
| /// form ga:XXXX, where XXXX is the Analytics view (profile) ID. |
| /// Value must have pattern `ga:\[0-9\]+`. |
| /// |
| /// [startDate] - Start date for fetching Analytics data. Requests can specify |
| /// a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, |
| /// yesterday, or 7daysAgo). The default value is 7daysAgo. |
| /// Value must have pattern |
| /// `\[0-9\]{4}-\[0-9\]{2}-\[0-9\]{2}|today|yesterday|\[0-9\]+(daysAgo)`. |
| /// |
| /// [endDate] - End date for fetching Analytics data. Requests can specify a |
| /// start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, |
| /// yesterday, or 7daysAgo). The default value is 7daysAgo. |
| /// Value must have pattern |
| /// `\[0-9\]{4}-\[0-9\]{2}-\[0-9\]{2}|today|yesterday|\[0-9\]+(daysAgo)`. |
| /// |
| /// [metrics] - A comma-separated list of Multi-Channel Funnels metrics. E.g., |
| /// 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must |
| /// be specified. |
| /// Value must have pattern `mcf:.+`. |
| /// |
| /// [dimensions] - A comma-separated list of Multi-Channel Funnels dimensions. |
| /// E.g., 'mcf:source,mcf:medium'. |
| /// Value must have pattern `(mcf:.+)?`. |
| /// |
| /// [filters] - A comma-separated list of dimension or metric filters to be |
| /// applied to the Analytics data. |
| /// Value must have pattern `mcf:.+`. |
| /// |
| /// [maxResults] - The maximum number of entries to include in this feed. |
| /// |
| /// [samplingLevel] - The desired sampling level. |
| /// Possible string values are: |
| /// - "DEFAULT" : Returns response with a sample size that balances speed and |
| /// accuracy. |
| /// - "FASTER" : Returns a fast response with a smaller sample size. |
| /// - "HIGHER_PRECISION" : Returns a more accurate response using a large |
| /// sample size, but this may result in the response being slower. |
| /// |
| /// [sort] - A comma-separated list of dimensions or metrics that determine |
| /// the sort order for the Analytics data. |
| /// Value must have pattern `(-)?mcf:.+`. |
| /// |
| /// [startIndex] - An index of the first entity to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [McfData]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<McfData> get( |
| core.String ids, |
| core.String startDate, |
| core.String endDate, |
| core.String metrics, { |
| core.String? dimensions, |
| core.String? filters, |
| core.int? maxResults, |
| core.String? samplingLevel, |
| core.String? sort, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'ids': [ids], |
| 'start-date': [startDate], |
| 'end-date': [endDate], |
| 'metrics': [metrics], |
| 'dimensions': ?dimensions == null ? null : [dimensions], |
| 'filters': ?filters == null ? null : [filters], |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'samplingLevel': ?samplingLevel == null ? null : [samplingLevel], |
| 'sort': ?sort == null ? null : [sort], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| const url_ = 'data/mcf'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return McfData.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class DataRealtimeResource { |
| final commons.ApiRequester _requester; |
| |
| DataRealtimeResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Returns real time data for a view (profile). |
| /// |
| /// Request parameters: |
| /// |
| /// [ids] - Unique table ID for retrieving real time data. Table ID is of the |
| /// form ga:XXXX, where XXXX is the Analytics view (profile) ID. |
| /// Value must have pattern `ga:\[0-9\]+`. |
| /// |
| /// [metrics] - A comma-separated list of real time metrics. E.g., |
| /// 'rt:activeUsers'. At least one metric must be specified. |
| /// Value must have pattern `(ga:.+)|(rt:.+)`. |
| /// |
| /// [dimensions] - A comma-separated list of real time dimensions. E.g., |
| /// 'rt:medium,rt:city'. |
| /// Value must have pattern `(ga:.+)|(rt:.+)`. |
| /// |
| /// [filters] - A comma-separated list of dimension or metric filters to be |
| /// applied to real time data. |
| /// Value must have pattern `(ga:.+)|(rt:.+)`. |
| /// |
| /// [maxResults] - The maximum number of entries to include in this feed. |
| /// |
| /// [sort] - A comma-separated list of dimensions or metrics that determine |
| /// the sort order for real time data. |
| /// Value must have pattern `(-)?((ga:.+)|(rt:.+))`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [RealtimeData]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<RealtimeData> get( |
| core.String ids, |
| core.String metrics, { |
| core.String? dimensions, |
| core.String? filters, |
| core.int? maxResults, |
| core.String? sort, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'ids': [ids], |
| 'metrics': [metrics], |
| 'dimensions': ?dimensions == null ? null : [dimensions], |
| 'filters': ?filters == null ? null : [filters], |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'sort': ?sort == null ? null : [sort], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| const url_ = 'data/realtime'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return RealtimeData.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementAccountSummariesResource get accountSummaries => |
| ManagementAccountSummariesResource(_requester); |
| ManagementAccountUserLinksResource get accountUserLinks => |
| ManagementAccountUserLinksResource(_requester); |
| ManagementAccountsResource get accounts => |
| ManagementAccountsResource(_requester); |
| ManagementClientIdResource get clientId => |
| ManagementClientIdResource(_requester); |
| ManagementCustomDataSourcesResource get customDataSources => |
| ManagementCustomDataSourcesResource(_requester); |
| ManagementCustomDimensionsResource get customDimensions => |
| ManagementCustomDimensionsResource(_requester); |
| ManagementCustomMetricsResource get customMetrics => |
| ManagementCustomMetricsResource(_requester); |
| ManagementExperimentsResource get experiments => |
| ManagementExperimentsResource(_requester); |
| ManagementFiltersResource get filters => |
| ManagementFiltersResource(_requester); |
| ManagementGoalsResource get goals => ManagementGoalsResource(_requester); |
| ManagementProfileFilterLinksResource get profileFilterLinks => |
| ManagementProfileFilterLinksResource(_requester); |
| ManagementProfileUserLinksResource get profileUserLinks => |
| ManagementProfileUserLinksResource(_requester); |
| ManagementProfilesResource get profiles => |
| ManagementProfilesResource(_requester); |
| ManagementRemarketingAudienceResource get remarketingAudience => |
| ManagementRemarketingAudienceResource(_requester); |
| ManagementSegmentsResource get segments => |
| ManagementSegmentsResource(_requester); |
| ManagementUnsampledReportsResource get unsampledReports => |
| ManagementUnsampledReportsResource(_requester); |
| ManagementUploadsResource get uploads => |
| ManagementUploadsResource(_requester); |
| ManagementWebPropertyAdWordsLinksResource get webPropertyAdWordsLinks => |
| ManagementWebPropertyAdWordsLinksResource(_requester); |
| ManagementWebpropertiesResource get webproperties => |
| ManagementWebpropertiesResource(_requester); |
| ManagementWebpropertyUserLinksResource get webpropertyUserLinks => |
| ManagementWebpropertyUserLinksResource(_requester); |
| |
| ManagementResource(commons.ApiRequester client) : _requester = client; |
| } |
| |
| class ManagementAccountSummariesResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementAccountSummariesResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Lists account summaries (lightweight tree comprised of |
| /// accounts/properties/profiles) to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [maxResults] - The maximum number of account summaries to include in this |
| /// response, where the largest acceptable value is 1000. |
| /// |
| /// [startIndex] - An index of the first entity to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [AccountSummaries]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<AccountSummaries> list({ |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| const url_ = 'management/accountSummaries'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return AccountSummaries.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementAccountUserLinksResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementAccountUserLinksResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Removes a user from the given account. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to delete the user link for. |
| /// |
| /// [linkId] - Link ID to delete the user link for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<void> delete( |
| core.String accountId, |
| core.String linkId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/entityUserLinks/' + |
| commons.escapeVariable('$linkId'); |
| |
| await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| downloadOptions: null, |
| ); |
| } |
| |
| /// Adds a new user to the given account. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to create the user link for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityUserLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityUserLink> insert( |
| EntityUserLink request, |
| core.String accountId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/entityUserLinks'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return EntityUserLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists account-user links for a given account. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve the user links for. |
| /// |
| /// [maxResults] - The maximum number of account-user links to include in this |
| /// response. |
| /// |
| /// [startIndex] - An index of the first account-user link to retrieve. Use |
| /// this parameter as a pagination mechanism along with the max-results |
| /// parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityUserLinks]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityUserLinks> list( |
| core.String accountId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/entityUserLinks'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return EntityUserLinks.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates permissions for an existing user on the given account. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to update the account-user link for. |
| /// |
| /// [linkId] - Link ID to update the account-user link for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityUserLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityUserLink> update( |
| EntityUserLink request, |
| core.String accountId, |
| core.String linkId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/entityUserLinks/' + |
| commons.escapeVariable('$linkId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return EntityUserLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementAccountsResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementAccountsResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Lists all accounts to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [maxResults] - The maximum number of accounts to include in this response. |
| /// |
| /// [startIndex] - An index of the first account to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Accounts]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Accounts> list({ |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| const url_ = 'management/accounts'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Accounts.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ManagementClientIdResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementClientIdResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Hashes the given Client ID. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [HashClientIdResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<HashClientIdResponse> hashClientId( |
| HashClientIdRequest request, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| const url_ = 'management/clientId:hashClientId'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return HashClientIdResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementCustomDataSourcesResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementCustomDataSourcesResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// List custom data sources to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account Id for the custom data sources to retrieve. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property Id for the custom data sources to retrieve. |
| /// Value must have pattern `UA-(\d+)-(\d+)`. |
| /// |
| /// [maxResults] - The maximum number of custom data sources to include in |
| /// this response. |
| /// |
| /// [startIndex] - A 1-based index of the first custom data source to |
| /// retrieve. Use this parameter as a pagination mechanism along with the |
| /// max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomDataSources]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomDataSources> list( |
| core.String accountId, |
| core.String webPropertyId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDataSources'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return CustomDataSources.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementCustomDimensionsResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementCustomDimensionsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Get a custom dimension to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the custom dimension to retrieve. |
| /// |
| /// [webPropertyId] - Web property ID for the custom dimension to retrieve. |
| /// |
| /// [customDimensionId] - The ID of the custom dimension to retrieve. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomDimension]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomDimension> get( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String customDimensionId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDimensions/' + |
| commons.escapeVariable('$customDimensionId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return CustomDimension.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Create a new custom dimension. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the custom dimension to create. |
| /// |
| /// [webPropertyId] - Web property ID for the custom dimension to create. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomDimension]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomDimension> insert( |
| CustomDimension request, |
| core.String accountId, |
| core.String webPropertyId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDimensions'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return CustomDimension.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists custom dimensions to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the custom dimensions to retrieve. |
| /// |
| /// [webPropertyId] - Web property ID for the custom dimensions to retrieve. |
| /// |
| /// [maxResults] - The maximum number of custom dimensions to include in this |
| /// response. |
| /// |
| /// [startIndex] - An index of the first entity to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomDimensions]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomDimensions> list( |
| core.String accountId, |
| core.String webPropertyId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDimensions'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return CustomDimensions.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates an existing custom dimension. |
| /// |
| /// This method supports patch semantics. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the custom dimension to update. |
| /// |
| /// [webPropertyId] - Web property ID for the custom dimension to update. |
| /// |
| /// [customDimensionId] - Custom dimension ID for the custom dimension to |
| /// update. |
| /// |
| /// [ignoreCustomDataSourceLinks] - Force the update and ignore any warnings |
| /// related to the custom dimension being linked to a custom data source / |
| /// data set. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomDimension]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomDimension> patch( |
| CustomDimension request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String customDimensionId, { |
| core.bool? ignoreCustomDataSourceLinks, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'ignoreCustomDataSourceLinks': ?ignoreCustomDataSourceLinks == null |
| ? null |
| : ['${ignoreCustomDataSourceLinks}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDimensions/' + |
| commons.escapeVariable('$customDimensionId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return CustomDimension.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates an existing custom dimension. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the custom dimension to update. |
| /// |
| /// [webPropertyId] - Web property ID for the custom dimension to update. |
| /// |
| /// [customDimensionId] - Custom dimension ID for the custom dimension to |
| /// update. |
| /// |
| /// [ignoreCustomDataSourceLinks] - Force the update and ignore any warnings |
| /// related to the custom dimension being linked to a custom data source / |
| /// data set. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomDimension]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomDimension> update( |
| CustomDimension request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String customDimensionId, { |
| core.bool? ignoreCustomDataSourceLinks, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'ignoreCustomDataSourceLinks': ?ignoreCustomDataSourceLinks == null |
| ? null |
| : ['${ignoreCustomDataSourceLinks}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDimensions/' + |
| commons.escapeVariable('$customDimensionId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return CustomDimension.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementCustomMetricsResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementCustomMetricsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Get a custom metric to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the custom metric to retrieve. |
| /// |
| /// [webPropertyId] - Web property ID for the custom metric to retrieve. |
| /// |
| /// [customMetricId] - The ID of the custom metric to retrieve. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomMetric]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomMetric> get( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String customMetricId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customMetrics/' + |
| commons.escapeVariable('$customMetricId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return CustomMetric.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Create a new custom metric. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the custom metric to create. |
| /// |
| /// [webPropertyId] - Web property ID for the custom dimension to create. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomMetric]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomMetric> insert( |
| CustomMetric request, |
| core.String accountId, |
| core.String webPropertyId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customMetrics'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return CustomMetric.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists custom metrics to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the custom metrics to retrieve. |
| /// |
| /// [webPropertyId] - Web property ID for the custom metrics to retrieve. |
| /// |
| /// [maxResults] - The maximum number of custom metrics to include in this |
| /// response. |
| /// |
| /// [startIndex] - An index of the first entity to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomMetrics]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomMetrics> list( |
| core.String accountId, |
| core.String webPropertyId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customMetrics'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return CustomMetrics.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates an existing custom metric. |
| /// |
| /// This method supports patch semantics. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the custom metric to update. |
| /// |
| /// [webPropertyId] - Web property ID for the custom metric to update. |
| /// |
| /// [customMetricId] - Custom metric ID for the custom metric to update. |
| /// |
| /// [ignoreCustomDataSourceLinks] - Force the update and ignore any warnings |
| /// related to the custom metric being linked to a custom data source / data |
| /// set. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomMetric]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomMetric> patch( |
| CustomMetric request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String customMetricId, { |
| core.bool? ignoreCustomDataSourceLinks, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'ignoreCustomDataSourceLinks': ?ignoreCustomDataSourceLinks == null |
| ? null |
| : ['${ignoreCustomDataSourceLinks}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customMetrics/' + |
| commons.escapeVariable('$customMetricId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return CustomMetric.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates an existing custom metric. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the custom metric to update. |
| /// |
| /// [webPropertyId] - Web property ID for the custom metric to update. |
| /// |
| /// [customMetricId] - Custom metric ID for the custom metric to update. |
| /// |
| /// [ignoreCustomDataSourceLinks] - Force the update and ignore any warnings |
| /// related to the custom metric being linked to a custom data source / data |
| /// set. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CustomMetric]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CustomMetric> update( |
| CustomMetric request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String customMetricId, { |
| core.bool? ignoreCustomDataSourceLinks, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'ignoreCustomDataSourceLinks': ?ignoreCustomDataSourceLinks == null |
| ? null |
| : ['${ignoreCustomDataSourceLinks}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customMetrics/' + |
| commons.escapeVariable('$customMetricId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return CustomMetric.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementExperimentsResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementExperimentsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Delete an experiment. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which the experiment belongs |
| /// |
| /// [webPropertyId] - Web property ID to which the experiment belongs |
| /// |
| /// [profileId] - View (Profile) ID to which the experiment belongs |
| /// |
| /// [experimentId] - ID of the experiment to delete |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<void> delete( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String experimentId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/experiments/' + |
| commons.escapeVariable('$experimentId'); |
| |
| await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| downloadOptions: null, |
| ); |
| } |
| |
| /// Returns an experiment to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve the experiment for. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve the experiment for. |
| /// |
| /// [profileId] - View (Profile) ID to retrieve the experiment for. |
| /// |
| /// [experimentId] - Experiment ID to retrieve the experiment for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Experiment]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Experiment> get( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String experimentId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/experiments/' + |
| commons.escapeVariable('$experimentId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Experiment.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Create a new experiment. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to create the experiment for. |
| /// |
| /// [webPropertyId] - Web property ID to create the experiment for. |
| /// |
| /// [profileId] - View (Profile) ID to create the experiment for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Experiment]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Experiment> insert( |
| Experiment request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/experiments'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Experiment.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists experiments to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve experiments for. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve experiments for. |
| /// Value must have pattern `UA-(\d+)-(\d+)`. |
| /// |
| /// [profileId] - View (Profile) ID to retrieve experiments for. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [maxResults] - The maximum number of experiments to include in this |
| /// response. |
| /// |
| /// [startIndex] - An index of the first experiment to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Experiments]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Experiments> list( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/experiments'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Experiments.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Update an existing experiment. |
| /// |
| /// This method supports patch semantics. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID of the experiment to update. |
| /// |
| /// [webPropertyId] - Web property ID of the experiment to update. |
| /// |
| /// [profileId] - View (Profile) ID of the experiment to update. |
| /// |
| /// [experimentId] - Experiment ID of the experiment to update. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Experiment]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Experiment> patch( |
| Experiment request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String experimentId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/experiments/' + |
| commons.escapeVariable('$experimentId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Experiment.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Update an existing experiment. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID of the experiment to update. |
| /// |
| /// [webPropertyId] - Web property ID of the experiment to update. |
| /// |
| /// [profileId] - View (Profile) ID of the experiment to update. |
| /// |
| /// [experimentId] - Experiment ID of the experiment to update. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Experiment]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Experiment> update( |
| Experiment request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String experimentId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/experiments/' + |
| commons.escapeVariable('$experimentId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Experiment.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementFiltersResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementFiltersResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Delete a filter. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to delete the filter for. |
| /// |
| /// [filterId] - ID of the filter to be deleted. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Filter]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Filter> delete( |
| core.String accountId, |
| core.String filterId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/filters/' + |
| commons.escapeVariable('$filterId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| ); |
| return Filter.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Returns filters to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve filters for. |
| /// |
| /// [filterId] - Filter ID to retrieve filters for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Filter]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Filter> get( |
| core.String accountId, |
| core.String filterId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/filters/' + |
| commons.escapeVariable('$filterId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Filter.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Create a new filter. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to create filter for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Filter]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Filter> insert( |
| Filter request, |
| core.String accountId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/filters'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Filter.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Lists all filters for an account |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve filters for. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [maxResults] - The maximum number of filters to include in this response. |
| /// |
| /// [startIndex] - An index of the first entity to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Filters]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Filters> list( |
| core.String accountId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/filters'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Filters.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates an existing filter. |
| /// |
| /// This method supports patch semantics. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which the filter belongs. |
| /// |
| /// [filterId] - ID of the filter to be updated. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Filter]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Filter> patch( |
| Filter request, |
| core.String accountId, |
| core.String filterId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/filters/' + |
| commons.escapeVariable('$filterId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Filter.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates an existing filter. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which the filter belongs. |
| /// |
| /// [filterId] - ID of the filter to be updated. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Filter]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Filter> update( |
| Filter request, |
| core.String accountId, |
| core.String filterId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/filters/' + |
| commons.escapeVariable('$filterId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Filter.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ManagementGoalsResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementGoalsResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Gets a goal to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve the goal for. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve the goal for. |
| /// |
| /// [profileId] - View (Profile) ID to retrieve the goal for. |
| /// |
| /// [goalId] - Goal ID to retrieve the goal for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Goal]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Goal> get( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String goalId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/goals/' + |
| commons.escapeVariable('$goalId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Goal.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Create a new goal. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to create the goal for. |
| /// |
| /// [webPropertyId] - Web property ID to create the goal for. |
| /// |
| /// [profileId] - View (Profile) ID to create the goal for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Goal]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Goal> insert( |
| Goal request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/goals'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Goal.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Lists goals to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve goals for. Can either be a specific |
| /// account ID or '~all', which refers to all the accounts that user has |
| /// access to. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve goals for. Can either be a |
| /// specific web property ID or '~all', which refers to all the web properties |
| /// that user has access to. |
| /// |
| /// [profileId] - View (Profile) ID to retrieve goals for. Can either be a |
| /// specific view (profile) ID or '~all', which refers to all the views |
| /// (profiles) that user has access to. |
| /// |
| /// [maxResults] - The maximum number of goals to include in this response. |
| /// |
| /// [startIndex] - An index of the first goal to retrieve. Use this parameter |
| /// as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Goals]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Goals> list( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/goals'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Goals.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates an existing goal. |
| /// |
| /// This method supports patch semantics. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to update the goal. |
| /// |
| /// [webPropertyId] - Web property ID to update the goal. |
| /// |
| /// [profileId] - View (Profile) ID to update the goal. |
| /// |
| /// [goalId] - Index of the goal to be updated. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Goal]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Goal> patch( |
| Goal request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String goalId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/goals/' + |
| commons.escapeVariable('$goalId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Goal.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates an existing goal. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to update the goal. |
| /// |
| /// [webPropertyId] - Web property ID to update the goal. |
| /// |
| /// [profileId] - View (Profile) ID to update the goal. |
| /// |
| /// [goalId] - Index of the goal to be updated. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Goal]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Goal> update( |
| Goal request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String goalId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/goals/' + |
| commons.escapeVariable('$goalId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Goal.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ManagementProfileFilterLinksResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementProfileFilterLinksResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Delete a profile filter link. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which the profile filter link belongs. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property Id to which the profile filter link |
| /// belongs. |
| /// Value must have pattern `UA-(\d+)-(\d+)`. |
| /// |
| /// [profileId] - Profile ID to which the filter link belongs. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [linkId] - ID of the profile filter link to delete. |
| /// Value must have pattern `\d+:\d+`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<void> delete( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String linkId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/profileFilterLinks/' + |
| commons.escapeVariable('$linkId'); |
| |
| await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| downloadOptions: null, |
| ); |
| } |
| |
| /// Returns a single profile filter link. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve profile filter link for. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property Id to retrieve profile filter link for. |
| /// Value must have pattern `UA-(\d+)-(\d+)`. |
| /// |
| /// [profileId] - Profile ID to retrieve filter link for. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [linkId] - ID of the profile filter link. |
| /// Value must have pattern `\d+:\d+`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ProfileFilterLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ProfileFilterLink> get( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String linkId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/profileFilterLinks/' + |
| commons.escapeVariable('$linkId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ProfileFilterLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Create a new profile filter link. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to create profile filter link for. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property Id to create profile filter link for. |
| /// Value must have pattern `UA-(\d+)-(\d+)`. |
| /// |
| /// [profileId] - Profile ID to create filter link for. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ProfileFilterLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ProfileFilterLink> insert( |
| ProfileFilterLink request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/profileFilterLinks'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return ProfileFilterLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists all profile filter links for a profile. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve profile filter links for. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property Id for profile filter links for. Can either |
| /// be a specific web property ID or '~all', which refers to all the web |
| /// properties that user has access to. |
| /// |
| /// [profileId] - Profile ID to retrieve filter links for. Can either be a |
| /// specific profile ID or '~all', which refers to all the profiles that user |
| /// has access to. |
| /// |
| /// [maxResults] - The maximum number of profile filter links to include in |
| /// this response. |
| /// |
| /// [startIndex] - An index of the first entity to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ProfileFilterLinks]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ProfileFilterLinks> list( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/profileFilterLinks'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ProfileFilterLinks.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Update an existing profile filter link. |
| /// |
| /// This method supports patch semantics. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which profile filter link belongs. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property Id to which profile filter link belongs |
| /// Value must have pattern `UA-(\d+)-(\d+)`. |
| /// |
| /// [profileId] - Profile ID to which filter link belongs |
| /// Value must have pattern `\d+`. |
| /// |
| /// [linkId] - ID of the profile filter link to be updated. |
| /// Value must have pattern `\d+:\d+`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ProfileFilterLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ProfileFilterLink> patch( |
| ProfileFilterLink request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String linkId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/profileFilterLinks/' + |
| commons.escapeVariable('$linkId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return ProfileFilterLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Update an existing profile filter link. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which profile filter link belongs. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property Id to which profile filter link belongs |
| /// Value must have pattern `UA-(\d+)-(\d+)`. |
| /// |
| /// [profileId] - Profile ID to which filter link belongs |
| /// Value must have pattern `\d+`. |
| /// |
| /// [linkId] - ID of the profile filter link to be updated. |
| /// Value must have pattern `\d+:\d+`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ProfileFilterLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ProfileFilterLink> update( |
| ProfileFilterLink request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String linkId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/profileFilterLinks/' + |
| commons.escapeVariable('$linkId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return ProfileFilterLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementProfileUserLinksResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementProfileUserLinksResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Removes a user from the given view (profile). |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to delete the user link for. |
| /// |
| /// [webPropertyId] - Web Property ID to delete the user link for. |
| /// |
| /// [profileId] - View (Profile) ID to delete the user link for. |
| /// |
| /// [linkId] - Link ID to delete the user link for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<void> delete( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String linkId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/entityUserLinks/' + |
| commons.escapeVariable('$linkId'); |
| |
| await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| downloadOptions: null, |
| ); |
| } |
| |
| /// Adds a new user to the given view (profile). |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to create the user link for. |
| /// |
| /// [webPropertyId] - Web Property ID to create the user link for. |
| /// |
| /// [profileId] - View (Profile) ID to create the user link for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityUserLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityUserLink> insert( |
| EntityUserLink request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/entityUserLinks'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return EntityUserLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists profile-user links for a given view (profile). |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID which the given view (profile) belongs to. |
| /// |
| /// [webPropertyId] - Web Property ID which the given view (profile) belongs |
| /// to. Can either be a specific web property ID or '~all', which refers to |
| /// all the web properties that user has access to. |
| /// |
| /// [profileId] - View (Profile) ID to retrieve the profile-user links for. |
| /// Can either be a specific profile ID or '~all', which refers to all the |
| /// profiles that user has access to. |
| /// |
| /// [maxResults] - The maximum number of profile-user links to include in this |
| /// response. |
| /// |
| /// [startIndex] - An index of the first profile-user link to retrieve. Use |
| /// this parameter as a pagination mechanism along with the max-results |
| /// parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityUserLinks]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityUserLinks> list( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/entityUserLinks'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return EntityUserLinks.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates permissions for an existing user on the given view (profile). |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to update the user link for. |
| /// |
| /// [webPropertyId] - Web Property ID to update the user link for. |
| /// |
| /// [profileId] - View (Profile ID) to update the user link for. |
| /// |
| /// [linkId] - Link ID to update the user link for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityUserLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityUserLink> update( |
| EntityUserLink request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String linkId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/entityUserLinks/' + |
| commons.escapeVariable('$linkId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return EntityUserLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementProfilesResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementProfilesResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Deletes a view (profile). |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to delete the view (profile) for. |
| /// |
| /// [webPropertyId] - Web property ID to delete the view (profile) for. |
| /// |
| /// [profileId] - ID of the view (profile) to be deleted. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<void> delete( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId'); |
| |
| await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| downloadOptions: null, |
| ); |
| } |
| |
| /// Gets a view (profile) to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve the view (profile) for. |
| /// Value must have pattern `\[0-9\]+`. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve the view (profile) for. |
| /// Value must have pattern `UA-\[0-9\]+-\[0-9\]+`. |
| /// |
| /// [profileId] - View (Profile) ID to retrieve the view (profile) for. |
| /// Value must have pattern `\[0-9\]+`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Profile]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Profile> get( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Profile.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Create a new view (profile). |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to create the view (profile) for. |
| /// |
| /// [webPropertyId] - Web property ID to create the view (profile) for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Profile]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Profile> insert( |
| Profile request, |
| core.String accountId, |
| core.String webPropertyId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Profile.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Lists views (profiles) to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID for the view (profiles) to retrieve. Can either |
| /// be a specific account ID or '~all', which refers to all the accounts to |
| /// which the user has access. |
| /// |
| /// [webPropertyId] - Web property ID for the views (profiles) to retrieve. |
| /// Can either be a specific web property ID or '~all', which refers to all |
| /// the web properties to which the user has access. |
| /// |
| /// [maxResults] - The maximum number of views (profiles) to include in this |
| /// response. |
| /// |
| /// [startIndex] - An index of the first entity to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Profiles]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Profiles> list( |
| core.String accountId, |
| core.String webPropertyId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Profiles.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates an existing view (profile). |
| /// |
| /// This method supports patch semantics. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which the view (profile) belongs |
| /// |
| /// [webPropertyId] - Web property ID to which the view (profile) belongs |
| /// |
| /// [profileId] - ID of the view (profile) to be updated. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Profile]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Profile> patch( |
| Profile request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Profile.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates an existing view (profile). |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which the view (profile) belongs |
| /// |
| /// [webPropertyId] - Web property ID to which the view (profile) belongs |
| /// |
| /// [profileId] - ID of the view (profile) to be updated. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Profile]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Profile> update( |
| Profile request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Profile.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ManagementRemarketingAudienceResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementRemarketingAudienceResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Delete a remarketing audience. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which the remarketing audience belongs. |
| /// |
| /// [webPropertyId] - Web property ID to which the remarketing audience |
| /// belongs. |
| /// |
| /// [remarketingAudienceId] - The ID of the remarketing audience to delete. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<void> delete( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String remarketingAudienceId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/remarketingAudiences/' + |
| commons.escapeVariable('$remarketingAudienceId'); |
| |
| await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| downloadOptions: null, |
| ); |
| } |
| |
| /// Gets a remarketing audience to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - The account ID of the remarketing audience to retrieve. |
| /// |
| /// [webPropertyId] - The web property ID of the remarketing audience to |
| /// retrieve. |
| /// |
| /// [remarketingAudienceId] - The ID of the remarketing audience to retrieve. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [RemarketingAudience]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<RemarketingAudience> get( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String remarketingAudienceId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/remarketingAudiences/' + |
| commons.escapeVariable('$remarketingAudienceId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return RemarketingAudience.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Creates a new remarketing audience. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - The account ID for which to create the remarketing audience. |
| /// |
| /// [webPropertyId] - Web property ID for which to create the remarketing |
| /// audience. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [RemarketingAudience]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<RemarketingAudience> insert( |
| RemarketingAudience request, |
| core.String accountId, |
| core.String webPropertyId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/remarketingAudiences'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return RemarketingAudience.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists remarketing audiences to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - The account ID of the remarketing audiences to retrieve. |
| /// |
| /// [webPropertyId] - The web property ID of the remarketing audiences to |
| /// retrieve. |
| /// |
| /// [maxResults] - The maximum number of remarketing audiences to include in |
| /// this response. |
| /// |
| /// [startIndex] - An index of the first entity to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [type] - null |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [RemarketingAudiences]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<RemarketingAudiences> list( |
| core.String accountId, |
| core.String webPropertyId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? type, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'type': ?type == null ? null : [type], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/remarketingAudiences'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return RemarketingAudiences.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates an existing remarketing audience. |
| /// |
| /// This method supports patch semantics. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - The account ID of the remarketing audience to update. |
| /// |
| /// [webPropertyId] - The web property ID of the remarketing audience to |
| /// update. |
| /// |
| /// [remarketingAudienceId] - The ID of the remarketing audience to update. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [RemarketingAudience]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<RemarketingAudience> patch( |
| RemarketingAudience request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String remarketingAudienceId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/remarketingAudiences/' + |
| commons.escapeVariable('$remarketingAudienceId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return RemarketingAudience.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates an existing remarketing audience. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - The account ID of the remarketing audience to update. |
| /// |
| /// [webPropertyId] - The web property ID of the remarketing audience to |
| /// update. |
| /// |
| /// [remarketingAudienceId] - The ID of the remarketing audience to update. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [RemarketingAudience]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<RemarketingAudience> update( |
| RemarketingAudience request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String remarketingAudienceId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/remarketingAudiences/' + |
| commons.escapeVariable('$remarketingAudienceId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return RemarketingAudience.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementSegmentsResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementSegmentsResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Lists segments to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [maxResults] - The maximum number of segments to include in this response. |
| /// |
| /// [startIndex] - An index of the first segment to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Segments]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Segments> list({ |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| const url_ = 'management/segments'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Segments.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ManagementUnsampledReportsResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementUnsampledReportsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Deletes an unsampled report. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to delete the unsampled report for. |
| /// |
| /// [webPropertyId] - Web property ID to delete the unsampled reports for. |
| /// |
| /// [profileId] - View (Profile) ID to delete the unsampled report for. |
| /// |
| /// [unsampledReportId] - ID of the unsampled report to be deleted. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<void> delete( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String unsampledReportId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/unsampledReports/' + |
| commons.escapeVariable('$unsampledReportId'); |
| |
| await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| downloadOptions: null, |
| ); |
| } |
| |
| /// Returns a single unsampled report. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve unsampled report for. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve unsampled reports for. |
| /// |
| /// [profileId] - View (Profile) ID to retrieve unsampled report for. |
| /// |
| /// [unsampledReportId] - ID of the unsampled report to retrieve. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [UnsampledReport]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<UnsampledReport> get( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, |
| core.String unsampledReportId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/unsampledReports/' + |
| commons.escapeVariable('$unsampledReportId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return UnsampledReport.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Create a new unsampled report. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to create the unsampled report for. |
| /// |
| /// [webPropertyId] - Web property ID to create the unsampled report for. |
| /// |
| /// [profileId] - View (Profile) ID to create the unsampled report for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [UnsampledReport]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<UnsampledReport> insert( |
| UnsampledReport request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/unsampledReports'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return UnsampledReport.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists unsampled reports to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve unsampled reports for. Must be a |
| /// specific account ID, ~all is not supported. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve unsampled reports for. Must |
| /// be a specific web property ID, ~all is not supported. |
| /// |
| /// [profileId] - View (Profile) ID to retrieve unsampled reports for. Must be |
| /// a specific view (profile) ID, ~all is not supported. |
| /// |
| /// [maxResults] - The maximum number of unsampled reports to include in this |
| /// response. |
| /// |
| /// [startIndex] - An index of the first unsampled report to retrieve. Use |
| /// this parameter as a pagination mechanism along with the max-results |
| /// parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [UnsampledReports]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<UnsampledReports> list( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String profileId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/profiles/' + |
| commons.escapeVariable('$profileId') + |
| '/unsampledReports'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return UnsampledReports.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementUploadsResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementUploadsResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Delete data associated with a previous upload. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account Id for the uploads to be deleted. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property Id for the uploads to be deleted. |
| /// Value must have pattern `UA-(\d+)-(\d+)`. |
| /// |
| /// [customDataSourceId] - Custom data source Id for the uploads to be |
| /// deleted. |
| /// Value must have pattern `.{22}`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<void> deleteUploadData( |
| AnalyticsDataimportDeleteUploadDataRequest request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String customDataSourceId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDataSources/' + |
| commons.escapeVariable('$customDataSourceId') + |
| '/deleteUploadData'; |
| |
| await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| downloadOptions: null, |
| ); |
| } |
| |
| /// List uploads to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account Id for the upload to retrieve. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property Id for the upload to retrieve. |
| /// Value must have pattern `UA-(\d+)-(\d+)`. |
| /// |
| /// [customDataSourceId] - Custom data source Id for upload to retrieve. |
| /// Value must have pattern `.{22}`. |
| /// |
| /// [uploadId] - Upload Id to retrieve. |
| /// Value must have pattern `.{22}`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Upload]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Upload> get( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String customDataSourceId, |
| core.String uploadId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDataSources/' + |
| commons.escapeVariable('$customDataSourceId') + |
| '/uploads/' + |
| commons.escapeVariable('$uploadId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Upload.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// List uploads to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account Id for the uploads to retrieve. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property Id for the uploads to retrieve. |
| /// Value must have pattern `UA-(\d+)-(\d+)`. |
| /// |
| /// [customDataSourceId] - Custom data source Id for uploads to retrieve. |
| /// Value must have pattern `.{22}`. |
| /// |
| /// [maxResults] - The maximum number of uploads to include in this response. |
| /// |
| /// [startIndex] - A 1-based index of the first upload to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Uploads]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Uploads> list( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String customDataSourceId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDataSources/' + |
| commons.escapeVariable('$customDataSourceId') + |
| '/uploads'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Uploads.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Upload data for a custom data source. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account Id associated with the upload. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property UA-string associated with the upload. |
| /// Value must have pattern `UA-\d+-\d+`. |
| /// |
| /// [customDataSourceId] - Custom data source Id to which the data being |
| /// uploaded belongs. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// [uploadMedia] - The media to upload. |
| /// |
| /// [uploadOptions] - Options for the media upload. Streaming Media without |
| /// the length being known ahead of time is only supported via resumable |
| /// uploads. |
| /// |
| /// Completes with a [Upload]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Upload> uploadData( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String customDataSourceId, { |
| core.String? $fields, |
| commons.UploadOptions uploadOptions = commons.UploadOptions.defaultOptions, |
| commons.Media? uploadMedia, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| core.String url_; |
| if (uploadMedia == null) { |
| url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDataSources/' + |
| commons.escapeVariable('$customDataSourceId') + |
| '/uploads'; |
| } else if (uploadOptions is commons.ResumableUploadOptions) { |
| url_ = |
| '/resumable/upload/analytics/v3/management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDataSources/' + |
| commons.escapeVariable('$customDataSourceId') + |
| '/uploads'; |
| } else { |
| url_ = |
| '/upload/analytics/v3/management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/customDataSources/' + |
| commons.escapeVariable('$customDataSourceId') + |
| '/uploads'; |
| } |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| queryParams: queryParams_, |
| uploadMedia: uploadMedia, |
| uploadOptions: uploadOptions, |
| ); |
| return Upload.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ManagementWebPropertyAdWordsLinksResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementWebPropertyAdWordsLinksResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Deletes a web property-Google Ads link. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - ID of the account which the given web property belongs to. |
| /// |
| /// [webPropertyId] - Web property ID to delete the Google Ads link for. |
| /// |
| /// [webPropertyAdWordsLinkId] - Web property Google Ads link ID. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<void> delete( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String webPropertyAdWordsLinkId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/entityAdWordsLinks/' + |
| commons.escapeVariable('$webPropertyAdWordsLinkId'); |
| |
| await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| downloadOptions: null, |
| ); |
| } |
| |
| /// Returns a web property-Google Ads link to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - ID of the account which the given web property belongs to. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve the Google Ads link for. |
| /// |
| /// [webPropertyAdWordsLinkId] - Web property-Google Ads link ID. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityAdWordsLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityAdWordsLink> get( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String webPropertyAdWordsLinkId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/entityAdWordsLinks/' + |
| commons.escapeVariable('$webPropertyAdWordsLinkId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return EntityAdWordsLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Creates a webProperty-Google Ads link. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - ID of the Google Analytics account to create the link for. |
| /// |
| /// [webPropertyId] - Web property ID to create the link for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityAdWordsLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityAdWordsLink> insert( |
| EntityAdWordsLink request, |
| core.String accountId, |
| core.String webPropertyId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/entityAdWordsLinks'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return EntityAdWordsLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists webProperty-Google Ads links for a given web property. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - ID of the account which the given web property belongs to. |
| /// Value must have pattern `\d+`. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve the Google Ads links for. |
| /// |
| /// [maxResults] - The maximum number of webProperty-Google Ads links to |
| /// include in this response. |
| /// |
| /// [startIndex] - An index of the first webProperty-Google Ads link to |
| /// retrieve. Use this parameter as a pagination mechanism along with the |
| /// max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityAdWordsLinks]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityAdWordsLinks> list( |
| core.String accountId, |
| core.String webPropertyId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/entityAdWordsLinks'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return EntityAdWordsLinks.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates an existing webProperty-Google Ads link. |
| /// |
| /// This method supports patch semantics. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - ID of the account which the given web property belongs to. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve the Google Ads link for. |
| /// |
| /// [webPropertyAdWordsLinkId] - Web property-Google Ads link ID. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityAdWordsLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityAdWordsLink> patch( |
| EntityAdWordsLink request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String webPropertyAdWordsLinkId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/entityAdWordsLinks/' + |
| commons.escapeVariable('$webPropertyAdWordsLinkId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return EntityAdWordsLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates an existing webProperty-Google Ads link. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - ID of the account which the given web property belongs to. |
| /// |
| /// [webPropertyId] - Web property ID to retrieve the Google Ads link for. |
| /// |
| /// [webPropertyAdWordsLinkId] - Web property-Google Ads link ID. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityAdWordsLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityAdWordsLink> update( |
| EntityAdWordsLink request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String webPropertyAdWordsLinkId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/entityAdWordsLinks/' + |
| commons.escapeVariable('$webPropertyAdWordsLinkId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return EntityAdWordsLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementWebpropertiesResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementWebpropertiesResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Gets a web property to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve the web property for. |
| /// Value must have pattern `\[0-9\]+`. |
| /// |
| /// [webPropertyId] - ID to retrieve the web property for. |
| /// Value must have pattern `UA-\[0-9\]+-\[0-9\]+`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Webproperty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Webproperty> get( |
| core.String accountId, |
| core.String webPropertyId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Webproperty.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Create a new property if the account has fewer than 20 properties. |
| /// |
| /// Web properties are visible in the Google Analytics interface only if they |
| /// have at least one profile. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to create the web property for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Webproperty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Webproperty> insert( |
| Webproperty request, |
| core.String accountId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Webproperty.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists web properties to which the user has access. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to retrieve web properties for. Can either be a |
| /// specific account ID or '~all', which refers to all the accounts that user |
| /// has access to. |
| /// |
| /// [maxResults] - The maximum number of web properties to include in this |
| /// response. |
| /// |
| /// [startIndex] - An index of the first entity to retrieve. Use this |
| /// parameter as a pagination mechanism along with the max-results parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Webproperties]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Webproperties> list( |
| core.String accountId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Webproperties.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates an existing web property. |
| /// |
| /// This method supports patch semantics. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which the web property belongs |
| /// |
| /// [webPropertyId] - Web property ID |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Webproperty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Webproperty> patch( |
| Webproperty request, |
| core.String accountId, |
| core.String webPropertyId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Webproperty.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates an existing web property. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to which the web property belongs |
| /// |
| /// [webPropertyId] - Web property ID |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Webproperty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Webproperty> update( |
| Webproperty request, |
| core.String accountId, |
| core.String webPropertyId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Webproperty.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ManagementWebpropertyUserLinksResource { |
| final commons.ApiRequester _requester; |
| |
| ManagementWebpropertyUserLinksResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Removes a user from the given web property. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to delete the user link for. |
| /// |
| /// [webPropertyId] - Web Property ID to delete the user link for. |
| /// |
| /// [linkId] - Link ID to delete the user link for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<void> delete( |
| core.String accountId, |
| core.String webPropertyId, |
| core.String linkId, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/entityUserLinks/' + |
| commons.escapeVariable('$linkId'); |
| |
| await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| downloadOptions: null, |
| ); |
| } |
| |
| /// Adds a new user to the given web property. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to create the user link for. |
| /// |
| /// [webPropertyId] - Web Property ID to create the user link for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityUserLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityUserLink> insert( |
| EntityUserLink request, |
| core.String accountId, |
| core.String webPropertyId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/entityUserLinks'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return EntityUserLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists webProperty-user links for a given web property. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID which the given web property belongs to. |
| /// |
| /// [webPropertyId] - Web Property ID for the webProperty-user links to |
| /// retrieve. Can either be a specific web property ID or '~all', which refers |
| /// to all the web properties that user has access to. |
| /// |
| /// [maxResults] - The maximum number of webProperty-user Links to include in |
| /// this response. |
| /// |
| /// [startIndex] - An index of the first webProperty-user link to retrieve. |
| /// Use this parameter as a pagination mechanism along with the max-results |
| /// parameter. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityUserLinks]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityUserLinks> list( |
| core.String accountId, |
| core.String webPropertyId, { |
| core.int? maxResults, |
| core.int? startIndex, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'max-results': ?maxResults == null ? null : ['${maxResults}'], |
| 'start-index': ?startIndex == null ? null : ['${startIndex}'], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/entityUserLinks'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return EntityUserLinks.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates permissions for an existing user on the given web property. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [accountId] - Account ID to update the account-user link for. |
| /// |
| /// [webPropertyId] - Web property ID to update the account-user link for. |
| /// |
| /// [linkId] - Link ID to update the account-user link for. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [EntityUserLink]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<EntityUserLink> update( |
| EntityUserLink request, |
| core.String accountId, |
| core.String webPropertyId, |
| core.String linkId, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'management/accounts/' + |
| commons.escapeVariable('$accountId') + |
| '/webproperties/' + |
| commons.escapeVariable('$webPropertyId') + |
| '/entityUserLinks/' + |
| commons.escapeVariable('$linkId'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PUT', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return EntityUserLink.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class MetadataResource { |
| final commons.ApiRequester _requester; |
| |
| MetadataColumnsResource get columns => MetadataColumnsResource(_requester); |
| |
| MetadataResource(commons.ApiRequester client) : _requester = client; |
| } |
| |
| class MetadataColumnsResource { |
| final commons.ApiRequester _requester; |
| |
| MetadataColumnsResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Lists all columns for a report type |
| /// |
| /// Request parameters: |
| /// |
| /// [reportType] - Report type. Allowed Values: 'ga'. Where 'ga' corresponds |
| /// to the Core Reporting API |
| /// Value must have pattern `ga`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Columns]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Columns> list( |
| core.String reportType, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = |
| 'metadata/' + commons.escapeVariable('$reportType') + '/columns'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Columns.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ProvisioningResource { |
| final commons.ApiRequester _requester; |
| |
| ProvisioningResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Creates an account ticket. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [AccountTicket]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<AccountTicket> createAccountTicket( |
| AccountTicket request, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| const url_ = 'provisioning/createAccountTicket'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return AccountTicket.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Provision account. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [AccountTreeResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<AccountTreeResponse> createAccountTree( |
| AccountTreeRequest request, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| const url_ = 'provisioning/createAccountTree'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return AccountTreeResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class UserDeletionResource { |
| final commons.ApiRequester _requester; |
| |
| UserDeletionUserDeletionRequestResource get userDeletionRequest => |
| UserDeletionUserDeletionRequestResource(_requester); |
| |
| UserDeletionResource(commons.ApiRequester client) : _requester = client; |
| } |
| |
| class UserDeletionUserDeletionRequestResource { |
| final commons.ApiRequester _requester; |
| |
| UserDeletionUserDeletionRequestResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Insert or update a user deletion requests. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [UserDeletionRequest]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<UserDeletionRequest> upsert( |
| UserDeletionRequest request, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| const url_ = 'userDeletion/userDeletionRequests:upsert'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return UserDeletionRequest.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| /// Child link for an account entry. |
| /// |
| /// Points to the list of web properties for this account. |
| class AccountChildLink { |
| /// Link to the list of web properties for this account. |
| core.String? href; |
| |
| /// Type of the child link. |
| /// |
| /// Its value is "analytics#webproperties". |
| core.String? type; |
| |
| AccountChildLink({this.href, this.type}); |
| |
| AccountChildLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| /// Permissions the user has for this account. |
| class AccountPermissions { |
| /// All the permissions that the user has for this account. |
| /// |
| /// These include any implied permissions (e.g., EDIT implies VIEW). |
| core.List<core.String>? effective; |
| |
| AccountPermissions({this.effective}); |
| |
| AccountPermissions.fromJson(core.Map json_) |
| : this( |
| effective: (json_['effective'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final effective = this.effective; |
| return {'effective': ?effective}; |
| } |
| } |
| |
| /// JSON template for Analytics account entry. |
| class Account { |
| /// Child link for an account entry. |
| /// |
| /// Points to the list of web properties for this account. |
| AccountChildLink? childLink; |
| |
| /// Time the account was created. |
| core.DateTime? created; |
| |
| /// Account ID. |
| core.String? id; |
| |
| /// Resource type for Analytics account. |
| core.String? kind; |
| |
| /// Account name. |
| core.String? name; |
| |
| /// Permissions the user has for this account. |
| AccountPermissions? permissions; |
| |
| /// Link for this account. |
| core.String? selfLink; |
| |
| /// Indicates whether this account is starred or not. |
| core.bool? starred; |
| |
| /// Time the account was last modified. |
| core.DateTime? updated; |
| |
| Account({ |
| this.childLink, |
| this.created, |
| this.id, |
| this.kind, |
| this.name, |
| this.permissions, |
| this.selfLink, |
| this.starred, |
| this.updated, |
| }); |
| |
| Account.fromJson(core.Map json_) |
| : this( |
| childLink: json_.containsKey('childLink') |
| ? AccountChildLink.fromJson( |
| json_['childLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| permissions: json_.containsKey('permissions') |
| ? AccountPermissions.fromJson( |
| json_['permissions'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| selfLink: json_['selfLink'] as core.String?, |
| starred: json_['starred'] as core.bool?, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final childLink = this.childLink; |
| final created = this.created; |
| final id = this.id; |
| final kind = this.kind; |
| final name = this.name; |
| final permissions = this.permissions; |
| final selfLink = this.selfLink; |
| final starred = this.starred; |
| final updated = this.updated; |
| return { |
| 'childLink': ?childLink, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'id': ?id, |
| 'kind': ?kind, |
| 'name': ?name, |
| 'permissions': ?permissions, |
| 'selfLink': ?selfLink, |
| 'starred': ?starred, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| }; |
| } |
| } |
| |
| /// JSON template for a linked account. |
| class AccountRef { |
| /// Link for this account. |
| core.String? href; |
| |
| /// Account ID. |
| core.String? id; |
| |
| /// Analytics account reference. |
| core.String? kind; |
| |
| /// Account name. |
| core.String? name; |
| |
| AccountRef({this.href, this.id, this.kind, this.name}); |
| |
| AccountRef.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final id = this.id; |
| final kind = this.kind; |
| final name = this.name; |
| return {'href': ?href, 'id': ?id, 'kind': ?kind, 'name': ?name}; |
| } |
| } |
| |
| /// An AccountSummary collection lists a summary of accounts, properties and |
| /// views (profiles) to which the user has access. |
| /// |
| /// Each resource in the collection corresponds to a single AccountSummary. |
| class AccountSummaries { |
| /// A list of AccountSummaries. |
| core.List<AccountSummary>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this AccountSummary collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this AccountSummary collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| AccountSummaries({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| AccountSummaries.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => AccountSummary.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics AccountSummary. |
| /// |
| /// An AccountSummary is a lightweight tree comprised of properties/profiles. |
| class AccountSummary { |
| /// Account ID. |
| core.String? id; |
| |
| /// Resource type for Analytics AccountSummary. |
| core.String? kind; |
| |
| /// Account name. |
| core.String? name; |
| |
| /// Indicates whether this account is starred or not. |
| core.bool? starred; |
| |
| /// List of web properties under this account. |
| core.List<WebPropertySummary>? webProperties; |
| |
| AccountSummary({ |
| this.id, |
| this.kind, |
| this.name, |
| this.starred, |
| this.webProperties, |
| }); |
| |
| AccountSummary.fromJson(core.Map json_) |
| : this( |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| starred: json_['starred'] as core.bool?, |
| webProperties: (json_['webProperties'] as core.List?) |
| ?.map( |
| (value) => WebPropertySummary.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final id = this.id; |
| final kind = this.kind; |
| final name = this.name; |
| final starred = this.starred; |
| final webProperties = this.webProperties; |
| return { |
| 'id': ?id, |
| 'kind': ?kind, |
| 'name': ?name, |
| 'starred': ?starred, |
| 'webProperties': ?webProperties, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics account ticket. |
| /// |
| /// The account ticket consists of the ticket ID and the basic information for |
| /// the account, property and profile. |
| class AccountTicket { |
| /// Account for this ticket. |
| Account? account; |
| |
| /// Account ticket ID used to access the account ticket. |
| core.String? id; |
| |
| /// Resource type for account ticket. |
| core.String? kind; |
| |
| /// View (Profile) for the account. |
| Profile? profile; |
| |
| /// Redirect URI where the user will be sent after accepting Terms of Service. |
| /// |
| /// Must be configured in APIs console as a callback URL. |
| core.String? redirectUri; |
| |
| /// Web property for the account. |
| Webproperty? webproperty; |
| |
| AccountTicket({ |
| this.account, |
| this.id, |
| this.kind, |
| this.profile, |
| this.redirectUri, |
| this.webproperty, |
| }); |
| |
| AccountTicket.fromJson(core.Map json_) |
| : this( |
| account: json_.containsKey('account') |
| ? Account.fromJson( |
| json_['account'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| profile: json_.containsKey('profile') |
| ? Profile.fromJson( |
| json_['profile'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| redirectUri: json_['redirectUri'] as core.String?, |
| webproperty: json_.containsKey('webproperty') |
| ? Webproperty.fromJson( |
| json_['webproperty'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final account = this.account; |
| final id = this.id; |
| final kind = this.kind; |
| final profile = this.profile; |
| final redirectUri = this.redirectUri; |
| final webproperty = this.webproperty; |
| return { |
| 'account': ?account, |
| 'id': ?id, |
| 'kind': ?kind, |
| 'profile': ?profile, |
| 'redirectUri': ?redirectUri, |
| 'webproperty': ?webproperty, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics account tree requests. |
| /// |
| /// The account tree request is used in the provisioning api to create an |
| /// account, property, and view (profile). It contains the basic information |
| /// required to make these fields. |
| class AccountTreeRequest { |
| core.String? accountName; |
| |
| /// Resource type for account ticket. |
| core.String? kind; |
| core.String? profileName; |
| core.String? timezone; |
| core.String? webpropertyName; |
| core.String? websiteUrl; |
| |
| AccountTreeRequest({ |
| this.accountName, |
| this.kind, |
| this.profileName, |
| this.timezone, |
| this.webpropertyName, |
| this.websiteUrl, |
| }); |
| |
| AccountTreeRequest.fromJson(core.Map json_) |
| : this( |
| accountName: json_['accountName'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| profileName: json_['profileName'] as core.String?, |
| timezone: json_['timezone'] as core.String?, |
| webpropertyName: json_['webpropertyName'] as core.String?, |
| websiteUrl: json_['websiteUrl'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountName = this.accountName; |
| final kind = this.kind; |
| final profileName = this.profileName; |
| final timezone = this.timezone; |
| final webpropertyName = this.webpropertyName; |
| final websiteUrl = this.websiteUrl; |
| return { |
| 'accountName': ?accountName, |
| 'kind': ?kind, |
| 'profileName': ?profileName, |
| 'timezone': ?timezone, |
| 'webpropertyName': ?webpropertyName, |
| 'websiteUrl': ?websiteUrl, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics account tree response. |
| /// |
| /// The account tree response is used in the provisioning api to return the |
| /// result of creating an account, property, and view (profile). |
| class AccountTreeResponse { |
| /// The account created. |
| Account? account; |
| |
| /// Resource type for account ticket. |
| core.String? kind; |
| |
| /// View (Profile) for the account. |
| Profile? profile; |
| |
| /// Web property for the account. |
| Webproperty? webproperty; |
| |
| AccountTreeResponse({ |
| this.account, |
| this.kind, |
| this.profile, |
| this.webproperty, |
| }); |
| |
| AccountTreeResponse.fromJson(core.Map json_) |
| : this( |
| account: json_.containsKey('account') |
| ? Account.fromJson( |
| json_['account'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| kind: json_['kind'] as core.String?, |
| profile: json_.containsKey('profile') |
| ? Profile.fromJson( |
| json_['profile'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| webproperty: json_.containsKey('webproperty') |
| ? Webproperty.fromJson( |
| json_['webproperty'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final account = this.account; |
| final kind = this.kind; |
| final profile = this.profile; |
| final webproperty = this.webproperty; |
| return { |
| 'account': ?account, |
| 'kind': ?kind, |
| 'profile': ?profile, |
| 'webproperty': ?webproperty, |
| }; |
| } |
| } |
| |
| /// An account collection provides a list of Analytics accounts to which a user |
| /// has access. |
| /// |
| /// The account collection is the entry point to all management information. |
| /// Each resource in the collection corresponds to a single Analytics account. |
| class Accounts { |
| /// A list of accounts. |
| core.List<Account>? items; |
| |
| /// The maximum number of entries the response can contain, regardless of the |
| /// actual number of entries returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Next link for this account collection. |
| core.String? nextLink; |
| |
| /// Previous link for this account collection. |
| core.String? previousLink; |
| |
| /// The starting index of the entries, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| Accounts({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| Accounts.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => Account.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// JSON template for an Google Ads account. |
| class AdWordsAccount { |
| /// True if auto-tagging is enabled on the Google Ads account. |
| /// |
| /// Read-only after the insert operation. |
| core.bool? autoTaggingEnabled; |
| |
| /// Customer ID. |
| /// |
| /// This field is required when creating a Google Ads link. |
| core.String? customerId; |
| |
| /// Resource type for Google Ads account. |
| core.String? kind; |
| |
| AdWordsAccount({this.autoTaggingEnabled, this.customerId, this.kind}); |
| |
| AdWordsAccount.fromJson(core.Map json_) |
| : this( |
| autoTaggingEnabled: json_['autoTaggingEnabled'] as core.bool?, |
| customerId: json_['customerId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final autoTaggingEnabled = this.autoTaggingEnabled; |
| final customerId = this.customerId; |
| final kind = this.kind; |
| return { |
| 'autoTaggingEnabled': ?autoTaggingEnabled, |
| 'customerId': ?customerId, |
| 'kind': ?kind, |
| }; |
| } |
| } |
| |
| /// Request template for the delete upload data request. |
| class AnalyticsDataimportDeleteUploadDataRequest { |
| /// A list of upload UIDs. |
| core.List<core.String>? customDataImportUids; |
| |
| AnalyticsDataimportDeleteUploadDataRequest({this.customDataImportUids}); |
| |
| AnalyticsDataimportDeleteUploadDataRequest.fromJson(core.Map json_) |
| : this( |
| customDataImportUids: (json_['customDataImportUids'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final customDataImportUids = this.customDataImportUids; |
| return {'customDataImportUids': ?customDataImportUids}; |
| } |
| } |
| |
| /// JSON template for a metadata column. |
| class Column { |
| /// Map of attribute name and value for this column. |
| core.Map<core.String, core.String>? attributes; |
| |
| /// Column id. |
| core.String? id; |
| |
| /// Resource type for Analytics column. |
| core.String? kind; |
| |
| Column({this.attributes, this.id, this.kind}); |
| |
| Column.fromJson(core.Map json_) |
| : this( |
| attributes: |
| (json_['attributes'] as core.Map<core.String, core.dynamic>?)?.map( |
| (key, value) => core.MapEntry(key, value as core.String), |
| ), |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final attributes = this.attributes; |
| final id = this.id; |
| final kind = this.kind; |
| return {'attributes': ?attributes, 'id': ?id, 'kind': ?kind}; |
| } |
| } |
| |
| /// Lists columns (dimensions and metrics) for a particular report type. |
| class Columns { |
| /// List of attributes names returned by columns. |
| core.List<core.String>? attributeNames; |
| |
| /// Etag of collection. |
| /// |
| /// This etag can be compared with the last response etag to check if response |
| /// has changed. |
| core.String? etag; |
| |
| /// List of columns for a report type. |
| core.List<Column>? items; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Total number of columns returned in the response. |
| core.int? totalResults; |
| |
| Columns({ |
| this.attributeNames, |
| this.etag, |
| this.items, |
| this.kind, |
| this.totalResults, |
| }); |
| |
| Columns.fromJson(core.Map json_) |
| : this( |
| attributeNames: (json_['attributeNames'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| etag: json_['etag'] as core.String?, |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => |
| Column.fromJson(value as core.Map<core.String, core.dynamic>), |
| ) |
| .toList(), |
| kind: json_['kind'] as core.String?, |
| totalResults: json_['totalResults'] as core.int?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final attributeNames = this.attributeNames; |
| final etag = this.etag; |
| final items = this.items; |
| final kind = this.kind; |
| final totalResults = this.totalResults; |
| return { |
| 'attributeNames': ?attributeNames, |
| 'etag': ?etag, |
| 'items': ?items, |
| 'kind': ?kind, |
| 'totalResults': ?totalResults, |
| }; |
| } |
| } |
| |
| class CustomDataSourceChildLink { |
| /// Link to the list of daily uploads for this custom data source. |
| /// |
| /// Link to the list of uploads for this custom data source. |
| core.String? href; |
| |
| /// Value is "analytics#dailyUploads". |
| /// |
| /// Value is "analytics#uploads". |
| core.String? type; |
| |
| CustomDataSourceChildLink({this.href, this.type}); |
| |
| CustomDataSourceChildLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| /// Parent link for this custom data source. |
| /// |
| /// Points to the web property to which this custom data source belongs. |
| class CustomDataSourceParentLink { |
| /// Link to the web property to which this custom data source belongs. |
| core.String? href; |
| |
| /// Value is "analytics#webproperty". |
| core.String? type; |
| |
| CustomDataSourceParentLink({this.href, this.type}); |
| |
| CustomDataSourceParentLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| /// JSON template for an Analytics custom data source. |
| class CustomDataSource { |
| /// Account ID to which this custom data source belongs. |
| core.String? accountId; |
| CustomDataSourceChildLink? childLink; |
| |
| /// Time this custom data source was created. |
| core.DateTime? created; |
| |
| /// Description of custom data source. |
| core.String? description; |
| |
| /// Custom data source ID. |
| core.String? id; |
| core.String? importBehavior; |
| |
| /// Resource type for Analytics custom data source. |
| core.String? kind; |
| |
| /// Name of this custom data source. |
| core.String? name; |
| |
| /// Parent link for this custom data source. |
| /// |
| /// Points to the web property to which this custom data source belongs. |
| CustomDataSourceParentLink? parentLink; |
| |
| /// IDs of views (profiles) linked to the custom data source. |
| core.List<core.String>? profilesLinked; |
| |
| /// Collection of schema headers of the custom data source. |
| core.List<core.String>? schema; |
| |
| /// Link for this Analytics custom data source. |
| core.String? selfLink; |
| |
| /// Type of the custom data source. |
| core.String? type; |
| |
| /// Time this custom data source was last modified. |
| core.DateTime? updated; |
| |
| /// Upload type of the custom data source. |
| core.String? uploadType; |
| |
| /// Web property ID of the form UA-XXXXX-YY to which this custom data source |
| /// belongs. |
| core.String? webPropertyId; |
| |
| CustomDataSource({ |
| this.accountId, |
| this.childLink, |
| this.created, |
| this.description, |
| this.id, |
| this.importBehavior, |
| this.kind, |
| this.name, |
| this.parentLink, |
| this.profilesLinked, |
| this.schema, |
| this.selfLink, |
| this.type, |
| this.updated, |
| this.uploadType, |
| this.webPropertyId, |
| }); |
| |
| CustomDataSource.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| childLink: json_.containsKey('childLink') |
| ? CustomDataSourceChildLink.fromJson( |
| json_['childLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| description: json_['description'] as core.String?, |
| id: json_['id'] as core.String?, |
| importBehavior: json_['importBehavior'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| parentLink: json_.containsKey('parentLink') |
| ? CustomDataSourceParentLink.fromJson( |
| json_['parentLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| profilesLinked: (json_['profilesLinked'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| schema: (json_['schema'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| selfLink: json_['selfLink'] as core.String?, |
| type: json_['type'] as core.String?, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| uploadType: json_['uploadType'] as core.String?, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final childLink = this.childLink; |
| final created = this.created; |
| final description = this.description; |
| final id = this.id; |
| final importBehavior = this.importBehavior; |
| final kind = this.kind; |
| final name = this.name; |
| final parentLink = this.parentLink; |
| final profilesLinked = this.profilesLinked; |
| final schema = this.schema; |
| final selfLink = this.selfLink; |
| final type = this.type; |
| final updated = this.updated; |
| final uploadType = this.uploadType; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'childLink': ?childLink, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'description': ?description, |
| 'id': ?id, |
| 'importBehavior': ?importBehavior, |
| 'kind': ?kind, |
| 'name': ?name, |
| 'parentLink': ?parentLink, |
| 'profilesLinked': ?profilesLinked, |
| 'schema': ?schema, |
| 'selfLink': ?selfLink, |
| 'type': ?type, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| 'uploadType': ?uploadType, |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// Lists Analytics custom data sources to which the user has access. |
| /// |
| /// Each resource in the collection corresponds to a single Analytics custom |
| /// data source. |
| class CustomDataSources { |
| /// Collection of custom data sources. |
| core.List<CustomDataSource>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this custom data source collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this custom data source collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| CustomDataSources({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| CustomDataSources.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => CustomDataSource.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// Parent link for the custom dimension. |
| /// |
| /// Points to the property to which the custom dimension belongs. |
| class CustomDimensionParentLink { |
| /// Link to the property to which the custom dimension belongs. |
| core.String? href; |
| |
| /// Type of the parent link. |
| /// |
| /// Set to "analytics#webproperty". |
| core.String? type; |
| |
| CustomDimensionParentLink({this.href, this.type}); |
| |
| CustomDimensionParentLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| /// JSON template for Analytics Custom Dimension. |
| class CustomDimension { |
| /// Account ID. |
| core.String? accountId; |
| |
| /// Boolean indicating whether the custom dimension is active. |
| core.bool? active; |
| |
| /// Time the custom dimension was created. |
| core.DateTime? created; |
| |
| /// Custom dimension ID. |
| core.String? id; |
| |
| /// Index of the custom dimension. |
| core.int? index; |
| |
| /// Kind value for a custom dimension. |
| /// |
| /// Set to "analytics#customDimension". It is a read-only field. |
| core.String? kind; |
| |
| /// Name of the custom dimension. |
| core.String? name; |
| |
| /// Parent link for the custom dimension. |
| /// |
| /// Points to the property to which the custom dimension belongs. |
| CustomDimensionParentLink? parentLink; |
| |
| /// Scope of the custom dimension: HIT, SESSION, USER or PRODUCT. |
| core.String? scope; |
| |
| /// Link for the custom dimension |
| core.String? selfLink; |
| |
| /// Time the custom dimension was last modified. |
| core.DateTime? updated; |
| |
| /// Property ID. |
| core.String? webPropertyId; |
| |
| CustomDimension({ |
| this.accountId, |
| this.active, |
| this.created, |
| this.id, |
| this.index, |
| this.kind, |
| this.name, |
| this.parentLink, |
| this.scope, |
| this.selfLink, |
| this.updated, |
| this.webPropertyId, |
| }); |
| |
| CustomDimension.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| active: json_['active'] as core.bool?, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| id: json_['id'] as core.String?, |
| index: json_['index'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| parentLink: json_.containsKey('parentLink') |
| ? CustomDimensionParentLink.fromJson( |
| json_['parentLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| scope: json_['scope'] as core.String?, |
| selfLink: json_['selfLink'] as core.String?, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final active = this.active; |
| final created = this.created; |
| final id = this.id; |
| final index = this.index; |
| final kind = this.kind; |
| final name = this.name; |
| final parentLink = this.parentLink; |
| final scope = this.scope; |
| final selfLink = this.selfLink; |
| final updated = this.updated; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'active': ?active, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'id': ?id, |
| 'index': ?index, |
| 'kind': ?kind, |
| 'name': ?name, |
| 'parentLink': ?parentLink, |
| 'scope': ?scope, |
| 'selfLink': ?selfLink, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// A custom dimension collection lists Analytics custom dimensions to which the |
| /// user has access. |
| /// |
| /// Each resource in the collection corresponds to a single Analytics custom |
| /// dimension. |
| class CustomDimensions { |
| /// Collection of custom dimensions. |
| core.List<CustomDimension>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this custom dimension collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this custom dimension collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| CustomDimensions({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| CustomDimensions.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => CustomDimension.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// Parent link for the custom metric. |
| /// |
| /// Points to the property to which the custom metric belongs. |
| class CustomMetricParentLink { |
| /// Link to the property to which the custom metric belongs. |
| core.String? href; |
| |
| /// Type of the parent link. |
| /// |
| /// Set to "analytics#webproperty". |
| core.String? type; |
| |
| CustomMetricParentLink({this.href, this.type}); |
| |
| CustomMetricParentLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| /// JSON template for Analytics Custom Metric. |
| class CustomMetric { |
| /// Account ID. |
| core.String? accountId; |
| |
| /// Boolean indicating whether the custom metric is active. |
| core.bool? active; |
| |
| /// Time the custom metric was created. |
| core.DateTime? created; |
| |
| /// Custom metric ID. |
| core.String? id; |
| |
| /// Index of the custom metric. |
| core.int? index; |
| |
| /// Kind value for a custom metric. |
| /// |
| /// Set to "analytics#customMetric". It is a read-only field. |
| core.String? kind; |
| |
| /// Max value of custom metric. |
| core.String? maxValue; |
| |
| /// Min value of custom metric. |
| core.String? minValue; |
| |
| /// Name of the custom metric. |
| core.String? name; |
| |
| /// Parent link for the custom metric. |
| /// |
| /// Points to the property to which the custom metric belongs. |
| CustomMetricParentLink? parentLink; |
| |
| /// Scope of the custom metric: HIT or PRODUCT. |
| core.String? scope; |
| |
| /// Link for the custom metric |
| core.String? selfLink; |
| |
| /// Data type of custom metric. |
| core.String? type; |
| |
| /// Time the custom metric was last modified. |
| core.DateTime? updated; |
| |
| /// Property ID. |
| core.String? webPropertyId; |
| |
| CustomMetric({ |
| this.accountId, |
| this.active, |
| this.created, |
| this.id, |
| this.index, |
| this.kind, |
| this.maxValue, |
| this.minValue, |
| this.name, |
| this.parentLink, |
| this.scope, |
| this.selfLink, |
| this.type, |
| this.updated, |
| this.webPropertyId, |
| }); |
| |
| CustomMetric.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| active: json_['active'] as core.bool?, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| id: json_['id'] as core.String?, |
| index: json_['index'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| maxValue: json_['max_value'] as core.String?, |
| minValue: json_['min_value'] as core.String?, |
| name: json_['name'] as core.String?, |
| parentLink: json_.containsKey('parentLink') |
| ? CustomMetricParentLink.fromJson( |
| json_['parentLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| scope: json_['scope'] as core.String?, |
| selfLink: json_['selfLink'] as core.String?, |
| type: json_['type'] as core.String?, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final active = this.active; |
| final created = this.created; |
| final id = this.id; |
| final index = this.index; |
| final kind = this.kind; |
| final maxValue = this.maxValue; |
| final minValue = this.minValue; |
| final name = this.name; |
| final parentLink = this.parentLink; |
| final scope = this.scope; |
| final selfLink = this.selfLink; |
| final type = this.type; |
| final updated = this.updated; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'active': ?active, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'id': ?id, |
| 'index': ?index, |
| 'kind': ?kind, |
| 'max_value': ?maxValue, |
| 'min_value': ?minValue, |
| 'name': ?name, |
| 'parentLink': ?parentLink, |
| 'scope': ?scope, |
| 'selfLink': ?selfLink, |
| 'type': ?type, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// A custom metric collection lists Analytics custom metrics to which the user |
| /// has access. |
| /// |
| /// Each resource in the collection corresponds to a single Analytics custom |
| /// metric. |
| class CustomMetrics { |
| /// Collection of custom metrics. |
| core.List<CustomMetric>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this custom metric collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this custom metric collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| CustomMetrics({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| CustomMetrics.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => CustomMetric.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// Web property being linked. |
| class EntityAdWordsLinkEntity { |
| WebPropertyRef? webPropertyRef; |
| |
| EntityAdWordsLinkEntity({this.webPropertyRef}); |
| |
| EntityAdWordsLinkEntity.fromJson(core.Map json_) |
| : this( |
| webPropertyRef: json_.containsKey('webPropertyRef') |
| ? WebPropertyRef.fromJson( |
| json_['webPropertyRef'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final webPropertyRef = this.webPropertyRef; |
| return {'webPropertyRef': ?webPropertyRef}; |
| } |
| } |
| |
| /// JSON template for Analytics Entity Google Ads Link. |
| class EntityAdWordsLink { |
| /// A list of Google Ads client accounts. |
| /// |
| /// These cannot be MCC accounts. This field is required when creating a |
| /// Google Ads link. It cannot be empty. |
| core.List<AdWordsAccount>? adWordsAccounts; |
| |
| /// Web property being linked. |
| EntityAdWordsLinkEntity? entity; |
| |
| /// Entity Google Ads link ID |
| core.String? id; |
| |
| /// Resource type for entity Google Ads link. |
| core.String? kind; |
| |
| /// Name of the link. |
| /// |
| /// This field is required when creating a Google Ads link. |
| core.String? name; |
| |
| /// IDs of linked Views (Profiles) represented as strings. |
| core.List<core.String>? profileIds; |
| |
| /// URL link for this Google Analytics - Google Ads link. |
| core.String? selfLink; |
| |
| EntityAdWordsLink({ |
| this.adWordsAccounts, |
| this.entity, |
| this.id, |
| this.kind, |
| this.name, |
| this.profileIds, |
| this.selfLink, |
| }); |
| |
| EntityAdWordsLink.fromJson(core.Map json_) |
| : this( |
| adWordsAccounts: (json_['adWordsAccounts'] as core.List?) |
| ?.map( |
| (value) => AdWordsAccount.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| entity: json_.containsKey('entity') |
| ? EntityAdWordsLinkEntity.fromJson( |
| json_['entity'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| profileIds: (json_['profileIds'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| selfLink: json_['selfLink'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final adWordsAccounts = this.adWordsAccounts; |
| final entity = this.entity; |
| final id = this.id; |
| final kind = this.kind; |
| final name = this.name; |
| final profileIds = this.profileIds; |
| final selfLink = this.selfLink; |
| return { |
| 'adWordsAccounts': ?adWordsAccounts, |
| 'entity': ?entity, |
| 'id': ?id, |
| 'kind': ?kind, |
| 'name': ?name, |
| 'profileIds': ?profileIds, |
| 'selfLink': ?selfLink, |
| }; |
| } |
| } |
| |
| /// An entity Google Ads link collection provides a list of GA-Google Ads links |
| /// Each resource in this collection corresponds to a single link. |
| class EntityAdWordsLinks { |
| /// A list of entity Google Ads links. |
| core.List<EntityAdWordsLink>? items; |
| |
| /// The maximum number of entries the response can contain, regardless of the |
| /// actual number of entries returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Next link for this Google Ads link collection. |
| core.String? nextLink; |
| |
| /// Previous link for this Google Ads link collection. |
| core.String? previousLink; |
| |
| /// The starting index of the entries, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| EntityAdWordsLinks({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| }); |
| |
| EntityAdWordsLinks.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => EntityAdWordsLink.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| }; |
| } |
| } |
| |
| /// Entity for this link. |
| /// |
| /// It can be an account, a web property, or a view (profile). |
| class EntityUserLinkEntity { |
| /// Account for this link. |
| AccountRef? accountRef; |
| |
| /// View (Profile) for this link. |
| ProfileRef? profileRef; |
| |
| /// Web property for this link. |
| WebPropertyRef? webPropertyRef; |
| |
| EntityUserLinkEntity({this.accountRef, this.profileRef, this.webPropertyRef}); |
| |
| EntityUserLinkEntity.fromJson(core.Map json_) |
| : this( |
| accountRef: json_.containsKey('accountRef') |
| ? AccountRef.fromJson( |
| json_['accountRef'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| profileRef: json_.containsKey('profileRef') |
| ? ProfileRef.fromJson( |
| json_['profileRef'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| webPropertyRef: json_.containsKey('webPropertyRef') |
| ? WebPropertyRef.fromJson( |
| json_['webPropertyRef'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountRef = this.accountRef; |
| final profileRef = this.profileRef; |
| final webPropertyRef = this.webPropertyRef; |
| return { |
| 'accountRef': ?accountRef, |
| 'profileRef': ?profileRef, |
| 'webPropertyRef': ?webPropertyRef, |
| }; |
| } |
| } |
| |
| /// Permissions the user has for this entity. |
| class EntityUserLinkPermissions { |
| /// Effective permissions represent all the permissions that a user has for |
| /// this entity. |
| /// |
| /// These include any implied permissions (e.g., EDIT implies VIEW) or |
| /// inherited permissions from the parent entity. Effective permissions are |
| /// read-only. |
| core.List<core.String>? effective; |
| |
| /// Permissions that a user has been assigned at this very level. |
| /// |
| /// Does not include any implied or inherited permissions. Local permissions |
| /// are modifiable. |
| core.List<core.String>? local; |
| |
| EntityUserLinkPermissions({this.effective, this.local}); |
| |
| EntityUserLinkPermissions.fromJson(core.Map json_) |
| : this( |
| effective: (json_['effective'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| local: (json_['local'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final effective = this.effective; |
| final local = this.local; |
| return {'effective': ?effective, 'local': ?local}; |
| } |
| } |
| |
| /// JSON template for an Analytics Entity-User Link. |
| /// |
| /// Returns permissions that a user has for an entity. |
| class EntityUserLink { |
| /// Entity for this link. |
| /// |
| /// It can be an account, a web property, or a view (profile). |
| EntityUserLinkEntity? entity; |
| |
| /// Entity user link ID |
| core.String? id; |
| |
| /// Resource type for entity user link. |
| core.String? kind; |
| |
| /// Permissions the user has for this entity. |
| EntityUserLinkPermissions? permissions; |
| |
| /// Self link for this resource. |
| core.String? selfLink; |
| |
| /// User reference. |
| UserRef? userRef; |
| |
| EntityUserLink({ |
| this.entity, |
| this.id, |
| this.kind, |
| this.permissions, |
| this.selfLink, |
| this.userRef, |
| }); |
| |
| EntityUserLink.fromJson(core.Map json_) |
| : this( |
| entity: json_.containsKey('entity') |
| ? EntityUserLinkEntity.fromJson( |
| json_['entity'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| permissions: json_.containsKey('permissions') |
| ? EntityUserLinkPermissions.fromJson( |
| json_['permissions'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| selfLink: json_['selfLink'] as core.String?, |
| userRef: json_.containsKey('userRef') |
| ? UserRef.fromJson( |
| json_['userRef'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final entity = this.entity; |
| final id = this.id; |
| final kind = this.kind; |
| final permissions = this.permissions; |
| final selfLink = this.selfLink; |
| final userRef = this.userRef; |
| return { |
| 'entity': ?entity, |
| 'id': ?id, |
| 'kind': ?kind, |
| 'permissions': ?permissions, |
| 'selfLink': ?selfLink, |
| 'userRef': ?userRef, |
| }; |
| } |
| } |
| |
| /// An entity user link collection provides a list of Analytics ACL links Each |
| /// resource in this collection corresponds to a single link. |
| class EntityUserLinks { |
| /// A list of entity user links. |
| core.List<EntityUserLink>? items; |
| |
| /// The maximum number of entries the response can contain, regardless of the |
| /// actual number of entries returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Next link for this account collection. |
| core.String? nextLink; |
| |
| /// Previous link for this account collection. |
| core.String? previousLink; |
| |
| /// The starting index of the entries, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| EntityUserLinks({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| }); |
| |
| EntityUserLinks.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => EntityUserLink.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| }; |
| } |
| } |
| |
| /// Parent link for an experiment. |
| /// |
| /// Points to the view (profile) to which this experiment belongs. |
| class ExperimentParentLink { |
| /// Link to the view (profile) to which this experiment belongs. |
| /// |
| /// This field is read-only. |
| core.String? href; |
| |
| /// Value is "analytics#profile". |
| /// |
| /// This field is read-only. |
| core.String? type; |
| |
| ExperimentParentLink({this.href, this.type}); |
| |
| ExperimentParentLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| class ExperimentVariations { |
| /// The name of the variation. |
| /// |
| /// This field is required when creating an experiment. This field may not be |
| /// changed for an experiment whose status is ENDED. |
| core.String? name; |
| |
| /// Status of the variation. |
| /// |
| /// Possible values: "ACTIVE", "INACTIVE". INACTIVE variations are not served. |
| /// This field may not be changed for an experiment whose status is ENDED. |
| core.String? status; |
| |
| /// The URL of the variation. |
| /// |
| /// This field may not be changed for an experiment whose status is RUNNING or |
| /// ENDED. |
| core.String? url; |
| |
| /// Weight that this variation should receive. |
| /// |
| /// Only present if the experiment is running. This field is read-only. |
| core.double? weight; |
| |
| /// True if the experiment has ended and this variation performed |
| /// (statistically) significantly better than the original. |
| /// |
| /// This field is read-only. |
| core.bool? won; |
| |
| ExperimentVariations({ |
| this.name, |
| this.status, |
| this.url, |
| this.weight, |
| this.won, |
| }); |
| |
| ExperimentVariations.fromJson(core.Map json_) |
| : this( |
| name: json_['name'] as core.String?, |
| status: json_['status'] as core.String?, |
| url: json_['url'] as core.String?, |
| weight: (json_['weight'] as core.num?)?.toDouble(), |
| won: json_['won'] as core.bool?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final name = this.name; |
| final status = this.status; |
| final url = this.url; |
| final weight = this.weight; |
| final won = this.won; |
| return { |
| 'name': ?name, |
| 'status': ?status, |
| 'url': ?url, |
| 'weight': ?weight, |
| 'won': ?won, |
| }; |
| } |
| } |
| |
| /// JSON template for Analytics experiment resource. |
| class Experiment { |
| /// Account ID to which this experiment belongs. |
| /// |
| /// This field is read-only. |
| core.String? accountId; |
| |
| /// Time the experiment was created. |
| /// |
| /// This field is read-only. |
| core.DateTime? created; |
| |
| /// Notes about this experiment. |
| core.String? description; |
| |
| /// If true, the end user will be able to edit the experiment via the Google |
| /// Analytics user interface. |
| core.bool? editableInGaUi; |
| |
| /// The ending time of the experiment (the time the status changed from |
| /// RUNNING to ENDED). |
| /// |
| /// This field is present only if the experiment has ended. This field is |
| /// read-only. |
| core.DateTime? endTime; |
| |
| /// Boolean specifying whether to distribute traffic evenly across all |
| /// variations. |
| /// |
| /// If the value is False, content experiments follows the default behavior of |
| /// adjusting traffic dynamically based on variation performance. Optional -- |
| /// defaults to False. This field may not be changed for an experiment whose |
| /// status is ENDED. |
| core.bool? equalWeighting; |
| |
| /// Experiment ID. |
| /// |
| /// Required for patch and update. Disallowed for create. |
| core.String? id; |
| |
| /// Internal ID for the web property to which this experiment belongs. |
| /// |
| /// This field is read-only. |
| core.String? internalWebPropertyId; |
| |
| /// Resource type for an Analytics experiment. |
| /// |
| /// This field is read-only. |
| core.String? kind; |
| |
| /// An integer number in \[3, 90\]. |
| /// |
| /// Specifies the minimum length of the experiment. Can be changed for a |
| /// running experiment. This field may not be changed for an experiments whose |
| /// status is ENDED. |
| core.int? minimumExperimentLengthInDays; |
| |
| /// Experiment name. |
| /// |
| /// This field may not be changed for an experiment whose status is ENDED. |
| /// This field is required when creating an experiment. |
| core.String? name; |
| |
| /// The metric that the experiment is optimizing. |
| /// |
| /// Valid values: "ga:goal(n)Completions", "ga:adsenseAdsClicks", |
| /// "ga:adsenseAdsViewed", "ga:adsenseRevenue", "ga:bounces", "ga:pageviews", |
| /// "ga:sessionDuration", "ga:transactions", "ga:transactionRevenue". This |
| /// field is required if status is "RUNNING" and servingFramework is one of |
| /// "REDIRECT" or "API". |
| core.String? objectiveMetric; |
| |
| /// Whether the objectiveMetric should be minimized or maximized. |
| /// |
| /// Possible values: "MAXIMUM", "MINIMUM". Optional--defaults to "MAXIMUM". |
| /// Cannot be specified without objectiveMetric. Cannot be modified when |
| /// status is "RUNNING" or "ENDED". |
| core.String? optimizationType; |
| |
| /// Parent link for an experiment. |
| /// |
| /// Points to the view (profile) to which this experiment belongs. |
| ExperimentParentLink? parentLink; |
| |
| /// View (Profile) ID to which this experiment belongs. |
| /// |
| /// This field is read-only. |
| core.String? profileId; |
| |
| /// Why the experiment ended. |
| /// |
| /// Possible values: "STOPPED_BY_USER", "WINNER_FOUND", "EXPERIMENT_EXPIRED", |
| /// "ENDED_WITH_NO_WINNER", "GOAL_OBJECTIVE_CHANGED". "ENDED_WITH_NO_WINNER" |
| /// means that the experiment didn't expire but no winner was projected to be |
| /// found. If the experiment status is changed via the API to ENDED this field |
| /// is set to STOPPED_BY_USER. This field is read-only. |
| core.String? reasonExperimentEnded; |
| |
| /// Boolean specifying whether variations URLS are rewritten to match those of |
| /// the original. |
| /// |
| /// This field may not be changed for an experiments whose status is ENDED. |
| core.bool? rewriteVariationUrlsAsOriginal; |
| |
| /// Link for this experiment. |
| /// |
| /// This field is read-only. |
| core.String? selfLink; |
| |
| /// The framework used to serve the experiment variations and evaluate the |
| /// results. |
| /// |
| /// One of: |
| /// - REDIRECT: Google Analytics redirects traffic to different variation |
| /// pages, reports the chosen variation and evaluates the results. |
| /// - API: Google Analytics chooses and reports the variation to serve and |
| /// evaluates the results; the caller is responsible for serving the selected |
| /// variation. |
| /// - EXTERNAL: The variations will be served externally and the chosen |
| /// variation reported to Google Analytics. The caller is responsible for |
| /// serving the selected variation and evaluating the results. |
| core.String? servingFramework; |
| |
| /// The snippet of code to include on the control page(s). |
| /// |
| /// This field is read-only. |
| core.String? snippet; |
| |
| /// The starting time of the experiment (the time the status changed from |
| /// READY_TO_RUN to RUNNING). |
| /// |
| /// This field is present only if the experiment has started. This field is |
| /// read-only. |
| core.DateTime? startTime; |
| |
| /// Experiment status. |
| /// |
| /// Possible values: "DRAFT", "READY_TO_RUN", "RUNNING", "ENDED". Experiments |
| /// can be created in the "DRAFT", "READY_TO_RUN" or "RUNNING" state. This |
| /// field is required when creating an experiment. |
| core.String? status; |
| |
| /// A floating-point number in (0, 1\]. |
| /// |
| /// Specifies the fraction of the traffic that participates in the experiment. |
| /// Can be changed for a running experiment. This field may not be changed for |
| /// an experiments whose status is ENDED. |
| core.double? trafficCoverage; |
| |
| /// Time the experiment was last modified. |
| /// |
| /// This field is read-only. |
| core.DateTime? updated; |
| |
| /// Array of variations. |
| /// |
| /// The first variation in the array is the original. The number of variations |
| /// may not change once an experiment is in the RUNNING state. At least two |
| /// variations are required before status can be set to RUNNING. |
| core.List<ExperimentVariations>? variations; |
| |
| /// Web property ID to which this experiment belongs. |
| /// |
| /// The web property ID is of the form UA-XXXXX-YY. This field is read-only. |
| core.String? webPropertyId; |
| |
| /// A floating-point number in (0, 1). |
| /// |
| /// Specifies the necessary confidence level to choose a winner. This field |
| /// may not be changed for an experiments whose status is ENDED. |
| core.double? winnerConfidenceLevel; |
| |
| /// Boolean specifying whether a winner has been found for this experiment. |
| /// |
| /// This field is read-only. |
| core.bool? winnerFound; |
| |
| Experiment({ |
| this.accountId, |
| this.created, |
| this.description, |
| this.editableInGaUi, |
| this.endTime, |
| this.equalWeighting, |
| this.id, |
| this.internalWebPropertyId, |
| this.kind, |
| this.minimumExperimentLengthInDays, |
| this.name, |
| this.objectiveMetric, |
| this.optimizationType, |
| this.parentLink, |
| this.profileId, |
| this.reasonExperimentEnded, |
| this.rewriteVariationUrlsAsOriginal, |
| this.selfLink, |
| this.servingFramework, |
| this.snippet, |
| this.startTime, |
| this.status, |
| this.trafficCoverage, |
| this.updated, |
| this.variations, |
| this.webPropertyId, |
| this.winnerConfidenceLevel, |
| this.winnerFound, |
| }); |
| |
| Experiment.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| description: json_['description'] as core.String?, |
| editableInGaUi: json_['editableInGaUi'] as core.bool?, |
| endTime: json_.containsKey('endTime') |
| ? core.DateTime.parse(json_['endTime'] as core.String) |
| : null, |
| equalWeighting: json_['equalWeighting'] as core.bool?, |
| id: json_['id'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| minimumExperimentLengthInDays: |
| json_['minimumExperimentLengthInDays'] as core.int?, |
| name: json_['name'] as core.String?, |
| objectiveMetric: json_['objectiveMetric'] as core.String?, |
| optimizationType: json_['optimizationType'] as core.String?, |
| parentLink: json_.containsKey('parentLink') |
| ? ExperimentParentLink.fromJson( |
| json_['parentLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| profileId: json_['profileId'] as core.String?, |
| reasonExperimentEnded: json_['reasonExperimentEnded'] as core.String?, |
| rewriteVariationUrlsAsOriginal: |
| json_['rewriteVariationUrlsAsOriginal'] as core.bool?, |
| selfLink: json_['selfLink'] as core.String?, |
| servingFramework: json_['servingFramework'] as core.String?, |
| snippet: json_['snippet'] as core.String?, |
| startTime: json_.containsKey('startTime') |
| ? core.DateTime.parse(json_['startTime'] as core.String) |
| : null, |
| status: json_['status'] as core.String?, |
| trafficCoverage: (json_['trafficCoverage'] as core.num?)?.toDouble(), |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| variations: (json_['variations'] as core.List?) |
| ?.map( |
| (value) => ExperimentVariations.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| winnerConfidenceLevel: (json_['winnerConfidenceLevel'] as core.num?) |
| ?.toDouble(), |
| winnerFound: json_['winnerFound'] as core.bool?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final created = this.created; |
| final description = this.description; |
| final editableInGaUi = this.editableInGaUi; |
| final endTime = this.endTime; |
| final equalWeighting = this.equalWeighting; |
| final id = this.id; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final kind = this.kind; |
| final minimumExperimentLengthInDays = this.minimumExperimentLengthInDays; |
| final name = this.name; |
| final objectiveMetric = this.objectiveMetric; |
| final optimizationType = this.optimizationType; |
| final parentLink = this.parentLink; |
| final profileId = this.profileId; |
| final reasonExperimentEnded = this.reasonExperimentEnded; |
| final rewriteVariationUrlsAsOriginal = this.rewriteVariationUrlsAsOriginal; |
| final selfLink = this.selfLink; |
| final servingFramework = this.servingFramework; |
| final snippet = this.snippet; |
| final startTime = this.startTime; |
| final status = this.status; |
| final trafficCoverage = this.trafficCoverage; |
| final updated = this.updated; |
| final variations = this.variations; |
| final webPropertyId = this.webPropertyId; |
| final winnerConfidenceLevel = this.winnerConfidenceLevel; |
| final winnerFound = this.winnerFound; |
| return { |
| 'accountId': ?accountId, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'description': ?description, |
| 'editableInGaUi': ?editableInGaUi, |
| 'endTime': ?endTime?.toUtc().toIso8601String(), |
| 'equalWeighting': ?equalWeighting, |
| 'id': ?id, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'kind': ?kind, |
| 'minimumExperimentLengthInDays': ?minimumExperimentLengthInDays, |
| 'name': ?name, |
| 'objectiveMetric': ?objectiveMetric, |
| 'optimizationType': ?optimizationType, |
| 'parentLink': ?parentLink, |
| 'profileId': ?profileId, |
| 'reasonExperimentEnded': ?reasonExperimentEnded, |
| 'rewriteVariationUrlsAsOriginal': ?rewriteVariationUrlsAsOriginal, |
| 'selfLink': ?selfLink, |
| 'servingFramework': ?servingFramework, |
| 'snippet': ?snippet, |
| 'startTime': ?startTime?.toUtc().toIso8601String(), |
| 'status': ?status, |
| 'trafficCoverage': ?trafficCoverage, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| 'variations': ?variations, |
| 'webPropertyId': ?webPropertyId, |
| 'winnerConfidenceLevel': ?winnerConfidenceLevel, |
| 'winnerFound': ?winnerFound, |
| }; |
| } |
| } |
| |
| /// An experiment collection lists Analytics experiments to which the user has |
| /// access. |
| /// |
| /// Each view (profile) can have a set of experiments. Each resource in the |
| /// Experiment collection corresponds to a single Analytics experiment. |
| class Experiments { |
| /// A list of experiments. |
| core.List<Experiment>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this experiment collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this experiment collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// resources in the result. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| Experiments({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| Experiments.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => Experiment.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// Details for the filter of the type ADVANCED. |
| class FilterAdvancedDetails { |
| /// Indicates if the filter expressions are case sensitive. |
| core.bool? caseSensitive; |
| |
| /// Expression to extract from field A. |
| core.String? extractA; |
| |
| /// Expression to extract from field B. |
| core.String? extractB; |
| |
| /// Field A. |
| core.String? fieldA; |
| |
| /// The Index of the custom dimension. |
| /// |
| /// Required if field is a CUSTOM_DIMENSION. |
| core.int? fieldAIndex; |
| |
| /// Indicates if field A is required to match. |
| core.bool? fieldARequired; |
| |
| /// Field B. |
| core.String? fieldB; |
| |
| /// The Index of the custom dimension. |
| /// |
| /// Required if field is a CUSTOM_DIMENSION. |
| core.int? fieldBIndex; |
| |
| /// Indicates if field B is required to match. |
| core.bool? fieldBRequired; |
| |
| /// Expression used to construct the output value. |
| core.String? outputConstructor; |
| |
| /// Output field. |
| core.String? outputToField; |
| |
| /// The Index of the custom dimension. |
| /// |
| /// Required if field is a CUSTOM_DIMENSION. |
| core.int? outputToFieldIndex; |
| |
| /// Indicates if the existing value of the output field, if any, should be |
| /// overridden by the output expression. |
| core.bool? overrideOutputField; |
| |
| FilterAdvancedDetails({ |
| this.caseSensitive, |
| this.extractA, |
| this.extractB, |
| this.fieldA, |
| this.fieldAIndex, |
| this.fieldARequired, |
| this.fieldB, |
| this.fieldBIndex, |
| this.fieldBRequired, |
| this.outputConstructor, |
| this.outputToField, |
| this.outputToFieldIndex, |
| this.overrideOutputField, |
| }); |
| |
| FilterAdvancedDetails.fromJson(core.Map json_) |
| : this( |
| caseSensitive: json_['caseSensitive'] as core.bool?, |
| extractA: json_['extractA'] as core.String?, |
| extractB: json_['extractB'] as core.String?, |
| fieldA: json_['fieldA'] as core.String?, |
| fieldAIndex: json_['fieldAIndex'] as core.int?, |
| fieldARequired: json_['fieldARequired'] as core.bool?, |
| fieldB: json_['fieldB'] as core.String?, |
| fieldBIndex: json_['fieldBIndex'] as core.int?, |
| fieldBRequired: json_['fieldBRequired'] as core.bool?, |
| outputConstructor: json_['outputConstructor'] as core.String?, |
| outputToField: json_['outputToField'] as core.String?, |
| outputToFieldIndex: json_['outputToFieldIndex'] as core.int?, |
| overrideOutputField: json_['overrideOutputField'] as core.bool?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final caseSensitive = this.caseSensitive; |
| final extractA = this.extractA; |
| final extractB = this.extractB; |
| final fieldA = this.fieldA; |
| final fieldAIndex = this.fieldAIndex; |
| final fieldARequired = this.fieldARequired; |
| final fieldB = this.fieldB; |
| final fieldBIndex = this.fieldBIndex; |
| final fieldBRequired = this.fieldBRequired; |
| final outputConstructor = this.outputConstructor; |
| final outputToField = this.outputToField; |
| final outputToFieldIndex = this.outputToFieldIndex; |
| final overrideOutputField = this.overrideOutputField; |
| return { |
| 'caseSensitive': ?caseSensitive, |
| 'extractA': ?extractA, |
| 'extractB': ?extractB, |
| 'fieldA': ?fieldA, |
| 'fieldAIndex': ?fieldAIndex, |
| 'fieldARequired': ?fieldARequired, |
| 'fieldB': ?fieldB, |
| 'fieldBIndex': ?fieldBIndex, |
| 'fieldBRequired': ?fieldBRequired, |
| 'outputConstructor': ?outputConstructor, |
| 'outputToField': ?outputToField, |
| 'outputToFieldIndex': ?outputToFieldIndex, |
| 'overrideOutputField': ?overrideOutputField, |
| }; |
| } |
| } |
| |
| /// Details for the filter of the type LOWER. |
| class FilterLowercaseDetails { |
| /// Field to use in the filter. |
| core.String? field; |
| |
| /// The Index of the custom dimension. |
| /// |
| /// Required if field is a CUSTOM_DIMENSION. |
| core.int? fieldIndex; |
| |
| FilterLowercaseDetails({this.field, this.fieldIndex}); |
| |
| FilterLowercaseDetails.fromJson(core.Map json_) |
| : this( |
| field: json_['field'] as core.String?, |
| fieldIndex: json_['fieldIndex'] as core.int?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final field = this.field; |
| final fieldIndex = this.fieldIndex; |
| return {'field': ?field, 'fieldIndex': ?fieldIndex}; |
| } |
| } |
| |
| /// Parent link for this filter. |
| /// |
| /// Points to the account to which this filter belongs. |
| class FilterParentLink { |
| /// Link to the account to which this filter belongs. |
| core.String? href; |
| |
| /// Value is "analytics#account". |
| core.String? type; |
| |
| FilterParentLink({this.href, this.type}); |
| |
| FilterParentLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| /// Details for the filter of the type SEARCH_AND_REPLACE. |
| class FilterSearchAndReplaceDetails { |
| /// Determines if the filter is case sensitive. |
| core.bool? caseSensitive; |
| |
| /// Field to use in the filter. |
| core.String? field; |
| |
| /// The Index of the custom dimension. |
| /// |
| /// Required if field is a CUSTOM_DIMENSION. |
| core.int? fieldIndex; |
| |
| /// Term to replace the search term with. |
| core.String? replaceString; |
| |
| /// Term to search. |
| core.String? searchString; |
| |
| FilterSearchAndReplaceDetails({ |
| this.caseSensitive, |
| this.field, |
| this.fieldIndex, |
| this.replaceString, |
| this.searchString, |
| }); |
| |
| FilterSearchAndReplaceDetails.fromJson(core.Map json_) |
| : this( |
| caseSensitive: json_['caseSensitive'] as core.bool?, |
| field: json_['field'] as core.String?, |
| fieldIndex: json_['fieldIndex'] as core.int?, |
| replaceString: json_['replaceString'] as core.String?, |
| searchString: json_['searchString'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final caseSensitive = this.caseSensitive; |
| final field = this.field; |
| final fieldIndex = this.fieldIndex; |
| final replaceString = this.replaceString; |
| final searchString = this.searchString; |
| return { |
| 'caseSensitive': ?caseSensitive, |
| 'field': ?field, |
| 'fieldIndex': ?fieldIndex, |
| 'replaceString': ?replaceString, |
| 'searchString': ?searchString, |
| }; |
| } |
| } |
| |
| /// Details for the filter of the type UPPER. |
| class FilterUppercaseDetails { |
| /// Field to use in the filter. |
| core.String? field; |
| |
| /// The Index of the custom dimension. |
| /// |
| /// Required if field is a CUSTOM_DIMENSION. |
| core.int? fieldIndex; |
| |
| FilterUppercaseDetails({this.field, this.fieldIndex}); |
| |
| FilterUppercaseDetails.fromJson(core.Map json_) |
| : this( |
| field: json_['field'] as core.String?, |
| fieldIndex: json_['fieldIndex'] as core.int?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final field = this.field; |
| final fieldIndex = this.fieldIndex; |
| return {'field': ?field, 'fieldIndex': ?fieldIndex}; |
| } |
| } |
| |
| /// JSON template for an Analytics account filter. |
| class Filter { |
| /// Account ID to which this filter belongs. |
| core.String? accountId; |
| |
| /// Details for the filter of the type ADVANCED. |
| FilterAdvancedDetails? advancedDetails; |
| |
| /// Time this filter was created. |
| core.DateTime? created; |
| |
| /// Details for the filter of the type EXCLUDE. |
| FilterExpression? excludeDetails; |
| |
| /// Filter ID. |
| core.String? id; |
| |
| /// Details for the filter of the type INCLUDE. |
| FilterExpression? includeDetails; |
| |
| /// Resource type for Analytics filter. |
| core.String? kind; |
| |
| /// Details for the filter of the type LOWER. |
| FilterLowercaseDetails? lowercaseDetails; |
| |
| /// Name of this filter. |
| core.String? name; |
| |
| /// Parent link for this filter. |
| /// |
| /// Points to the account to which this filter belongs. |
| FilterParentLink? parentLink; |
| |
| /// Details for the filter of the type SEARCH_AND_REPLACE. |
| FilterSearchAndReplaceDetails? searchAndReplaceDetails; |
| |
| /// Link for this filter. |
| core.String? selfLink; |
| |
| /// Type of this filter. |
| /// |
| /// Possible values are INCLUDE, EXCLUDE, LOWERCASE, UPPERCASE, |
| /// SEARCH_AND_REPLACE and ADVANCED. |
| core.String? type; |
| |
| /// Time this filter was last modified. |
| core.DateTime? updated; |
| |
| /// Details for the filter of the type UPPER. |
| FilterUppercaseDetails? uppercaseDetails; |
| |
| Filter({ |
| this.accountId, |
| this.advancedDetails, |
| this.created, |
| this.excludeDetails, |
| this.id, |
| this.includeDetails, |
| this.kind, |
| this.lowercaseDetails, |
| this.name, |
| this.parentLink, |
| this.searchAndReplaceDetails, |
| this.selfLink, |
| this.type, |
| this.updated, |
| this.uppercaseDetails, |
| }); |
| |
| Filter.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| advancedDetails: json_.containsKey('advancedDetails') |
| ? FilterAdvancedDetails.fromJson( |
| json_['advancedDetails'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| excludeDetails: json_.containsKey('excludeDetails') |
| ? FilterExpression.fromJson( |
| json_['excludeDetails'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| id: json_['id'] as core.String?, |
| includeDetails: json_.containsKey('includeDetails') |
| ? FilterExpression.fromJson( |
| json_['includeDetails'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| kind: json_['kind'] as core.String?, |
| lowercaseDetails: json_.containsKey('lowercaseDetails') |
| ? FilterLowercaseDetails.fromJson( |
| json_['lowercaseDetails'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| name: json_['name'] as core.String?, |
| parentLink: json_.containsKey('parentLink') |
| ? FilterParentLink.fromJson( |
| json_['parentLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| searchAndReplaceDetails: json_.containsKey('searchAndReplaceDetails') |
| ? FilterSearchAndReplaceDetails.fromJson( |
| json_['searchAndReplaceDetails'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| selfLink: json_['selfLink'] as core.String?, |
| type: json_['type'] as core.String?, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| uppercaseDetails: json_.containsKey('uppercaseDetails') |
| ? FilterUppercaseDetails.fromJson( |
| json_['uppercaseDetails'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final advancedDetails = this.advancedDetails; |
| final created = this.created; |
| final excludeDetails = this.excludeDetails; |
| final id = this.id; |
| final includeDetails = this.includeDetails; |
| final kind = this.kind; |
| final lowercaseDetails = this.lowercaseDetails; |
| final name = this.name; |
| final parentLink = this.parentLink; |
| final searchAndReplaceDetails = this.searchAndReplaceDetails; |
| final selfLink = this.selfLink; |
| final type = this.type; |
| final updated = this.updated; |
| final uppercaseDetails = this.uppercaseDetails; |
| return { |
| 'accountId': ?accountId, |
| 'advancedDetails': ?advancedDetails, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'excludeDetails': ?excludeDetails, |
| 'id': ?id, |
| 'includeDetails': ?includeDetails, |
| 'kind': ?kind, |
| 'lowercaseDetails': ?lowercaseDetails, |
| 'name': ?name, |
| 'parentLink': ?parentLink, |
| 'searchAndReplaceDetails': ?searchAndReplaceDetails, |
| 'selfLink': ?selfLink, |
| 'type': ?type, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| 'uppercaseDetails': ?uppercaseDetails, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics filter expression. |
| class FilterExpression { |
| /// Determines if the filter is case sensitive. |
| core.bool? caseSensitive; |
| |
| /// Filter expression value |
| core.String? expressionValue; |
| |
| /// Field to filter. |
| /// |
| /// Possible values: |
| /// - Content and Traffic |
| /// - PAGE_REQUEST_URI, |
| /// - PAGE_HOSTNAME, |
| /// - PAGE_TITLE, |
| /// - REFERRAL, |
| /// - COST_DATA_URI (Campaign target URL), |
| /// - HIT_TYPE, |
| /// - INTERNAL_SEARCH_TERM, |
| /// - INTERNAL_SEARCH_TYPE, |
| /// - SOURCE_PROPERTY_TRACKING_ID, |
| /// - Campaign or AdGroup |
| /// - CAMPAIGN_SOURCE, |
| /// - CAMPAIGN_MEDIUM, |
| /// - CAMPAIGN_NAME, |
| /// - CAMPAIGN_AD_GROUP, |
| /// - CAMPAIGN_TERM, |
| /// - CAMPAIGN_CONTENT, |
| /// - CAMPAIGN_CODE, |
| /// - CAMPAIGN_REFERRAL_PATH, |
| /// - E-Commerce |
| /// - TRANSACTION_COUNTRY, |
| /// - TRANSACTION_REGION, |
| /// - TRANSACTION_CITY, |
| /// - TRANSACTION_AFFILIATION (Store or order location), |
| /// - ITEM_NAME, |
| /// - ITEM_CODE, |
| /// - ITEM_VARIATION, |
| /// - TRANSACTION_ID, |
| /// - TRANSACTION_CURRENCY_CODE, |
| /// - PRODUCT_ACTION_TYPE, |
| /// - Audience/Users |
| /// - BROWSER, |
| /// - BROWSER_VERSION, |
| /// - BROWSER_SIZE, |
| /// - PLATFORM, |
| /// - PLATFORM_VERSION, |
| /// - LANGUAGE, |
| /// - SCREEN_RESOLUTION, |
| /// - SCREEN_COLORS, |
| /// - JAVA_ENABLED (Boolean Field), |
| /// - FLASH_VERSION, |
| /// - GEO_SPEED (Connection speed), |
| /// - VISITOR_TYPE, |
| /// - GEO_ORGANIZATION (ISP organization), |
| /// - GEO_DOMAIN, |
| /// - GEO_IP_ADDRESS, |
| /// - GEO_IP_VERSION, |
| /// - Location |
| /// - GEO_COUNTRY, |
| /// - GEO_REGION, |
| /// - GEO_CITY, |
| /// - Event |
| /// - EVENT_CATEGORY, |
| /// - EVENT_ACTION, |
| /// - EVENT_LABEL, |
| /// - Other |
| /// - CUSTOM_FIELD_1, |
| /// - CUSTOM_FIELD_2, |
| /// - USER_DEFINED_VALUE, |
| /// - Application |
| /// - APP_ID, |
| /// - APP_INSTALLER_ID, |
| /// - APP_NAME, |
| /// - APP_VERSION, |
| /// - SCREEN, |
| /// - IS_APP (Boolean Field), |
| /// - IS_FATAL_EXCEPTION (Boolean Field), |
| /// - EXCEPTION_DESCRIPTION, |
| /// - Mobile device |
| /// - IS_MOBILE (Boolean Field, Deprecated. Use DEVICE_CATEGORY=mobile), |
| /// - IS_TABLET (Boolean Field, Deprecated. Use DEVICE_CATEGORY=tablet), |
| /// - DEVICE_CATEGORY, |
| /// - MOBILE_HAS_QWERTY_KEYBOARD (Boolean Field), |
| /// - MOBILE_HAS_NFC_SUPPORT (Boolean Field), |
| /// - MOBILE_HAS_CELLULAR_RADIO (Boolean Field), |
| /// - MOBILE_HAS_WIFI_SUPPORT (Boolean Field), |
| /// - MOBILE_BRAND_NAME, |
| /// - MOBILE_MODEL_NAME, |
| /// - MOBILE_MARKETING_NAME, |
| /// - MOBILE_POINTING_METHOD, |
| /// - Social |
| /// - SOCIAL_NETWORK, |
| /// - SOCIAL_ACTION, |
| /// - SOCIAL_ACTION_TARGET, |
| /// - Custom dimension |
| /// - CUSTOM_DIMENSION (See accompanying field index), |
| core.String? field; |
| |
| /// The Index of the custom dimension. |
| /// |
| /// Set only if the field is a is CUSTOM_DIMENSION. |
| core.int? fieldIndex; |
| |
| /// Kind value for filter expression |
| core.String? kind; |
| |
| /// Match type for this filter. |
| /// |
| /// Possible values are BEGINS_WITH, EQUAL, ENDS_WITH, CONTAINS, or MATCHES. |
| /// GEO_DOMAIN, GEO_IP_ADDRESS, PAGE_REQUEST_URI, or PAGE_HOSTNAME filters can |
| /// use any match type; all other filters must use MATCHES. |
| core.String? matchType; |
| |
| FilterExpression({ |
| this.caseSensitive, |
| this.expressionValue, |
| this.field, |
| this.fieldIndex, |
| this.kind, |
| this.matchType, |
| }); |
| |
| FilterExpression.fromJson(core.Map json_) |
| : this( |
| caseSensitive: json_['caseSensitive'] as core.bool?, |
| expressionValue: json_['expressionValue'] as core.String?, |
| field: json_['field'] as core.String?, |
| fieldIndex: json_['fieldIndex'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| matchType: json_['matchType'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final caseSensitive = this.caseSensitive; |
| final expressionValue = this.expressionValue; |
| final field = this.field; |
| final fieldIndex = this.fieldIndex; |
| final kind = this.kind; |
| final matchType = this.matchType; |
| return { |
| 'caseSensitive': ?caseSensitive, |
| 'expressionValue': ?expressionValue, |
| 'field': ?field, |
| 'fieldIndex': ?fieldIndex, |
| 'kind': ?kind, |
| 'matchType': ?matchType, |
| }; |
| } |
| } |
| |
| /// JSON template for a profile filter link. |
| class FilterRef { |
| /// Account ID to which this filter belongs. |
| core.String? accountId; |
| |
| /// Link for this filter. |
| core.String? href; |
| |
| /// Filter ID. |
| core.String? id; |
| |
| /// Kind value for filter reference. |
| core.String? kind; |
| |
| /// Name of this filter. |
| core.String? name; |
| |
| FilterRef({this.accountId, this.href, this.id, this.kind, this.name}); |
| |
| FilterRef.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| href: json_['href'] as core.String?, |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final href = this.href; |
| final id = this.id; |
| final kind = this.kind; |
| final name = this.name; |
| return { |
| 'accountId': ?accountId, |
| 'href': ?href, |
| 'id': ?id, |
| 'kind': ?kind, |
| 'name': ?name, |
| }; |
| } |
| } |
| |
| /// A filter collection lists filters created by users in an Analytics account. |
| /// |
| /// Each resource in the collection corresponds to a filter. |
| class Filters { |
| /// A list of filters. |
| core.List<Filter>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1,000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this filter collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this filter collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| Filters({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| Filters.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => |
| Filter.fromJson(value as core.Map<core.String, core.dynamic>), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| class GaDataColumnHeaders { |
| /// Column Type. |
| /// |
| /// Either DIMENSION or METRIC. |
| core.String? columnType; |
| |
| /// Data type. |
| /// |
| /// Dimension column headers have only STRING as the data type. Metric column |
| /// headers have data types for metric values such as INTEGER, DOUBLE, |
| /// CURRENCY etc. |
| core.String? dataType; |
| |
| /// Column name. |
| core.String? name; |
| |
| GaDataColumnHeaders({this.columnType, this.dataType, this.name}); |
| |
| GaDataColumnHeaders.fromJson(core.Map json_) |
| : this( |
| columnType: json_['columnType'] as core.String?, |
| dataType: json_['dataType'] as core.String?, |
| name: json_['name'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final columnType = this.columnType; |
| final dataType = this.dataType; |
| final name = this.name; |
| return {'columnType': ?columnType, 'dataType': ?dataType, 'name': ?name}; |
| } |
| } |
| |
| class GaDataDataTableCols { |
| core.String? id; |
| core.String? label; |
| core.String? type; |
| |
| GaDataDataTableCols({this.id, this.label, this.type}); |
| |
| GaDataDataTableCols.fromJson(core.Map json_) |
| : this( |
| id: json_['id'] as core.String?, |
| label: json_['label'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final id = this.id; |
| final label = this.label; |
| final type = this.type; |
| return {'id': ?id, 'label': ?label, 'type': ?type}; |
| } |
| } |
| |
| class GaDataDataTableRowsC { |
| core.String? v; |
| |
| GaDataDataTableRowsC({this.v}); |
| |
| GaDataDataTableRowsC.fromJson(core.Map json_) |
| : this(v: json_['v'] as core.String?); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final v = this.v; |
| return {'v': ?v}; |
| } |
| } |
| |
| class GaDataDataTableRows { |
| core.List<GaDataDataTableRowsC>? c; |
| |
| GaDataDataTableRows({this.c}); |
| |
| GaDataDataTableRows.fromJson(core.Map json_) |
| : this( |
| c: (json_['c'] as core.List?) |
| ?.map( |
| (value) => GaDataDataTableRowsC.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final c = this.c; |
| return {'c': ?c}; |
| } |
| } |
| |
| class GaDataDataTable { |
| core.List<GaDataDataTableCols>? cols; |
| core.List<GaDataDataTableRows>? rows; |
| |
| GaDataDataTable({this.cols, this.rows}); |
| |
| GaDataDataTable.fromJson(core.Map json_) |
| : this( |
| cols: (json_['cols'] as core.List?) |
| ?.map( |
| (value) => GaDataDataTableCols.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| rows: (json_['rows'] as core.List?) |
| ?.map( |
| (value) => GaDataDataTableRows.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final cols = this.cols; |
| final rows = this.rows; |
| return {'cols': ?cols, 'rows': ?rows}; |
| } |
| } |
| |
| /// Information for the view (profile), for which the Analytics data was |
| /// requested. |
| class GaDataProfileInfo { |
| /// Account ID to which this view (profile) belongs. |
| core.String? accountId; |
| |
| /// Internal ID for the web property to which this view (profile) belongs. |
| core.String? internalWebPropertyId; |
| |
| /// View (Profile) ID. |
| core.String? profileId; |
| |
| /// View (Profile) name. |
| core.String? profileName; |
| |
| /// Table ID for view (profile). |
| core.String? tableId; |
| |
| /// Web Property ID to which this view (profile) belongs. |
| core.String? webPropertyId; |
| |
| GaDataProfileInfo({ |
| this.accountId, |
| this.internalWebPropertyId, |
| this.profileId, |
| this.profileName, |
| this.tableId, |
| this.webPropertyId, |
| }); |
| |
| GaDataProfileInfo.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| profileId: json_['profileId'] as core.String?, |
| profileName: json_['profileName'] as core.String?, |
| tableId: json_['tableId'] as core.String?, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final profileId = this.profileId; |
| final profileName = this.profileName; |
| final tableId = this.tableId; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'profileId': ?profileId, |
| 'profileName': ?profileName, |
| 'tableId': ?tableId, |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// Analytics data request query parameters. |
| class GaDataQuery { |
| /// List of analytics dimensions. |
| core.String? dimensions; |
| |
| /// End date. |
| core.String? endDate; |
| |
| /// Comma-separated list of dimension or metric filters. |
| core.String? filters; |
| |
| /// Unique table ID. |
| core.String? ids; |
| |
| /// Maximum results per page. |
| core.int? maxResults; |
| |
| /// List of analytics metrics. |
| core.List<core.String>? metrics; |
| |
| /// Desired sampling level |
| core.String? samplingLevel; |
| |
| /// Analytics advanced segment. |
| core.String? segment; |
| |
| /// List of dimensions or metrics based on which Analytics data is sorted. |
| core.List<core.String>? sort; |
| |
| /// Start date. |
| core.String? startDate; |
| |
| /// Start index. |
| core.int? startIndex; |
| |
| GaDataQuery({ |
| this.dimensions, |
| this.endDate, |
| this.filters, |
| this.ids, |
| this.maxResults, |
| this.metrics, |
| this.samplingLevel, |
| this.segment, |
| this.sort, |
| this.startDate, |
| this.startIndex, |
| }); |
| |
| GaDataQuery.fromJson(core.Map json_) |
| : this( |
| dimensions: json_['dimensions'] as core.String?, |
| endDate: json_['end-date'] as core.String?, |
| filters: json_['filters'] as core.String?, |
| ids: json_['ids'] as core.String?, |
| maxResults: json_['max-results'] as core.int?, |
| metrics: (json_['metrics'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| samplingLevel: json_['samplingLevel'] as core.String?, |
| segment: json_['segment'] as core.String?, |
| sort: (json_['sort'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| startDate: json_['start-date'] as core.String?, |
| startIndex: json_['start-index'] as core.int?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final dimensions = this.dimensions; |
| final endDate = this.endDate; |
| final filters = this.filters; |
| final ids = this.ids; |
| final maxResults = this.maxResults; |
| final metrics = this.metrics; |
| final samplingLevel = this.samplingLevel; |
| final segment = this.segment; |
| final sort = this.sort; |
| final startDate = this.startDate; |
| final startIndex = this.startIndex; |
| return { |
| 'dimensions': ?dimensions, |
| 'end-date': ?endDate, |
| 'filters': ?filters, |
| 'ids': ?ids, |
| 'max-results': ?maxResults, |
| 'metrics': ?metrics, |
| 'samplingLevel': ?samplingLevel, |
| 'segment': ?segment, |
| 'sort': ?sort, |
| 'start-date': ?startDate, |
| 'start-index': ?startIndex, |
| }; |
| } |
| } |
| |
| /// Analytics data for a given view (profile). |
| class GaData { |
| /// Column headers that list dimension names followed by the metric names. |
| /// |
| /// The order of dimensions and metrics is same as specified in the request. |
| core.List<GaDataColumnHeaders>? columnHeaders; |
| |
| /// Determines if Analytics data contains samples. |
| core.bool? containsSampledData; |
| |
| /// The last refreshed time in seconds for Analytics data. |
| core.String? dataLastRefreshed; |
| GaDataDataTable? dataTable; |
| |
| /// Unique ID for this data response. |
| core.String? id; |
| |
| /// The maximum number of rows the response can contain, regardless of the |
| /// actual number of rows returned. |
| /// |
| /// Its value ranges from 1 to 10,000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Resource type. |
| core.String? kind; |
| |
| /// Link to next page for this Analytics data query. |
| core.String? nextLink; |
| |
| /// Link to previous page for this Analytics data query. |
| core.String? previousLink; |
| |
| /// Information for the view (profile), for which the Analytics data was |
| /// requested. |
| GaDataProfileInfo? profileInfo; |
| |
| /// Analytics data request query parameters. |
| GaDataQuery? query; |
| |
| /// Analytics data rows, where each row contains a list of dimension values |
| /// followed by the metric values. |
| /// |
| /// The order of dimensions and metrics is same as specified in the request. |
| core.List<core.List<core.String>>? rows; |
| |
| /// The number of samples used to calculate the result. |
| core.String? sampleSize; |
| |
| /// Total size of the sample space from which the samples were selected. |
| core.String? sampleSpace; |
| |
| /// Link to this page. |
| core.String? selfLink; |
| |
| /// The total number of rows for the query, regardless of the number of rows |
| /// in the response. |
| core.int? totalResults; |
| |
| /// Total values for the requested metrics over all the results, not just the |
| /// results returned in this response. |
| /// |
| /// The order of the metric totals is same as the metric order specified in |
| /// the request. |
| core.Map<core.String, core.String>? totalsForAllResults; |
| |
| GaData({ |
| this.columnHeaders, |
| this.containsSampledData, |
| this.dataLastRefreshed, |
| this.dataTable, |
| this.id, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.profileInfo, |
| this.query, |
| this.rows, |
| this.sampleSize, |
| this.sampleSpace, |
| this.selfLink, |
| this.totalResults, |
| this.totalsForAllResults, |
| }); |
| |
| GaData.fromJson(core.Map json_) |
| : this( |
| columnHeaders: (json_['columnHeaders'] as core.List?) |
| ?.map( |
| (value) => GaDataColumnHeaders.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| containsSampledData: json_['containsSampledData'] as core.bool?, |
| dataLastRefreshed: json_['dataLastRefreshed'] as core.String?, |
| dataTable: json_.containsKey('dataTable') |
| ? GaDataDataTable.fromJson( |
| json_['dataTable'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| id: json_['id'] as core.String?, |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| profileInfo: json_.containsKey('profileInfo') |
| ? GaDataProfileInfo.fromJson( |
| json_['profileInfo'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| query: json_.containsKey('query') |
| ? GaDataQuery.fromJson( |
| json_['query'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| rows: (json_['rows'] as core.List?) |
| ?.map( |
| (value) => (value as core.List) |
| .map((value) => value as core.String) |
| .toList(), |
| ) |
| .toList(), |
| sampleSize: json_['sampleSize'] as core.String?, |
| sampleSpace: json_['sampleSpace'] as core.String?, |
| selfLink: json_['selfLink'] as core.String?, |
| totalResults: json_['totalResults'] as core.int?, |
| totalsForAllResults: |
| (json_['totalsForAllResults'] |
| as core.Map<core.String, core.dynamic>?) |
| ?.map((key, value) => core.MapEntry(key, value as core.String)), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final columnHeaders = this.columnHeaders; |
| final containsSampledData = this.containsSampledData; |
| final dataLastRefreshed = this.dataLastRefreshed; |
| final dataTable = this.dataTable; |
| final id = this.id; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final profileInfo = this.profileInfo; |
| final query = this.query; |
| final rows = this.rows; |
| final sampleSize = this.sampleSize; |
| final sampleSpace = this.sampleSpace; |
| final selfLink = this.selfLink; |
| final totalResults = this.totalResults; |
| final totalsForAllResults = this.totalsForAllResults; |
| return { |
| 'columnHeaders': ?columnHeaders, |
| 'containsSampledData': ?containsSampledData, |
| 'dataLastRefreshed': ?dataLastRefreshed, |
| 'dataTable': ?dataTable, |
| 'id': ?id, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'profileInfo': ?profileInfo, |
| 'query': ?query, |
| 'rows': ?rows, |
| 'sampleSize': ?sampleSize, |
| 'sampleSpace': ?sampleSpace, |
| 'selfLink': ?selfLink, |
| 'totalResults': ?totalResults, |
| 'totalsForAllResults': ?totalsForAllResults, |
| }; |
| } |
| } |
| |
| class GoalEventDetailsEventConditions { |
| /// Type of comparison. |
| /// |
| /// Possible values are LESS_THAN, GREATER_THAN or EQUAL. |
| core.String? comparisonType; |
| |
| /// Value used for this comparison. |
| core.String? comparisonValue; |
| |
| /// Expression used for this match. |
| core.String? expression; |
| |
| /// Type of the match to be performed. |
| /// |
| /// Possible values are REGEXP, BEGINS_WITH, or EXACT. |
| core.String? matchType; |
| |
| /// Type of this event condition. |
| /// |
| /// Possible values are CATEGORY, ACTION, LABEL, or VALUE. |
| core.String? type; |
| |
| GoalEventDetailsEventConditions({ |
| this.comparisonType, |
| this.comparisonValue, |
| this.expression, |
| this.matchType, |
| this.type, |
| }); |
| |
| GoalEventDetailsEventConditions.fromJson(core.Map json_) |
| : this( |
| comparisonType: json_['comparisonType'] as core.String?, |
| comparisonValue: json_['comparisonValue'] as core.String?, |
| expression: json_['expression'] as core.String?, |
| matchType: json_['matchType'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final comparisonType = this.comparisonType; |
| final comparisonValue = this.comparisonValue; |
| final expression = this.expression; |
| final matchType = this.matchType; |
| final type = this.type; |
| return { |
| 'comparisonType': ?comparisonType, |
| 'comparisonValue': ?comparisonValue, |
| 'expression': ?expression, |
| 'matchType': ?matchType, |
| 'type': ?type, |
| }; |
| } |
| } |
| |
| /// Details for the goal of the type EVENT. |
| class GoalEventDetails { |
| /// List of event conditions. |
| core.List<GoalEventDetailsEventConditions>? eventConditions; |
| |
| /// Determines if the event value should be used as the value for this goal. |
| core.bool? useEventValue; |
| |
| GoalEventDetails({this.eventConditions, this.useEventValue}); |
| |
| GoalEventDetails.fromJson(core.Map json_) |
| : this( |
| eventConditions: (json_['eventConditions'] as core.List?) |
| ?.map( |
| (value) => GoalEventDetailsEventConditions.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| useEventValue: json_['useEventValue'] as core.bool?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final eventConditions = this.eventConditions; |
| final useEventValue = this.useEventValue; |
| return { |
| 'eventConditions': ?eventConditions, |
| 'useEventValue': ?useEventValue, |
| }; |
| } |
| } |
| |
| /// Parent link for a goal. |
| /// |
| /// Points to the view (profile) to which this goal belongs. |
| class GoalParentLink { |
| /// Link to the view (profile) to which this goal belongs. |
| core.String? href; |
| |
| /// Value is "analytics#profile". |
| core.String? type; |
| |
| GoalParentLink({this.href, this.type}); |
| |
| GoalParentLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| class GoalUrlDestinationDetailsSteps { |
| /// Step name. |
| core.String? name; |
| |
| /// Step number. |
| core.int? number; |
| |
| /// URL for this step. |
| core.String? url; |
| |
| GoalUrlDestinationDetailsSteps({this.name, this.number, this.url}); |
| |
| GoalUrlDestinationDetailsSteps.fromJson(core.Map json_) |
| : this( |
| name: json_['name'] as core.String?, |
| number: json_['number'] as core.int?, |
| url: json_['url'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final name = this.name; |
| final number = this.number; |
| final url = this.url; |
| return {'name': ?name, 'number': ?number, 'url': ?url}; |
| } |
| } |
| |
| /// Details for the goal of the type URL_DESTINATION. |
| class GoalUrlDestinationDetails { |
| /// Determines if the goal URL must exactly match the capitalization of |
| /// visited URLs. |
| core.bool? caseSensitive; |
| |
| /// Determines if the first step in this goal is required. |
| core.bool? firstStepRequired; |
| |
| /// Match type for the goal URL. |
| /// |
| /// Possible values are HEAD, EXACT, or REGEX. |
| core.String? matchType; |
| |
| /// List of steps configured for this goal funnel. |
| core.List<GoalUrlDestinationDetailsSteps>? steps; |
| |
| /// URL for this goal. |
| core.String? url; |
| |
| GoalUrlDestinationDetails({ |
| this.caseSensitive, |
| this.firstStepRequired, |
| this.matchType, |
| this.steps, |
| this.url, |
| }); |
| |
| GoalUrlDestinationDetails.fromJson(core.Map json_) |
| : this( |
| caseSensitive: json_['caseSensitive'] as core.bool?, |
| firstStepRequired: json_['firstStepRequired'] as core.bool?, |
| matchType: json_['matchType'] as core.String?, |
| steps: (json_['steps'] as core.List?) |
| ?.map( |
| (value) => GoalUrlDestinationDetailsSteps.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| url: json_['url'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final caseSensitive = this.caseSensitive; |
| final firstStepRequired = this.firstStepRequired; |
| final matchType = this.matchType; |
| final steps = this.steps; |
| final url = this.url; |
| return { |
| 'caseSensitive': ?caseSensitive, |
| 'firstStepRequired': ?firstStepRequired, |
| 'matchType': ?matchType, |
| 'steps': ?steps, |
| 'url': ?url, |
| }; |
| } |
| } |
| |
| /// Details for the goal of the type VISIT_NUM_PAGES. |
| class GoalVisitNumPagesDetails { |
| /// Type of comparison. |
| /// |
| /// Possible values are LESS_THAN, GREATER_THAN, or EQUAL. |
| core.String? comparisonType; |
| |
| /// Value used for this comparison. |
| core.String? comparisonValue; |
| |
| GoalVisitNumPagesDetails({this.comparisonType, this.comparisonValue}); |
| |
| GoalVisitNumPagesDetails.fromJson(core.Map json_) |
| : this( |
| comparisonType: json_['comparisonType'] as core.String?, |
| comparisonValue: json_['comparisonValue'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final comparisonType = this.comparisonType; |
| final comparisonValue = this.comparisonValue; |
| return { |
| 'comparisonType': ?comparisonType, |
| 'comparisonValue': ?comparisonValue, |
| }; |
| } |
| } |
| |
| /// Details for the goal of the type VISIT_TIME_ON_SITE. |
| class GoalVisitTimeOnSiteDetails { |
| /// Type of comparison. |
| /// |
| /// Possible values are LESS_THAN or GREATER_THAN. |
| core.String? comparisonType; |
| |
| /// Value used for this comparison. |
| core.String? comparisonValue; |
| |
| GoalVisitTimeOnSiteDetails({this.comparisonType, this.comparisonValue}); |
| |
| GoalVisitTimeOnSiteDetails.fromJson(core.Map json_) |
| : this( |
| comparisonType: json_['comparisonType'] as core.String?, |
| comparisonValue: json_['comparisonValue'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final comparisonType = this.comparisonType; |
| final comparisonValue = this.comparisonValue; |
| return { |
| 'comparisonType': ?comparisonType, |
| 'comparisonValue': ?comparisonValue, |
| }; |
| } |
| } |
| |
| /// JSON template for Analytics goal resource. |
| class Goal { |
| /// Account ID to which this goal belongs. |
| core.String? accountId; |
| |
| /// Determines whether this goal is active. |
| core.bool? active; |
| |
| /// Time this goal was created. |
| core.DateTime? created; |
| |
| /// Details for the goal of the type EVENT. |
| GoalEventDetails? eventDetails; |
| |
| /// Goal ID. |
| core.String? id; |
| |
| /// Internal ID for the web property to which this goal belongs. |
| core.String? internalWebPropertyId; |
| |
| /// Resource type for an Analytics goal. |
| core.String? kind; |
| |
| /// Goal name. |
| core.String? name; |
| |
| /// Parent link for a goal. |
| /// |
| /// Points to the view (profile) to which this goal belongs. |
| GoalParentLink? parentLink; |
| |
| /// View (Profile) ID to which this goal belongs. |
| core.String? profileId; |
| |
| /// Link for this goal. |
| core.String? selfLink; |
| |
| /// Goal type. |
| /// |
| /// Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, |
| /// AND EVENT. |
| core.String? type; |
| |
| /// Time this goal was last modified. |
| core.DateTime? updated; |
| |
| /// Details for the goal of the type URL_DESTINATION. |
| GoalUrlDestinationDetails? urlDestinationDetails; |
| |
| /// Goal value. |
| core.double? value; |
| |
| /// Details for the goal of the type VISIT_NUM_PAGES. |
| GoalVisitNumPagesDetails? visitNumPagesDetails; |
| |
| /// Details for the goal of the type VISIT_TIME_ON_SITE. |
| GoalVisitTimeOnSiteDetails? visitTimeOnSiteDetails; |
| |
| /// Web property ID to which this goal belongs. |
| /// |
| /// The web property ID is of the form UA-XXXXX-YY. |
| core.String? webPropertyId; |
| |
| Goal({ |
| this.accountId, |
| this.active, |
| this.created, |
| this.eventDetails, |
| this.id, |
| this.internalWebPropertyId, |
| this.kind, |
| this.name, |
| this.parentLink, |
| this.profileId, |
| this.selfLink, |
| this.type, |
| this.updated, |
| this.urlDestinationDetails, |
| this.value, |
| this.visitNumPagesDetails, |
| this.visitTimeOnSiteDetails, |
| this.webPropertyId, |
| }); |
| |
| Goal.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| active: json_['active'] as core.bool?, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| eventDetails: json_.containsKey('eventDetails') |
| ? GoalEventDetails.fromJson( |
| json_['eventDetails'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| id: json_['id'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| parentLink: json_.containsKey('parentLink') |
| ? GoalParentLink.fromJson( |
| json_['parentLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| profileId: json_['profileId'] as core.String?, |
| selfLink: json_['selfLink'] as core.String?, |
| type: json_['type'] as core.String?, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| urlDestinationDetails: json_.containsKey('urlDestinationDetails') |
| ? GoalUrlDestinationDetails.fromJson( |
| json_['urlDestinationDetails'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| value: (json_['value'] as core.num?)?.toDouble(), |
| visitNumPagesDetails: json_.containsKey('visitNumPagesDetails') |
| ? GoalVisitNumPagesDetails.fromJson( |
| json_['visitNumPagesDetails'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| visitTimeOnSiteDetails: json_.containsKey('visitTimeOnSiteDetails') |
| ? GoalVisitTimeOnSiteDetails.fromJson( |
| json_['visitTimeOnSiteDetails'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final active = this.active; |
| final created = this.created; |
| final eventDetails = this.eventDetails; |
| final id = this.id; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final kind = this.kind; |
| final name = this.name; |
| final parentLink = this.parentLink; |
| final profileId = this.profileId; |
| final selfLink = this.selfLink; |
| final type = this.type; |
| final updated = this.updated; |
| final urlDestinationDetails = this.urlDestinationDetails; |
| final value = this.value; |
| final visitNumPagesDetails = this.visitNumPagesDetails; |
| final visitTimeOnSiteDetails = this.visitTimeOnSiteDetails; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'active': ?active, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'eventDetails': ?eventDetails, |
| 'id': ?id, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'kind': ?kind, |
| 'name': ?name, |
| 'parentLink': ?parentLink, |
| 'profileId': ?profileId, |
| 'selfLink': ?selfLink, |
| 'type': ?type, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| 'urlDestinationDetails': ?urlDestinationDetails, |
| 'value': ?value, |
| 'visitNumPagesDetails': ?visitNumPagesDetails, |
| 'visitTimeOnSiteDetails': ?visitTimeOnSiteDetails, |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// A goal collection lists Analytics goals to which the user has access. |
| /// |
| /// Each view (profile) can have a set of goals. Each resource in the Goal |
| /// collection corresponds to a single Analytics goal. |
| class Goals { |
| /// A list of goals. |
| core.List<Goal>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this goal collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this goal collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// resources in the result. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| Goals({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| Goals.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => |
| Goal.fromJson(value as core.Map<core.String, core.dynamic>), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// JSON template for a hash Client Id request resource. |
| class HashClientIdRequest { |
| core.String? clientId; |
| core.String? kind; |
| core.String? webPropertyId; |
| |
| HashClientIdRequest({this.clientId, this.kind, this.webPropertyId}); |
| |
| HashClientIdRequest.fromJson(core.Map json_) |
| : this( |
| clientId: json_['clientId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final clientId = this.clientId; |
| final kind = this.kind; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'clientId': ?clientId, |
| 'kind': ?kind, |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// JSON template for a hash Client Id response resource. |
| class HashClientIdResponse { |
| core.String? clientId; |
| core.String? hashedClientId; |
| core.String? kind; |
| core.String? webPropertyId; |
| |
| HashClientIdResponse({ |
| this.clientId, |
| this.hashedClientId, |
| this.kind, |
| this.webPropertyId, |
| }); |
| |
| HashClientIdResponse.fromJson(core.Map json_) |
| : this( |
| clientId: json_['clientId'] as core.String?, |
| hashedClientId: json_['hashedClientId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final clientId = this.clientId; |
| final hashedClientId = this.hashedClientId; |
| final kind = this.kind; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'clientId': ?clientId, |
| 'hashedClientId': ?hashedClientId, |
| 'kind': ?kind, |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics Remarketing Include Conditions. |
| class IncludeConditions { |
| /// The look-back window lets you specify a time frame for evaluating the |
| /// behavior that qualifies users for your audience. |
| /// |
| /// For example, if your filters include users from Central Asia, and |
| /// Transactions Greater than 2, and you set the look-back window to 14 days, |
| /// then any user from Central Asia whose cumulative transactions exceed 2 |
| /// during the last 14 days is added to the audience. |
| core.int? daysToLookBack; |
| |
| /// Boolean indicating whether this segment is a smart list. |
| /// |
| /// https://support.google.com/analytics/answer/4628577 |
| core.bool? isSmartList; |
| |
| /// Resource type for include conditions. |
| core.String? kind; |
| |
| /// Number of days (in the range 1 to 540) a user remains in the audience. |
| core.int? membershipDurationDays; |
| |
| /// The segment condition that will cause a user to be added to an audience. |
| core.String? segment; |
| |
| IncludeConditions({ |
| this.daysToLookBack, |
| this.isSmartList, |
| this.kind, |
| this.membershipDurationDays, |
| this.segment, |
| }); |
| |
| IncludeConditions.fromJson(core.Map json_) |
| : this( |
| daysToLookBack: json_['daysToLookBack'] as core.int?, |
| isSmartList: json_['isSmartList'] as core.bool?, |
| kind: json_['kind'] as core.String?, |
| membershipDurationDays: json_['membershipDurationDays'] as core.int?, |
| segment: json_['segment'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final daysToLookBack = this.daysToLookBack; |
| final isSmartList = this.isSmartList; |
| final kind = this.kind; |
| final membershipDurationDays = this.membershipDurationDays; |
| final segment = this.segment; |
| return { |
| 'daysToLookBack': ?daysToLookBack, |
| 'isSmartList': ?isSmartList, |
| 'kind': ?kind, |
| 'membershipDurationDays': ?membershipDurationDays, |
| 'segment': ?segment, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics Remarketing Audience Foreign Link. |
| class LinkedForeignAccount { |
| /// Account ID to which this linked foreign account belongs. |
| core.String? accountId; |
| |
| /// Boolean indicating whether this is eligible for search. |
| core.bool? eligibleForSearch; |
| |
| /// Entity ad account link ID. |
| core.String? id; |
| |
| /// Internal ID for the web property to which this linked foreign account |
| /// belongs. |
| core.String? internalWebPropertyId; |
| |
| /// Resource type for linked foreign account. |
| core.String? kind; |
| |
| /// The foreign account ID. |
| /// |
| /// For example the an Google Ads `linkedAccountId` has the following format |
| /// XXX-XXX-XXXX. |
| core.String? linkedAccountId; |
| |
| /// Remarketing audience ID to which this linked foreign account belongs. |
| core.String? remarketingAudienceId; |
| |
| /// The status of this foreign account link. |
| core.String? status; |
| |
| /// The type of the foreign account. |
| /// |
| /// For example, `ADWORDS_LINKS`, `DBM_LINKS`, `MCC_LINKS` or `OPTIMIZE`. |
| core.String? type; |
| |
| /// Web property ID of the form UA-XXXXX-YY to which this linked foreign |
| /// account belongs. |
| core.String? webPropertyId; |
| |
| LinkedForeignAccount({ |
| this.accountId, |
| this.eligibleForSearch, |
| this.id, |
| this.internalWebPropertyId, |
| this.kind, |
| this.linkedAccountId, |
| this.remarketingAudienceId, |
| this.status, |
| this.type, |
| this.webPropertyId, |
| }); |
| |
| LinkedForeignAccount.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| eligibleForSearch: json_['eligibleForSearch'] as core.bool?, |
| id: json_['id'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| linkedAccountId: json_['linkedAccountId'] as core.String?, |
| remarketingAudienceId: json_['remarketingAudienceId'] as core.String?, |
| status: json_['status'] as core.String?, |
| type: json_['type'] as core.String?, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final eligibleForSearch = this.eligibleForSearch; |
| final id = this.id; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final kind = this.kind; |
| final linkedAccountId = this.linkedAccountId; |
| final remarketingAudienceId = this.remarketingAudienceId; |
| final status = this.status; |
| final type = this.type; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'eligibleForSearch': ?eligibleForSearch, |
| 'id': ?id, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'kind': ?kind, |
| 'linkedAccountId': ?linkedAccountId, |
| 'remarketingAudienceId': ?remarketingAudienceId, |
| 'status': ?status, |
| 'type': ?type, |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| class McfDataColumnHeaders { |
| /// Column Type. |
| /// |
| /// Either DIMENSION or METRIC. |
| core.String? columnType; |
| |
| /// Data type. |
| /// |
| /// Dimension and metric values data types such as INTEGER, DOUBLE, CURRENCY, |
| /// MCF_SEQUENCE etc. |
| core.String? dataType; |
| |
| /// Column name. |
| core.String? name; |
| |
| McfDataColumnHeaders({this.columnType, this.dataType, this.name}); |
| |
| McfDataColumnHeaders.fromJson(core.Map json_) |
| : this( |
| columnType: json_['columnType'] as core.String?, |
| dataType: json_['dataType'] as core.String?, |
| name: json_['name'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final columnType = this.columnType; |
| final dataType = this.dataType; |
| final name = this.name; |
| return {'columnType': ?columnType, 'dataType': ?dataType, 'name': ?name}; |
| } |
| } |
| |
| /// Information for the view (profile), for which the Analytics data was |
| /// requested. |
| class McfDataProfileInfo { |
| /// Account ID to which this view (profile) belongs. |
| core.String? accountId; |
| |
| /// Internal ID for the web property to which this view (profile) belongs. |
| core.String? internalWebPropertyId; |
| |
| /// View (Profile) ID. |
| core.String? profileId; |
| |
| /// View (Profile) name. |
| core.String? profileName; |
| |
| /// Table ID for view (profile). |
| core.String? tableId; |
| |
| /// Web Property ID to which this view (profile) belongs. |
| core.String? webPropertyId; |
| |
| McfDataProfileInfo({ |
| this.accountId, |
| this.internalWebPropertyId, |
| this.profileId, |
| this.profileName, |
| this.tableId, |
| this.webPropertyId, |
| }); |
| |
| McfDataProfileInfo.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| profileId: json_['profileId'] as core.String?, |
| profileName: json_['profileName'] as core.String?, |
| tableId: json_['tableId'] as core.String?, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final profileId = this.profileId; |
| final profileName = this.profileName; |
| final tableId = this.tableId; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'profileId': ?profileId, |
| 'profileName': ?profileName, |
| 'tableId': ?tableId, |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// Analytics data request query parameters. |
| class McfDataQuery { |
| /// List of analytics dimensions. |
| core.String? dimensions; |
| |
| /// End date. |
| core.String? endDate; |
| |
| /// Comma-separated list of dimension or metric filters. |
| core.String? filters; |
| |
| /// Unique table ID. |
| core.String? ids; |
| |
| /// Maximum results per page. |
| core.int? maxResults; |
| |
| /// List of analytics metrics. |
| core.List<core.String>? metrics; |
| |
| /// Desired sampling level |
| core.String? samplingLevel; |
| |
| /// Analytics advanced segment. |
| core.String? segment; |
| |
| /// List of dimensions or metrics based on which Analytics data is sorted. |
| core.List<core.String>? sort; |
| |
| /// Start date. |
| core.String? startDate; |
| |
| /// Start index. |
| core.int? startIndex; |
| |
| McfDataQuery({ |
| this.dimensions, |
| this.endDate, |
| this.filters, |
| this.ids, |
| this.maxResults, |
| this.metrics, |
| this.samplingLevel, |
| this.segment, |
| this.sort, |
| this.startDate, |
| this.startIndex, |
| }); |
| |
| McfDataQuery.fromJson(core.Map json_) |
| : this( |
| dimensions: json_['dimensions'] as core.String?, |
| endDate: json_['end-date'] as core.String?, |
| filters: json_['filters'] as core.String?, |
| ids: json_['ids'] as core.String?, |
| maxResults: json_['max-results'] as core.int?, |
| metrics: (json_['metrics'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| samplingLevel: json_['samplingLevel'] as core.String?, |
| segment: json_['segment'] as core.String?, |
| sort: (json_['sort'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| startDate: json_['start-date'] as core.String?, |
| startIndex: json_['start-index'] as core.int?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final dimensions = this.dimensions; |
| final endDate = this.endDate; |
| final filters = this.filters; |
| final ids = this.ids; |
| final maxResults = this.maxResults; |
| final metrics = this.metrics; |
| final samplingLevel = this.samplingLevel; |
| final segment = this.segment; |
| final sort = this.sort; |
| final startDate = this.startDate; |
| final startIndex = this.startIndex; |
| return { |
| 'dimensions': ?dimensions, |
| 'end-date': ?endDate, |
| 'filters': ?filters, |
| 'ids': ?ids, |
| 'max-results': ?maxResults, |
| 'metrics': ?metrics, |
| 'samplingLevel': ?samplingLevel, |
| 'segment': ?segment, |
| 'sort': ?sort, |
| 'start-date': ?startDate, |
| 'start-index': ?startIndex, |
| }; |
| } |
| } |
| |
| class McfDataRowsConversionPathValue { |
| /// Type of an interaction on conversion path. |
| /// |
| /// Such as CLICK, IMPRESSION etc. |
| core.String? interactionType; |
| |
| /// Node value of an interaction on conversion path. |
| /// |
| /// Such as source, medium etc. |
| core.String? nodeValue; |
| |
| McfDataRowsConversionPathValue({this.interactionType, this.nodeValue}); |
| |
| McfDataRowsConversionPathValue.fromJson(core.Map json_) |
| : this( |
| interactionType: json_['interactionType'] as core.String?, |
| nodeValue: json_['nodeValue'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final interactionType = this.interactionType; |
| final nodeValue = this.nodeValue; |
| return {'interactionType': ?interactionType, 'nodeValue': ?nodeValue}; |
| } |
| } |
| |
| /// A union object representing a dimension or metric value. |
| /// |
| /// Only one of "primitiveValue" or "conversionPathValue" attribute will be |
| /// populated. |
| class McfDataRows { |
| /// A conversion path dimension value, containing a list of interactions with |
| /// their attributes. |
| core.List<McfDataRowsConversionPathValue>? conversionPathValue; |
| |
| /// A primitive dimension value. |
| /// |
| /// A primitive metric value. |
| core.String? primitiveValue; |
| |
| McfDataRows({this.conversionPathValue, this.primitiveValue}); |
| |
| McfDataRows.fromJson(core.Map json_) |
| : this( |
| conversionPathValue: (json_['conversionPathValue'] as core.List?) |
| ?.map( |
| (value) => McfDataRowsConversionPathValue.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| primitiveValue: json_['primitiveValue'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final conversionPathValue = this.conversionPathValue; |
| final primitiveValue = this.primitiveValue; |
| return { |
| 'conversionPathValue': ?conversionPathValue, |
| 'primitiveValue': ?primitiveValue, |
| }; |
| } |
| } |
| |
| /// Multi-Channel Funnels data for a given view (profile). |
| class McfData { |
| /// Column headers that list dimension names followed by the metric names. |
| /// |
| /// The order of dimensions and metrics is same as specified in the request. |
| core.List<McfDataColumnHeaders>? columnHeaders; |
| |
| /// Determines if the Analytics data contains sampled data. |
| core.bool? containsSampledData; |
| |
| /// Unique ID for this data response. |
| core.String? id; |
| |
| /// The maximum number of rows the response can contain, regardless of the |
| /// actual number of rows returned. |
| /// |
| /// Its value ranges from 1 to 10,000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Resource type. |
| core.String? kind; |
| |
| /// Link to next page for this Analytics data query. |
| core.String? nextLink; |
| |
| /// Link to previous page for this Analytics data query. |
| core.String? previousLink; |
| |
| /// Information for the view (profile), for which the Analytics data was |
| /// requested. |
| McfDataProfileInfo? profileInfo; |
| |
| /// Analytics data request query parameters. |
| McfDataQuery? query; |
| |
| /// Analytics data rows, where each row contains a list of dimension values |
| /// followed by the metric values. |
| /// |
| /// The order of dimensions and metrics is same as specified in the request. |
| core.List<core.List<McfDataRows>>? rows; |
| |
| /// The number of samples used to calculate the result. |
| core.String? sampleSize; |
| |
| /// Total size of the sample space from which the samples were selected. |
| core.String? sampleSpace; |
| |
| /// Link to this page. |
| core.String? selfLink; |
| |
| /// The total number of rows for the query, regardless of the number of rows |
| /// in the response. |
| core.int? totalResults; |
| |
| /// Total values for the requested metrics over all the results, not just the |
| /// results returned in this response. |
| /// |
| /// The order of the metric totals is same as the metric order specified in |
| /// the request. |
| core.Map<core.String, core.String>? totalsForAllResults; |
| |
| McfData({ |
| this.columnHeaders, |
| this.containsSampledData, |
| this.id, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.profileInfo, |
| this.query, |
| this.rows, |
| this.sampleSize, |
| this.sampleSpace, |
| this.selfLink, |
| this.totalResults, |
| this.totalsForAllResults, |
| }); |
| |
| McfData.fromJson(core.Map json_) |
| : this( |
| columnHeaders: (json_['columnHeaders'] as core.List?) |
| ?.map( |
| (value) => McfDataColumnHeaders.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| containsSampledData: json_['containsSampledData'] as core.bool?, |
| id: json_['id'] as core.String?, |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| profileInfo: json_.containsKey('profileInfo') |
| ? McfDataProfileInfo.fromJson( |
| json_['profileInfo'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| query: json_.containsKey('query') |
| ? McfDataQuery.fromJson( |
| json_['query'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| rows: (json_['rows'] as core.List?) |
| ?.map( |
| (value) => (value as core.List) |
| .map( |
| (value) => McfDataRows.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| ) |
| .toList(), |
| sampleSize: json_['sampleSize'] as core.String?, |
| sampleSpace: json_['sampleSpace'] as core.String?, |
| selfLink: json_['selfLink'] as core.String?, |
| totalResults: json_['totalResults'] as core.int?, |
| totalsForAllResults: |
| (json_['totalsForAllResults'] |
| as core.Map<core.String, core.dynamic>?) |
| ?.map((key, value) => core.MapEntry(key, value as core.String)), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final columnHeaders = this.columnHeaders; |
| final containsSampledData = this.containsSampledData; |
| final id = this.id; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final profileInfo = this.profileInfo; |
| final query = this.query; |
| final rows = this.rows; |
| final sampleSize = this.sampleSize; |
| final sampleSpace = this.sampleSpace; |
| final selfLink = this.selfLink; |
| final totalResults = this.totalResults; |
| final totalsForAllResults = this.totalsForAllResults; |
| return { |
| 'columnHeaders': ?columnHeaders, |
| 'containsSampledData': ?containsSampledData, |
| 'id': ?id, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'profileInfo': ?profileInfo, |
| 'query': ?query, |
| 'rows': ?rows, |
| 'sampleSize': ?sampleSize, |
| 'sampleSpace': ?sampleSpace, |
| 'selfLink': ?selfLink, |
| 'totalResults': ?totalResults, |
| 'totalsForAllResults': ?totalsForAllResults, |
| }; |
| } |
| } |
| |
| /// Child link for this view (profile). |
| /// |
| /// Points to the list of goals for this view (profile). |
| class ProfileChildLink { |
| /// Link to the list of goals for this view (profile). |
| core.String? href; |
| |
| /// Value is "analytics#goals". |
| core.String? type; |
| |
| ProfileChildLink({this.href, this.type}); |
| |
| ProfileChildLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| /// Parent link for this view (profile). |
| /// |
| /// Points to the web property to which this view (profile) belongs. |
| class ProfileParentLink { |
| /// Link to the web property to which this view (profile) belongs. |
| core.String? href; |
| |
| /// Value is "analytics#webproperty". |
| core.String? type; |
| |
| ProfileParentLink({this.href, this.type}); |
| |
| ProfileParentLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| /// Permissions the user has for this view (profile). |
| class ProfilePermissions { |
| /// All the permissions that the user has for this view (profile). |
| /// |
| /// These include any implied permissions (e.g., EDIT implies VIEW) or |
| /// inherited permissions from the parent web property. |
| core.List<core.String>? effective; |
| |
| ProfilePermissions({this.effective}); |
| |
| ProfilePermissions.fromJson(core.Map json_) |
| : this( |
| effective: (json_['effective'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final effective = this.effective; |
| return {'effective': ?effective}; |
| } |
| } |
| |
| /// JSON template for an Analytics view (profile). |
| class Profile { |
| /// Account ID to which this view (profile) belongs. |
| core.String? accountId; |
| |
| /// Indicates whether bot filtering is enabled for this view (profile). |
| core.bool? botFilteringEnabled; |
| |
| /// Child link for this view (profile). |
| /// |
| /// Points to the list of goals for this view (profile). |
| ProfileChildLink? childLink; |
| |
| /// Time this view (profile) was created. |
| core.DateTime? created; |
| |
| /// The currency type associated with this view (profile), defaults to USD. |
| /// |
| /// The supported values are: |
| /// USD, JPY, EUR, GBP, AUD, KRW, BRL, CNY, DKK, RUB, SEK, NOK, PLN, TRY, TWD, |
| /// HKD, THB, IDR, ARS, MXN, VND, PHP, INR, CHF, CAD, CZK, NZD, HUF, BGN, LTL, |
| /// ZAR, UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD, |
| /// SAR, SGD, VEF, LVL |
| core.String? currency; |
| |
| /// Default page for this view (profile). |
| core.String? defaultPage; |
| |
| /// Indicates whether ecommerce tracking is enabled for this view (profile). |
| core.bool? eCommerceTracking; |
| |
| /// Indicates whether enhanced ecommerce tracking is enabled for this view |
| /// (profile). |
| /// |
| /// This property can only be enabled if ecommerce tracking is enabled. |
| core.bool? enhancedECommerceTracking; |
| |
| /// The query parameters that are excluded from this view (profile). |
| core.String? excludeQueryParameters; |
| |
| /// View (Profile) ID. |
| core.String? id; |
| |
| /// Internal ID for the web property to which this view (profile) belongs. |
| core.String? internalWebPropertyId; |
| |
| /// Resource type for Analytics view (profile). |
| core.String? kind; |
| |
| /// Name of this view (profile). |
| core.String? name; |
| |
| /// Parent link for this view (profile). |
| /// |
| /// Points to the web property to which this view (profile) belongs. |
| ProfileParentLink? parentLink; |
| |
| /// Permissions the user has for this view (profile). |
| ProfilePermissions? permissions; |
| |
| /// Link for this view (profile). |
| core.String? selfLink; |
| |
| /// Site search category parameters for this view (profile). |
| core.String? siteSearchCategoryParameters; |
| |
| /// The site search query parameters for this view (profile). |
| core.String? siteSearchQueryParameters; |
| |
| /// Indicates whether this view (profile) is starred or not. |
| core.bool? starred; |
| |
| /// Whether or not Analytics will strip search category parameters from the |
| /// URLs in your reports. |
| core.bool? stripSiteSearchCategoryParameters; |
| |
| /// Whether or not Analytics will strip search query parameters from the URLs |
| /// in your reports. |
| core.bool? stripSiteSearchQueryParameters; |
| |
| /// Time zone for which this view (profile) has been configured. |
| /// |
| /// Time zones are identified by strings from the TZ database. |
| core.String? timezone; |
| |
| /// View (Profile) type. |
| /// |
| /// Supported types: WEB or APP. |
| core.String? type; |
| |
| /// Time this view (profile) was last modified. |
| core.DateTime? updated; |
| |
| /// Web property ID of the form UA-XXXXX-YY to which this view (profile) |
| /// belongs. |
| core.String? webPropertyId; |
| |
| /// Website URL for this view (profile). |
| core.String? websiteUrl; |
| |
| Profile({ |
| this.accountId, |
| this.botFilteringEnabled, |
| this.childLink, |
| this.created, |
| this.currency, |
| this.defaultPage, |
| this.eCommerceTracking, |
| this.enhancedECommerceTracking, |
| this.excludeQueryParameters, |
| this.id, |
| this.internalWebPropertyId, |
| this.kind, |
| this.name, |
| this.parentLink, |
| this.permissions, |
| this.selfLink, |
| this.siteSearchCategoryParameters, |
| this.siteSearchQueryParameters, |
| this.starred, |
| this.stripSiteSearchCategoryParameters, |
| this.stripSiteSearchQueryParameters, |
| this.timezone, |
| this.type, |
| this.updated, |
| this.webPropertyId, |
| this.websiteUrl, |
| }); |
| |
| Profile.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| botFilteringEnabled: json_['botFilteringEnabled'] as core.bool?, |
| childLink: json_.containsKey('childLink') |
| ? ProfileChildLink.fromJson( |
| json_['childLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| currency: json_['currency'] as core.String?, |
| defaultPage: json_['defaultPage'] as core.String?, |
| eCommerceTracking: json_['eCommerceTracking'] as core.bool?, |
| enhancedECommerceTracking: |
| json_['enhancedECommerceTracking'] as core.bool?, |
| excludeQueryParameters: json_['excludeQueryParameters'] as core.String?, |
| id: json_['id'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| parentLink: json_.containsKey('parentLink') |
| ? ProfileParentLink.fromJson( |
| json_['parentLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| permissions: json_.containsKey('permissions') |
| ? ProfilePermissions.fromJson( |
| json_['permissions'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| selfLink: json_['selfLink'] as core.String?, |
| siteSearchCategoryParameters: |
| json_['siteSearchCategoryParameters'] as core.String?, |
| siteSearchQueryParameters: |
| json_['siteSearchQueryParameters'] as core.String?, |
| starred: json_['starred'] as core.bool?, |
| stripSiteSearchCategoryParameters: |
| json_['stripSiteSearchCategoryParameters'] as core.bool?, |
| stripSiteSearchQueryParameters: |
| json_['stripSiteSearchQueryParameters'] as core.bool?, |
| timezone: json_['timezone'] as core.String?, |
| type: json_['type'] as core.String?, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| websiteUrl: json_['websiteUrl'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final botFilteringEnabled = this.botFilteringEnabled; |
| final childLink = this.childLink; |
| final created = this.created; |
| final currency = this.currency; |
| final defaultPage = this.defaultPage; |
| final eCommerceTracking = this.eCommerceTracking; |
| final enhancedECommerceTracking = this.enhancedECommerceTracking; |
| final excludeQueryParameters = this.excludeQueryParameters; |
| final id = this.id; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final kind = this.kind; |
| final name = this.name; |
| final parentLink = this.parentLink; |
| final permissions = this.permissions; |
| final selfLink = this.selfLink; |
| final siteSearchCategoryParameters = this.siteSearchCategoryParameters; |
| final siteSearchQueryParameters = this.siteSearchQueryParameters; |
| final starred = this.starred; |
| final stripSiteSearchCategoryParameters = |
| this.stripSiteSearchCategoryParameters; |
| final stripSiteSearchQueryParameters = this.stripSiteSearchQueryParameters; |
| final timezone = this.timezone; |
| final type = this.type; |
| final updated = this.updated; |
| final webPropertyId = this.webPropertyId; |
| final websiteUrl = this.websiteUrl; |
| return { |
| 'accountId': ?accountId, |
| 'botFilteringEnabled': ?botFilteringEnabled, |
| 'childLink': ?childLink, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'currency': ?currency, |
| 'defaultPage': ?defaultPage, |
| 'eCommerceTracking': ?eCommerceTracking, |
| 'enhancedECommerceTracking': ?enhancedECommerceTracking, |
| 'excludeQueryParameters': ?excludeQueryParameters, |
| 'id': ?id, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'kind': ?kind, |
| 'name': ?name, |
| 'parentLink': ?parentLink, |
| 'permissions': ?permissions, |
| 'selfLink': ?selfLink, |
| 'siteSearchCategoryParameters': ?siteSearchCategoryParameters, |
| 'siteSearchQueryParameters': ?siteSearchQueryParameters, |
| 'starred': ?starred, |
| 'stripSiteSearchCategoryParameters': ?stripSiteSearchCategoryParameters, |
| 'stripSiteSearchQueryParameters': ?stripSiteSearchQueryParameters, |
| 'timezone': ?timezone, |
| 'type': ?type, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| 'webPropertyId': ?webPropertyId, |
| 'websiteUrl': ?websiteUrl, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics profile filter link. |
| class ProfileFilterLink { |
| /// Filter for this link. |
| FilterRef? filterRef; |
| |
| /// Profile filter link ID. |
| core.String? id; |
| |
| /// Resource type for Analytics filter. |
| core.String? kind; |
| |
| /// View (Profile) for this link. |
| ProfileRef? profileRef; |
| |
| /// The rank of this profile filter link relative to the other filters linked |
| /// to the same profile. |
| /// For readonly (i.e., list and get) operations, the rank always starts at 1. |
| /// For write (i.e., create, update, or delete) operations, you may specify a |
| /// value between 0 and 255 inclusively, \[0, 255\]. |
| /// |
| /// In order to insert a link at the end of the list, either don't specify a |
| /// rank or set a rank to a number greater than the largest rank in the list. |
| /// In order to insert a link to the beginning of the list specify a rank that |
| /// is less than or equal to 1. The new link will move all existing filters |
| /// with the same or lower rank down the list. After the link is |
| /// inserted/updated/deleted all profile filter links will be renumbered |
| /// starting at 1. |
| core.int? rank; |
| |
| /// Link for this profile filter link. |
| core.String? selfLink; |
| |
| ProfileFilterLink({ |
| this.filterRef, |
| this.id, |
| this.kind, |
| this.profileRef, |
| this.rank, |
| this.selfLink, |
| }); |
| |
| ProfileFilterLink.fromJson(core.Map json_) |
| : this( |
| filterRef: json_.containsKey('filterRef') |
| ? FilterRef.fromJson( |
| json_['filterRef'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| profileRef: json_.containsKey('profileRef') |
| ? ProfileRef.fromJson( |
| json_['profileRef'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| rank: json_['rank'] as core.int?, |
| selfLink: json_['selfLink'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final filterRef = this.filterRef; |
| final id = this.id; |
| final kind = this.kind; |
| final profileRef = this.profileRef; |
| final rank = this.rank; |
| final selfLink = this.selfLink; |
| return { |
| 'filterRef': ?filterRef, |
| 'id': ?id, |
| 'kind': ?kind, |
| 'profileRef': ?profileRef, |
| 'rank': ?rank, |
| 'selfLink': ?selfLink, |
| }; |
| } |
| } |
| |
| /// A profile filter link collection lists profile filter links between profiles |
| /// and filters. |
| /// |
| /// Each resource in the collection corresponds to a profile filter link. |
| class ProfileFilterLinks { |
| /// A list of profile filter links. |
| core.List<ProfileFilterLink>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1,000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this profile filter link collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this profile filter link collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| ProfileFilterLinks({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| ProfileFilterLinks.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => ProfileFilterLink.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// JSON template for a linked view (profile). |
| class ProfileRef { |
| /// Account ID to which this view (profile) belongs. |
| core.String? accountId; |
| |
| /// Link for this view (profile). |
| core.String? href; |
| |
| /// View (Profile) ID. |
| core.String? id; |
| |
| /// Internal ID for the web property to which this view (profile) belongs. |
| core.String? internalWebPropertyId; |
| |
| /// Analytics view (profile) reference. |
| core.String? kind; |
| |
| /// Name of this view (profile). |
| core.String? name; |
| |
| /// Web property ID of the form UA-XXXXX-YY to which this view (profile) |
| /// belongs. |
| core.String? webPropertyId; |
| |
| ProfileRef({ |
| this.accountId, |
| this.href, |
| this.id, |
| this.internalWebPropertyId, |
| this.kind, |
| this.name, |
| this.webPropertyId, |
| }); |
| |
| ProfileRef.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| href: json_['href'] as core.String?, |
| id: json_['id'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final href = this.href; |
| final id = this.id; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final kind = this.kind; |
| final name = this.name; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'href': ?href, |
| 'id': ?id, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'kind': ?kind, |
| 'name': ?name, |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics ProfileSummary. |
| /// |
| /// ProfileSummary returns basic information (i.e., summary) for a profile. |
| class ProfileSummary { |
| /// View (profile) ID. |
| core.String? id; |
| |
| /// Resource type for Analytics ProfileSummary. |
| core.String? kind; |
| |
| /// View (profile) name. |
| core.String? name; |
| |
| /// Indicates whether this view (profile) is starred or not. |
| core.bool? starred; |
| |
| /// View (Profile) type. |
| /// |
| /// Supported types: WEB or APP. |
| core.String? type; |
| |
| ProfileSummary({this.id, this.kind, this.name, this.starred, this.type}); |
| |
| ProfileSummary.fromJson(core.Map json_) |
| : this( |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| starred: json_['starred'] as core.bool?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final id = this.id; |
| final kind = this.kind; |
| final name = this.name; |
| final starred = this.starred; |
| final type = this.type; |
| return { |
| 'id': ?id, |
| 'kind': ?kind, |
| 'name': ?name, |
| 'starred': ?starred, |
| 'type': ?type, |
| }; |
| } |
| } |
| |
| /// A view (profile) collection lists Analytics views (profiles) to which the |
| /// user has access. |
| /// |
| /// Each resource in the collection corresponds to a single Analytics view |
| /// (profile). |
| class Profiles { |
| /// A list of views (profiles). |
| core.List<Profile>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this view (profile) collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this view (profile) collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| Profiles({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| Profiles.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => Profile.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| class RealtimeDataColumnHeaders { |
| /// Column Type. |
| /// |
| /// Either DIMENSION or METRIC. |
| core.String? columnType; |
| |
| /// Data type. |
| /// |
| /// Dimension column headers have only STRING as the data type. Metric column |
| /// headers have data types for metric values such as INTEGER, DOUBLE, |
| /// CURRENCY etc. |
| core.String? dataType; |
| |
| /// Column name. |
| core.String? name; |
| |
| RealtimeDataColumnHeaders({this.columnType, this.dataType, this.name}); |
| |
| RealtimeDataColumnHeaders.fromJson(core.Map json_) |
| : this( |
| columnType: json_['columnType'] as core.String?, |
| dataType: json_['dataType'] as core.String?, |
| name: json_['name'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final columnType = this.columnType; |
| final dataType = this.dataType; |
| final name = this.name; |
| return {'columnType': ?columnType, 'dataType': ?dataType, 'name': ?name}; |
| } |
| } |
| |
| /// Information for the view (profile), for which the real time data was |
| /// requested. |
| class RealtimeDataProfileInfo { |
| /// Account ID to which this view (profile) belongs. |
| core.String? accountId; |
| |
| /// Internal ID for the web property to which this view (profile) belongs. |
| core.String? internalWebPropertyId; |
| |
| /// View (Profile) ID. |
| core.String? profileId; |
| |
| /// View (Profile) name. |
| core.String? profileName; |
| |
| /// Table ID for view (profile). |
| core.String? tableId; |
| |
| /// Web Property ID to which this view (profile) belongs. |
| core.String? webPropertyId; |
| |
| RealtimeDataProfileInfo({ |
| this.accountId, |
| this.internalWebPropertyId, |
| this.profileId, |
| this.profileName, |
| this.tableId, |
| this.webPropertyId, |
| }); |
| |
| RealtimeDataProfileInfo.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| profileId: json_['profileId'] as core.String?, |
| profileName: json_['profileName'] as core.String?, |
| tableId: json_['tableId'] as core.String?, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final profileId = this.profileId; |
| final profileName = this.profileName; |
| final tableId = this.tableId; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'profileId': ?profileId, |
| 'profileName': ?profileName, |
| 'tableId': ?tableId, |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// Real time data request query parameters. |
| class RealtimeDataQuery { |
| /// List of real time dimensions. |
| core.String? dimensions; |
| |
| /// Comma-separated list of dimension or metric filters. |
| core.String? filters; |
| |
| /// Unique table ID. |
| core.String? ids; |
| |
| /// Maximum results per page. |
| core.int? maxResults; |
| |
| /// List of real time metrics. |
| core.List<core.String>? metrics; |
| |
| /// List of dimensions or metrics based on which real time data is sorted. |
| core.List<core.String>? sort; |
| |
| RealtimeDataQuery({ |
| this.dimensions, |
| this.filters, |
| this.ids, |
| this.maxResults, |
| this.metrics, |
| this.sort, |
| }); |
| |
| RealtimeDataQuery.fromJson(core.Map json_) |
| : this( |
| dimensions: json_['dimensions'] as core.String?, |
| filters: json_['filters'] as core.String?, |
| ids: json_['ids'] as core.String?, |
| maxResults: json_['max-results'] as core.int?, |
| metrics: (json_['metrics'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| sort: (json_['sort'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final dimensions = this.dimensions; |
| final filters = this.filters; |
| final ids = this.ids; |
| final maxResults = this.maxResults; |
| final metrics = this.metrics; |
| final sort = this.sort; |
| return { |
| 'dimensions': ?dimensions, |
| 'filters': ?filters, |
| 'ids': ?ids, |
| 'max-results': ?maxResults, |
| 'metrics': ?metrics, |
| 'sort': ?sort, |
| }; |
| } |
| } |
| |
| /// Real time data for a given view (profile). |
| class RealtimeData { |
| /// Column headers that list dimension names followed by the metric names. |
| /// |
| /// The order of dimensions and metrics is same as specified in the request. |
| core.List<RealtimeDataColumnHeaders>? columnHeaders; |
| |
| /// Unique ID for this data response. |
| core.String? id; |
| |
| /// Resource type. |
| core.String? kind; |
| |
| /// Information for the view (profile), for which the real time data was |
| /// requested. |
| RealtimeDataProfileInfo? profileInfo; |
| |
| /// Real time data request query parameters. |
| RealtimeDataQuery? query; |
| |
| /// Real time data rows, where each row contains a list of dimension values |
| /// followed by the metric values. |
| /// |
| /// The order of dimensions and metrics is same as specified in the request. |
| core.List<core.List<core.String>>? rows; |
| |
| /// Link to this page. |
| core.String? selfLink; |
| |
| /// The total number of rows for the query, regardless of the number of rows |
| /// in the response. |
| core.int? totalResults; |
| |
| /// Total values for the requested metrics over all the results, not just the |
| /// results returned in this response. |
| /// |
| /// The order of the metric totals is same as the metric order specified in |
| /// the request. |
| core.Map<core.String, core.String>? totalsForAllResults; |
| |
| RealtimeData({ |
| this.columnHeaders, |
| this.id, |
| this.kind, |
| this.profileInfo, |
| this.query, |
| this.rows, |
| this.selfLink, |
| this.totalResults, |
| this.totalsForAllResults, |
| }); |
| |
| RealtimeData.fromJson(core.Map json_) |
| : this( |
| columnHeaders: (json_['columnHeaders'] as core.List?) |
| ?.map( |
| (value) => RealtimeDataColumnHeaders.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| profileInfo: json_.containsKey('profileInfo') |
| ? RealtimeDataProfileInfo.fromJson( |
| json_['profileInfo'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| query: json_.containsKey('query') |
| ? RealtimeDataQuery.fromJson( |
| json_['query'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| rows: (json_['rows'] as core.List?) |
| ?.map( |
| (value) => (value as core.List) |
| .map((value) => value as core.String) |
| .toList(), |
| ) |
| .toList(), |
| selfLink: json_['selfLink'] as core.String?, |
| totalResults: json_['totalResults'] as core.int?, |
| totalsForAllResults: |
| (json_['totalsForAllResults'] |
| as core.Map<core.String, core.dynamic>?) |
| ?.map((key, value) => core.MapEntry(key, value as core.String)), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final columnHeaders = this.columnHeaders; |
| final id = this.id; |
| final kind = this.kind; |
| final profileInfo = this.profileInfo; |
| final query = this.query; |
| final rows = this.rows; |
| final selfLink = this.selfLink; |
| final totalResults = this.totalResults; |
| final totalsForAllResults = this.totalsForAllResults; |
| return { |
| 'columnHeaders': ?columnHeaders, |
| 'id': ?id, |
| 'kind': ?kind, |
| 'profileInfo': ?profileInfo, |
| 'query': ?query, |
| 'rows': ?rows, |
| 'selfLink': ?selfLink, |
| 'totalResults': ?totalResults, |
| 'totalsForAllResults': ?totalsForAllResults, |
| }; |
| } |
| } |
| |
| /// The simple audience definition that will cause a user to be added to an |
| /// audience. |
| class RemarketingAudienceAudienceDefinition { |
| /// Defines the conditions to include users to the audience. |
| IncludeConditions? includeConditions; |
| |
| RemarketingAudienceAudienceDefinition({this.includeConditions}); |
| |
| RemarketingAudienceAudienceDefinition.fromJson(core.Map json_) |
| : this( |
| includeConditions: json_.containsKey('includeConditions') |
| ? IncludeConditions.fromJson( |
| json_['includeConditions'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final includeConditions = this.includeConditions; |
| return {'includeConditions': ?includeConditions}; |
| } |
| } |
| |
| /// Defines the conditions to exclude users from the audience. |
| class RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions { |
| /// Whether to make the exclusion TEMPORARY or PERMANENT. |
| core.String? exclusionDuration; |
| |
| /// The segment condition that will cause a user to be removed from an |
| /// audience. |
| core.String? segment; |
| |
| RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions({ |
| this.exclusionDuration, |
| this.segment, |
| }); |
| |
| RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions.fromJson( |
| core.Map json_, |
| ) : this( |
| exclusionDuration: json_['exclusionDuration'] as core.String?, |
| segment: json_['segment'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final exclusionDuration = this.exclusionDuration; |
| final segment = this.segment; |
| return {'exclusionDuration': ?exclusionDuration, 'segment': ?segment}; |
| } |
| } |
| |
| /// A state based audience definition that will cause a user to be added or |
| /// removed from an audience. |
| class RemarketingAudienceStateBasedAudienceDefinition { |
| /// Defines the conditions to exclude users from the audience. |
| RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions? |
| excludeConditions; |
| |
| /// Defines the conditions to include users to the audience. |
| IncludeConditions? includeConditions; |
| |
| RemarketingAudienceStateBasedAudienceDefinition({ |
| this.excludeConditions, |
| this.includeConditions, |
| }); |
| |
| RemarketingAudienceStateBasedAudienceDefinition.fromJson(core.Map json_) |
| : this( |
| excludeConditions: json_.containsKey('excludeConditions') |
| ? RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions.fromJson( |
| json_['excludeConditions'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| includeConditions: json_.containsKey('includeConditions') |
| ? IncludeConditions.fromJson( |
| json_['includeConditions'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final excludeConditions = this.excludeConditions; |
| final includeConditions = this.includeConditions; |
| return { |
| 'excludeConditions': ?excludeConditions, |
| 'includeConditions': ?includeConditions, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics remarketing audience. |
| class RemarketingAudience { |
| /// Account ID to which this remarketing audience belongs. |
| core.String? accountId; |
| |
| /// The simple audience definition that will cause a user to be added to an |
| /// audience. |
| RemarketingAudienceAudienceDefinition? audienceDefinition; |
| |
| /// The type of audience, either SIMPLE or STATE_BASED. |
| core.String? audienceType; |
| |
| /// Time this remarketing audience was created. |
| core.DateTime? created; |
| |
| /// The description of this remarketing audience. |
| core.String? description; |
| |
| /// Remarketing Audience ID. |
| core.String? id; |
| |
| /// Internal ID for the web property to which this remarketing audience |
| /// belongs. |
| core.String? internalWebPropertyId; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// The linked ad accounts associated with this remarketing audience. |
| /// |
| /// A remarketing audience can have only one linkedAdAccount currently. |
| core.List<LinkedForeignAccount>? linkedAdAccounts; |
| |
| /// The views (profiles) that this remarketing audience is linked to. |
| core.List<core.String>? linkedViews; |
| |
| /// The name of this remarketing audience. |
| core.String? name; |
| |
| /// A state based audience definition that will cause a user to be added or |
| /// removed from an audience. |
| RemarketingAudienceStateBasedAudienceDefinition? stateBasedAudienceDefinition; |
| |
| /// Time this remarketing audience was last modified. |
| core.DateTime? updated; |
| |
| /// Web property ID of the form UA-XXXXX-YY to which this remarketing audience |
| /// belongs. |
| core.String? webPropertyId; |
| |
| RemarketingAudience({ |
| this.accountId, |
| this.audienceDefinition, |
| this.audienceType, |
| this.created, |
| this.description, |
| this.id, |
| this.internalWebPropertyId, |
| this.kind, |
| this.linkedAdAccounts, |
| this.linkedViews, |
| this.name, |
| this.stateBasedAudienceDefinition, |
| this.updated, |
| this.webPropertyId, |
| }); |
| |
| RemarketingAudience.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| audienceDefinition: json_.containsKey('audienceDefinition') |
| ? RemarketingAudienceAudienceDefinition.fromJson( |
| json_['audienceDefinition'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| audienceType: json_['audienceType'] as core.String?, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| description: json_['description'] as core.String?, |
| id: json_['id'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| linkedAdAccounts: (json_['linkedAdAccounts'] as core.List?) |
| ?.map( |
| (value) => LinkedForeignAccount.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| linkedViews: (json_['linkedViews'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| name: json_['name'] as core.String?, |
| stateBasedAudienceDefinition: |
| json_.containsKey('stateBasedAudienceDefinition') |
| ? RemarketingAudienceStateBasedAudienceDefinition.fromJson( |
| json_['stateBasedAudienceDefinition'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final audienceDefinition = this.audienceDefinition; |
| final audienceType = this.audienceType; |
| final created = this.created; |
| final description = this.description; |
| final id = this.id; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final kind = this.kind; |
| final linkedAdAccounts = this.linkedAdAccounts; |
| final linkedViews = this.linkedViews; |
| final name = this.name; |
| final stateBasedAudienceDefinition = this.stateBasedAudienceDefinition; |
| final updated = this.updated; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'audienceDefinition': ?audienceDefinition, |
| 'audienceType': ?audienceType, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'description': ?description, |
| 'id': ?id, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'kind': ?kind, |
| 'linkedAdAccounts': ?linkedAdAccounts, |
| 'linkedViews': ?linkedViews, |
| 'name': ?name, |
| 'stateBasedAudienceDefinition': ?stateBasedAudienceDefinition, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// A remarketing audience collection lists Analytics remarketing audiences to |
| /// which the user has access. |
| /// |
| /// Each resource in the collection corresponds to a single Analytics |
| /// remarketing audience. |
| class RemarketingAudiences { |
| /// A list of remarketing audiences. |
| core.List<RemarketingAudience>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this remarketing audience collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this view (profile) collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| RemarketingAudiences({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| RemarketingAudiences.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => RemarketingAudience.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics segment. |
| class Segment { |
| /// Time the segment was created. |
| core.DateTime? created; |
| |
| /// Segment definition. |
| core.String? definition; |
| |
| /// Segment ID. |
| core.String? id; |
| |
| /// Resource type for Analytics segment. |
| core.String? kind; |
| |
| /// Segment name. |
| core.String? name; |
| |
| /// Segment ID. |
| /// |
| /// Can be used with the 'segment' parameter in Core Reporting API. |
| core.String? segmentId; |
| |
| /// Link for this segment. |
| core.String? selfLink; |
| |
| /// Type for a segment. |
| /// |
| /// Possible values are "BUILT_IN" or "CUSTOM". |
| core.String? type; |
| |
| /// Time the segment was last modified. |
| core.DateTime? updated; |
| |
| Segment({ |
| this.created, |
| this.definition, |
| this.id, |
| this.kind, |
| this.name, |
| this.segmentId, |
| this.selfLink, |
| this.type, |
| this.updated, |
| }); |
| |
| Segment.fromJson(core.Map json_) |
| : this( |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| definition: json_['definition'] as core.String?, |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| segmentId: json_['segmentId'] as core.String?, |
| selfLink: json_['selfLink'] as core.String?, |
| type: json_['type'] as core.String?, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final created = this.created; |
| final definition = this.definition; |
| final id = this.id; |
| final kind = this.kind; |
| final name = this.name; |
| final segmentId = this.segmentId; |
| final selfLink = this.selfLink; |
| final type = this.type; |
| final updated = this.updated; |
| return { |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'definition': ?definition, |
| 'id': ?id, |
| 'kind': ?kind, |
| 'name': ?name, |
| 'segmentId': ?segmentId, |
| 'selfLink': ?selfLink, |
| 'type': ?type, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| }; |
| } |
| } |
| |
| /// An segment collection lists Analytics segments that the user has access to. |
| /// |
| /// Each resource in the collection corresponds to a single Analytics segment. |
| class Segments { |
| /// A list of segments. |
| core.List<Segment>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type for segments. |
| core.String? kind; |
| |
| /// Link to next page for this segment collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this segment collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| Segments({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| Segments.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => Segment.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// Download details for a file stored in Google Cloud Storage. |
| class UnsampledReportCloudStorageDownloadDetails { |
| /// Id of the bucket the file object is stored in. |
| core.String? bucketId; |
| |
| /// Id of the file object containing the report data. |
| core.String? objectId; |
| |
| UnsampledReportCloudStorageDownloadDetails({this.bucketId, this.objectId}); |
| |
| UnsampledReportCloudStorageDownloadDetails.fromJson(core.Map json_) |
| : this( |
| bucketId: json_['bucketId'] as core.String?, |
| objectId: json_['objectId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final bucketId = this.bucketId; |
| final objectId = this.objectId; |
| return {'bucketId': ?bucketId, 'objectId': ?objectId}; |
| } |
| } |
| |
| /// Download details for a file stored in Google Drive. |
| class UnsampledReportDriveDownloadDetails { |
| /// Id of the document/file containing the report data. |
| core.String? documentId; |
| |
| UnsampledReportDriveDownloadDetails({this.documentId}); |
| |
| UnsampledReportDriveDownloadDetails.fromJson(core.Map json_) |
| : this(documentId: json_['documentId'] as core.String?); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final documentId = this.documentId; |
| return {'documentId': ?documentId}; |
| } |
| } |
| |
| /// JSON template for Analytics unsampled report resource. |
| class UnsampledReport { |
| /// Account ID to which this unsampled report belongs. |
| core.String? accountId; |
| |
| /// Download details for a file stored in Google Cloud Storage. |
| UnsampledReportCloudStorageDownloadDetails? cloudStorageDownloadDetails; |
| |
| /// Time this unsampled report was created. |
| core.DateTime? created; |
| |
| /// The dimensions for the unsampled report. |
| core.String? dimensions; |
| |
| /// The type of download you need to use for the report data file. |
| /// |
| /// Possible values include `GOOGLE_DRIVE` and `GOOGLE_CLOUD_STORAGE`. If the |
| /// value is `GOOGLE_DRIVE`, see the `driveDownloadDetails` field. If the |
| /// value is `GOOGLE_CLOUD_STORAGE`, see the `cloudStorageDownloadDetails` |
| /// field. |
| core.String? downloadType; |
| |
| /// Download details for a file stored in Google Drive. |
| UnsampledReportDriveDownloadDetails? driveDownloadDetails; |
| |
| /// The end date for the unsampled report. |
| core.String? endDate; |
| |
| /// The filters for the unsampled report. |
| core.String? filters; |
| |
| /// Unsampled report ID. |
| core.String? id; |
| |
| /// Resource type for an Analytics unsampled report. |
| core.String? kind; |
| |
| /// The metrics for the unsampled report. |
| core.String? metrics; |
| |
| /// View (Profile) ID to which this unsampled report belongs. |
| core.String? profileId; |
| |
| /// The segment for the unsampled report. |
| core.String? segment; |
| |
| /// Link for this unsampled report. |
| core.String? selfLink; |
| |
| /// The start date for the unsampled report. |
| core.String? startDate; |
| |
| /// Status of this unsampled report. |
| /// |
| /// Possible values are PENDING, COMPLETED, or FAILED. |
| core.String? status; |
| |
| /// Title of the unsampled report. |
| core.String? title; |
| |
| /// Time this unsampled report was last modified. |
| core.DateTime? updated; |
| |
| /// Web property ID to which this unsampled report belongs. |
| /// |
| /// The web property ID is of the form UA-XXXXX-YY. |
| core.String? webPropertyId; |
| |
| UnsampledReport({ |
| this.accountId, |
| this.cloudStorageDownloadDetails, |
| this.created, |
| this.dimensions, |
| this.downloadType, |
| this.driveDownloadDetails, |
| this.endDate, |
| this.filters, |
| this.id, |
| this.kind, |
| this.metrics, |
| this.profileId, |
| this.segment, |
| this.selfLink, |
| this.startDate, |
| this.status, |
| this.title, |
| this.updated, |
| this.webPropertyId, |
| }); |
| |
| UnsampledReport.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| cloudStorageDownloadDetails: |
| json_.containsKey('cloudStorageDownloadDetails') |
| ? UnsampledReportCloudStorageDownloadDetails.fromJson( |
| json_['cloudStorageDownloadDetails'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| dimensions: json_['dimensions'] as core.String?, |
| downloadType: json_['downloadType'] as core.String?, |
| driveDownloadDetails: json_.containsKey('driveDownloadDetails') |
| ? UnsampledReportDriveDownloadDetails.fromJson( |
| json_['driveDownloadDetails'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| endDate: json_['end-date'] as core.String?, |
| filters: json_['filters'] as core.String?, |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| metrics: json_['metrics'] as core.String?, |
| profileId: json_['profileId'] as core.String?, |
| segment: json_['segment'] as core.String?, |
| selfLink: json_['selfLink'] as core.String?, |
| startDate: json_['start-date'] as core.String?, |
| status: json_['status'] as core.String?, |
| title: json_['title'] as core.String?, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final cloudStorageDownloadDetails = this.cloudStorageDownloadDetails; |
| final created = this.created; |
| final dimensions = this.dimensions; |
| final downloadType = this.downloadType; |
| final driveDownloadDetails = this.driveDownloadDetails; |
| final endDate = this.endDate; |
| final filters = this.filters; |
| final id = this.id; |
| final kind = this.kind; |
| final metrics = this.metrics; |
| final profileId = this.profileId; |
| final segment = this.segment; |
| final selfLink = this.selfLink; |
| final startDate = this.startDate; |
| final status = this.status; |
| final title = this.title; |
| final updated = this.updated; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'accountId': ?accountId, |
| 'cloudStorageDownloadDetails': ?cloudStorageDownloadDetails, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'dimensions': ?dimensions, |
| 'downloadType': ?downloadType, |
| 'driveDownloadDetails': ?driveDownloadDetails, |
| 'end-date': ?endDate, |
| 'filters': ?filters, |
| 'id': ?id, |
| 'kind': ?kind, |
| 'metrics': ?metrics, |
| 'profileId': ?profileId, |
| 'segment': ?segment, |
| 'selfLink': ?selfLink, |
| 'start-date': ?startDate, |
| 'status': ?status, |
| 'title': ?title, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// An unsampled report collection lists Analytics unsampled reports to which |
| /// the user has access. |
| /// |
| /// Each view (profile) can have a set of unsampled reports. Each resource in |
| /// the unsampled report collection corresponds to a single Analytics unsampled |
| /// report. |
| class UnsampledReports { |
| /// A list of unsampled reports. |
| core.List<UnsampledReport>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this unsampled report collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this unsampled report collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// resources in the result. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| UnsampledReports({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| UnsampledReports.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => UnsampledReport.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// Metadata returned for an upload operation. |
| class Upload { |
| /// Account Id to which this upload belongs. |
| core.String? accountId; |
| |
| /// Custom data source Id to which this data import belongs. |
| core.String? customDataSourceId; |
| |
| /// Data import errors collection. |
| core.List<core.String>? errors; |
| |
| /// A unique ID for this upload. |
| core.String? id; |
| |
| /// Resource type for Analytics upload. |
| core.String? kind; |
| |
| /// Upload status. |
| /// |
| /// Possible values: PENDING, COMPLETED, FAILED, DELETING, DELETED. |
| core.String? status; |
| |
| /// Time this file is uploaded. |
| core.DateTime? uploadTime; |
| |
| Upload({ |
| this.accountId, |
| this.customDataSourceId, |
| this.errors, |
| this.id, |
| this.kind, |
| this.status, |
| this.uploadTime, |
| }); |
| |
| Upload.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| customDataSourceId: json_['customDataSourceId'] as core.String?, |
| errors: (json_['errors'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| status: json_['status'] as core.String?, |
| uploadTime: json_.containsKey('uploadTime') |
| ? core.DateTime.parse(json_['uploadTime'] as core.String) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final customDataSourceId = this.customDataSourceId; |
| final errors = this.errors; |
| final id = this.id; |
| final kind = this.kind; |
| final status = this.status; |
| final uploadTime = this.uploadTime; |
| return { |
| 'accountId': ?accountId, |
| 'customDataSourceId': ?customDataSourceId, |
| 'errors': ?errors, |
| 'id': ?id, |
| 'kind': ?kind, |
| 'status': ?status, |
| 'uploadTime': ?uploadTime?.toUtc().toIso8601String(), |
| }; |
| } |
| } |
| |
| /// Upload collection lists Analytics uploads to which the user has access. |
| /// |
| /// Each custom data source can have a set of uploads. Each resource in the |
| /// upload collection corresponds to a single Analytics data upload. |
| class Uploads { |
| /// A list of uploads. |
| core.List<Upload>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this upload collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this upload collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// resources in the result. |
| core.int? totalResults; |
| |
| Uploads({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| }); |
| |
| Uploads.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => |
| Upload.fromJson(value as core.Map<core.String, core.dynamic>), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| }; |
| } |
| } |
| |
| /// User ID. |
| class UserDeletionRequestId { |
| /// Type of user |
| core.String? type; |
| |
| /// The User's id |
| core.String? userId; |
| |
| UserDeletionRequestId({this.type, this.userId}); |
| |
| UserDeletionRequestId.fromJson(core.Map json_) |
| : this( |
| type: json_['type'] as core.String?, |
| userId: json_['userId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final type = this.type; |
| final userId = this.userId; |
| return {'type': ?type, 'userId': ?userId}; |
| } |
| } |
| |
| /// JSON template for a user deletion request resource. |
| class UserDeletionRequest { |
| /// This marks the point in time for which all user data before should be |
| /// deleted |
| core.DateTime? deletionRequestTime; |
| |
| /// Firebase Project Id |
| core.String? firebaseProjectId; |
| |
| /// User ID. |
| UserDeletionRequestId? id; |
| |
| /// Value is "analytics#userDeletionRequest". |
| core.String? kind; |
| |
| /// Property ID |
| core.String? propertyId; |
| |
| /// Web property ID of the form UA-XXXXX-YY. |
| core.String? webPropertyId; |
| |
| UserDeletionRequest({ |
| this.deletionRequestTime, |
| this.firebaseProjectId, |
| this.id, |
| this.kind, |
| this.propertyId, |
| this.webPropertyId, |
| }); |
| |
| UserDeletionRequest.fromJson(core.Map json_) |
| : this( |
| deletionRequestTime: json_.containsKey('deletionRequestTime') |
| ? core.DateTime.parse(json_['deletionRequestTime'] as core.String) |
| : null, |
| firebaseProjectId: json_['firebaseProjectId'] as core.String?, |
| id: json_.containsKey('id') |
| ? UserDeletionRequestId.fromJson( |
| json_['id'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| kind: json_['kind'] as core.String?, |
| propertyId: json_['propertyId'] as core.String?, |
| webPropertyId: json_['webPropertyId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final deletionRequestTime = this.deletionRequestTime; |
| final firebaseProjectId = this.firebaseProjectId; |
| final id = this.id; |
| final kind = this.kind; |
| final propertyId = this.propertyId; |
| final webPropertyId = this.webPropertyId; |
| return { |
| 'deletionRequestTime': ?deletionRequestTime?.toUtc().toIso8601String(), |
| 'firebaseProjectId': ?firebaseProjectId, |
| 'id': ?id, |
| 'kind': ?kind, |
| 'propertyId': ?propertyId, |
| 'webPropertyId': ?webPropertyId, |
| }; |
| } |
| } |
| |
| /// JSON template for a user reference. |
| class UserRef { |
| /// Email ID of this user. |
| core.String? email; |
| |
| /// User ID. |
| core.String? id; |
| core.String? kind; |
| |
| UserRef({this.email, this.id, this.kind}); |
| |
| UserRef.fromJson(core.Map json_) |
| : this( |
| email: json_['email'] as core.String?, |
| id: json_['id'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final email = this.email; |
| final id = this.id; |
| final kind = this.kind; |
| return {'email': ?email, 'id': ?id, 'kind': ?kind}; |
| } |
| } |
| |
| /// JSON template for a web property reference. |
| class WebPropertyRef { |
| /// Account ID to which this web property belongs. |
| core.String? accountId; |
| |
| /// Link for this web property. |
| core.String? href; |
| |
| /// Web property ID of the form UA-XXXXX-YY. |
| core.String? id; |
| |
| /// Internal ID for this web property. |
| core.String? internalWebPropertyId; |
| |
| /// Analytics web property reference. |
| core.String? kind; |
| |
| /// Name of this web property. |
| core.String? name; |
| |
| WebPropertyRef({ |
| this.accountId, |
| this.href, |
| this.id, |
| this.internalWebPropertyId, |
| this.kind, |
| this.name, |
| }); |
| |
| WebPropertyRef.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| href: json_['href'] as core.String?, |
| id: json_['id'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| name: json_['name'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final href = this.href; |
| final id = this.id; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final kind = this.kind; |
| final name = this.name; |
| return { |
| 'accountId': ?accountId, |
| 'href': ?href, |
| 'id': ?id, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'kind': ?kind, |
| 'name': ?name, |
| }; |
| } |
| } |
| |
| /// JSON template for an Analytics WebPropertySummary. |
| /// |
| /// WebPropertySummary returns basic information (i.e., summary) for a web |
| /// property. |
| class WebPropertySummary { |
| /// Web property ID of the form UA-XXXXX-YY. |
| core.String? id; |
| |
| /// Internal ID for this web property. |
| core.String? internalWebPropertyId; |
| |
| /// Resource type for Analytics WebPropertySummary. |
| core.String? kind; |
| |
| /// Level for this web property. |
| /// |
| /// Possible values are STANDARD or PREMIUM. |
| core.String? level; |
| |
| /// Web property name. |
| core.String? name; |
| |
| /// List of profiles under this web property. |
| core.List<ProfileSummary>? profiles; |
| |
| /// Indicates whether this web property is starred or not. |
| core.bool? starred; |
| |
| /// Website url for this web property. |
| core.String? websiteUrl; |
| |
| WebPropertySummary({ |
| this.id, |
| this.internalWebPropertyId, |
| this.kind, |
| this.level, |
| this.name, |
| this.profiles, |
| this.starred, |
| this.websiteUrl, |
| }); |
| |
| WebPropertySummary.fromJson(core.Map json_) |
| : this( |
| id: json_['id'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| level: json_['level'] as core.String?, |
| name: json_['name'] as core.String?, |
| profiles: (json_['profiles'] as core.List?) |
| ?.map( |
| (value) => ProfileSummary.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| starred: json_['starred'] as core.bool?, |
| websiteUrl: json_['websiteUrl'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final id = this.id; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final kind = this.kind; |
| final level = this.level; |
| final name = this.name; |
| final profiles = this.profiles; |
| final starred = this.starred; |
| final websiteUrl = this.websiteUrl; |
| return { |
| 'id': ?id, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'kind': ?kind, |
| 'level': ?level, |
| 'name': ?name, |
| 'profiles': ?profiles, |
| 'starred': ?starred, |
| 'websiteUrl': ?websiteUrl, |
| }; |
| } |
| } |
| |
| /// A web property collection lists Analytics web properties to which the user |
| /// has access. |
| /// |
| /// Each resource in the collection corresponds to a single Analytics web |
| /// property. |
| class Webproperties { |
| /// A list of web properties. |
| core.List<Webproperty>? items; |
| |
| /// The maximum number of resources the response can contain, regardless of |
| /// the actual number of resources returned. |
| /// |
| /// Its value ranges from 1 to 1000 with a value of 1000 by default, or |
| /// otherwise specified by the max-results query parameter. |
| core.int? itemsPerPage; |
| |
| /// Collection type. |
| core.String? kind; |
| |
| /// Link to next page for this web property collection. |
| core.String? nextLink; |
| |
| /// Link to previous page for this web property collection. |
| core.String? previousLink; |
| |
| /// The starting index of the resources, which is 1 by default or otherwise |
| /// specified by the start-index query parameter. |
| core.int? startIndex; |
| |
| /// The total number of results for the query, regardless of the number of |
| /// results in the response. |
| core.int? totalResults; |
| |
| /// Email ID of the authenticated user |
| core.String? username; |
| |
| Webproperties({ |
| this.items, |
| this.itemsPerPage, |
| this.kind, |
| this.nextLink, |
| this.previousLink, |
| this.startIndex, |
| this.totalResults, |
| this.username, |
| }); |
| |
| Webproperties.fromJson(core.Map json_) |
| : this( |
| items: (json_['items'] as core.List?) |
| ?.map( |
| (value) => Webproperty.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| itemsPerPage: json_['itemsPerPage'] as core.int?, |
| kind: json_['kind'] as core.String?, |
| nextLink: json_['nextLink'] as core.String?, |
| previousLink: json_['previousLink'] as core.String?, |
| startIndex: json_['startIndex'] as core.int?, |
| totalResults: json_['totalResults'] as core.int?, |
| username: json_['username'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final items = this.items; |
| final itemsPerPage = this.itemsPerPage; |
| final kind = this.kind; |
| final nextLink = this.nextLink; |
| final previousLink = this.previousLink; |
| final startIndex = this.startIndex; |
| final totalResults = this.totalResults; |
| final username = this.username; |
| return { |
| 'items': ?items, |
| 'itemsPerPage': ?itemsPerPage, |
| 'kind': ?kind, |
| 'nextLink': ?nextLink, |
| 'previousLink': ?previousLink, |
| 'startIndex': ?startIndex, |
| 'totalResults': ?totalResults, |
| 'username': ?username, |
| }; |
| } |
| } |
| |
| /// Child link for this web property. |
| /// |
| /// Points to the list of views (profiles) for this web property. |
| class WebpropertyChildLink { |
| /// Link to the list of views (profiles) for this web property. |
| core.String? href; |
| |
| /// Type of the parent link. |
| /// |
| /// Its value is "analytics#profiles". |
| core.String? type; |
| |
| WebpropertyChildLink({this.href, this.type}); |
| |
| WebpropertyChildLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| /// Parent link for this web property. |
| /// |
| /// Points to the account to which this web property belongs. |
| class WebpropertyParentLink { |
| /// Link to the account for this web property. |
| core.String? href; |
| |
| /// Type of the parent link. |
| /// |
| /// Its value is "analytics#account". |
| core.String? type; |
| |
| WebpropertyParentLink({this.href, this.type}); |
| |
| WebpropertyParentLink.fromJson(core.Map json_) |
| : this( |
| href: json_['href'] as core.String?, |
| type: json_['type'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final href = this.href; |
| final type = this.type; |
| return {'href': ?href, 'type': ?type}; |
| } |
| } |
| |
| /// Permissions the user has for this web property. |
| class WebpropertyPermissions { |
| /// All the permissions that the user has for this web property. |
| /// |
| /// These include any implied permissions (e.g., EDIT implies VIEW) or |
| /// inherited permissions from the parent account. |
| core.List<core.String>? effective; |
| |
| WebpropertyPermissions({this.effective}); |
| |
| WebpropertyPermissions.fromJson(core.Map json_) |
| : this( |
| effective: (json_['effective'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final effective = this.effective; |
| return {'effective': ?effective}; |
| } |
| } |
| |
| /// JSON template for an Analytics web property. |
| class Webproperty { |
| /// Account ID to which this web property belongs. |
| core.String? accountId; |
| |
| /// Child link for this web property. |
| /// |
| /// Points to the list of views (profiles) for this web property. |
| WebpropertyChildLink? childLink; |
| |
| /// Time this web property was created. |
| core.DateTime? created; |
| |
| /// Set to true to reset the retention period of the user identifier with each |
| /// new event from that user (thus setting the expiration date to current time |
| /// plus retention period). |
| /// Set to false to delete data associated with the user identifier |
| /// automatically after the rentention period. |
| /// This property cannot be set on insert. |
| core.bool? dataRetentionResetOnNewActivity; |
| |
| /// The length of time for which user and event data is retained. |
| /// This property cannot be set on insert. |
| core.String? dataRetentionTtl; |
| |
| /// Default view (profile) ID. |
| core.String? defaultProfileId; |
| |
| /// Web property ID of the form UA-XXXXX-YY. |
| core.String? id; |
| |
| /// The industry vertical/category selected for this web property. |
| core.String? industryVertical; |
| |
| /// Internal ID for this web property. |
| core.String? internalWebPropertyId; |
| |
| /// Resource type for Analytics WebProperty. |
| core.String? kind; |
| |
| /// Level for this web property. |
| /// |
| /// Possible values are STANDARD or PREMIUM. |
| core.String? level; |
| |
| /// Name of this web property. |
| core.String? name; |
| |
| /// Parent link for this web property. |
| /// |
| /// Points to the account to which this web property belongs. |
| WebpropertyParentLink? parentLink; |
| |
| /// Permissions the user has for this web property. |
| WebpropertyPermissions? permissions; |
| |
| /// View (Profile) count for this web property. |
| core.int? profileCount; |
| |
| /// Link for this web property. |
| core.String? selfLink; |
| |
| /// Indicates whether this web property is starred or not. |
| core.bool? starred; |
| |
| /// Time this web property was last modified. |
| core.DateTime? updated; |
| |
| /// Website url for this web property. |
| core.String? websiteUrl; |
| |
| Webproperty({ |
| this.accountId, |
| this.childLink, |
| this.created, |
| this.dataRetentionResetOnNewActivity, |
| this.dataRetentionTtl, |
| this.defaultProfileId, |
| this.id, |
| this.industryVertical, |
| this.internalWebPropertyId, |
| this.kind, |
| this.level, |
| this.name, |
| this.parentLink, |
| this.permissions, |
| this.profileCount, |
| this.selfLink, |
| this.starred, |
| this.updated, |
| this.websiteUrl, |
| }); |
| |
| Webproperty.fromJson(core.Map json_) |
| : this( |
| accountId: json_['accountId'] as core.String?, |
| childLink: json_.containsKey('childLink') |
| ? WebpropertyChildLink.fromJson( |
| json_['childLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| created: json_.containsKey('created') |
| ? core.DateTime.parse(json_['created'] as core.String) |
| : null, |
| dataRetentionResetOnNewActivity: |
| json_['dataRetentionResetOnNewActivity'] as core.bool?, |
| dataRetentionTtl: json_['dataRetentionTtl'] as core.String?, |
| defaultProfileId: json_['defaultProfileId'] as core.String?, |
| id: json_['id'] as core.String?, |
| industryVertical: json_['industryVertical'] as core.String?, |
| internalWebPropertyId: json_['internalWebPropertyId'] as core.String?, |
| kind: json_['kind'] as core.String?, |
| level: json_['level'] as core.String?, |
| name: json_['name'] as core.String?, |
| parentLink: json_.containsKey('parentLink') |
| ? WebpropertyParentLink.fromJson( |
| json_['parentLink'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| permissions: json_.containsKey('permissions') |
| ? WebpropertyPermissions.fromJson( |
| json_['permissions'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| profileCount: json_['profileCount'] as core.int?, |
| selfLink: json_['selfLink'] as core.String?, |
| starred: json_['starred'] as core.bool?, |
| updated: json_.containsKey('updated') |
| ? core.DateTime.parse(json_['updated'] as core.String) |
| : null, |
| websiteUrl: json_['websiteUrl'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final accountId = this.accountId; |
| final childLink = this.childLink; |
| final created = this.created; |
| final dataRetentionResetOnNewActivity = |
| this.dataRetentionResetOnNewActivity; |
| final dataRetentionTtl = this.dataRetentionTtl; |
| final defaultProfileId = this.defaultProfileId; |
| final id = this.id; |
| final industryVertical = this.industryVertical; |
| final internalWebPropertyId = this.internalWebPropertyId; |
| final kind = this.kind; |
| final level = this.level; |
| final name = this.name; |
| final parentLink = this.parentLink; |
| final permissions = this.permissions; |
| final profileCount = this.profileCount; |
| final selfLink = this.selfLink; |
| final starred = this.starred; |
| final updated = this.updated; |
| final websiteUrl = this.websiteUrl; |
| return { |
| 'accountId': ?accountId, |
| 'childLink': ?childLink, |
| 'created': ?created?.toUtc().toIso8601String(), |
| 'dataRetentionResetOnNewActivity': ?dataRetentionResetOnNewActivity, |
| 'dataRetentionTtl': ?dataRetentionTtl, |
| 'defaultProfileId': ?defaultProfileId, |
| 'id': ?id, |
| 'industryVertical': ?industryVertical, |
| 'internalWebPropertyId': ?internalWebPropertyId, |
| 'kind': ?kind, |
| 'level': ?level, |
| 'name': ?name, |
| 'parentLink': ?parentLink, |
| 'permissions': ?permissions, |
| 'profileCount': ?profileCount, |
| 'selfLink': ?selfLink, |
| 'starred': ?starred, |
| 'updated': ?updated?.toUtc().toIso8601String(), |
| 'websiteUrl': ?websiteUrl, |
| }; |
| } |
| } |