@@ -364,6 +364,132 @@ instance ToJSON GaDataQuery where
364 ("segment" .=) <$> _gdqSegment,
364 ("segment" .=) <$> _gdqSegment,
365 ("start-date" .=) <$> _gdqStartDate])
365 ("start-date" .=) <$> _gdqStartDate])
367+-- | A remarketing audience collection lists Analytics remarketing audiences
368+-- to which the user has access. Each resource in the collection
369+-- corresponds to a single Analytics remarketing audience.
371+-- /See:/ 'remarketingAudiences' smart constructor.
372+data RemarketingAudiences = RemarketingAudiences'
373+ { _raNextLink :: !(Maybe Text)
374+ , _raItemsPerPage :: !(Maybe (Textual Int32))
376+ , _raUsername :: !(Maybe Text)
377+ , _raItems :: !(Maybe [RemarketingAudience])
378+ , _raTotalResults :: !(Maybe (Textual Int32))
379+ , _raStartIndex :: !(Maybe (Textual Int32))
380+ , _raPreviousLink :: !(Maybe Text)
381+ } deriving (Eq,Show,Data,Typeable,Generic)
383+-- | Creates a value of 'RemarketingAudiences' with the minimum fields required to make a request.
385+-- Use one of the following lenses to modify other fields as desired:
389+-- * 'raItemsPerPage'
397+-- * 'raTotalResults'
401+-- * 'raPreviousLink'
403+ :: RemarketingAudiences
404+remarketingAudiences =
405+ RemarketingAudiences'
406+ { _raNextLink = Nothing
407+ , _raItemsPerPage = Nothing
408+ , _raKind = "analytics#remarketingAudiences"
409+ , _raUsername = Nothing
410+ , _raItems = Nothing
411+ , _raTotalResults = Nothing
412+ , _raStartIndex = Nothing
413+ , _raPreviousLink = Nothing
416+-- | Link to next page for this remarketing audience collection.
417+raNextLink :: Lens' RemarketingAudiences (Maybe Text)
419+ = lens _raNextLink (\ s a -> s{_raNextLink = a})
421+-- | The maximum number of resources the response can contain, regardless of
422+-- the actual number of resources returned. Its value ranges from 1 to 1000
423+-- with a value of 1000 by default, or otherwise specified by the
424+-- max-results query parameter.
425+raItemsPerPage :: Lens' RemarketingAudiences (Maybe Int32)
427+ = lens _raItemsPerPage
428+ (\ s a -> s{_raItemsPerPage = a})
431+-- | Collection type.
432+raKind :: Lens' RemarketingAudiences Text
433+raKind = lens _raKind (\ s a -> s{_raKind = a})
435+-- | Email ID of the authenticated user
436+raUsername :: Lens' RemarketingAudiences (Maybe Text)
438+ = lens _raUsername (\ s a -> s{_raUsername = a})
440+-- | A list of remarketing audiences.
441+raItems :: Lens' RemarketingAudiences [RemarketingAudience]
443+ = lens _raItems (\ s a -> s{_raItems = a}) . _Default
446+-- | The total number of results for the query, regardless of the number of
447+-- results in the response.
448+raTotalResults :: Lens' RemarketingAudiences (Maybe Int32)
450+ = lens _raTotalResults
451+ (\ s a -> s{_raTotalResults = a})
454+-- | The starting index of the resources, which is 1 by default or otherwise
455+-- specified by the start-index query parameter.
456+raStartIndex :: Lens' RemarketingAudiences (Maybe Int32)
458+ = lens _raStartIndex (\ s a -> s{_raStartIndex = a})
461+-- | Link to previous page for this view (profile) collection.
462+raPreviousLink :: Lens' RemarketingAudiences (Maybe Text)
464+ = lens _raPreviousLink
465+ (\ s a -> s{_raPreviousLink = a})
467+instance FromJSON RemarketingAudiences where
469+ = withObject "RemarketingAudiences"
471+ RemarketingAudiences' <$>
472+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
473+ (o .:? "kind" .!= "analytics#remarketingAudiences")
474+ <*> (o .:? "username")
475+ <*> (o .:? "items" .!= mempty)
476+ <*> (o .:? "totalResults")
477+ <*> (o .:? "startIndex")
478+ <*> (o .:? "previousLink"))
480+instance ToJSON RemarketingAudiences where
481+ toJSON RemarketingAudiences'{..}
484+ [("nextLink" .=) <$> _raNextLink,
485+ ("itemsPerPage" .=) <$> _raItemsPerPage,
486+ Just ("kind" .= _raKind),
487+ ("username" .=) <$> _raUsername,
488+ ("items" .=) <$> _raItems,
489+ ("totalResults" .=) <$> _raTotalResults,
490+ ("startIndex" .=) <$> _raStartIndex,
491+ ("previousLink" .=) <$> _raPreviousLink])
368-- /See:/ 'gaDataDataTableRowsItem' smart constructor.
494-- /See:/ 'gaDataDataTableRowsItem' smart constructor.
369newtype GaDataDataTableRowsItem = GaDataDataTableRowsItem'
495newtype GaDataDataTableRowsItem = GaDataDataTableRowsItem'
@@ -488,7 +614,11 @@ unSampledReport =
488 , _uStartDate = Nothing
614 , _uStartDate = Nothing
491−-- | The type of download you need to use for the report data file.
617+-- | The type of download you need to use for the report data file. Possible
618+-- values include \`GOOGLE_DRIVE\` and \`GOOGLE_CLOUD_STORAGE\`. If the
619+-- value is \`GOOGLE_DRIVE\`, see the \`driveDownloadDetails\` field. If
620+-- the value is \`GOOGLE_CLOUD_STORAGE\`, see the
621+-- \`cloudStorageDownloadDetails\` field.
492uDownloadType :: Lens' UnSampledReport (Maybe Text)
622uDownloadType :: Lens' UnSampledReport (Maybe Text)
493uDownloadType
623uDownloadType
494 = lens _uDownloadType
624 = lens _uDownloadType
@@ -778,6 +908,201 @@ instance ToJSON ProFileParentLink where
778 [("href" .=) <$> _pfplHref,
908 [("href" .=) <$> _pfplHref,
779 Just ("type" .= _pfplType)])
909 Just ("type" .= _pfplType)])
911+-- | JSON template for an Analytics remarketing audience.
913+-- /See:/ 'remarketingAudience' smart constructor.
914+data RemarketingAudience = RemarketingAudience'
915+ { _rWebPropertyId :: !(Maybe Text)
917+ , _rCreated :: !(Maybe DateTime')
918+ , _rLinkedAdAccounts :: !(Maybe [LinkedForeignAccount])
919+ , _rAudienceDefinition :: !(Maybe RemarketingAudienceAudienceDefinition)
920+ , _rAudienceType :: !(Maybe Text)
921+ , _rAccountId :: !(Maybe Text)
922+ , _rName :: !(Maybe Text)
923+ , _rStateBasedAudienceDefinition :: !(Maybe RemarketingAudienceStateBasedAudienceDefinition)
924+ , _rLinkedViews :: !(Maybe [Text])
925+ , _rInternalWebPropertyId :: !(Maybe Text)
926+ , _rId :: !(Maybe Text)
927+ , _rUpdated :: !(Maybe DateTime')
928+ , _rDescription :: !(Maybe Text)
929+ } deriving (Eq,Show,Data,Typeable,Generic)
931+-- | Creates a value of 'RemarketingAudience' with the minimum fields required to make a request.
933+-- Use one of the following lenses to modify other fields as desired:
935+-- * 'rWebPropertyId'
941+-- * 'rLinkedAdAccounts'
943+-- * 'rAudienceDefinition'
951+-- * 'rStateBasedAudienceDefinition'
955+-- * 'rInternalWebPropertyId'
963+ :: RemarketingAudience
964+remarketingAudience =
965+ RemarketingAudience'
966+ { _rWebPropertyId = Nothing
967+ , _rKind = "analytics#remarketingAudience"
968+ , _rCreated = Nothing
969+ , _rLinkedAdAccounts = Nothing
970+ , _rAudienceDefinition = Nothing
971+ , _rAudienceType = Nothing
972+ , _rAccountId = Nothing
974+ , _rStateBasedAudienceDefinition = Nothing
975+ , _rLinkedViews = Nothing
976+ , _rInternalWebPropertyId = Nothing
978+ , _rUpdated = Nothing
979+ , _rDescription = Nothing
982+-- | Web property ID of the form UA-XXXXX-YY to which this remarketing
984+rWebPropertyId :: Lens' RemarketingAudience (Maybe Text)
986+ = lens _rWebPropertyId
987+ (\ s a -> s{_rWebPropertyId = a})
989+-- | Collection type.
990+rKind :: Lens' RemarketingAudience Text
991+rKind = lens _rKind (\ s a -> s{_rKind = a})
993+-- | Time this remarketing audience was created.
994+rCreated :: Lens' RemarketingAudience (Maybe UTCTime)
996+ = lens _rCreated (\ s a -> s{_rCreated = a}) .
999+-- | The linked ad accounts associated with this remarketing audience. A
1000+-- remarketing audience can have only one linkedAdAccount currently.
1001+rLinkedAdAccounts :: Lens' RemarketingAudience [LinkedForeignAccount]
1003+ = lens _rLinkedAdAccounts
1004+ (\ s a -> s{_rLinkedAdAccounts = a})
1008+-- | The simple audience definition that will cause a user to be added to an
1010+rAudienceDefinition :: Lens' RemarketingAudience (Maybe RemarketingAudienceAudienceDefinition)
1012+ = lens _rAudienceDefinition
1013+ (\ s a -> s{_rAudienceDefinition = a})
1015+-- | The type of audience, either SIMPLE or STATE_BASED.
1016+rAudienceType :: Lens' RemarketingAudience (Maybe Text)
1018+ = lens _rAudienceType
1019+ (\ s a -> s{_rAudienceType = a})
1021+-- | Account ID to which this remarketing audience belongs.
1022+rAccountId :: Lens' RemarketingAudience (Maybe Text)
1024+ = lens _rAccountId (\ s a -> s{_rAccountId = a})
1026+-- | The name of this remarketing audience.
1027+rName :: Lens' RemarketingAudience (Maybe Text)
1028+rName = lens _rName (\ s a -> s{_rName = a})
1030+-- | A state based audience definition that will cause a user to be added or
1031+-- removed from an audience.
1032+rStateBasedAudienceDefinition :: Lens' RemarketingAudience (Maybe RemarketingAudienceStateBasedAudienceDefinition)
1033+rStateBasedAudienceDefinition
1034+ = lens _rStateBasedAudienceDefinition
1035+ (\ s a -> s{_rStateBasedAudienceDefinition = a})
1037+-- | The views (profiles) that this remarketing audience is linked to.
1038+rLinkedViews :: Lens' RemarketingAudience [Text]
1040+ = lens _rLinkedViews (\ s a -> s{_rLinkedViews = a})
1044+-- | Internal ID for the web property to which this remarketing audience
1046+rInternalWebPropertyId :: Lens' RemarketingAudience (Maybe Text)
1047+rInternalWebPropertyId
1048+ = lens _rInternalWebPropertyId
1049+ (\ s a -> s{_rInternalWebPropertyId = a})
1051+-- | Remarketing Audience ID.
1052+rId :: Lens' RemarketingAudience (Maybe Text)
1053+rId = lens _rId (\ s a -> s{_rId = a})
1055+-- | Time this remarketing audience was last modified.
1056+rUpdated :: Lens' RemarketingAudience (Maybe UTCTime)
1058+ = lens _rUpdated (\ s a -> s{_rUpdated = a}) .
1061+-- | The description of this remarketing audience.
1062+rDescription :: Lens' RemarketingAudience (Maybe Text)
1064+ = lens _rDescription (\ s a -> s{_rDescription = a})
1066+instance FromJSON RemarketingAudience where
1068+ = withObject "RemarketingAudience"
1070+ RemarketingAudience' <$>
1071+ (o .:? "webPropertyId") <*>
1072+ (o .:? "kind" .!= "analytics#remarketingAudience")
1073+ <*> (o .:? "created")
1074+ <*> (o .:? "linkedAdAccounts" .!= mempty)
1075+ <*> (o .:? "audienceDefinition")
1076+ <*> (o .:? "audienceType")
1077+ <*> (o .:? "accountId")
1079+ <*> (o .:? "stateBasedAudienceDefinition")
1080+ <*> (o .:? "linkedViews" .!= mempty)
1081+ <*> (o .:? "internalWebPropertyId")
1083+ <*> (o .:? "updated")
1084+ <*> (o .:? "description"))
1086+instance ToJSON RemarketingAudience where
1087+ toJSON RemarketingAudience'{..}
1090+ [("webPropertyId" .=) <$> _rWebPropertyId,
1091+ Just ("kind" .= _rKind),
1092+ ("created" .=) <$> _rCreated,
1093+ ("linkedAdAccounts" .=) <$> _rLinkedAdAccounts,
1094+ ("audienceDefinition" .=) <$> _rAudienceDefinition,
1095+ ("audienceType" .=) <$> _rAudienceType,
1096+ ("accountId" .=) <$> _rAccountId,
1097+ ("name" .=) <$> _rName,
1098+ ("stateBasedAudienceDefinition" .=) <$>
1099+ _rStateBasedAudienceDefinition,
1100+ ("linkedViews" .=) <$> _rLinkedViews,
1101+ ("internalWebPropertyId" .=) <$>
1102+ _rInternalWebPropertyId,
1103+ ("id" .=) <$> _rId, ("updated" .=) <$> _rUpdated,
1104+ ("description" .=) <$> _rDescription])
782-- /See:/ 'gaDataDataTableRowsItemCItem' smart constructor.
1107-- /See:/ 'gaDataDataTableRowsItemCItem' smart constructor.
783newtype GaDataDataTableRowsItemCItem = GaDataDataTableRowsItemCItem'
1108newtype GaDataDataTableRowsItemCItem = GaDataDataTableRowsItemCItem'
@@ -3016,9 +3341,10 @@ pName :: Lens' ProFile (Maybe Text)
3016pName = lens _pName (\ s a -> s{_pName = a})
3341pName = lens _pName (\ s a -> s{_pName = a})
3018-- | The currency type associated with this view (profile), defaults to USD.
3343-- | The currency type associated with this view (profile), defaults to USD.
3019−-- The supported values are: ARS, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK,
3344+-- The supported values are: USD, JPY, EUR, GBP, AUD, KRW, BRL, CNY, DKK,
3020−-- EUR, GBP, HKD, HUF, IDR, INR, JPY, KRW, LTL, MXN, NOK, NZD, PHP, PLN,
3345+-- RUB, SEK, NOK, PLN, TRY, TWD, HKD, THB, IDR, ARS, MXN, VND, PHP, INR,
3021−-- RUB, SEK, THB, TRY, TWD, USD, VND, ZAR
3346+-- CHF, CAD, CZK, NZD, HUF, BGN, LTL, ZAR, UAH, AED, BOB, CLP, COP, EGP,
3347+-- HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD, SAR, SGD, VEF, LVL
3022pCurrency :: Lens' ProFile (Maybe Text)
3348pCurrency :: Lens' ProFile (Maybe Text)
3023pCurrency
3349pCurrency
3024 = lens _pCurrency (\ s a -> s{_pCurrency = a})
3350 = lens _pCurrency (\ s a -> s{_pCurrency = a})
@@ -3594,6 +3920,7 @@ data GaData = GaData'
3594 , _gdColumnHeaders :: !(Maybe [GaDataColumnHeadersItem])
3920 , _gdColumnHeaders :: !(Maybe [GaDataColumnHeadersItem])
3595 , _gdId :: !(Maybe Text)
3921 , _gdId :: !(Maybe Text)
3596 , _gdTotalResults :: !(Maybe (Textual Int32))
3922 , _gdTotalResults :: !(Maybe (Textual Int32))
3923+ , _gdDataLastRefreshed :: !(Maybe (Textual Int64))
3597 , _gdDataTable :: !(Maybe GaDataDataTable)
3924 , _gdDataTable :: !(Maybe GaDataDataTable)
3598 , _gdContainsSampledData :: !(Maybe Bool)
3925 , _gdContainsSampledData :: !(Maybe Bool)
3599 , _gdTotalsForAllResults :: !(Maybe GaDataTotalsForAllResults)
3926 , _gdTotalsForAllResults :: !(Maybe GaDataTotalsForAllResults)
@@ -3628,6 +3955,8 @@ data GaData = GaData'
3629-- * 'gdTotalResults'
3956-- * 'gdTotalResults'
3958+-- * 'gdDataLastRefreshed'
3631-- * 'gdDataTable'
3960-- * 'gdDataTable'
3633-- * 'gdContainsSampledData'
3962-- * 'gdContainsSampledData'
@@ -3651,6 +3980,7 @@ gaData =
3651 , _gdColumnHeaders = Nothing
3980 , _gdColumnHeaders = Nothing
3652 , _gdId = Nothing
3981 , _gdId = Nothing
3653 , _gdTotalResults = Nothing
3982 , _gdTotalResults = Nothing
3983+ , _gdDataLastRefreshed = Nothing
3654 , _gdDataTable = Nothing
3984 , _gdDataTable = Nothing
3655 , _gdContainsSampledData = Nothing
3985 , _gdContainsSampledData = Nothing
3656 , _gdTotalsForAllResults = Nothing
3986 , _gdTotalsForAllResults = Nothing
@@ -3734,6 +4064,13 @@ gdTotalResults
3734 (\ s a -> s{_gdTotalResults = a})
4064 (\ s a -> s{_gdTotalResults = a})
3735 . mapping _Coerce
4065 . mapping _Coerce
4067+-- | The last refreshed time in seconds for Analytics data.
4068+gdDataLastRefreshed :: Lens' GaData (Maybe Int64)
4070+ = lens _gdDataLastRefreshed
4071+ (\ s a -> s{_gdDataLastRefreshed = a})
3737gdDataTable :: Lens' GaData (Maybe GaDataDataTable)
4074gdDataTable :: Lens' GaData (Maybe GaDataDataTable)
3738gdDataTable
4075gdDataTable
3739 = lens _gdDataTable (\ s a -> s{_gdDataTable = a})
4076 = lens _gdDataTable (\ s a -> s{_gdDataTable = a})
@@ -3774,6 +4111,7 @@ instance FromJSON GaData where
3774 <*> (o .:? "columnHeaders" .!= mempty)
4111 <*> (o .:? "columnHeaders" .!= mempty)
3775 <*> (o .:? "id")
4112 <*> (o .:? "id")
3776 <*> (o .:? "totalResults")
4113 <*> (o .:? "totalResults")
4114+ <*> (o .:? "dataLastRefreshed")
3777 <*> (o .:? "dataTable")
4115 <*> (o .:? "dataTable")
3778 <*> (o .:? "containsSampledData")
4116 <*> (o .:? "containsSampledData")
3779 <*> (o .:? "totalsForAllResults")
4117 <*> (o .:? "totalsForAllResults")
@@ -3795,6 +4133,7 @@ instance ToJSON GaData where
3795 ("columnHeaders" .=) <$> _gdColumnHeaders,
4133 ("columnHeaders" .=) <$> _gdColumnHeaders,
3796 ("id" .=) <$> _gdId,
4134 ("id" .=) <$> _gdId,
3797 ("totalResults" .=) <$> _gdTotalResults,
4135 ("totalResults" .=) <$> _gdTotalResults,
4136+ ("dataLastRefreshed" .=) <$> _gdDataLastRefreshed,
3798 ("dataTable" .=) <$> _gdDataTable,
4137 ("dataTable" .=) <$> _gdDataTable,
3799 ("containsSampledData" .=) <$>
4138 ("containsSampledData" .=) <$>
3800 _gdContainsSampledData,
4139 _gdContainsSampledData,
@@ -4122,6 +4461,147 @@ instance ToJSON WebPropertyRef where
4122 _wprInternalWebPropertyId,
4461 _wprInternalWebPropertyId,
4123 ("id" .=) <$> _wprId])
4462 ("id" .=) <$> _wprId])
4464+-- | JSON template for an Analytics Remarketing Audience Foreign Link.
4466+-- /See:/ 'linkedForeignAccount' smart constructor.
4467+data LinkedForeignAccount = LinkedForeignAccount'
4468+ { _lfaStatus :: !(Maybe Text)
4469+ , _lfaWebPropertyId :: !(Maybe Text)
4470+ , _lfaKind :: !Text
4471+ , _lfaEligibleForSearch :: !(Maybe Bool)
4472+ , _lfaAccountId :: !(Maybe Text)
4473+ , _lfaRemarketingAudienceId :: !(Maybe Text)
4474+ , _lfaLinkedAccountId :: !(Maybe Text)
4475+ , _lfaInternalWebPropertyId :: !(Maybe Text)
4476+ , _lfaId :: !(Maybe Text)
4477+ , _lfaType :: !(Maybe Text)
4478+ } deriving (Eq,Show,Data,Typeable,Generic)
4480+-- | Creates a value of 'LinkedForeignAccount' with the minimum fields required to make a request.
4482+-- Use one of the following lenses to modify other fields as desired:
4486+-- * 'lfaWebPropertyId'
4490+-- * 'lfaEligibleForSearch'
4494+-- * 'lfaRemarketingAudienceId'
4496+-- * 'lfaLinkedAccountId'
4498+-- * 'lfaInternalWebPropertyId'
4503+linkedForeignAccount
4504+ :: LinkedForeignAccount
4505+linkedForeignAccount =
4506+ LinkedForeignAccount'
4507+ { _lfaStatus = Nothing
4508+ , _lfaWebPropertyId = Nothing
4509+ , _lfaKind = "analytics#linkedForeignAccount"
4510+ , _lfaEligibleForSearch = Nothing
4511+ , _lfaAccountId = Nothing
4512+ , _lfaRemarketingAudienceId = Nothing
4513+ , _lfaLinkedAccountId = Nothing
4514+ , _lfaInternalWebPropertyId = Nothing
4516+ , _lfaType = Nothing
4519+-- | The status of this foreign account link.
4520+lfaStatus :: Lens' LinkedForeignAccount (Maybe Text)
4522+ = lens _lfaStatus (\ s a -> s{_lfaStatus = a})
4524+-- | Web property ID of the form UA-XXXXX-YY to which this linked foreign
4526+lfaWebPropertyId :: Lens' LinkedForeignAccount (Maybe Text)
4528+ = lens _lfaWebPropertyId
4529+ (\ s a -> s{_lfaWebPropertyId = a})
4531+-- | Resource type for linked foreign account.
4532+lfaKind :: Lens' LinkedForeignAccount Text
4533+lfaKind = lens _lfaKind (\ s a -> s{_lfaKind = a})
4535+-- | Boolean indicating whether this is eligible for search.
4536+lfaEligibleForSearch :: Lens' LinkedForeignAccount (Maybe Bool)
4537+lfaEligibleForSearch
4538+ = lens _lfaEligibleForSearch
4539+ (\ s a -> s{_lfaEligibleForSearch = a})
4541+-- | Account ID to which this linked foreign account belongs.
4542+lfaAccountId :: Lens' LinkedForeignAccount (Maybe Text)
4544+ = lens _lfaAccountId (\ s a -> s{_lfaAccountId = a})
4546+-- | Remarketing audience ID to which this linked foreign account belongs.
4547+lfaRemarketingAudienceId :: Lens' LinkedForeignAccount (Maybe Text)
4548+lfaRemarketingAudienceId
4549+ = lens _lfaRemarketingAudienceId
4550+ (\ s a -> s{_lfaRemarketingAudienceId = a})
4552+-- | The foreign account ID. For example the an AdWords \`linkedAccountId\`
4553+-- has the following format XXX-XXX-XXXX.
4554+lfaLinkedAccountId :: Lens' LinkedForeignAccount (Maybe Text)
4556+ = lens _lfaLinkedAccountId
4557+ (\ s a -> s{_lfaLinkedAccountId = a})
4559+-- | Internal ID for the web property to which this linked foreign account
4561+lfaInternalWebPropertyId :: Lens' LinkedForeignAccount (Maybe Text)
4562+lfaInternalWebPropertyId
4563+ = lens _lfaInternalWebPropertyId
4564+ (\ s a -> s{_lfaInternalWebPropertyId = a})
4566+-- | Entity ad account link ID.
4567+lfaId :: Lens' LinkedForeignAccount (Maybe Text)
4568+lfaId = lens _lfaId (\ s a -> s{_lfaId = a})
4570+-- | The type of the foreign account. For example \`ADWORDS_LINKS\`.
4571+lfaType :: Lens' LinkedForeignAccount (Maybe Text)
4572+lfaType = lens _lfaType (\ s a -> s{_lfaType = a})
4574+instance FromJSON LinkedForeignAccount where
4576+ = withObject "LinkedForeignAccount"
4578+ LinkedForeignAccount' <$>
4579+ (o .:? "status") <*> (o .:? "webPropertyId") <*>
4580+ (o .:? "kind" .!= "analytics#linkedForeignAccount")
4581+ <*> (o .:? "eligibleForSearch")
4582+ <*> (o .:? "accountId")
4583+ <*> (o .:? "remarketingAudienceId")
4584+ <*> (o .:? "linkedAccountId")
4585+ <*> (o .:? "internalWebPropertyId")
4587+ <*> (o .:? "type"))
4589+instance ToJSON LinkedForeignAccount where
4590+ toJSON LinkedForeignAccount'{..}
4593+ [("status" .=) <$> _lfaStatus,
4594+ ("webPropertyId" .=) <$> _lfaWebPropertyId,
4595+ Just ("kind" .= _lfaKind),
4596+ ("eligibleForSearch" .=) <$> _lfaEligibleForSearch,
4597+ ("accountId" .=) <$> _lfaAccountId,
4598+ ("remarketingAudienceId" .=) <$>
4599+ _lfaRemarketingAudienceId,
4600+ ("linkedAccountId" .=) <$> _lfaLinkedAccountId,
4601+ ("internalWebPropertyId" .=) <$>
4602+ _lfaInternalWebPropertyId,
4603+ ("id" .=) <$> _lfaId, ("type" .=) <$> _lfaType])
4125-- | A goal collection lists Analytics goals to which the user has access.
4605-- | A goal collection lists Analytics goals to which the user has access.
4126-- Each view (profile) can have a set of goals. Each resource in the Goal
4606-- Each view (profile) can have a set of goals. Each resource in the Goal
4127-- collection corresponds to a single Analytics goal.
4607-- collection corresponds to a single Analytics goal.
@@ -5778,6 +6258,98 @@ instance ToJSON CustomDataSourceChildLink where
5778 [("href" .=) <$> _cdsclHref,
6258 [("href" .=) <$> _cdsclHref,
5779 ("type" .=) <$> _cdsclType])
6259 ("type" .=) <$> _cdsclType])
6261+-- | JSON template for an Analytics Remarketing Include Conditions.
6263+-- /See:/ 'includeConditions' smart constructor.
6264+data IncludeConditions = IncludeConditions'
6266+ , _icDaysToLookBack :: !(Maybe (Textual Int32))
6267+ , _icMembershipDurationDays :: !(Maybe (Textual Int32))
6268+ , _icSegment :: !(Maybe Text)
6269+ , _icIsSmartList :: !(Maybe Bool)
6270+ } deriving (Eq,Show,Data,Typeable,Generic)
6272+-- | Creates a value of 'IncludeConditions' with the minimum fields required to make a request.
6274+-- Use one of the following lenses to modify other fields as desired:
6278+-- * 'icDaysToLookBack'
6280+-- * 'icMembershipDurationDays'
6284+-- * 'icIsSmartList'
6286+ :: IncludeConditions
6289+ { _icKind = "analytics#includeConditions"
6290+ , _icDaysToLookBack = Nothing
6291+ , _icMembershipDurationDays = Nothing
6292+ , _icSegment = Nothing
6293+ , _icIsSmartList = Nothing
6296+-- | Resource type for include conditions.
6297+icKind :: Lens' IncludeConditions Text
6298+icKind = lens _icKind (\ s a -> s{_icKind = a})
6300+-- | The look-back window lets you specify a time frame for evaluating the
6301+-- behavior that qualifies users for your audience. For example, if your
6302+-- filters include users from Central Asia, and Transactions Greater than
6303+-- 2, and you set the look-back window to 14 days, then any user from
6304+-- Central Asia whose cumulative transactions exceed 2 during the last 14
6305+-- days is added to the audience.
6306+icDaysToLookBack :: Lens' IncludeConditions (Maybe Int32)
6308+ = lens _icDaysToLookBack
6309+ (\ s a -> s{_icDaysToLookBack = a})
6312+-- | Number of days (in the range 1 to 540) a user remains in the audience.
6313+icMembershipDurationDays :: Lens' IncludeConditions (Maybe Int32)
6314+icMembershipDurationDays
6315+ = lens _icMembershipDurationDays
6316+ (\ s a -> s{_icMembershipDurationDays = a})
6319+-- | The segment condition that will cause a user to be added to an audience.
6320+icSegment :: Lens' IncludeConditions (Maybe Text)
6322+ = lens _icSegment (\ s a -> s{_icSegment = a})
6324+-- | Boolean indicating whether this segment is a smart list.
6325+-- https:\/\/support.google.com\/analytics\/answer\/4628577
6326+icIsSmartList :: Lens' IncludeConditions (Maybe Bool)
6328+ = lens _icIsSmartList
6329+ (\ s a -> s{_icIsSmartList = a})
6331+instance FromJSON IncludeConditions where
6333+ = withObject "IncludeConditions"
6335+ IncludeConditions' <$>
6336+ (o .:? "kind" .!= "analytics#includeConditions") <*>
6337+ (o .:? "daysToLookBack")
6338+ <*> (o .:? "membershipDurationDays")
6339+ <*> (o .:? "segment")
6340+ <*> (o .:? "isSmartList"))
6342+instance ToJSON IncludeConditions where
6343+ toJSON IncludeConditions'{..}
6346+ [Just ("kind" .= _icKind),
6347+ ("daysToLookBack" .=) <$> _icDaysToLookBack,
6348+ ("membershipDurationDays" .=) <$>
6349+ _icMembershipDurationDays,
6350+ ("segment" .=) <$> _icSegment,
6351+ ("isSmartList" .=) <$> _icIsSmartList])
5781-- | Parent link for this filter. Points to the account to which this filter
6353-- | Parent link for this filter. Points to the account to which this filter
5782-- belongs.
6354-- belongs.
@@ -8212,6 +8784,63 @@ instance ToJSON EntityAdWordsLinkEntity where
8212 (catMaybes
8784 (catMaybes
8213 [("webPropertyRef" .=) <$> _eawleWebPropertyRef])
8785 [("webPropertyRef" .=) <$> _eawleWebPropertyRef])
8787+-- | A state based audience definition that will cause a user to be added or
8788+-- removed from an audience.
8790+-- /See:/ 'remarketingAudienceStateBasedAudienceDefinition' smart constructor.
8791+data RemarketingAudienceStateBasedAudienceDefinition = RemarketingAudienceStateBasedAudienceDefinition'
8792+ { _rasbadExcludeConditions :: !(Maybe RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions)
8793+ , _rasbadIncludeConditions :: !(Maybe IncludeConditions)
8794+ } deriving (Eq,Show,Data,Typeable,Generic)
8796+-- | Creates a value of 'RemarketingAudienceStateBasedAudienceDefinition' with the minimum fields required to make a request.
8798+-- Use one of the following lenses to modify other fields as desired:
8800+-- * 'rasbadExcludeConditions'
8802+-- * 'rasbadIncludeConditions'
8803+remarketingAudienceStateBasedAudienceDefinition
8804+ :: RemarketingAudienceStateBasedAudienceDefinition
8805+remarketingAudienceStateBasedAudienceDefinition =
8806+ RemarketingAudienceStateBasedAudienceDefinition'
8807+ { _rasbadExcludeConditions = Nothing
8808+ , _rasbadIncludeConditions = Nothing
8811+-- | Defines the conditions to exclude users from the audience.
8812+rasbadExcludeConditions :: Lens' RemarketingAudienceStateBasedAudienceDefinition (Maybe RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions)
8813+rasbadExcludeConditions
8814+ = lens _rasbadExcludeConditions
8815+ (\ s a -> s{_rasbadExcludeConditions = a})
8817+-- | Defines the conditions to include users to the audience.
8818+rasbadIncludeConditions :: Lens' RemarketingAudienceStateBasedAudienceDefinition (Maybe IncludeConditions)
8819+rasbadIncludeConditions
8820+ = lens _rasbadIncludeConditions
8821+ (\ s a -> s{_rasbadIncludeConditions = a})
8824+ RemarketingAudienceStateBasedAudienceDefinition where
8827+ "RemarketingAudienceStateBasedAudienceDefinition"
8829+ RemarketingAudienceStateBasedAudienceDefinition' <$>
8830+ (o .:? "excludeConditions") <*>
8831+ (o .:? "includeConditions"))
8834+ RemarketingAudienceStateBasedAudienceDefinition where
8836+ RemarketingAudienceStateBasedAudienceDefinition'{..}
8839+ [("excludeConditions" .=) <$>
8840+ _rasbadExcludeConditions,
8841+ ("includeConditions" .=) <$>
8842+ _rasbadIncludeConditions])
8215-- | Details for the goal of the type URL_DESTINATION.
8844-- | Details for the goal of the type URL_DESTINATION.
8217-- /See:/ 'goalURLDestinationDetails' smart constructor.
8846-- /See:/ 'goalURLDestinationDetails' smart constructor.
@@ -9197,6 +9826,48 @@ instance ToJSON Column where
9197 ("attributes" .=) <$> _ccAttributes,
9826 ("attributes" .=) <$> _ccAttributes,
9198 ("id" .=) <$> _ccId])
9827 ("id" .=) <$> _ccId])
9829+-- | The simple audience definition that will cause a user to be added to an
9832+-- /See:/ 'remarketingAudienceAudienceDefinition' smart constructor.
9833+newtype RemarketingAudienceAudienceDefinition = RemarketingAudienceAudienceDefinition'
9834+ { _raadIncludeConditions :: Maybe IncludeConditions
9835+ } deriving (Eq,Show,Data,Typeable,Generic)
9837+-- | Creates a value of 'RemarketingAudienceAudienceDefinition' with the minimum fields required to make a request.
9839+-- Use one of the following lenses to modify other fields as desired:
9841+-- * 'raadIncludeConditions'
9842+remarketingAudienceAudienceDefinition
9843+ :: RemarketingAudienceAudienceDefinition
9844+remarketingAudienceAudienceDefinition =
9845+ RemarketingAudienceAudienceDefinition'
9846+ { _raadIncludeConditions = Nothing
9849+-- | Defines the conditions to include users to the audience.
9850+raadIncludeConditions :: Lens' RemarketingAudienceAudienceDefinition (Maybe IncludeConditions)
9851+raadIncludeConditions
9852+ = lens _raadIncludeConditions
9853+ (\ s a -> s{_raadIncludeConditions = a})
9856+ RemarketingAudienceAudienceDefinition where
9858+ = withObject "RemarketingAudienceAudienceDefinition"
9860+ RemarketingAudienceAudienceDefinition' <$>
9861+ (o .:? "includeConditions"))
9863+instance ToJSON RemarketingAudienceAudienceDefinition
9865+ toJSON RemarketingAudienceAudienceDefinition'{..}
9868+ [("includeConditions" .=) <$>
9869+ _raadIncludeConditions])
9201-- /See:/ 'gaDataDataTableColsItem' smart constructor.
9872-- /See:/ 'gaDataDataTableColsItem' smart constructor.
9202data GaDataDataTableColsItem = GaDataDataTableColsItem'
9873data GaDataDataTableColsItem = GaDataDataTableColsItem'
@@ -9332,6 +10003,64 @@ instance ToJSON ExperimentVariationsItem where
9332 ("weight" .=) <$> _eviWeight, ("url" .=) <$> _eviURL,
10003 ("weight" .=) <$> _eviWeight, ("url" .=) <$> _eviURL,
9333 ("won" .=) <$> _eviWon, ("name" .=) <$> _eviName])
10004 ("won" .=) <$> _eviWon, ("name" .=) <$> _eviName])
10006+-- | Defines the conditions to exclude users from the audience.
10008+-- /See:/ 'remarketingAudienceStateBasedAudienceDefinitionExcludeConditions' smart constructor.
10009+data RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions = RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions'
10010+ { _rasbadecExclusionDuration :: !(Maybe Text)
10011+ , _rasbadecSegment :: !(Maybe Text)
10012+ } deriving (Eq,Show,Data,Typeable,Generic)
10014+-- | Creates a value of 'RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions' with the minimum fields required to make a request.
10016+-- Use one of the following lenses to modify other fields as desired:
10018+-- * 'rasbadecExclusionDuration'
10020+-- * 'rasbadecSegment'
10021+remarketingAudienceStateBasedAudienceDefinitionExcludeConditions
10022+ :: RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
10023+remarketingAudienceStateBasedAudienceDefinitionExcludeConditions =
10024+ RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions'
10025+ { _rasbadecExclusionDuration = Nothing
10026+ , _rasbadecSegment = Nothing
10029+-- | Whether to make the exclusion TEMPORARY or PERMANENT.
10030+rasbadecExclusionDuration :: Lens' RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions (Maybe Text)
10031+rasbadecExclusionDuration
10032+ = lens _rasbadecExclusionDuration
10033+ (\ s a -> s{_rasbadecExclusionDuration = a})
10035+-- | The segment condition that will cause a user to be removed from an
10037+rasbadecSegment :: Lens' RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions (Maybe Text)
10039+ = lens _rasbadecSegment
10040+ (\ s a -> s{_rasbadecSegment = a})
10043+ RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
10047+ "RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions"
10049+ RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions'
10051+ (o .:? "exclusionDuration") <*> (o .:? "segment"))
10054+ RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
10057+ RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions'{..}
10060+ [("exclusionDuration" .=) <$>
10061+ _rasbadecExclusionDuration,
10062+ ("segment" .=) <$> _rasbadecSegment])
9335-- | Total values for the requested metrics over all the results, not just
10064-- | Total values for the requested metrics over all the results, not just
9336-- the results returned in this response. The order of the metric totals is
10065-- the results returned in this response. The order of the metric totals is
9337-- same as the metric order specified in the request.
10066-- same as the metric order specified in the request.