{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Analytics.Types.Product where
import Network.Google.Analytics.Types.Sum
import Network.Google.Prelude
data UserDeletionRequest = UserDeletionRequest'
{ _udrWebPropertyId :: !(Maybe Text)
, _udrKind :: !Text
, _udrId :: !(Maybe UserDeletionRequestId)
, _udrFirebaseProjectId :: !(Maybe Text)
, _udrDeletionRequestTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
userDeletionRequest
:: UserDeletionRequest
userDeletionRequest =
UserDeletionRequest'
{ _udrWebPropertyId = Nothing
, _udrKind = "analytics#userDeletionRequest"
, _udrId = Nothing
, _udrFirebaseProjectId = Nothing
, _udrDeletionRequestTime = Nothing
}
udrWebPropertyId :: Lens' UserDeletionRequest (Maybe Text)
udrWebPropertyId
= lens _udrWebPropertyId
(\ s a -> s{_udrWebPropertyId = a})
udrKind :: Lens' UserDeletionRequest Text
udrKind = lens _udrKind (\ s a -> s{_udrKind = a})
udrId :: Lens' UserDeletionRequest (Maybe UserDeletionRequestId)
udrId = lens _udrId (\ s a -> s{_udrId = a})
udrFirebaseProjectId :: Lens' UserDeletionRequest (Maybe Text)
udrFirebaseProjectId
= lens _udrFirebaseProjectId
(\ s a -> s{_udrFirebaseProjectId = a})
udrDeletionRequestTime :: Lens' UserDeletionRequest (Maybe UTCTime)
udrDeletionRequestTime
= lens _udrDeletionRequestTime
(\ s a -> s{_udrDeletionRequestTime = a})
. mapping _DateTime
instance FromJSON UserDeletionRequest where
parseJSON
= withObject "UserDeletionRequest"
(\ o ->
UserDeletionRequest' <$>
(o .:? "webPropertyId") <*>
(o .:? "kind" .!= "analytics#userDeletionRequest")
<*> (o .:? "id")
<*> (o .:? "firebaseProjectId")
<*> (o .:? "deletionRequestTime"))
instance ToJSON UserDeletionRequest where
toJSON UserDeletionRequest'{..}
= object
(catMaybes
[("webPropertyId" .=) <$> _udrWebPropertyId,
Just ("kind" .= _udrKind), ("id" .=) <$> _udrId,
("firebaseProjectId" .=) <$> _udrFirebaseProjectId,
("deletionRequestTime" .=) <$>
_udrDeletionRequestTime])
data UnSampledReports = UnSampledReports'
{ _usrNextLink :: !(Maybe Text)
, _usrItemsPerPage :: !(Maybe (Textual Int32))
, _usrKind :: !Text
, _usrUsername :: !(Maybe Text)
, _usrItems :: !(Maybe [UnSampledReport])
, _usrTotalResults :: !(Maybe (Textual Int32))
, _usrStartIndex :: !(Maybe (Textual Int32))
, _usrPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
unSampledReports
:: UnSampledReports
unSampledReports =
UnSampledReports'
{ _usrNextLink = Nothing
, _usrItemsPerPage = Nothing
, _usrKind = "analytics#unsampledReports"
, _usrUsername = Nothing
, _usrItems = Nothing
, _usrTotalResults = Nothing
, _usrStartIndex = Nothing
, _usrPreviousLink = Nothing
}
usrNextLink :: Lens' UnSampledReports (Maybe Text)
usrNextLink
= lens _usrNextLink (\ s a -> s{_usrNextLink = a})
usrItemsPerPage :: Lens' UnSampledReports (Maybe Int32)
usrItemsPerPage
= lens _usrItemsPerPage
(\ s a -> s{_usrItemsPerPage = a})
. mapping _Coerce
usrKind :: Lens' UnSampledReports Text
usrKind = lens _usrKind (\ s a -> s{_usrKind = a})
usrUsername :: Lens' UnSampledReports (Maybe Text)
usrUsername
= lens _usrUsername (\ s a -> s{_usrUsername = a})
usrItems :: Lens' UnSampledReports [UnSampledReport]
usrItems
= lens _usrItems (\ s a -> s{_usrItems = a}) .
_Default
. _Coerce
usrTotalResults :: Lens' UnSampledReports (Maybe Int32)
usrTotalResults
= lens _usrTotalResults
(\ s a -> s{_usrTotalResults = a})
. mapping _Coerce
usrStartIndex :: Lens' UnSampledReports (Maybe Int32)
usrStartIndex
= lens _usrStartIndex
(\ s a -> s{_usrStartIndex = a})
. mapping _Coerce
usrPreviousLink :: Lens' UnSampledReports (Maybe Text)
usrPreviousLink
= lens _usrPreviousLink
(\ s a -> s{_usrPreviousLink = a})
instance FromJSON UnSampledReports where
parseJSON
= withObject "UnSampledReports"
(\ o ->
UnSampledReports' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#unsampledReports")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON UnSampledReports where
toJSON UnSampledReports'{..}
= object
(catMaybes
[("nextLink" .=) <$> _usrNextLink,
("itemsPerPage" .=) <$> _usrItemsPerPage,
Just ("kind" .= _usrKind),
("username" .=) <$> _usrUsername,
("items" .=) <$> _usrItems,
("totalResults" .=) <$> _usrTotalResults,
("startIndex" .=) <$> _usrStartIndex,
("previousLink" .=) <$> _usrPreviousLink])
data GoalURLDestinationDetailsStepsItem = GoalURLDestinationDetailsStepsItem'
{ _guddsiURL :: !(Maybe Text)
, _guddsiName :: !(Maybe Text)
, _guddsiNumber :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
goalURLDestinationDetailsStepsItem
:: GoalURLDestinationDetailsStepsItem
goalURLDestinationDetailsStepsItem =
GoalURLDestinationDetailsStepsItem'
{ _guddsiURL = Nothing
, _guddsiName = Nothing
, _guddsiNumber = Nothing
}
guddsiURL :: Lens' GoalURLDestinationDetailsStepsItem (Maybe Text)
guddsiURL
= lens _guddsiURL (\ s a -> s{_guddsiURL = a})
guddsiName :: Lens' GoalURLDestinationDetailsStepsItem (Maybe Text)
guddsiName
= lens _guddsiName (\ s a -> s{_guddsiName = a})
guddsiNumber :: Lens' GoalURLDestinationDetailsStepsItem (Maybe Int32)
guddsiNumber
= lens _guddsiNumber (\ s a -> s{_guddsiNumber = a})
. mapping _Coerce
instance FromJSON GoalURLDestinationDetailsStepsItem
where
parseJSON
= withObject "GoalURLDestinationDetailsStepsItem"
(\ o ->
GoalURLDestinationDetailsStepsItem' <$>
(o .:? "url") <*> (o .:? "name") <*>
(o .:? "number"))
instance ToJSON GoalURLDestinationDetailsStepsItem
where
toJSON GoalURLDestinationDetailsStepsItem'{..}
= object
(catMaybes
[("url" .=) <$> _guddsiURL,
("name" .=) <$> _guddsiName,
("number" .=) <$> _guddsiNumber])
data GaDataQuery = GaDataQuery'
{ _gdqMetrics :: !(Maybe [Text])
, _gdqSamplingLevel :: !(Maybe Text)
, _gdqFilters :: !(Maybe Text)
, _gdqIds :: !(Maybe Text)
, _gdqEndDate :: !(Maybe Text)
, _gdqSort :: !(Maybe [Text])
, _gdqDimensions :: !(Maybe Text)
, _gdqStartIndex :: !(Maybe (Textual Int32))
, _gdqMaxResults :: !(Maybe (Textual Int32))
, _gdqSegment :: !(Maybe Text)
, _gdqStartDate :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
gaDataQuery
:: GaDataQuery
gaDataQuery =
GaDataQuery'
{ _gdqMetrics = Nothing
, _gdqSamplingLevel = Nothing
, _gdqFilters = Nothing
, _gdqIds = Nothing
, _gdqEndDate = Nothing
, _gdqSort = Nothing
, _gdqDimensions = Nothing
, _gdqStartIndex = Nothing
, _gdqMaxResults = Nothing
, _gdqSegment = Nothing
, _gdqStartDate = Nothing
}
gdqMetrics :: Lens' GaDataQuery [Text]
gdqMetrics
= lens _gdqMetrics (\ s a -> s{_gdqMetrics = a}) .
_Default
. _Coerce
gdqSamplingLevel :: Lens' GaDataQuery (Maybe Text)
gdqSamplingLevel
= lens _gdqSamplingLevel
(\ s a -> s{_gdqSamplingLevel = a})
gdqFilters :: Lens' GaDataQuery (Maybe Text)
gdqFilters
= lens _gdqFilters (\ s a -> s{_gdqFilters = a})
gdqIds :: Lens' GaDataQuery (Maybe Text)
gdqIds = lens _gdqIds (\ s a -> s{_gdqIds = a})
gdqEndDate :: Lens' GaDataQuery (Maybe Text)
gdqEndDate
= lens _gdqEndDate (\ s a -> s{_gdqEndDate = a})
gdqSort :: Lens' GaDataQuery [Text]
gdqSort
= lens _gdqSort (\ s a -> s{_gdqSort = a}) . _Default
. _Coerce
gdqDimensions :: Lens' GaDataQuery (Maybe Text)
gdqDimensions
= lens _gdqDimensions
(\ s a -> s{_gdqDimensions = a})
gdqStartIndex :: Lens' GaDataQuery (Maybe Int32)
gdqStartIndex
= lens _gdqStartIndex
(\ s a -> s{_gdqStartIndex = a})
. mapping _Coerce
gdqMaxResults :: Lens' GaDataQuery (Maybe Int32)
gdqMaxResults
= lens _gdqMaxResults
(\ s a -> s{_gdqMaxResults = a})
. mapping _Coerce
gdqSegment :: Lens' GaDataQuery (Maybe Text)
gdqSegment
= lens _gdqSegment (\ s a -> s{_gdqSegment = a})
gdqStartDate :: Lens' GaDataQuery (Maybe Text)
gdqStartDate
= lens _gdqStartDate (\ s a -> s{_gdqStartDate = a})
instance FromJSON GaDataQuery where
parseJSON
= withObject "GaDataQuery"
(\ o ->
GaDataQuery' <$>
(o .:? "metrics" .!= mempty) <*>
(o .:? "samplingLevel")
<*> (o .:? "filters")
<*> (o .:? "ids")
<*> (o .:? "end-date")
<*> (o .:? "sort" .!= mempty)
<*> (o .:? "dimensions")
<*> (o .:? "start-index")
<*> (o .:? "max-results")
<*> (o .:? "segment")
<*> (o .:? "start-date"))
instance ToJSON GaDataQuery where
toJSON GaDataQuery'{..}
= object
(catMaybes
[("metrics" .=) <$> _gdqMetrics,
("samplingLevel" .=) <$> _gdqSamplingLevel,
("filters" .=) <$> _gdqFilters,
("ids" .=) <$> _gdqIds,
("end-date" .=) <$> _gdqEndDate,
("sort" .=) <$> _gdqSort,
("dimensions" .=) <$> _gdqDimensions,
("start-index" .=) <$> _gdqStartIndex,
("max-results" .=) <$> _gdqMaxResults,
("segment" .=) <$> _gdqSegment,
("start-date" .=) <$> _gdqStartDate])
data RemarketingAudiences = RemarketingAudiences'
{ _raNextLink :: !(Maybe Text)
, _raItemsPerPage :: !(Maybe (Textual Int32))
, _raKind :: !Text
, _raUsername :: !(Maybe Text)
, _raItems :: !(Maybe [RemarketingAudience])
, _raTotalResults :: !(Maybe (Textual Int32))
, _raStartIndex :: !(Maybe (Textual Int32))
, _raPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
remarketingAudiences
:: RemarketingAudiences
remarketingAudiences =
RemarketingAudiences'
{ _raNextLink = Nothing
, _raItemsPerPage = Nothing
, _raKind = "analytics#remarketingAudiences"
, _raUsername = Nothing
, _raItems = Nothing
, _raTotalResults = Nothing
, _raStartIndex = Nothing
, _raPreviousLink = Nothing
}
raNextLink :: Lens' RemarketingAudiences (Maybe Text)
raNextLink
= lens _raNextLink (\ s a -> s{_raNextLink = a})
raItemsPerPage :: Lens' RemarketingAudiences (Maybe Int32)
raItemsPerPage
= lens _raItemsPerPage
(\ s a -> s{_raItemsPerPage = a})
. mapping _Coerce
raKind :: Lens' RemarketingAudiences Text
raKind = lens _raKind (\ s a -> s{_raKind = a})
raUsername :: Lens' RemarketingAudiences (Maybe Text)
raUsername
= lens _raUsername (\ s a -> s{_raUsername = a})
raItems :: Lens' RemarketingAudiences [RemarketingAudience]
raItems
= lens _raItems (\ s a -> s{_raItems = a}) . _Default
. _Coerce
raTotalResults :: Lens' RemarketingAudiences (Maybe Int32)
raTotalResults
= lens _raTotalResults
(\ s a -> s{_raTotalResults = a})
. mapping _Coerce
raStartIndex :: Lens' RemarketingAudiences (Maybe Int32)
raStartIndex
= lens _raStartIndex (\ s a -> s{_raStartIndex = a})
. mapping _Coerce
raPreviousLink :: Lens' RemarketingAudiences (Maybe Text)
raPreviousLink
= lens _raPreviousLink
(\ s a -> s{_raPreviousLink = a})
instance FromJSON RemarketingAudiences where
parseJSON
= withObject "RemarketingAudiences"
(\ o ->
RemarketingAudiences' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#remarketingAudiences")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON RemarketingAudiences where
toJSON RemarketingAudiences'{..}
= object
(catMaybes
[("nextLink" .=) <$> _raNextLink,
("itemsPerPage" .=) <$> _raItemsPerPage,
Just ("kind" .= _raKind),
("username" .=) <$> _raUsername,
("items" .=) <$> _raItems,
("totalResults" .=) <$> _raTotalResults,
("startIndex" .=) <$> _raStartIndex,
("previousLink" .=) <$> _raPreviousLink])
newtype GaDataDataTableRowsItem = GaDataDataTableRowsItem'
{ _gddtriC :: Maybe [GaDataDataTableRowsItemCItem]
} deriving (Eq,Show,Data,Typeable,Generic)
gaDataDataTableRowsItem
:: GaDataDataTableRowsItem
gaDataDataTableRowsItem =
GaDataDataTableRowsItem'
{ _gddtriC = Nothing
}
gddtriC :: Lens' GaDataDataTableRowsItem [GaDataDataTableRowsItemCItem]
gddtriC
= lens _gddtriC (\ s a -> s{_gddtriC = a}) . _Default
. _Coerce
instance FromJSON GaDataDataTableRowsItem where
parseJSON
= withObject "GaDataDataTableRowsItem"
(\ o ->
GaDataDataTableRowsItem' <$> (o .:? "c" .!= mempty))
instance ToJSON GaDataDataTableRowsItem where
toJSON GaDataDataTableRowsItem'{..}
= object (catMaybes [("c" .=) <$> _gddtriC])
data UnSampledReport = UnSampledReport'
{ _uDownloadType :: !(Maybe Text)
, _uStatus :: !(Maybe Text)
, _uMetrics :: !(Maybe Text)
, _uDriveDownloadDetails :: !(Maybe UnSampledReportDriveDownloadDetails)
, _uWebPropertyId :: !(Maybe Text)
, _uKind :: !Text
, _uCreated :: !(Maybe DateTime')
, _uFilters :: !(Maybe Text)
, _uProFileId :: !(Maybe Text)
, _uEndDate :: !(Maybe Text)
, _uSelfLink :: !(Maybe Text)
, _uAccountId :: !(Maybe Text)
, _uId :: !(Maybe Text)
, _uUpdated :: !(Maybe DateTime')
, _uTitle :: !(Maybe Text)
, _uDimensions :: !(Maybe Text)
, _uSegment :: !(Maybe Text)
, _uCloudStorageDownloadDetails :: !(Maybe UnSampledReportCloudStorageDownloadDetails)
, _uStartDate :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
unSampledReport
:: UnSampledReport
unSampledReport =
UnSampledReport'
{ _uDownloadType = Nothing
, _uStatus = Nothing
, _uMetrics = Nothing
, _uDriveDownloadDetails = Nothing
, _uWebPropertyId = Nothing
, _uKind = "analytics#unsampledReport"
, _uCreated = Nothing
, _uFilters = Nothing
, _uProFileId = Nothing
, _uEndDate = Nothing
, _uSelfLink = Nothing
, _uAccountId = Nothing
, _uId = Nothing
, _uUpdated = Nothing
, _uTitle = Nothing
, _uDimensions = Nothing
, _uSegment = Nothing
, _uCloudStorageDownloadDetails = Nothing
, _uStartDate = Nothing
}
uDownloadType :: Lens' UnSampledReport (Maybe Text)
uDownloadType
= lens _uDownloadType
(\ s a -> s{_uDownloadType = a})
uStatus :: Lens' UnSampledReport (Maybe Text)
uStatus = lens _uStatus (\ s a -> s{_uStatus = a})
uMetrics :: Lens' UnSampledReport (Maybe Text)
uMetrics = lens _uMetrics (\ s a -> s{_uMetrics = a})
uDriveDownloadDetails :: Lens' UnSampledReport (Maybe UnSampledReportDriveDownloadDetails)
uDriveDownloadDetails
= lens _uDriveDownloadDetails
(\ s a -> s{_uDriveDownloadDetails = a})
uWebPropertyId :: Lens' UnSampledReport (Maybe Text)
uWebPropertyId
= lens _uWebPropertyId
(\ s a -> s{_uWebPropertyId = a})
uKind :: Lens' UnSampledReport Text
uKind = lens _uKind (\ s a -> s{_uKind = a})
uCreated :: Lens' UnSampledReport (Maybe UTCTime)
uCreated
= lens _uCreated (\ s a -> s{_uCreated = a}) .
mapping _DateTime
uFilters :: Lens' UnSampledReport (Maybe Text)
uFilters = lens _uFilters (\ s a -> s{_uFilters = a})
uProFileId :: Lens' UnSampledReport (Maybe Text)
uProFileId
= lens _uProFileId (\ s a -> s{_uProFileId = a})
uEndDate :: Lens' UnSampledReport (Maybe Text)
uEndDate = lens _uEndDate (\ s a -> s{_uEndDate = a})
uSelfLink :: Lens' UnSampledReport (Maybe Text)
uSelfLink
= lens _uSelfLink (\ s a -> s{_uSelfLink = a})
uAccountId :: Lens' UnSampledReport (Maybe Text)
uAccountId
= lens _uAccountId (\ s a -> s{_uAccountId = a})
uId :: Lens' UnSampledReport (Maybe Text)
uId = lens _uId (\ s a -> s{_uId = a})
uUpdated :: Lens' UnSampledReport (Maybe UTCTime)
uUpdated
= lens _uUpdated (\ s a -> s{_uUpdated = a}) .
mapping _DateTime
uTitle :: Lens' UnSampledReport (Maybe Text)
uTitle = lens _uTitle (\ s a -> s{_uTitle = a})
uDimensions :: Lens' UnSampledReport (Maybe Text)
uDimensions
= lens _uDimensions (\ s a -> s{_uDimensions = a})
uSegment :: Lens' UnSampledReport (Maybe Text)
uSegment = lens _uSegment (\ s a -> s{_uSegment = a})
uCloudStorageDownloadDetails :: Lens' UnSampledReport (Maybe UnSampledReportCloudStorageDownloadDetails)
uCloudStorageDownloadDetails
= lens _uCloudStorageDownloadDetails
(\ s a -> s{_uCloudStorageDownloadDetails = a})
uStartDate :: Lens' UnSampledReport (Maybe Text)
uStartDate
= lens _uStartDate (\ s a -> s{_uStartDate = a})
instance FromJSON UnSampledReport where
parseJSON
= withObject "UnSampledReport"
(\ o ->
UnSampledReport' <$>
(o .:? "downloadType") <*> (o .:? "status") <*>
(o .:? "metrics")
<*> (o .:? "driveDownloadDetails")
<*> (o .:? "webPropertyId")
<*> (o .:? "kind" .!= "analytics#unsampledReport")
<*> (o .:? "created")
<*> (o .:? "filters")
<*> (o .:? "profileId")
<*> (o .:? "end-date")
<*> (o .:? "selfLink")
<*> (o .:? "accountId")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "title")
<*> (o .:? "dimensions")
<*> (o .:? "segment")
<*> (o .:? "cloudStorageDownloadDetails")
<*> (o .:? "start-date"))
instance ToJSON UnSampledReport where
toJSON UnSampledReport'{..}
= object
(catMaybes
[("downloadType" .=) <$> _uDownloadType,
("status" .=) <$> _uStatus,
("metrics" .=) <$> _uMetrics,
("driveDownloadDetails" .=) <$>
_uDriveDownloadDetails,
("webPropertyId" .=) <$> _uWebPropertyId,
Just ("kind" .= _uKind),
("created" .=) <$> _uCreated,
("filters" .=) <$> _uFilters,
("profileId" .=) <$> _uProFileId,
("end-date" .=) <$> _uEndDate,
("selfLink" .=) <$> _uSelfLink,
("accountId" .=) <$> _uAccountId, ("id" .=) <$> _uId,
("updated" .=) <$> _uUpdated,
("title" .=) <$> _uTitle,
("dimensions" .=) <$> _uDimensions,
("segment" .=) <$> _uSegment,
("cloudStorageDownloadDetails" .=) <$>
_uCloudStorageDownloadDetails,
("start-date" .=) <$> _uStartDate])
data McfDataColumnHeadersItem = McfDataColumnHeadersItem'
{ _mdchiColumnType :: !(Maybe Text)
, _mdchiName :: !(Maybe Text)
, _mdchiDataType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mcfDataColumnHeadersItem
:: McfDataColumnHeadersItem
mcfDataColumnHeadersItem =
McfDataColumnHeadersItem'
{ _mdchiColumnType = Nothing
, _mdchiName = Nothing
, _mdchiDataType = Nothing
}
mdchiColumnType :: Lens' McfDataColumnHeadersItem (Maybe Text)
mdchiColumnType
= lens _mdchiColumnType
(\ s a -> s{_mdchiColumnType = a})
mdchiName :: Lens' McfDataColumnHeadersItem (Maybe Text)
mdchiName
= lens _mdchiName (\ s a -> s{_mdchiName = a})
mdchiDataType :: Lens' McfDataColumnHeadersItem (Maybe Text)
mdchiDataType
= lens _mdchiDataType
(\ s a -> s{_mdchiDataType = a})
instance FromJSON McfDataColumnHeadersItem where
parseJSON
= withObject "McfDataColumnHeadersItem"
(\ o ->
McfDataColumnHeadersItem' <$>
(o .:? "columnType") <*> (o .:? "name") <*>
(o .:? "dataType"))
instance ToJSON McfDataColumnHeadersItem where
toJSON McfDataColumnHeadersItem'{..}
= object
(catMaybes
[("columnType" .=) <$> _mdchiColumnType,
("name" .=) <$> _mdchiName,
("dataType" .=) <$> _mdchiDataType])
newtype GaDataTotalsForAllResults = GaDataTotalsForAllResults'
{ _gdtfarAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
gaDataTotalsForAllResults
:: HashMap Text Text
-> GaDataTotalsForAllResults
gaDataTotalsForAllResults pGdtfarAddtional_ =
GaDataTotalsForAllResults'
{ _gdtfarAddtional = _Coerce # pGdtfarAddtional_
}
gdtfarAddtional :: Lens' GaDataTotalsForAllResults (HashMap Text Text)
gdtfarAddtional
= lens _gdtfarAddtional
(\ s a -> s{_gdtfarAddtional = a})
. _Coerce
instance FromJSON GaDataTotalsForAllResults where
parseJSON
= withObject "GaDataTotalsForAllResults"
(\ o ->
GaDataTotalsForAllResults' <$> (parseJSONObject o))
instance ToJSON GaDataTotalsForAllResults where
toJSON = toJSON . _gdtfarAddtional
data ProFileParentLink = ProFileParentLink'
{ _pfplHref :: !(Maybe Text)
, _pfplType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
proFileParentLink
:: ProFileParentLink
proFileParentLink =
ProFileParentLink'
{ _pfplHref = Nothing
, _pfplType = "analytics#webproperty"
}
pfplHref :: Lens' ProFileParentLink (Maybe Text)
pfplHref = lens _pfplHref (\ s a -> s{_pfplHref = a})
pfplType :: Lens' ProFileParentLink Text
pfplType = lens _pfplType (\ s a -> s{_pfplType = a})
instance FromJSON ProFileParentLink where
parseJSON
= withObject "ProFileParentLink"
(\ o ->
ProFileParentLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#webproperty"))
instance ToJSON ProFileParentLink where
toJSON ProFileParentLink'{..}
= object
(catMaybes
[("href" .=) <$> _pfplHref,
Just ("type" .= _pfplType)])
data RemarketingAudience = RemarketingAudience'
{ _rWebPropertyId :: !(Maybe Text)
, _rKind :: !Text
, _rCreated :: !(Maybe DateTime')
, _rLinkedAdAccounts :: !(Maybe [LinkedForeignAccount])
, _rAudienceDefinition :: !(Maybe RemarketingAudienceAudienceDefinition)
, _rAudienceType :: !(Maybe Text)
, _rAccountId :: !(Maybe Text)
, _rName :: !(Maybe Text)
, _rStateBasedAudienceDefinition :: !(Maybe RemarketingAudienceStateBasedAudienceDefinition)
, _rLinkedViews :: !(Maybe [Text])
, _rInternalWebPropertyId :: !(Maybe Text)
, _rId :: !(Maybe Text)
, _rUpdated :: !(Maybe DateTime')
, _rDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
remarketingAudience
:: RemarketingAudience
remarketingAudience =
RemarketingAudience'
{ _rWebPropertyId = Nothing
, _rKind = "analytics#remarketingAudience"
, _rCreated = Nothing
, _rLinkedAdAccounts = Nothing
, _rAudienceDefinition = Nothing
, _rAudienceType = Nothing
, _rAccountId = Nothing
, _rName = Nothing
, _rStateBasedAudienceDefinition = Nothing
, _rLinkedViews = Nothing
, _rInternalWebPropertyId = Nothing
, _rId = Nothing
, _rUpdated = Nothing
, _rDescription = Nothing
}
rWebPropertyId :: Lens' RemarketingAudience (Maybe Text)
rWebPropertyId
= lens _rWebPropertyId
(\ s a -> s{_rWebPropertyId = a})
rKind :: Lens' RemarketingAudience Text
rKind = lens _rKind (\ s a -> s{_rKind = a})
rCreated :: Lens' RemarketingAudience (Maybe UTCTime)
rCreated
= lens _rCreated (\ s a -> s{_rCreated = a}) .
mapping _DateTime
rLinkedAdAccounts :: Lens' RemarketingAudience [LinkedForeignAccount]
rLinkedAdAccounts
= lens _rLinkedAdAccounts
(\ s a -> s{_rLinkedAdAccounts = a})
. _Default
. _Coerce
rAudienceDefinition :: Lens' RemarketingAudience (Maybe RemarketingAudienceAudienceDefinition)
rAudienceDefinition
= lens _rAudienceDefinition
(\ s a -> s{_rAudienceDefinition = a})
rAudienceType :: Lens' RemarketingAudience (Maybe Text)
rAudienceType
= lens _rAudienceType
(\ s a -> s{_rAudienceType = a})
rAccountId :: Lens' RemarketingAudience (Maybe Text)
rAccountId
= lens _rAccountId (\ s a -> s{_rAccountId = a})
rName :: Lens' RemarketingAudience (Maybe Text)
rName = lens _rName (\ s a -> s{_rName = a})
rStateBasedAudienceDefinition :: Lens' RemarketingAudience (Maybe RemarketingAudienceStateBasedAudienceDefinition)
rStateBasedAudienceDefinition
= lens _rStateBasedAudienceDefinition
(\ s a -> s{_rStateBasedAudienceDefinition = a})
rLinkedViews :: Lens' RemarketingAudience [Text]
rLinkedViews
= lens _rLinkedViews (\ s a -> s{_rLinkedViews = a})
. _Default
. _Coerce
rInternalWebPropertyId :: Lens' RemarketingAudience (Maybe Text)
rInternalWebPropertyId
= lens _rInternalWebPropertyId
(\ s a -> s{_rInternalWebPropertyId = a})
rId :: Lens' RemarketingAudience (Maybe Text)
rId = lens _rId (\ s a -> s{_rId = a})
rUpdated :: Lens' RemarketingAudience (Maybe UTCTime)
rUpdated
= lens _rUpdated (\ s a -> s{_rUpdated = a}) .
mapping _DateTime
rDescription :: Lens' RemarketingAudience (Maybe Text)
rDescription
= lens _rDescription (\ s a -> s{_rDescription = a})
instance FromJSON RemarketingAudience where
parseJSON
= withObject "RemarketingAudience"
(\ o ->
RemarketingAudience' <$>
(o .:? "webPropertyId") <*>
(o .:? "kind" .!= "analytics#remarketingAudience")
<*> (o .:? "created")
<*> (o .:? "linkedAdAccounts" .!= mempty)
<*> (o .:? "audienceDefinition")
<*> (o .:? "audienceType")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "stateBasedAudienceDefinition")
<*> (o .:? "linkedViews" .!= mempty)
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "description"))
instance ToJSON RemarketingAudience where
toJSON RemarketingAudience'{..}
= object
(catMaybes
[("webPropertyId" .=) <$> _rWebPropertyId,
Just ("kind" .= _rKind),
("created" .=) <$> _rCreated,
("linkedAdAccounts" .=) <$> _rLinkedAdAccounts,
("audienceDefinition" .=) <$> _rAudienceDefinition,
("audienceType" .=) <$> _rAudienceType,
("accountId" .=) <$> _rAccountId,
("name" .=) <$> _rName,
("stateBasedAudienceDefinition" .=) <$>
_rStateBasedAudienceDefinition,
("linkedViews" .=) <$> _rLinkedViews,
("internalWebPropertyId" .=) <$>
_rInternalWebPropertyId,
("id" .=) <$> _rId, ("updated" .=) <$> _rUpdated,
("description" .=) <$> _rDescription])
newtype GaDataDataTableRowsItemCItem = GaDataDataTableRowsItemCItem'
{ _gddtriciV :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
gaDataDataTableRowsItemCItem
:: GaDataDataTableRowsItemCItem
gaDataDataTableRowsItemCItem =
GaDataDataTableRowsItemCItem'
{ _gddtriciV = Nothing
}
gddtriciV :: Lens' GaDataDataTableRowsItemCItem (Maybe Text)
gddtriciV
= lens _gddtriciV (\ s a -> s{_gddtriciV = a})
instance FromJSON GaDataDataTableRowsItemCItem where
parseJSON
= withObject "GaDataDataTableRowsItemCItem"
(\ o ->
GaDataDataTableRowsItemCItem' <$> (o .:? "v"))
instance ToJSON GaDataDataTableRowsItemCItem where
toJSON GaDataDataTableRowsItemCItem'{..}
= object (catMaybes [("v" .=) <$> _gddtriciV])
data EntityUserLinkPermissions = EntityUserLinkPermissions'
{ _eulpLocal :: !(Maybe [Text])
, _eulpEffective :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
entityUserLinkPermissions
:: EntityUserLinkPermissions
entityUserLinkPermissions =
EntityUserLinkPermissions'
{ _eulpLocal = Nothing
, _eulpEffective = Nothing
}
eulpLocal :: Lens' EntityUserLinkPermissions [Text]
eulpLocal
= lens _eulpLocal (\ s a -> s{_eulpLocal = a}) .
_Default
. _Coerce
eulpEffective :: Lens' EntityUserLinkPermissions [Text]
eulpEffective
= lens _eulpEffective
(\ s a -> s{_eulpEffective = a})
. _Default
. _Coerce
instance FromJSON EntityUserLinkPermissions where
parseJSON
= withObject "EntityUserLinkPermissions"
(\ o ->
EntityUserLinkPermissions' <$>
(o .:? "local" .!= mempty) <*>
(o .:? "effective" .!= mempty))
instance ToJSON EntityUserLinkPermissions where
toJSON EntityUserLinkPermissions'{..}
= object
(catMaybes
[("local" .=) <$> _eulpLocal,
("effective" .=) <$> _eulpEffective])
data RealtimeDataProFileInfo = RealtimeDataProFileInfo'
{ _rdpfiWebPropertyId :: !(Maybe Text)
, _rdpfiProFileId :: !(Maybe Text)
, _rdpfiProFileName :: !(Maybe Text)
, _rdpfiAccountId :: !(Maybe Text)
, _rdpfiInternalWebPropertyId :: !(Maybe Text)
, _rdpfiTableId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
realtimeDataProFileInfo
:: RealtimeDataProFileInfo
realtimeDataProFileInfo =
RealtimeDataProFileInfo'
{ _rdpfiWebPropertyId = Nothing
, _rdpfiProFileId = Nothing
, _rdpfiProFileName = Nothing
, _rdpfiAccountId = Nothing
, _rdpfiInternalWebPropertyId = Nothing
, _rdpfiTableId = Nothing
}
rdpfiWebPropertyId :: Lens' RealtimeDataProFileInfo (Maybe Text)
rdpfiWebPropertyId
= lens _rdpfiWebPropertyId
(\ s a -> s{_rdpfiWebPropertyId = a})
rdpfiProFileId :: Lens' RealtimeDataProFileInfo (Maybe Text)
rdpfiProFileId
= lens _rdpfiProFileId
(\ s a -> s{_rdpfiProFileId = a})
rdpfiProFileName :: Lens' RealtimeDataProFileInfo (Maybe Text)
rdpfiProFileName
= lens _rdpfiProFileName
(\ s a -> s{_rdpfiProFileName = a})
rdpfiAccountId :: Lens' RealtimeDataProFileInfo (Maybe Text)
rdpfiAccountId
= lens _rdpfiAccountId
(\ s a -> s{_rdpfiAccountId = a})
rdpfiInternalWebPropertyId :: Lens' RealtimeDataProFileInfo (Maybe Text)
rdpfiInternalWebPropertyId
= lens _rdpfiInternalWebPropertyId
(\ s a -> s{_rdpfiInternalWebPropertyId = a})
rdpfiTableId :: Lens' RealtimeDataProFileInfo (Maybe Text)
rdpfiTableId
= lens _rdpfiTableId (\ s a -> s{_rdpfiTableId = a})
instance FromJSON RealtimeDataProFileInfo where
parseJSON
= withObject "RealtimeDataProFileInfo"
(\ o ->
RealtimeDataProFileInfo' <$>
(o .:? "webPropertyId") <*> (o .:? "profileId") <*>
(o .:? "profileName")
<*> (o .:? "accountId")
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "tableId"))
instance ToJSON RealtimeDataProFileInfo where
toJSON RealtimeDataProFileInfo'{..}
= object
(catMaybes
[("webPropertyId" .=) <$> _rdpfiWebPropertyId,
("profileId" .=) <$> _rdpfiProFileId,
("profileName" .=) <$> _rdpfiProFileName,
("accountId" .=) <$> _rdpfiAccountId,
("internalWebPropertyId" .=) <$>
_rdpfiInternalWebPropertyId,
("tableId" .=) <$> _rdpfiTableId])
data McfDataRowsItemItemConversionPathValueItem = McfDataRowsItemItemConversionPathValueItem'
{ _mdriicpviInteractionType :: !(Maybe Text)
, _mdriicpviNodeValue :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mcfDataRowsItemItemConversionPathValueItem
:: McfDataRowsItemItemConversionPathValueItem
mcfDataRowsItemItemConversionPathValueItem =
McfDataRowsItemItemConversionPathValueItem'
{ _mdriicpviInteractionType = Nothing
, _mdriicpviNodeValue = Nothing
}
mdriicpviInteractionType :: Lens' McfDataRowsItemItemConversionPathValueItem (Maybe Text)
mdriicpviInteractionType
= lens _mdriicpviInteractionType
(\ s a -> s{_mdriicpviInteractionType = a})
mdriicpviNodeValue :: Lens' McfDataRowsItemItemConversionPathValueItem (Maybe Text)
mdriicpviNodeValue
= lens _mdriicpviNodeValue
(\ s a -> s{_mdriicpviNodeValue = a})
instance FromJSON
McfDataRowsItemItemConversionPathValueItem where
parseJSON
= withObject
"McfDataRowsItemItemConversionPathValueItem"
(\ o ->
McfDataRowsItemItemConversionPathValueItem' <$>
(o .:? "interactionType") <*> (o .:? "nodeValue"))
instance ToJSON
McfDataRowsItemItemConversionPathValueItem where
toJSON
McfDataRowsItemItemConversionPathValueItem'{..}
= object
(catMaybes
[("interactionType" .=) <$>
_mdriicpviInteractionType,
("nodeValue" .=) <$> _mdriicpviNodeValue])
data FilterExpression = FilterExpression'
{ _feFieldIndex :: !(Maybe (Textual Int32))
, _feField :: !(Maybe Text)
, _feKind :: !Text
, _feMatchType :: !(Maybe Text)
, _feCaseSensitive :: !(Maybe Bool)
, _feExpressionValue :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
filterExpression
:: FilterExpression
filterExpression =
FilterExpression'
{ _feFieldIndex = Nothing
, _feField = Nothing
, _feKind = "analytics#filterExpression"
, _feMatchType = Nothing
, _feCaseSensitive = Nothing
, _feExpressionValue = Nothing
}
feFieldIndex :: Lens' FilterExpression (Maybe Int32)
feFieldIndex
= lens _feFieldIndex (\ s a -> s{_feFieldIndex = a})
. mapping _Coerce
feField :: Lens' FilterExpression (Maybe Text)
feField = lens _feField (\ s a -> s{_feField = a})
feKind :: Lens' FilterExpression Text
feKind = lens _feKind (\ s a -> s{_feKind = a})
feMatchType :: Lens' FilterExpression (Maybe Text)
feMatchType
= lens _feMatchType (\ s a -> s{_feMatchType = a})
feCaseSensitive :: Lens' FilterExpression (Maybe Bool)
feCaseSensitive
= lens _feCaseSensitive
(\ s a -> s{_feCaseSensitive = a})
feExpressionValue :: Lens' FilterExpression (Maybe Text)
feExpressionValue
= lens _feExpressionValue
(\ s a -> s{_feExpressionValue = a})
instance FromJSON FilterExpression where
parseJSON
= withObject "FilterExpression"
(\ o ->
FilterExpression' <$>
(o .:? "fieldIndex") <*> (o .:? "field") <*>
(o .:? "kind" .!= "analytics#filterExpression")
<*> (o .:? "matchType")
<*> (o .:? "caseSensitive")
<*> (o .:? "expressionValue"))
instance ToJSON FilterExpression where
toJSON FilterExpression'{..}
= object
(catMaybes
[("fieldIndex" .=) <$> _feFieldIndex,
("field" .=) <$> _feField, Just ("kind" .= _feKind),
("matchType" .=) <$> _feMatchType,
("caseSensitive" .=) <$> _feCaseSensitive,
("expressionValue" .=) <$> _feExpressionValue])
data ProFileRef = ProFileRef'
{ _pfrWebPropertyId :: !(Maybe Text)
, _pfrKind :: !Text
, _pfrHref :: !(Maybe Text)
, _pfrAccountId :: !(Maybe Text)
, _pfrName :: !(Maybe Text)
, _pfrInternalWebPropertyId :: !(Maybe Text)
, _pfrId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
proFileRef
:: ProFileRef
proFileRef =
ProFileRef'
{ _pfrWebPropertyId = Nothing
, _pfrKind = "analytics#profileRef"
, _pfrHref = Nothing
, _pfrAccountId = Nothing
, _pfrName = Nothing
, _pfrInternalWebPropertyId = Nothing
, _pfrId = Nothing
}
pfrWebPropertyId :: Lens' ProFileRef (Maybe Text)
pfrWebPropertyId
= lens _pfrWebPropertyId
(\ s a -> s{_pfrWebPropertyId = a})
pfrKind :: Lens' ProFileRef Text
pfrKind = lens _pfrKind (\ s a -> s{_pfrKind = a})
pfrHref :: Lens' ProFileRef (Maybe Text)
pfrHref = lens _pfrHref (\ s a -> s{_pfrHref = a})
pfrAccountId :: Lens' ProFileRef (Maybe Text)
pfrAccountId
= lens _pfrAccountId (\ s a -> s{_pfrAccountId = a})
pfrName :: Lens' ProFileRef (Maybe Text)
pfrName = lens _pfrName (\ s a -> s{_pfrName = a})
pfrInternalWebPropertyId :: Lens' ProFileRef (Maybe Text)
pfrInternalWebPropertyId
= lens _pfrInternalWebPropertyId
(\ s a -> s{_pfrInternalWebPropertyId = a})
pfrId :: Lens' ProFileRef (Maybe Text)
pfrId = lens _pfrId (\ s a -> s{_pfrId = a})
instance FromJSON ProFileRef where
parseJSON
= withObject "ProFileRef"
(\ o ->
ProFileRef' <$>
(o .:? "webPropertyId") <*>
(o .:? "kind" .!= "analytics#profileRef")
<*> (o .:? "href")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "id"))
instance ToJSON ProFileRef where
toJSON ProFileRef'{..}
= object
(catMaybes
[("webPropertyId" .=) <$> _pfrWebPropertyId,
Just ("kind" .= _pfrKind), ("href" .=) <$> _pfrHref,
("accountId" .=) <$> _pfrAccountId,
("name" .=) <$> _pfrName,
("internalWebPropertyId" .=) <$>
_pfrInternalWebPropertyId,
("id" .=) <$> _pfrId])
data Accounts = Accounts'
{ _aNextLink :: !(Maybe Text)
, _aItemsPerPage :: !(Maybe (Textual Int32))
, _aKind :: !Text
, _aUsername :: !(Maybe Text)
, _aItems :: !(Maybe [Account])
, _aTotalResults :: !(Maybe (Textual Int32))
, _aStartIndex :: !(Maybe (Textual Int32))
, _aPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accounts
:: Accounts
accounts =
Accounts'
{ _aNextLink = Nothing
, _aItemsPerPage = Nothing
, _aKind = "analytics#accounts"
, _aUsername = Nothing
, _aItems = Nothing
, _aTotalResults = Nothing
, _aStartIndex = Nothing
, _aPreviousLink = Nothing
}
aNextLink :: Lens' Accounts (Maybe Text)
aNextLink
= lens _aNextLink (\ s a -> s{_aNextLink = a})
aItemsPerPage :: Lens' Accounts (Maybe Int32)
aItemsPerPage
= lens _aItemsPerPage
(\ s a -> s{_aItemsPerPage = a})
. mapping _Coerce
aKind :: Lens' Accounts Text
aKind = lens _aKind (\ s a -> s{_aKind = a})
aUsername :: Lens' Accounts (Maybe Text)
aUsername
= lens _aUsername (\ s a -> s{_aUsername = a})
aItems :: Lens' Accounts [Account]
aItems
= lens _aItems (\ s a -> s{_aItems = a}) . _Default .
_Coerce
aTotalResults :: Lens' Accounts (Maybe Int32)
aTotalResults
= lens _aTotalResults
(\ s a -> s{_aTotalResults = a})
. mapping _Coerce
aStartIndex :: Lens' Accounts (Maybe Int32)
aStartIndex
= lens _aStartIndex (\ s a -> s{_aStartIndex = a}) .
mapping _Coerce
aPreviousLink :: Lens' Accounts (Maybe Text)
aPreviousLink
= lens _aPreviousLink
(\ s a -> s{_aPreviousLink = a})
instance FromJSON Accounts where
parseJSON
= withObject "Accounts"
(\ o ->
Accounts' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#accounts")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON Accounts where
toJSON Accounts'{..}
= object
(catMaybes
[("nextLink" .=) <$> _aNextLink,
("itemsPerPage" .=) <$> _aItemsPerPage,
Just ("kind" .= _aKind),
("username" .=) <$> _aUsername,
("items" .=) <$> _aItems,
("totalResults" .=) <$> _aTotalResults,
("startIndex" .=) <$> _aStartIndex,
("previousLink" .=) <$> _aPreviousLink])
data Experiments = Experiments'
{ _eNextLink :: !(Maybe Text)
, _eItemsPerPage :: !(Maybe (Textual Int32))
, _eKind :: !Text
, _eUsername :: !(Maybe Text)
, _eItems :: !(Maybe [Experiment])
, _eTotalResults :: !(Maybe (Textual Int32))
, _eStartIndex :: !(Maybe (Textual Int32))
, _ePreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
experiments
:: Experiments
experiments =
Experiments'
{ _eNextLink = Nothing
, _eItemsPerPage = Nothing
, _eKind = "analytics#experiments"
, _eUsername = Nothing
, _eItems = Nothing
, _eTotalResults = Nothing
, _eStartIndex = Nothing
, _ePreviousLink = Nothing
}
eNextLink :: Lens' Experiments (Maybe Text)
eNextLink
= lens _eNextLink (\ s a -> s{_eNextLink = a})
eItemsPerPage :: Lens' Experiments (Maybe Int32)
eItemsPerPage
= lens _eItemsPerPage
(\ s a -> s{_eItemsPerPage = a})
. mapping _Coerce
eKind :: Lens' Experiments Text
eKind = lens _eKind (\ s a -> s{_eKind = a})
eUsername :: Lens' Experiments (Maybe Text)
eUsername
= lens _eUsername (\ s a -> s{_eUsername = a})
eItems :: Lens' Experiments [Experiment]
eItems
= lens _eItems (\ s a -> s{_eItems = a}) . _Default .
_Coerce
eTotalResults :: Lens' Experiments (Maybe Int32)
eTotalResults
= lens _eTotalResults
(\ s a -> s{_eTotalResults = a})
. mapping _Coerce
eStartIndex :: Lens' Experiments (Maybe Int32)
eStartIndex
= lens _eStartIndex (\ s a -> s{_eStartIndex = a}) .
mapping _Coerce
ePreviousLink :: Lens' Experiments (Maybe Text)
ePreviousLink
= lens _ePreviousLink
(\ s a -> s{_ePreviousLink = a})
instance FromJSON Experiments where
parseJSON
= withObject "Experiments"
(\ o ->
Experiments' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#experiments")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON Experiments where
toJSON Experiments'{..}
= object
(catMaybes
[("nextLink" .=) <$> _eNextLink,
("itemsPerPage" .=) <$> _eItemsPerPage,
Just ("kind" .= _eKind),
("username" .=) <$> _eUsername,
("items" .=) <$> _eItems,
("totalResults" .=) <$> _eTotalResults,
("startIndex" .=) <$> _eStartIndex,
("previousLink" .=) <$> _ePreviousLink])
data ExperimentParentLink = ExperimentParentLink'
{ _eplHref :: !(Maybe Text)
, _eplType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
experimentParentLink
:: ExperimentParentLink
experimentParentLink =
ExperimentParentLink'
{ _eplHref = Nothing
, _eplType = "analytics#profile"
}
eplHref :: Lens' ExperimentParentLink (Maybe Text)
eplHref = lens _eplHref (\ s a -> s{_eplHref = a})
eplType :: Lens' ExperimentParentLink Text
eplType = lens _eplType (\ s a -> s{_eplType = a})
instance FromJSON ExperimentParentLink where
parseJSON
= withObject "ExperimentParentLink"
(\ o ->
ExperimentParentLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#profile"))
instance ToJSON ExperimentParentLink where
toJSON ExperimentParentLink'{..}
= object
(catMaybes
[("href" .=) <$> _eplHref,
Just ("type" .= _eplType)])
newtype UnSampledReportDriveDownloadDetails = UnSampledReportDriveDownloadDetails'
{ _usrdddDocumentId :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
unSampledReportDriveDownloadDetails
:: UnSampledReportDriveDownloadDetails
unSampledReportDriveDownloadDetails =
UnSampledReportDriveDownloadDetails'
{ _usrdddDocumentId = Nothing
}
usrdddDocumentId :: Lens' UnSampledReportDriveDownloadDetails (Maybe Text)
usrdddDocumentId
= lens _usrdddDocumentId
(\ s a -> s{_usrdddDocumentId = a})
instance FromJSON UnSampledReportDriveDownloadDetails
where
parseJSON
= withObject "UnSampledReportDriveDownloadDetails"
(\ o ->
UnSampledReportDriveDownloadDetails' <$>
(o .:? "documentId"))
instance ToJSON UnSampledReportDriveDownloadDetails
where
toJSON UnSampledReportDriveDownloadDetails'{..}
= object
(catMaybes [("documentId" .=) <$> _usrdddDocumentId])
data McfDataProFileInfo = McfDataProFileInfo'
{ _mdpfiWebPropertyId :: !(Maybe Text)
, _mdpfiProFileId :: !(Maybe Text)
, _mdpfiProFileName :: !(Maybe Text)
, _mdpfiAccountId :: !(Maybe Text)
, _mdpfiInternalWebPropertyId :: !(Maybe Text)
, _mdpfiTableId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mcfDataProFileInfo
:: McfDataProFileInfo
mcfDataProFileInfo =
McfDataProFileInfo'
{ _mdpfiWebPropertyId = Nothing
, _mdpfiProFileId = Nothing
, _mdpfiProFileName = Nothing
, _mdpfiAccountId = Nothing
, _mdpfiInternalWebPropertyId = Nothing
, _mdpfiTableId = Nothing
}
mdpfiWebPropertyId :: Lens' McfDataProFileInfo (Maybe Text)
mdpfiWebPropertyId
= lens _mdpfiWebPropertyId
(\ s a -> s{_mdpfiWebPropertyId = a})
mdpfiProFileId :: Lens' McfDataProFileInfo (Maybe Text)
mdpfiProFileId
= lens _mdpfiProFileId
(\ s a -> s{_mdpfiProFileId = a})
mdpfiProFileName :: Lens' McfDataProFileInfo (Maybe Text)
mdpfiProFileName
= lens _mdpfiProFileName
(\ s a -> s{_mdpfiProFileName = a})
mdpfiAccountId :: Lens' McfDataProFileInfo (Maybe Text)
mdpfiAccountId
= lens _mdpfiAccountId
(\ s a -> s{_mdpfiAccountId = a})
mdpfiInternalWebPropertyId :: Lens' McfDataProFileInfo (Maybe Text)
mdpfiInternalWebPropertyId
= lens _mdpfiInternalWebPropertyId
(\ s a -> s{_mdpfiInternalWebPropertyId = a})
mdpfiTableId :: Lens' McfDataProFileInfo (Maybe Text)
mdpfiTableId
= lens _mdpfiTableId (\ s a -> s{_mdpfiTableId = a})
instance FromJSON McfDataProFileInfo where
parseJSON
= withObject "McfDataProFileInfo"
(\ o ->
McfDataProFileInfo' <$>
(o .:? "webPropertyId") <*> (o .:? "profileId") <*>
(o .:? "profileName")
<*> (o .:? "accountId")
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "tableId"))
instance ToJSON McfDataProFileInfo where
toJSON McfDataProFileInfo'{..}
= object
(catMaybes
[("webPropertyId" .=) <$> _mdpfiWebPropertyId,
("profileId" .=) <$> _mdpfiProFileId,
("profileName" .=) <$> _mdpfiProFileName,
("accountId" .=) <$> _mdpfiAccountId,
("internalWebPropertyId" .=) <$>
_mdpfiInternalWebPropertyId,
("tableId" .=) <$> _mdpfiTableId])
data CustomDataSources = CustomDataSources'
{ _cdsNextLink :: !(Maybe Text)
, _cdsItemsPerPage :: !(Maybe (Textual Int32))
, _cdsKind :: !Text
, _cdsUsername :: !(Maybe Text)
, _cdsItems :: !(Maybe [CustomDataSource])
, _cdsTotalResults :: !(Maybe (Textual Int32))
, _cdsStartIndex :: !(Maybe (Textual Int32))
, _cdsPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customDataSources
:: CustomDataSources
customDataSources =
CustomDataSources'
{ _cdsNextLink = Nothing
, _cdsItemsPerPage = Nothing
, _cdsKind = "analytics#customDataSources"
, _cdsUsername = Nothing
, _cdsItems = Nothing
, _cdsTotalResults = Nothing
, _cdsStartIndex = Nothing
, _cdsPreviousLink = Nothing
}
cdsNextLink :: Lens' CustomDataSources (Maybe Text)
cdsNextLink
= lens _cdsNextLink (\ s a -> s{_cdsNextLink = a})
cdsItemsPerPage :: Lens' CustomDataSources (Maybe Int32)
cdsItemsPerPage
= lens _cdsItemsPerPage
(\ s a -> s{_cdsItemsPerPage = a})
. mapping _Coerce
cdsKind :: Lens' CustomDataSources Text
cdsKind = lens _cdsKind (\ s a -> s{_cdsKind = a})
cdsUsername :: Lens' CustomDataSources (Maybe Text)
cdsUsername
= lens _cdsUsername (\ s a -> s{_cdsUsername = a})
cdsItems :: Lens' CustomDataSources [CustomDataSource]
cdsItems
= lens _cdsItems (\ s a -> s{_cdsItems = a}) .
_Default
. _Coerce
cdsTotalResults :: Lens' CustomDataSources (Maybe Int32)
cdsTotalResults
= lens _cdsTotalResults
(\ s a -> s{_cdsTotalResults = a})
. mapping _Coerce
cdsStartIndex :: Lens' CustomDataSources (Maybe Int32)
cdsStartIndex
= lens _cdsStartIndex
(\ s a -> s{_cdsStartIndex = a})
. mapping _Coerce
cdsPreviousLink :: Lens' CustomDataSources (Maybe Text)
cdsPreviousLink
= lens _cdsPreviousLink
(\ s a -> s{_cdsPreviousLink = a})
instance FromJSON CustomDataSources where
parseJSON
= withObject "CustomDataSources"
(\ o ->
CustomDataSources' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#customDataSources")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON CustomDataSources where
toJSON CustomDataSources'{..}
= object
(catMaybes
[("nextLink" .=) <$> _cdsNextLink,
("itemsPerPage" .=) <$> _cdsItemsPerPage,
Just ("kind" .= _cdsKind),
("username" .=) <$> _cdsUsername,
("items" .=) <$> _cdsItems,
("totalResults" .=) <$> _cdsTotalResults,
("startIndex" .=) <$> _cdsStartIndex,
("previousLink" .=) <$> _cdsPreviousLink])
data WebPropertyChildLink = WebPropertyChildLink'
{ _wpclHref :: !(Maybe Text)
, _wpclType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
webPropertyChildLink
:: WebPropertyChildLink
webPropertyChildLink =
WebPropertyChildLink'
{ _wpclHref = Nothing
, _wpclType = "analytics#profiles"
}
wpclHref :: Lens' WebPropertyChildLink (Maybe Text)
wpclHref = lens _wpclHref (\ s a -> s{_wpclHref = a})
wpclType :: Lens' WebPropertyChildLink Text
wpclType = lens _wpclType (\ s a -> s{_wpclType = a})
instance FromJSON WebPropertyChildLink where
parseJSON
= withObject "WebPropertyChildLink"
(\ o ->
WebPropertyChildLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#profiles"))
instance ToJSON WebPropertyChildLink where
toJSON WebPropertyChildLink'{..}
= object
(catMaybes
[("href" .=) <$> _wpclHref,
Just ("type" .= _wpclType)])
data HashClientIdResponse = HashClientIdResponse'
{ _hcirClientId :: !(Maybe Text)
, _hcirWebPropertyId :: !(Maybe Text)
, _hcirKind :: !Text
, _hcirHashedClientId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
hashClientIdResponse
:: HashClientIdResponse
hashClientIdResponse =
HashClientIdResponse'
{ _hcirClientId = Nothing
, _hcirWebPropertyId = Nothing
, _hcirKind = "analytics#hashClientIdResponse"
, _hcirHashedClientId = Nothing
}
hcirClientId :: Lens' HashClientIdResponse (Maybe Text)
hcirClientId
= lens _hcirClientId (\ s a -> s{_hcirClientId = a})
hcirWebPropertyId :: Lens' HashClientIdResponse (Maybe Text)
hcirWebPropertyId
= lens _hcirWebPropertyId
(\ s a -> s{_hcirWebPropertyId = a})
hcirKind :: Lens' HashClientIdResponse Text
hcirKind = lens _hcirKind (\ s a -> s{_hcirKind = a})
hcirHashedClientId :: Lens' HashClientIdResponse (Maybe Text)
hcirHashedClientId
= lens _hcirHashedClientId
(\ s a -> s{_hcirHashedClientId = a})
instance FromJSON HashClientIdResponse where
parseJSON
= withObject "HashClientIdResponse"
(\ o ->
HashClientIdResponse' <$>
(o .:? "clientId") <*> (o .:? "webPropertyId") <*>
(o .:? "kind" .!= "analytics#hashClientIdResponse")
<*> (o .:? "hashedClientId"))
instance ToJSON HashClientIdResponse where
toJSON HashClientIdResponse'{..}
= object
(catMaybes
[("clientId" .=) <$> _hcirClientId,
("webPropertyId" .=) <$> _hcirWebPropertyId,
Just ("kind" .= _hcirKind),
("hashedClientId" .=) <$> _hcirHashedClientId])
data McfData = McfData'
{ _mdNextLink :: !(Maybe Text)
, _mdSampleSpace :: !(Maybe (Textual Int64))
, _mdItemsPerPage :: !(Maybe (Textual Int32))
, _mdProFileInfo :: !(Maybe McfDataProFileInfo)
, _mdKind :: !Text
, _mdSampleSize :: !(Maybe (Textual Int64))
, _mdRows :: !(Maybe [[McfDataRowsItemItem]])
, _mdSelfLink :: !(Maybe Text)
, _mdQuery :: !(Maybe McfDataQuery)
, _mdColumnHeaders :: !(Maybe [McfDataColumnHeadersItem])
, _mdId :: !(Maybe Text)
, _mdTotalResults :: !(Maybe (Textual Int32))
, _mdContainsSampledData :: !(Maybe Bool)
, _mdTotalsForAllResults :: !(Maybe McfDataTotalsForAllResults)
, _mdPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mcfData
:: McfData
mcfData =
McfData'
{ _mdNextLink = Nothing
, _mdSampleSpace = Nothing
, _mdItemsPerPage = Nothing
, _mdProFileInfo = Nothing
, _mdKind = "analytics#mcfData"
, _mdSampleSize = Nothing
, _mdRows = Nothing
, _mdSelfLink = Nothing
, _mdQuery = Nothing
, _mdColumnHeaders = Nothing
, _mdId = Nothing
, _mdTotalResults = Nothing
, _mdContainsSampledData = Nothing
, _mdTotalsForAllResults = Nothing
, _mdPreviousLink = Nothing
}
mdNextLink :: Lens' McfData (Maybe Text)
mdNextLink
= lens _mdNextLink (\ s a -> s{_mdNextLink = a})
mdSampleSpace :: Lens' McfData (Maybe Int64)
mdSampleSpace
= lens _mdSampleSpace
(\ s a -> s{_mdSampleSpace = a})
. mapping _Coerce
mdItemsPerPage :: Lens' McfData (Maybe Int32)
mdItemsPerPage
= lens _mdItemsPerPage
(\ s a -> s{_mdItemsPerPage = a})
. mapping _Coerce
mdProFileInfo :: Lens' McfData (Maybe McfDataProFileInfo)
mdProFileInfo
= lens _mdProFileInfo
(\ s a -> s{_mdProFileInfo = a})
mdKind :: Lens' McfData Text
mdKind = lens _mdKind (\ s a -> s{_mdKind = a})
mdSampleSize :: Lens' McfData (Maybe Int64)
mdSampleSize
= lens _mdSampleSize (\ s a -> s{_mdSampleSize = a})
. mapping _Coerce
mdRows :: Lens' McfData [[McfDataRowsItemItem]]
mdRows
= lens _mdRows (\ s a -> s{_mdRows = a}) . _Default .
_Coerce
mdSelfLink :: Lens' McfData (Maybe Text)
mdSelfLink
= lens _mdSelfLink (\ s a -> s{_mdSelfLink = a})
mdQuery :: Lens' McfData (Maybe McfDataQuery)
mdQuery = lens _mdQuery (\ s a -> s{_mdQuery = a})
mdColumnHeaders :: Lens' McfData [McfDataColumnHeadersItem]
mdColumnHeaders
= lens _mdColumnHeaders
(\ s a -> s{_mdColumnHeaders = a})
. _Default
. _Coerce
mdId :: Lens' McfData (Maybe Text)
mdId = lens _mdId (\ s a -> s{_mdId = a})
mdTotalResults :: Lens' McfData (Maybe Int32)
mdTotalResults
= lens _mdTotalResults
(\ s a -> s{_mdTotalResults = a})
. mapping _Coerce
mdContainsSampledData :: Lens' McfData (Maybe Bool)
mdContainsSampledData
= lens _mdContainsSampledData
(\ s a -> s{_mdContainsSampledData = a})
mdTotalsForAllResults :: Lens' McfData (Maybe McfDataTotalsForAllResults)
mdTotalsForAllResults
= lens _mdTotalsForAllResults
(\ s a -> s{_mdTotalsForAllResults = a})
mdPreviousLink :: Lens' McfData (Maybe Text)
mdPreviousLink
= lens _mdPreviousLink
(\ s a -> s{_mdPreviousLink = a})
instance FromJSON McfData where
parseJSON
= withObject "McfData"
(\ o ->
McfData' <$>
(o .:? "nextLink") <*> (o .:? "sampleSpace") <*>
(o .:? "itemsPerPage")
<*> (o .:? "profileInfo")
<*> (o .:? "kind" .!= "analytics#mcfData")
<*> (o .:? "sampleSize")
<*> (o .:? "rows" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "query")
<*> (o .:? "columnHeaders" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "totalResults")
<*> (o .:? "containsSampledData")
<*> (o .:? "totalsForAllResults")
<*> (o .:? "previousLink"))
instance ToJSON McfData where
toJSON McfData'{..}
= object
(catMaybes
[("nextLink" .=) <$> _mdNextLink,
("sampleSpace" .=) <$> _mdSampleSpace,
("itemsPerPage" .=) <$> _mdItemsPerPage,
("profileInfo" .=) <$> _mdProFileInfo,
Just ("kind" .= _mdKind),
("sampleSize" .=) <$> _mdSampleSize,
("rows" .=) <$> _mdRows,
("selfLink" .=) <$> _mdSelfLink,
("query" .=) <$> _mdQuery,
("columnHeaders" .=) <$> _mdColumnHeaders,
("id" .=) <$> _mdId,
("totalResults" .=) <$> _mdTotalResults,
("containsSampledData" .=) <$>
_mdContainsSampledData,
("totalsForAllResults" .=) <$>
_mdTotalsForAllResults,
("previousLink" .=) <$> _mdPreviousLink])
data UserRef = UserRef'
{ _urEmail :: !(Maybe Text)
, _urKind :: !Text
, _urId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userRef
:: UserRef
userRef =
UserRef'
{ _urEmail = Nothing
, _urKind = "analytics#userRef"
, _urId = Nothing
}
urEmail :: Lens' UserRef (Maybe Text)
urEmail = lens _urEmail (\ s a -> s{_urEmail = a})
urKind :: Lens' UserRef Text
urKind = lens _urKind (\ s a -> s{_urKind = a})
urId :: Lens' UserRef (Maybe Text)
urId = lens _urId (\ s a -> s{_urId = a})
instance FromJSON UserRef where
parseJSON
= withObject "UserRef"
(\ o ->
UserRef' <$>
(o .:? "email") <*>
(o .:? "kind" .!= "analytics#userRef")
<*> (o .:? "id"))
instance ToJSON UserRef where
toJSON UserRef'{..}
= object
(catMaybes
[("email" .=) <$> _urEmail, Just ("kind" .= _urKind),
("id" .=) <$> _urId])
data GoalVisitNumPagesDetails = GoalVisitNumPagesDetails'
{ _gvnpdComparisonValue :: !(Maybe (Textual Int64))
, _gvnpdComparisonType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
goalVisitNumPagesDetails
:: GoalVisitNumPagesDetails
goalVisitNumPagesDetails =
GoalVisitNumPagesDetails'
{ _gvnpdComparisonValue = Nothing
, _gvnpdComparisonType = Nothing
}
gvnpdComparisonValue :: Lens' GoalVisitNumPagesDetails (Maybe Int64)
gvnpdComparisonValue
= lens _gvnpdComparisonValue
(\ s a -> s{_gvnpdComparisonValue = a})
. mapping _Coerce
gvnpdComparisonType :: Lens' GoalVisitNumPagesDetails (Maybe Text)
gvnpdComparisonType
= lens _gvnpdComparisonType
(\ s a -> s{_gvnpdComparisonType = a})
instance FromJSON GoalVisitNumPagesDetails where
parseJSON
= withObject "GoalVisitNumPagesDetails"
(\ o ->
GoalVisitNumPagesDetails' <$>
(o .:? "comparisonValue") <*>
(o .:? "comparisonType"))
instance ToJSON GoalVisitNumPagesDetails where
toJSON GoalVisitNumPagesDetails'{..}
= object
(catMaybes
[("comparisonValue" .=) <$> _gvnpdComparisonValue,
("comparisonType" .=) <$> _gvnpdComparisonType])
data RealtimeDataColumnHeadersItem = RealtimeDataColumnHeadersItem'
{ _rdchiColumnType :: !(Maybe Text)
, _rdchiName :: !(Maybe Text)
, _rdchiDataType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
realtimeDataColumnHeadersItem
:: RealtimeDataColumnHeadersItem
realtimeDataColumnHeadersItem =
RealtimeDataColumnHeadersItem'
{ _rdchiColumnType = Nothing
, _rdchiName = Nothing
, _rdchiDataType = Nothing
}
rdchiColumnType :: Lens' RealtimeDataColumnHeadersItem (Maybe Text)
rdchiColumnType
= lens _rdchiColumnType
(\ s a -> s{_rdchiColumnType = a})
rdchiName :: Lens' RealtimeDataColumnHeadersItem (Maybe Text)
rdchiName
= lens _rdchiName (\ s a -> s{_rdchiName = a})
rdchiDataType :: Lens' RealtimeDataColumnHeadersItem (Maybe Text)
rdchiDataType
= lens _rdchiDataType
(\ s a -> s{_rdchiDataType = a})
instance FromJSON RealtimeDataColumnHeadersItem where
parseJSON
= withObject "RealtimeDataColumnHeadersItem"
(\ o ->
RealtimeDataColumnHeadersItem' <$>
(o .:? "columnType") <*> (o .:? "name") <*>
(o .:? "dataType"))
instance ToJSON RealtimeDataColumnHeadersItem where
toJSON RealtimeDataColumnHeadersItem'{..}
= object
(catMaybes
[("columnType" .=) <$> _rdchiColumnType,
("name" .=) <$> _rdchiName,
("dataType" .=) <$> _rdchiDataType])
data AccountRef = AccountRef'
{ _arKind :: !Text
, _arHref :: !(Maybe Text)
, _arName :: !(Maybe Text)
, _arId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountRef
:: AccountRef
accountRef =
AccountRef'
{ _arKind = "analytics#accountRef"
, _arHref = Nothing
, _arName = Nothing
, _arId = Nothing
}
arKind :: Lens' AccountRef Text
arKind = lens _arKind (\ s a -> s{_arKind = a})
arHref :: Lens' AccountRef (Maybe Text)
arHref = lens _arHref (\ s a -> s{_arHref = a})
arName :: Lens' AccountRef (Maybe Text)
arName = lens _arName (\ s a -> s{_arName = a})
arId :: Lens' AccountRef (Maybe Text)
arId = lens _arId (\ s a -> s{_arId = a})
instance FromJSON AccountRef where
parseJSON
= withObject "AccountRef"
(\ o ->
AccountRef' <$>
(o .:? "kind" .!= "analytics#accountRef") <*>
(o .:? "href")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON AccountRef where
toJSON AccountRef'{..}
= object
(catMaybes
[Just ("kind" .= _arKind), ("href" .=) <$> _arHref,
("name" .=) <$> _arName, ("id" .=) <$> _arId])
data EntityAdWordsLinks = EntityAdWordsLinks'
{ _eawlNextLink :: !(Maybe Text)
, _eawlItemsPerPage :: !(Maybe (Textual Int32))
, _eawlKind :: !Text
, _eawlItems :: !(Maybe [EntityAdWordsLink])
, _eawlTotalResults :: !(Maybe (Textual Int32))
, _eawlStartIndex :: !(Maybe (Textual Int32))
, _eawlPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
entityAdWordsLinks
:: EntityAdWordsLinks
entityAdWordsLinks =
EntityAdWordsLinks'
{ _eawlNextLink = Nothing
, _eawlItemsPerPage = Nothing
, _eawlKind = "analytics#entityAdWordsLinks"
, _eawlItems = Nothing
, _eawlTotalResults = Nothing
, _eawlStartIndex = Nothing
, _eawlPreviousLink = Nothing
}
eawlNextLink :: Lens' EntityAdWordsLinks (Maybe Text)
eawlNextLink
= lens _eawlNextLink (\ s a -> s{_eawlNextLink = a})
eawlItemsPerPage :: Lens' EntityAdWordsLinks (Maybe Int32)
eawlItemsPerPage
= lens _eawlItemsPerPage
(\ s a -> s{_eawlItemsPerPage = a})
. mapping _Coerce
eawlKind :: Lens' EntityAdWordsLinks Text
eawlKind = lens _eawlKind (\ s a -> s{_eawlKind = a})
eawlItems :: Lens' EntityAdWordsLinks [EntityAdWordsLink]
eawlItems
= lens _eawlItems (\ s a -> s{_eawlItems = a}) .
_Default
. _Coerce
eawlTotalResults :: Lens' EntityAdWordsLinks (Maybe Int32)
eawlTotalResults
= lens _eawlTotalResults
(\ s a -> s{_eawlTotalResults = a})
. mapping _Coerce
eawlStartIndex :: Lens' EntityAdWordsLinks (Maybe Int32)
eawlStartIndex
= lens _eawlStartIndex
(\ s a -> s{_eawlStartIndex = a})
. mapping _Coerce
eawlPreviousLink :: Lens' EntityAdWordsLinks (Maybe Text)
eawlPreviousLink
= lens _eawlPreviousLink
(\ s a -> s{_eawlPreviousLink = a})
instance FromJSON EntityAdWordsLinks where
parseJSON
= withObject "EntityAdWordsLinks"
(\ o ->
EntityAdWordsLinks' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#entityAdWordsLinks")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON EntityAdWordsLinks where
toJSON EntityAdWordsLinks'{..}
= object
(catMaybes
[("nextLink" .=) <$> _eawlNextLink,
("itemsPerPage" .=) <$> _eawlItemsPerPage,
Just ("kind" .= _eawlKind),
("items" .=) <$> _eawlItems,
("totalResults" .=) <$> _eawlTotalResults,
("startIndex" .=) <$> _eawlStartIndex,
("previousLink" .=) <$> _eawlPreviousLink])
data ProFiles = ProFiles'
{ _pfNextLink :: !(Maybe Text)
, _pfItemsPerPage :: !(Maybe (Textual Int32))
, _pfKind :: !Text
, _pfUsername :: !(Maybe Text)
, _pfItems :: !(Maybe [ProFile])
, _pfTotalResults :: !(Maybe (Textual Int32))
, _pfStartIndex :: !(Maybe (Textual Int32))
, _pfPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
proFiles
:: ProFiles
proFiles =
ProFiles'
{ _pfNextLink = Nothing
, _pfItemsPerPage = Nothing
, _pfKind = "analytics#profiles"
, _pfUsername = Nothing
, _pfItems = Nothing
, _pfTotalResults = Nothing
, _pfStartIndex = Nothing
, _pfPreviousLink = Nothing
}
pfNextLink :: Lens' ProFiles (Maybe Text)
pfNextLink
= lens _pfNextLink (\ s a -> s{_pfNextLink = a})
pfItemsPerPage :: Lens' ProFiles (Maybe Int32)
pfItemsPerPage
= lens _pfItemsPerPage
(\ s a -> s{_pfItemsPerPage = a})
. mapping _Coerce
pfKind :: Lens' ProFiles Text
pfKind = lens _pfKind (\ s a -> s{_pfKind = a})
pfUsername :: Lens' ProFiles (Maybe Text)
pfUsername
= lens _pfUsername (\ s a -> s{_pfUsername = a})
pfItems :: Lens' ProFiles [ProFile]
pfItems
= lens _pfItems (\ s a -> s{_pfItems = a}) . _Default
. _Coerce
pfTotalResults :: Lens' ProFiles (Maybe Int32)
pfTotalResults
= lens _pfTotalResults
(\ s a -> s{_pfTotalResults = a})
. mapping _Coerce
pfStartIndex :: Lens' ProFiles (Maybe Int32)
pfStartIndex
= lens _pfStartIndex (\ s a -> s{_pfStartIndex = a})
. mapping _Coerce
pfPreviousLink :: Lens' ProFiles (Maybe Text)
pfPreviousLink
= lens _pfPreviousLink
(\ s a -> s{_pfPreviousLink = a})
instance FromJSON ProFiles where
parseJSON
= withObject "ProFiles"
(\ o ->
ProFiles' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#profiles")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON ProFiles where
toJSON ProFiles'{..}
= object
(catMaybes
[("nextLink" .=) <$> _pfNextLink,
("itemsPerPage" .=) <$> _pfItemsPerPage,
Just ("kind" .= _pfKind),
("username" .=) <$> _pfUsername,
("items" .=) <$> _pfItems,
("totalResults" .=) <$> _pfTotalResults,
("startIndex" .=) <$> _pfStartIndex,
("previousLink" .=) <$> _pfPreviousLink])
newtype AnalyticsDataimportDeleteUploadDataRequest = AnalyticsDataimportDeleteUploadDataRequest'
{ _addudrCustomDataImportUids :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
analyticsDataimportDeleteUploadDataRequest
:: AnalyticsDataimportDeleteUploadDataRequest
analyticsDataimportDeleteUploadDataRequest =
AnalyticsDataimportDeleteUploadDataRequest'
{ _addudrCustomDataImportUids = Nothing
}
addudrCustomDataImportUids :: Lens' AnalyticsDataimportDeleteUploadDataRequest [Text]
addudrCustomDataImportUids
= lens _addudrCustomDataImportUids
(\ s a -> s{_addudrCustomDataImportUids = a})
. _Default
. _Coerce
instance FromJSON
AnalyticsDataimportDeleteUploadDataRequest where
parseJSON
= withObject
"AnalyticsDataimportDeleteUploadDataRequest"
(\ o ->
AnalyticsDataimportDeleteUploadDataRequest' <$>
(o .:? "customDataImportUids" .!= mempty))
instance ToJSON
AnalyticsDataimportDeleteUploadDataRequest where
toJSON
AnalyticsDataimportDeleteUploadDataRequest'{..}
= object
(catMaybes
[("customDataImportUids" .=) <$>
_addudrCustomDataImportUids])
data EntityAdWordsLink = EntityAdWordsLink'
{ _entAdWordsAccounts :: !(Maybe [AdWordsAccount])
, _entProFileIds :: !(Maybe [Text])
, _entKind :: !Text
, _entSelfLink :: !(Maybe Text)
, _entName :: !(Maybe Text)
, _entId :: !(Maybe Text)
, _entEntity :: !(Maybe EntityAdWordsLinkEntity)
} deriving (Eq,Show,Data,Typeable,Generic)
entityAdWordsLink
:: EntityAdWordsLink
entityAdWordsLink =
EntityAdWordsLink'
{ _entAdWordsAccounts = Nothing
, _entProFileIds = Nothing
, _entKind = "analytics#entityAdWordsLink"
, _entSelfLink = Nothing
, _entName = Nothing
, _entId = Nothing
, _entEntity = Nothing
}
entAdWordsAccounts :: Lens' EntityAdWordsLink [AdWordsAccount]
entAdWordsAccounts
= lens _entAdWordsAccounts
(\ s a -> s{_entAdWordsAccounts = a})
. _Default
. _Coerce
entProFileIds :: Lens' EntityAdWordsLink [Text]
entProFileIds
= lens _entProFileIds
(\ s a -> s{_entProFileIds = a})
. _Default
. _Coerce
entKind :: Lens' EntityAdWordsLink Text
entKind = lens _entKind (\ s a -> s{_entKind = a})
entSelfLink :: Lens' EntityAdWordsLink (Maybe Text)
entSelfLink
= lens _entSelfLink (\ s a -> s{_entSelfLink = a})
entName :: Lens' EntityAdWordsLink (Maybe Text)
entName = lens _entName (\ s a -> s{_entName = a})
entId :: Lens' EntityAdWordsLink (Maybe Text)
entId = lens _entId (\ s a -> s{_entId = a})
entEntity :: Lens' EntityAdWordsLink (Maybe EntityAdWordsLinkEntity)
entEntity
= lens _entEntity (\ s a -> s{_entEntity = a})
instance FromJSON EntityAdWordsLink where
parseJSON
= withObject "EntityAdWordsLink"
(\ o ->
EntityAdWordsLink' <$>
(o .:? "adWordsAccounts" .!= mempty) <*>
(o .:? "profileIds" .!= mempty)
<*> (o .:? "kind" .!= "analytics#entityAdWordsLink")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "entity"))
instance ToJSON EntityAdWordsLink where
toJSON EntityAdWordsLink'{..}
= object
(catMaybes
[("adWordsAccounts" .=) <$> _entAdWordsAccounts,
("profileIds" .=) <$> _entProFileIds,
Just ("kind" .= _entKind),
("selfLink" .=) <$> _entSelfLink,
("name" .=) <$> _entName, ("id" .=) <$> _entId,
("entity" .=) <$> _entEntity])
data FilterSearchAndReplaceDetails = FilterSearchAndReplaceDetails'
{ _fsardFieldIndex :: !(Maybe (Textual Int32))
, _fsardField :: !(Maybe Text)
, _fsardSearchString :: !(Maybe Text)
, _fsardReplaceString :: !(Maybe Text)
, _fsardCaseSensitive :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
filterSearchAndReplaceDetails
:: FilterSearchAndReplaceDetails
filterSearchAndReplaceDetails =
FilterSearchAndReplaceDetails'
{ _fsardFieldIndex = Nothing
, _fsardField = Nothing
, _fsardSearchString = Nothing
, _fsardReplaceString = Nothing
, _fsardCaseSensitive = Nothing
}
fsardFieldIndex :: Lens' FilterSearchAndReplaceDetails (Maybe Int32)
fsardFieldIndex
= lens _fsardFieldIndex
(\ s a -> s{_fsardFieldIndex = a})
. mapping _Coerce
fsardField :: Lens' FilterSearchAndReplaceDetails (Maybe Text)
fsardField
= lens _fsardField (\ s a -> s{_fsardField = a})
fsardSearchString :: Lens' FilterSearchAndReplaceDetails (Maybe Text)
fsardSearchString
= lens _fsardSearchString
(\ s a -> s{_fsardSearchString = a})
fsardReplaceString :: Lens' FilterSearchAndReplaceDetails (Maybe Text)
fsardReplaceString
= lens _fsardReplaceString
(\ s a -> s{_fsardReplaceString = a})
fsardCaseSensitive :: Lens' FilterSearchAndReplaceDetails (Maybe Bool)
fsardCaseSensitive
= lens _fsardCaseSensitive
(\ s a -> s{_fsardCaseSensitive = a})
instance FromJSON FilterSearchAndReplaceDetails where
parseJSON
= withObject "FilterSearchAndReplaceDetails"
(\ o ->
FilterSearchAndReplaceDetails' <$>
(o .:? "fieldIndex") <*> (o .:? "field") <*>
(o .:? "searchString")
<*> (o .:? "replaceString")
<*> (o .:? "caseSensitive"))
instance ToJSON FilterSearchAndReplaceDetails where
toJSON FilterSearchAndReplaceDetails'{..}
= object
(catMaybes
[("fieldIndex" .=) <$> _fsardFieldIndex,
("field" .=) <$> _fsardField,
("searchString" .=) <$> _fsardSearchString,
("replaceString" .=) <$> _fsardReplaceString,
("caseSensitive" .=) <$> _fsardCaseSensitive])
newtype ProFilePermissions = ProFilePermissions'
{ _pfpEffective :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
proFilePermissions
:: ProFilePermissions
proFilePermissions =
ProFilePermissions'
{ _pfpEffective = Nothing
}
pfpEffective :: Lens' ProFilePermissions [Text]
pfpEffective
= lens _pfpEffective (\ s a -> s{_pfpEffective = a})
. _Default
. _Coerce
instance FromJSON ProFilePermissions where
parseJSON
= withObject "ProFilePermissions"
(\ o ->
ProFilePermissions' <$>
(o .:? "effective" .!= mempty))
instance ToJSON ProFilePermissions where
toJSON ProFilePermissions'{..}
= object
(catMaybes [("effective" .=) <$> _pfpEffective])
data ProFile = ProFile'
{ _pParentLink :: !(Maybe ProFileParentLink)
, _pECommerceTracking :: !(Maybe Bool)
, _pSiteSearchCategoryParameters :: !(Maybe Text)
, _pWebPropertyId :: !(Maybe Text)
, _pChildLink :: !(Maybe ProFileChildLink)
, _pSiteSearchQueryParameters :: !(Maybe Text)
, _pKind :: !Text
, _pDefaultPage :: !(Maybe Text)
, _pCreated :: !(Maybe DateTime')
, _pSelfLink :: !(Maybe Text)
, _pAccountId :: !(Maybe Text)
, _pBotFilteringEnabled :: !(Maybe Bool)
, _pName :: !(Maybe Text)
, _pCurrency :: !(Maybe Text)
, _pStarred :: !(Maybe Bool)
, _pInternalWebPropertyId :: !(Maybe Text)
, _pId :: !(Maybe Text)
, _pUpdated :: !(Maybe DateTime')
, _pPermissions :: !(Maybe ProFilePermissions)
, _pWebsiteURL :: !(Maybe Text)
, _pType :: !(Maybe Text)
, _pStripSiteSearchCategoryParameters :: !(Maybe Bool)
, _pTimezone :: !(Maybe Text)
, _pExcludeQueryParameters :: !(Maybe Text)
, _pEnhancedECommerceTracking :: !(Maybe Bool)
, _pStripSiteSearchQueryParameters :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
proFile
:: ProFile
proFile =
ProFile'
{ _pParentLink = Nothing
, _pECommerceTracking = Nothing
, _pSiteSearchCategoryParameters = Nothing
, _pWebPropertyId = Nothing
, _pChildLink = Nothing
, _pSiteSearchQueryParameters = Nothing
, _pKind = "analytics#profile"
, _pDefaultPage = Nothing
, _pCreated = Nothing
, _pSelfLink = Nothing
, _pAccountId = Nothing
, _pBotFilteringEnabled = Nothing
, _pName = Nothing
, _pCurrency = Nothing
, _pStarred = Nothing
, _pInternalWebPropertyId = Nothing
, _pId = Nothing
, _pUpdated = Nothing
, _pPermissions = Nothing
, _pWebsiteURL = Nothing
, _pType = Nothing
, _pStripSiteSearchCategoryParameters = Nothing
, _pTimezone = Nothing
, _pExcludeQueryParameters = Nothing
, _pEnhancedECommerceTracking = Nothing
, _pStripSiteSearchQueryParameters = Nothing
}
pParentLink :: Lens' ProFile (Maybe ProFileParentLink)
pParentLink
= lens _pParentLink (\ s a -> s{_pParentLink = a})
pECommerceTracking :: Lens' ProFile (Maybe Bool)
pECommerceTracking
= lens _pECommerceTracking
(\ s a -> s{_pECommerceTracking = a})
pSiteSearchCategoryParameters :: Lens' ProFile (Maybe Text)
pSiteSearchCategoryParameters
= lens _pSiteSearchCategoryParameters
(\ s a -> s{_pSiteSearchCategoryParameters = a})
pWebPropertyId :: Lens' ProFile (Maybe Text)
pWebPropertyId
= lens _pWebPropertyId
(\ s a -> s{_pWebPropertyId = a})
pChildLink :: Lens' ProFile (Maybe ProFileChildLink)
pChildLink
= lens _pChildLink (\ s a -> s{_pChildLink = a})
pSiteSearchQueryParameters :: Lens' ProFile (Maybe Text)
pSiteSearchQueryParameters
= lens _pSiteSearchQueryParameters
(\ s a -> s{_pSiteSearchQueryParameters = a})
pKind :: Lens' ProFile Text
pKind = lens _pKind (\ s a -> s{_pKind = a})
pDefaultPage :: Lens' ProFile (Maybe Text)
pDefaultPage
= lens _pDefaultPage (\ s a -> s{_pDefaultPage = a})
pCreated :: Lens' ProFile (Maybe UTCTime)
pCreated
= lens _pCreated (\ s a -> s{_pCreated = a}) .
mapping _DateTime
pSelfLink :: Lens' ProFile (Maybe Text)
pSelfLink
= lens _pSelfLink (\ s a -> s{_pSelfLink = a})
pAccountId :: Lens' ProFile (Maybe Text)
pAccountId
= lens _pAccountId (\ s a -> s{_pAccountId = a})
pBotFilteringEnabled :: Lens' ProFile (Maybe Bool)
pBotFilteringEnabled
= lens _pBotFilteringEnabled
(\ s a -> s{_pBotFilteringEnabled = a})
pName :: Lens' ProFile (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a})
pCurrency :: Lens' ProFile (Maybe Text)
pCurrency
= lens _pCurrency (\ s a -> s{_pCurrency = a})
pStarred :: Lens' ProFile (Maybe Bool)
pStarred = lens _pStarred (\ s a -> s{_pStarred = a})
pInternalWebPropertyId :: Lens' ProFile (Maybe Text)
pInternalWebPropertyId
= lens _pInternalWebPropertyId
(\ s a -> s{_pInternalWebPropertyId = a})
pId :: Lens' ProFile (Maybe Text)
pId = lens _pId (\ s a -> s{_pId = a})
pUpdated :: Lens' ProFile (Maybe UTCTime)
pUpdated
= lens _pUpdated (\ s a -> s{_pUpdated = a}) .
mapping _DateTime
pPermissions :: Lens' ProFile (Maybe ProFilePermissions)
pPermissions
= lens _pPermissions (\ s a -> s{_pPermissions = a})
pWebsiteURL :: Lens' ProFile (Maybe Text)
pWebsiteURL
= lens _pWebsiteURL (\ s a -> s{_pWebsiteURL = a})
pType :: Lens' ProFile (Maybe Text)
pType = lens _pType (\ s a -> s{_pType = a})
pStripSiteSearchCategoryParameters :: Lens' ProFile (Maybe Bool)
pStripSiteSearchCategoryParameters
= lens _pStripSiteSearchCategoryParameters
(\ s a -> s{_pStripSiteSearchCategoryParameters = a})
pTimezone :: Lens' ProFile (Maybe Text)
pTimezone
= lens _pTimezone (\ s a -> s{_pTimezone = a})
pExcludeQueryParameters :: Lens' ProFile (Maybe Text)
pExcludeQueryParameters
= lens _pExcludeQueryParameters
(\ s a -> s{_pExcludeQueryParameters = a})
pEnhancedECommerceTracking :: Lens' ProFile (Maybe Bool)
pEnhancedECommerceTracking
= lens _pEnhancedECommerceTracking
(\ s a -> s{_pEnhancedECommerceTracking = a})
pStripSiteSearchQueryParameters :: Lens' ProFile (Maybe Bool)
pStripSiteSearchQueryParameters
= lens _pStripSiteSearchQueryParameters
(\ s a -> s{_pStripSiteSearchQueryParameters = a})
instance FromJSON ProFile where
parseJSON
= withObject "ProFile"
(\ o ->
ProFile' <$>
(o .:? "parentLink") <*> (o .:? "eCommerceTracking")
<*> (o .:? "siteSearchCategoryParameters")
<*> (o .:? "webPropertyId")
<*> (o .:? "childLink")
<*> (o .:? "siteSearchQueryParameters")
<*> (o .:? "kind" .!= "analytics#profile")
<*> (o .:? "defaultPage")
<*> (o .:? "created")
<*> (o .:? "selfLink")
<*> (o .:? "accountId")
<*> (o .:? "botFilteringEnabled")
<*> (o .:? "name")
<*> (o .:? "currency")
<*> (o .:? "starred")
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "permissions")
<*> (o .:? "websiteUrl")
<*> (o .:? "type")
<*> (o .:? "stripSiteSearchCategoryParameters")
<*> (o .:? "timezone")
<*> (o .:? "excludeQueryParameters")
<*> (o .:? "enhancedECommerceTracking")
<*> (o .:? "stripSiteSearchQueryParameters"))
instance ToJSON ProFile where
toJSON ProFile'{..}
= object
(catMaybes
[("parentLink" .=) <$> _pParentLink,
("eCommerceTracking" .=) <$> _pECommerceTracking,
("siteSearchCategoryParameters" .=) <$>
_pSiteSearchCategoryParameters,
("webPropertyId" .=) <$> _pWebPropertyId,
("childLink" .=) <$> _pChildLink,
("siteSearchQueryParameters" .=) <$>
_pSiteSearchQueryParameters,
Just ("kind" .= _pKind),
("defaultPage" .=) <$> _pDefaultPage,
("created" .=) <$> _pCreated,
("selfLink" .=) <$> _pSelfLink,
("accountId" .=) <$> _pAccountId,
("botFilteringEnabled" .=) <$> _pBotFilteringEnabled,
("name" .=) <$> _pName,
("currency" .=) <$> _pCurrency,
("starred" .=) <$> _pStarred,
("internalWebPropertyId" .=) <$>
_pInternalWebPropertyId,
("id" .=) <$> _pId, ("updated" .=) <$> _pUpdated,
("permissions" .=) <$> _pPermissions,
("websiteUrl" .=) <$> _pWebsiteURL,
("type" .=) <$> _pType,
("stripSiteSearchCategoryParameters" .=) <$>
_pStripSiteSearchCategoryParameters,
("timezone" .=) <$> _pTimezone,
("excludeQueryParameters" .=) <$>
_pExcludeQueryParameters,
("enhancedECommerceTracking" .=) <$>
_pEnhancedECommerceTracking,
("stripSiteSearchQueryParameters" .=) <$>
_pStripSiteSearchQueryParameters])
data AccountSummaries = AccountSummaries'
{ _asNextLink :: !(Maybe Text)
, _asItemsPerPage :: !(Maybe (Textual Int32))
, _asKind :: !Text
, _asUsername :: !(Maybe Text)
, _asItems :: !(Maybe [AccountSummary])
, _asTotalResults :: !(Maybe (Textual Int32))
, _asStartIndex :: !(Maybe (Textual Int32))
, _asPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountSummaries
:: AccountSummaries
accountSummaries =
AccountSummaries'
{ _asNextLink = Nothing
, _asItemsPerPage = Nothing
, _asKind = "analytics#accountSummaries"
, _asUsername = Nothing
, _asItems = Nothing
, _asTotalResults = Nothing
, _asStartIndex = Nothing
, _asPreviousLink = Nothing
}
asNextLink :: Lens' AccountSummaries (Maybe Text)
asNextLink
= lens _asNextLink (\ s a -> s{_asNextLink = a})
asItemsPerPage :: Lens' AccountSummaries (Maybe Int32)
asItemsPerPage
= lens _asItemsPerPage
(\ s a -> s{_asItemsPerPage = a})
. mapping _Coerce
asKind :: Lens' AccountSummaries Text
asKind = lens _asKind (\ s a -> s{_asKind = a})
asUsername :: Lens' AccountSummaries (Maybe Text)
asUsername
= lens _asUsername (\ s a -> s{_asUsername = a})
asItems :: Lens' AccountSummaries [AccountSummary]
asItems
= lens _asItems (\ s a -> s{_asItems = a}) . _Default
. _Coerce
asTotalResults :: Lens' AccountSummaries (Maybe Int32)
asTotalResults
= lens _asTotalResults
(\ s a -> s{_asTotalResults = a})
. mapping _Coerce
asStartIndex :: Lens' AccountSummaries (Maybe Int32)
asStartIndex
= lens _asStartIndex (\ s a -> s{_asStartIndex = a})
. mapping _Coerce
asPreviousLink :: Lens' AccountSummaries (Maybe Text)
asPreviousLink
= lens _asPreviousLink
(\ s a -> s{_asPreviousLink = a})
instance FromJSON AccountSummaries where
parseJSON
= withObject "AccountSummaries"
(\ o ->
AccountSummaries' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#accountSummaries")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON AccountSummaries where
toJSON AccountSummaries'{..}
= object
(catMaybes
[("nextLink" .=) <$> _asNextLink,
("itemsPerPage" .=) <$> _asItemsPerPage,
Just ("kind" .= _asKind),
("username" .=) <$> _asUsername,
("items" .=) <$> _asItems,
("totalResults" .=) <$> _asTotalResults,
("startIndex" .=) <$> _asStartIndex,
("previousLink" .=) <$> _asPreviousLink])
data GoalEventDetails = GoalEventDetails'
{ _gedUseEventValue :: !(Maybe Bool)
, _gedEventConditions :: !(Maybe [GoalEventDetailsEventConditionsItem])
} deriving (Eq,Show,Data,Typeable,Generic)
goalEventDetails
:: GoalEventDetails
goalEventDetails =
GoalEventDetails'
{ _gedUseEventValue = Nothing
, _gedEventConditions = Nothing
}
gedUseEventValue :: Lens' GoalEventDetails (Maybe Bool)
gedUseEventValue
= lens _gedUseEventValue
(\ s a -> s{_gedUseEventValue = a})
gedEventConditions :: Lens' GoalEventDetails [GoalEventDetailsEventConditionsItem]
gedEventConditions
= lens _gedEventConditions
(\ s a -> s{_gedEventConditions = a})
. _Default
. _Coerce
instance FromJSON GoalEventDetails where
parseJSON
= withObject "GoalEventDetails"
(\ o ->
GoalEventDetails' <$>
(o .:? "useEventValue") <*>
(o .:? "eventConditions" .!= mempty))
instance ToJSON GoalEventDetails where
toJSON GoalEventDetails'{..}
= object
(catMaybes
[("useEventValue" .=) <$> _gedUseEventValue,
("eventConditions" .=) <$> _gedEventConditions])
data WebPropertySummary = WebPropertySummary'
{ _wpsKind :: !Text
, _wpsProFiles :: !(Maybe [ProFileSummary])
, _wpsName :: !(Maybe Text)
, _wpsStarred :: !(Maybe Bool)
, _wpsInternalWebPropertyId :: !(Maybe Text)
, _wpsId :: !(Maybe Text)
, _wpsWebsiteURL :: !(Maybe Text)
, _wpsLevel :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
webPropertySummary
:: WebPropertySummary
webPropertySummary =
WebPropertySummary'
{ _wpsKind = "analytics#webPropertySummary"
, _wpsProFiles = Nothing
, _wpsName = Nothing
, _wpsStarred = Nothing
, _wpsInternalWebPropertyId = Nothing
, _wpsId = Nothing
, _wpsWebsiteURL = Nothing
, _wpsLevel = Nothing
}
wpsKind :: Lens' WebPropertySummary Text
wpsKind = lens _wpsKind (\ s a -> s{_wpsKind = a})
wpsProFiles :: Lens' WebPropertySummary [ProFileSummary]
wpsProFiles
= lens _wpsProFiles (\ s a -> s{_wpsProFiles = a}) .
_Default
. _Coerce
wpsName :: Lens' WebPropertySummary (Maybe Text)
wpsName = lens _wpsName (\ s a -> s{_wpsName = a})
wpsStarred :: Lens' WebPropertySummary (Maybe Bool)
wpsStarred
= lens _wpsStarred (\ s a -> s{_wpsStarred = a})
wpsInternalWebPropertyId :: Lens' WebPropertySummary (Maybe Text)
wpsInternalWebPropertyId
= lens _wpsInternalWebPropertyId
(\ s a -> s{_wpsInternalWebPropertyId = a})
wpsId :: Lens' WebPropertySummary (Maybe Text)
wpsId = lens _wpsId (\ s a -> s{_wpsId = a})
wpsWebsiteURL :: Lens' WebPropertySummary (Maybe Text)
wpsWebsiteURL
= lens _wpsWebsiteURL
(\ s a -> s{_wpsWebsiteURL = a})
wpsLevel :: Lens' WebPropertySummary (Maybe Text)
wpsLevel = lens _wpsLevel (\ s a -> s{_wpsLevel = a})
instance FromJSON WebPropertySummary where
parseJSON
= withObject "WebPropertySummary"
(\ o ->
WebPropertySummary' <$>
(o .:? "kind" .!= "analytics#webPropertySummary") <*>
(o .:? "profiles" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "starred")
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "id")
<*> (o .:? "websiteUrl")
<*> (o .:? "level"))
instance ToJSON WebPropertySummary where
toJSON WebPropertySummary'{..}
= object
(catMaybes
[Just ("kind" .= _wpsKind),
("profiles" .=) <$> _wpsProFiles,
("name" .=) <$> _wpsName,
("starred" .=) <$> _wpsStarred,
("internalWebPropertyId" .=) <$>
_wpsInternalWebPropertyId,
("id" .=) <$> _wpsId,
("websiteUrl" .=) <$> _wpsWebsiteURL,
("level" .=) <$> _wpsLevel])
data Filters = Filters'
{ _fNextLink :: !(Maybe Text)
, _fItemsPerPage :: !(Maybe (Textual Int32))
, _fKind :: !Text
, _fUsername :: !(Maybe Text)
, _fItems :: !(Maybe [Filter])
, _fTotalResults :: !(Maybe (Textual Int32))
, _fStartIndex :: !(Maybe (Textual Int32))
, _fPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
filters
:: Filters
filters =
Filters'
{ _fNextLink = Nothing
, _fItemsPerPage = Nothing
, _fKind = "analytics#filters"
, _fUsername = Nothing
, _fItems = Nothing
, _fTotalResults = Nothing
, _fStartIndex = Nothing
, _fPreviousLink = Nothing
}
fNextLink :: Lens' Filters (Maybe Text)
fNextLink
= lens _fNextLink (\ s a -> s{_fNextLink = a})
fItemsPerPage :: Lens' Filters (Maybe Int32)
fItemsPerPage
= lens _fItemsPerPage
(\ s a -> s{_fItemsPerPage = a})
. mapping _Coerce
fKind :: Lens' Filters Text
fKind = lens _fKind (\ s a -> s{_fKind = a})
fUsername :: Lens' Filters (Maybe Text)
fUsername
= lens _fUsername (\ s a -> s{_fUsername = a})
fItems :: Lens' Filters [Filter]
fItems
= lens _fItems (\ s a -> s{_fItems = a}) . _Default .
_Coerce
fTotalResults :: Lens' Filters (Maybe Int32)
fTotalResults
= lens _fTotalResults
(\ s a -> s{_fTotalResults = a})
. mapping _Coerce
fStartIndex :: Lens' Filters (Maybe Int32)
fStartIndex
= lens _fStartIndex (\ s a -> s{_fStartIndex = a}) .
mapping _Coerce
fPreviousLink :: Lens' Filters (Maybe Text)
fPreviousLink
= lens _fPreviousLink
(\ s a -> s{_fPreviousLink = a})
instance FromJSON Filters where
parseJSON
= withObject "Filters"
(\ o ->
Filters' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#filters")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON Filters where
toJSON Filters'{..}
= object
(catMaybes
[("nextLink" .=) <$> _fNextLink,
("itemsPerPage" .=) <$> _fItemsPerPage,
Just ("kind" .= _fKind),
("username" .=) <$> _fUsername,
("items" .=) <$> _fItems,
("totalResults" .=) <$> _fTotalResults,
("startIndex" .=) <$> _fStartIndex,
("previousLink" .=) <$> _fPreviousLink])
data GaData = GaData'
{ _gdNextLink :: !(Maybe Text)
, _gdSampleSpace :: !(Maybe (Textual Int64))
, _gdItemsPerPage :: !(Maybe (Textual Int32))
, _gdProFileInfo :: !(Maybe GaDataProFileInfo)
, _gdKind :: !Text
, _gdSampleSize :: !(Maybe (Textual Int64))
, _gdRows :: !(Maybe [[Text]])
, _gdSelfLink :: !(Maybe Text)
, _gdQuery :: !(Maybe GaDataQuery)
, _gdColumnHeaders :: !(Maybe [GaDataColumnHeadersItem])
, _gdId :: !(Maybe Text)
, _gdTotalResults :: !(Maybe (Textual Int32))
, _gdDataLastRefreshed :: !(Maybe (Textual Int64))
, _gdDataTable :: !(Maybe GaDataDataTable)
, _gdContainsSampledData :: !(Maybe Bool)
, _gdTotalsForAllResults :: !(Maybe GaDataTotalsForAllResults)
, _gdPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
gaData
:: GaData
gaData =
GaData'
{ _gdNextLink = Nothing
, _gdSampleSpace = Nothing
, _gdItemsPerPage = Nothing
, _gdProFileInfo = Nothing
, _gdKind = "analytics#gaData"
, _gdSampleSize = Nothing
, _gdRows = Nothing
, _gdSelfLink = Nothing
, _gdQuery = Nothing
, _gdColumnHeaders = Nothing
, _gdId = Nothing
, _gdTotalResults = Nothing
, _gdDataLastRefreshed = Nothing
, _gdDataTable = Nothing
, _gdContainsSampledData = Nothing
, _gdTotalsForAllResults = Nothing
, _gdPreviousLink = Nothing
}
gdNextLink :: Lens' GaData (Maybe Text)
gdNextLink
= lens _gdNextLink (\ s a -> s{_gdNextLink = a})
gdSampleSpace :: Lens' GaData (Maybe Int64)
gdSampleSpace
= lens _gdSampleSpace
(\ s a -> s{_gdSampleSpace = a})
. mapping _Coerce
gdItemsPerPage :: Lens' GaData (Maybe Int32)
gdItemsPerPage
= lens _gdItemsPerPage
(\ s a -> s{_gdItemsPerPage = a})
. mapping _Coerce
gdProFileInfo :: Lens' GaData (Maybe GaDataProFileInfo)
gdProFileInfo
= lens _gdProFileInfo
(\ s a -> s{_gdProFileInfo = a})
gdKind :: Lens' GaData Text
gdKind = lens _gdKind (\ s a -> s{_gdKind = a})
gdSampleSize :: Lens' GaData (Maybe Int64)
gdSampleSize
= lens _gdSampleSize (\ s a -> s{_gdSampleSize = a})
. mapping _Coerce
gdRows :: Lens' GaData [[Text]]
gdRows
= lens _gdRows (\ s a -> s{_gdRows = a}) . _Default .
_Coerce
gdSelfLink :: Lens' GaData (Maybe Text)
gdSelfLink
= lens _gdSelfLink (\ s a -> s{_gdSelfLink = a})
gdQuery :: Lens' GaData (Maybe GaDataQuery)
gdQuery = lens _gdQuery (\ s a -> s{_gdQuery = a})
gdColumnHeaders :: Lens' GaData [GaDataColumnHeadersItem]
gdColumnHeaders
= lens _gdColumnHeaders
(\ s a -> s{_gdColumnHeaders = a})
. _Default
. _Coerce
gdId :: Lens' GaData (Maybe Text)
gdId = lens _gdId (\ s a -> s{_gdId = a})
gdTotalResults :: Lens' GaData (Maybe Int32)
gdTotalResults
= lens _gdTotalResults
(\ s a -> s{_gdTotalResults = a})
. mapping _Coerce
gdDataLastRefreshed :: Lens' GaData (Maybe Int64)
gdDataLastRefreshed
= lens _gdDataLastRefreshed
(\ s a -> s{_gdDataLastRefreshed = a})
. mapping _Coerce
gdDataTable :: Lens' GaData (Maybe GaDataDataTable)
gdDataTable
= lens _gdDataTable (\ s a -> s{_gdDataTable = a})
gdContainsSampledData :: Lens' GaData (Maybe Bool)
gdContainsSampledData
= lens _gdContainsSampledData
(\ s a -> s{_gdContainsSampledData = a})
gdTotalsForAllResults :: Lens' GaData (Maybe GaDataTotalsForAllResults)
gdTotalsForAllResults
= lens _gdTotalsForAllResults
(\ s a -> s{_gdTotalsForAllResults = a})
gdPreviousLink :: Lens' GaData (Maybe Text)
gdPreviousLink
= lens _gdPreviousLink
(\ s a -> s{_gdPreviousLink = a})
instance FromJSON GaData where
parseJSON
= withObject "GaData"
(\ o ->
GaData' <$>
(o .:? "nextLink") <*> (o .:? "sampleSpace") <*>
(o .:? "itemsPerPage")
<*> (o .:? "profileInfo")
<*> (o .:? "kind" .!= "analytics#gaData")
<*> (o .:? "sampleSize")
<*> (o .:? "rows" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "query")
<*> (o .:? "columnHeaders" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "totalResults")
<*> (o .:? "dataLastRefreshed")
<*> (o .:? "dataTable")
<*> (o .:? "containsSampledData")
<*> (o .:? "totalsForAllResults")
<*> (o .:? "previousLink"))
instance ToJSON GaData where
toJSON GaData'{..}
= object
(catMaybes
[("nextLink" .=) <$> _gdNextLink,
("sampleSpace" .=) <$> _gdSampleSpace,
("itemsPerPage" .=) <$> _gdItemsPerPage,
("profileInfo" .=) <$> _gdProFileInfo,
Just ("kind" .= _gdKind),
("sampleSize" .=) <$> _gdSampleSize,
("rows" .=) <$> _gdRows,
("selfLink" .=) <$> _gdSelfLink,
("query" .=) <$> _gdQuery,
("columnHeaders" .=) <$> _gdColumnHeaders,
("id" .=) <$> _gdId,
("totalResults" .=) <$> _gdTotalResults,
("dataLastRefreshed" .=) <$> _gdDataLastRefreshed,
("dataTable" .=) <$> _gdDataTable,
("containsSampledData" .=) <$>
_gdContainsSampledData,
("totalsForAllResults" .=) <$>
_gdTotalsForAllResults,
("previousLink" .=) <$> _gdPreviousLink])
newtype RealtimeDataTotalsForAllResults = RealtimeDataTotalsForAllResults'
{ _rdtfarAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
realtimeDataTotalsForAllResults
:: HashMap Text Text
-> RealtimeDataTotalsForAllResults
realtimeDataTotalsForAllResults pRdtfarAddtional_ =
RealtimeDataTotalsForAllResults'
{ _rdtfarAddtional = _Coerce # pRdtfarAddtional_
}
rdtfarAddtional :: Lens' RealtimeDataTotalsForAllResults (HashMap Text Text)
rdtfarAddtional
= lens _rdtfarAddtional
(\ s a -> s{_rdtfarAddtional = a})
. _Coerce
instance FromJSON RealtimeDataTotalsForAllResults
where
parseJSON
= withObject "RealtimeDataTotalsForAllResults"
(\ o ->
RealtimeDataTotalsForAllResults' <$>
(parseJSONObject o))
instance ToJSON RealtimeDataTotalsForAllResults where
toJSON = toJSON . _rdtfarAddtional
data CustomDataSource = CustomDataSource'
{ _cParentLink :: !(Maybe CustomDataSourceParentLink)
, _cWebPropertyId :: !(Maybe Text)
, _cChildLink :: !(Maybe CustomDataSourceChildLink)
, _cKind :: !Text
, _cCreated :: !(Maybe DateTime')
, _cUploadType :: !(Maybe Text)
, _cSchema :: !(Maybe [Text])
, _cImportBehavior :: !(Maybe Text)
, _cSelfLink :: !(Maybe Text)
, _cAccountId :: !(Maybe Text)
, _cName :: !(Maybe Text)
, _cId :: !(Maybe Text)
, _cUpdated :: !(Maybe DateTime')
, _cType :: !(Maybe Text)
, _cDescription :: !(Maybe Text)
, _cProFilesLinked :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
customDataSource
:: CustomDataSource
customDataSource =
CustomDataSource'
{ _cParentLink = Nothing
, _cWebPropertyId = Nothing
, _cChildLink = Nothing
, _cKind = "analytics#customDataSource"
, _cCreated = Nothing
, _cUploadType = Nothing
, _cSchema = Nothing
, _cImportBehavior = Nothing
, _cSelfLink = Nothing
, _cAccountId = Nothing
, _cName = Nothing
, _cId = Nothing
, _cUpdated = Nothing
, _cType = Nothing
, _cDescription = Nothing
, _cProFilesLinked = Nothing
}
cParentLink :: Lens' CustomDataSource (Maybe CustomDataSourceParentLink)
cParentLink
= lens _cParentLink (\ s a -> s{_cParentLink = a})
cWebPropertyId :: Lens' CustomDataSource (Maybe Text)
cWebPropertyId
= lens _cWebPropertyId
(\ s a -> s{_cWebPropertyId = a})
cChildLink :: Lens' CustomDataSource (Maybe CustomDataSourceChildLink)
cChildLink
= lens _cChildLink (\ s a -> s{_cChildLink = a})
cKind :: Lens' CustomDataSource Text
cKind = lens _cKind (\ s a -> s{_cKind = a})
cCreated :: Lens' CustomDataSource (Maybe UTCTime)
cCreated
= lens _cCreated (\ s a -> s{_cCreated = a}) .
mapping _DateTime
cUploadType :: Lens' CustomDataSource (Maybe Text)
cUploadType
= lens _cUploadType (\ s a -> s{_cUploadType = a})
cSchema :: Lens' CustomDataSource [Text]
cSchema
= lens _cSchema (\ s a -> s{_cSchema = a}) . _Default
. _Coerce
cImportBehavior :: Lens' CustomDataSource (Maybe Text)
cImportBehavior
= lens _cImportBehavior
(\ s a -> s{_cImportBehavior = a})
cSelfLink :: Lens' CustomDataSource (Maybe Text)
cSelfLink
= lens _cSelfLink (\ s a -> s{_cSelfLink = a})
cAccountId :: Lens' CustomDataSource (Maybe Text)
cAccountId
= lens _cAccountId (\ s a -> s{_cAccountId = a})
cName :: Lens' CustomDataSource (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cId :: Lens' CustomDataSource (Maybe Text)
cId = lens _cId (\ s a -> s{_cId = a})
cUpdated :: Lens' CustomDataSource (Maybe UTCTime)
cUpdated
= lens _cUpdated (\ s a -> s{_cUpdated = a}) .
mapping _DateTime
cType :: Lens' CustomDataSource (Maybe Text)
cType = lens _cType (\ s a -> s{_cType = a})
cDescription :: Lens' CustomDataSource (Maybe Text)
cDescription
= lens _cDescription (\ s a -> s{_cDescription = a})
cProFilesLinked :: Lens' CustomDataSource [Text]
cProFilesLinked
= lens _cProFilesLinked
(\ s a -> s{_cProFilesLinked = a})
. _Default
. _Coerce
instance FromJSON CustomDataSource where
parseJSON
= withObject "CustomDataSource"
(\ o ->
CustomDataSource' <$>
(o .:? "parentLink") <*> (o .:? "webPropertyId") <*>
(o .:? "childLink")
<*> (o .:? "kind" .!= "analytics#customDataSource")
<*> (o .:? "created")
<*> (o .:? "uploadType")
<*> (o .:? "schema" .!= mempty)
<*> (o .:? "importBehavior")
<*> (o .:? "selfLink")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "type")
<*> (o .:? "description")
<*> (o .:? "profilesLinked" .!= mempty))
instance ToJSON CustomDataSource where
toJSON CustomDataSource'{..}
= object
(catMaybes
[("parentLink" .=) <$> _cParentLink,
("webPropertyId" .=) <$> _cWebPropertyId,
("childLink" .=) <$> _cChildLink,
Just ("kind" .= _cKind),
("created" .=) <$> _cCreated,
("uploadType" .=) <$> _cUploadType,
("schema" .=) <$> _cSchema,
("importBehavior" .=) <$> _cImportBehavior,
("selfLink" .=) <$> _cSelfLink,
("accountId" .=) <$> _cAccountId,
("name" .=) <$> _cName, ("id" .=) <$> _cId,
("updated" .=) <$> _cUpdated, ("type" .=) <$> _cType,
("description" .=) <$> _cDescription,
("profilesLinked" .=) <$> _cProFilesLinked])
data AccountTreeRequest = AccountTreeRequest'
{ _atrAccountSettings :: !(Maybe AccountTreeRequestAccountSettings)
, _atrWebPropertyName :: !(Maybe Text)
, _atrKind :: !Text
, _atrAccountName :: !(Maybe Text)
, _atrProFileName :: !(Maybe Text)
, _atrWebsiteURL :: !(Maybe Text)
, _atrTimezone :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountTreeRequest
:: AccountTreeRequest
accountTreeRequest =
AccountTreeRequest'
{ _atrAccountSettings = Nothing
, _atrWebPropertyName = Nothing
, _atrKind = "analytics#accountTreeRequest"
, _atrAccountName = Nothing
, _atrProFileName = Nothing
, _atrWebsiteURL = Nothing
, _atrTimezone = Nothing
}
atrAccountSettings :: Lens' AccountTreeRequest (Maybe AccountTreeRequestAccountSettings)
atrAccountSettings
= lens _atrAccountSettings
(\ s a -> s{_atrAccountSettings = a})
atrWebPropertyName :: Lens' AccountTreeRequest (Maybe Text)
atrWebPropertyName
= lens _atrWebPropertyName
(\ s a -> s{_atrWebPropertyName = a})
atrKind :: Lens' AccountTreeRequest Text
atrKind = lens _atrKind (\ s a -> s{_atrKind = a})
atrAccountName :: Lens' AccountTreeRequest (Maybe Text)
atrAccountName
= lens _atrAccountName
(\ s a -> s{_atrAccountName = a})
atrProFileName :: Lens' AccountTreeRequest (Maybe Text)
atrProFileName
= lens _atrProFileName
(\ s a -> s{_atrProFileName = a})
atrWebsiteURL :: Lens' AccountTreeRequest (Maybe Text)
atrWebsiteURL
= lens _atrWebsiteURL
(\ s a -> s{_atrWebsiteURL = a})
atrTimezone :: Lens' AccountTreeRequest (Maybe Text)
atrTimezone
= lens _atrTimezone (\ s a -> s{_atrTimezone = a})
instance FromJSON AccountTreeRequest where
parseJSON
= withObject "AccountTreeRequest"
(\ o ->
AccountTreeRequest' <$>
(o .:? "accountSettings") <*>
(o .:? "webpropertyName")
<*> (o .:? "kind" .!= "analytics#accountTreeRequest")
<*> (o .:? "accountName")
<*> (o .:? "profileName")
<*> (o .:? "websiteUrl")
<*> (o .:? "timezone"))
instance ToJSON AccountTreeRequest where
toJSON AccountTreeRequest'{..}
= object
(catMaybes
[("accountSettings" .=) <$> _atrAccountSettings,
("webpropertyName" .=) <$> _atrWebPropertyName,
Just ("kind" .= _atrKind),
("accountName" .=) <$> _atrAccountName,
("profileName" .=) <$> _atrProFileName,
("websiteUrl" .=) <$> _atrWebsiteURL,
("timezone" .=) <$> _atrTimezone])
data WebPropertyRef = WebPropertyRef'
{ _wprKind :: !Text
, _wprHref :: !(Maybe Text)
, _wprAccountId :: !(Maybe Text)
, _wprName :: !(Maybe Text)
, _wprInternalWebPropertyId :: !(Maybe Text)
, _wprId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
webPropertyRef
:: WebPropertyRef
webPropertyRef =
WebPropertyRef'
{ _wprKind = "analytics#webPropertyRef"
, _wprHref = Nothing
, _wprAccountId = Nothing
, _wprName = Nothing
, _wprInternalWebPropertyId = Nothing
, _wprId = Nothing
}
wprKind :: Lens' WebPropertyRef Text
wprKind = lens _wprKind (\ s a -> s{_wprKind = a})
wprHref :: Lens' WebPropertyRef (Maybe Text)
wprHref = lens _wprHref (\ s a -> s{_wprHref = a})
wprAccountId :: Lens' WebPropertyRef (Maybe Text)
wprAccountId
= lens _wprAccountId (\ s a -> s{_wprAccountId = a})
wprName :: Lens' WebPropertyRef (Maybe Text)
wprName = lens _wprName (\ s a -> s{_wprName = a})
wprInternalWebPropertyId :: Lens' WebPropertyRef (Maybe Text)
wprInternalWebPropertyId
= lens _wprInternalWebPropertyId
(\ s a -> s{_wprInternalWebPropertyId = a})
wprId :: Lens' WebPropertyRef (Maybe Text)
wprId = lens _wprId (\ s a -> s{_wprId = a})
instance FromJSON WebPropertyRef where
parseJSON
= withObject "WebPropertyRef"
(\ o ->
WebPropertyRef' <$>
(o .:? "kind" .!= "analytics#webPropertyRef") <*>
(o .:? "href")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "id"))
instance ToJSON WebPropertyRef where
toJSON WebPropertyRef'{..}
= object
(catMaybes
[Just ("kind" .= _wprKind), ("href" .=) <$> _wprHref,
("accountId" .=) <$> _wprAccountId,
("name" .=) <$> _wprName,
("internalWebPropertyId" .=) <$>
_wprInternalWebPropertyId,
("id" .=) <$> _wprId])
data LinkedForeignAccount = LinkedForeignAccount'
{ _lfaStatus :: !(Maybe Text)
, _lfaWebPropertyId :: !(Maybe Text)
, _lfaKind :: !Text
, _lfaEligibleForSearch :: !(Maybe Bool)
, _lfaAccountId :: !(Maybe Text)
, _lfaRemarketingAudienceId :: !(Maybe Text)
, _lfaLinkedAccountId :: !(Maybe Text)
, _lfaInternalWebPropertyId :: !(Maybe Text)
, _lfaId :: !(Maybe Text)
, _lfaType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
linkedForeignAccount
:: LinkedForeignAccount
linkedForeignAccount =
LinkedForeignAccount'
{ _lfaStatus = Nothing
, _lfaWebPropertyId = Nothing
, _lfaKind = "analytics#linkedForeignAccount"
, _lfaEligibleForSearch = Nothing
, _lfaAccountId = Nothing
, _lfaRemarketingAudienceId = Nothing
, _lfaLinkedAccountId = Nothing
, _lfaInternalWebPropertyId = Nothing
, _lfaId = Nothing
, _lfaType = Nothing
}
lfaStatus :: Lens' LinkedForeignAccount (Maybe Text)
lfaStatus
= lens _lfaStatus (\ s a -> s{_lfaStatus = a})
lfaWebPropertyId :: Lens' LinkedForeignAccount (Maybe Text)
lfaWebPropertyId
= lens _lfaWebPropertyId
(\ s a -> s{_lfaWebPropertyId = a})
lfaKind :: Lens' LinkedForeignAccount Text
lfaKind = lens _lfaKind (\ s a -> s{_lfaKind = a})
lfaEligibleForSearch :: Lens' LinkedForeignAccount (Maybe Bool)
lfaEligibleForSearch
= lens _lfaEligibleForSearch
(\ s a -> s{_lfaEligibleForSearch = a})
lfaAccountId :: Lens' LinkedForeignAccount (Maybe Text)
lfaAccountId
= lens _lfaAccountId (\ s a -> s{_lfaAccountId = a})
lfaRemarketingAudienceId :: Lens' LinkedForeignAccount (Maybe Text)
lfaRemarketingAudienceId
= lens _lfaRemarketingAudienceId
(\ s a -> s{_lfaRemarketingAudienceId = a})
lfaLinkedAccountId :: Lens' LinkedForeignAccount (Maybe Text)
lfaLinkedAccountId
= lens _lfaLinkedAccountId
(\ s a -> s{_lfaLinkedAccountId = a})
lfaInternalWebPropertyId :: Lens' LinkedForeignAccount (Maybe Text)
lfaInternalWebPropertyId
= lens _lfaInternalWebPropertyId
(\ s a -> s{_lfaInternalWebPropertyId = a})
lfaId :: Lens' LinkedForeignAccount (Maybe Text)
lfaId = lens _lfaId (\ s a -> s{_lfaId = a})
lfaType :: Lens' LinkedForeignAccount (Maybe Text)
lfaType = lens _lfaType (\ s a -> s{_lfaType = a})
instance FromJSON LinkedForeignAccount where
parseJSON
= withObject "LinkedForeignAccount"
(\ o ->
LinkedForeignAccount' <$>
(o .:? "status") <*> (o .:? "webPropertyId") <*>
(o .:? "kind" .!= "analytics#linkedForeignAccount")
<*> (o .:? "eligibleForSearch")
<*> (o .:? "accountId")
<*> (o .:? "remarketingAudienceId")
<*> (o .:? "linkedAccountId")
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "id")
<*> (o .:? "type"))
instance ToJSON LinkedForeignAccount where
toJSON LinkedForeignAccount'{..}
= object
(catMaybes
[("status" .=) <$> _lfaStatus,
("webPropertyId" .=) <$> _lfaWebPropertyId,
Just ("kind" .= _lfaKind),
("eligibleForSearch" .=) <$> _lfaEligibleForSearch,
("accountId" .=) <$> _lfaAccountId,
("remarketingAudienceId" .=) <$>
_lfaRemarketingAudienceId,
("linkedAccountId" .=) <$> _lfaLinkedAccountId,
("internalWebPropertyId" .=) <$>
_lfaInternalWebPropertyId,
("id" .=) <$> _lfaId, ("type" .=) <$> _lfaType])
data Goals = Goals'
{ _gNextLink :: !(Maybe Text)
, _gItemsPerPage :: !(Maybe (Textual Int32))
, _gKind :: !Text
, _gUsername :: !(Maybe Text)
, _gItems :: !(Maybe [Goal])
, _gTotalResults :: !(Maybe (Textual Int32))
, _gStartIndex :: !(Maybe (Textual Int32))
, _gPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
goals
:: Goals
goals =
Goals'
{ _gNextLink = Nothing
, _gItemsPerPage = Nothing
, _gKind = "analytics#goals"
, _gUsername = Nothing
, _gItems = Nothing
, _gTotalResults = Nothing
, _gStartIndex = Nothing
, _gPreviousLink = Nothing
}
gNextLink :: Lens' Goals (Maybe Text)
gNextLink
= lens _gNextLink (\ s a -> s{_gNextLink = a})
gItemsPerPage :: Lens' Goals (Maybe Int32)
gItemsPerPage
= lens _gItemsPerPage
(\ s a -> s{_gItemsPerPage = a})
. mapping _Coerce
gKind :: Lens' Goals Text
gKind = lens _gKind (\ s a -> s{_gKind = a})
gUsername :: Lens' Goals (Maybe Text)
gUsername
= lens _gUsername (\ s a -> s{_gUsername = a})
gItems :: Lens' Goals [Goal]
gItems
= lens _gItems (\ s a -> s{_gItems = a}) . _Default .
_Coerce
gTotalResults :: Lens' Goals (Maybe Int32)
gTotalResults
= lens _gTotalResults
(\ s a -> s{_gTotalResults = a})
. mapping _Coerce
gStartIndex :: Lens' Goals (Maybe Int32)
gStartIndex
= lens _gStartIndex (\ s a -> s{_gStartIndex = a}) .
mapping _Coerce
gPreviousLink :: Lens' Goals (Maybe Text)
gPreviousLink
= lens _gPreviousLink
(\ s a -> s{_gPreviousLink = a})
instance FromJSON Goals where
parseJSON
= withObject "Goals"
(\ o ->
Goals' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#goals")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON Goals where
toJSON Goals'{..}
= object
(catMaybes
[("nextLink" .=) <$> _gNextLink,
("itemsPerPage" .=) <$> _gItemsPerPage,
Just ("kind" .= _gKind),
("username" .=) <$> _gUsername,
("items" .=) <$> _gItems,
("totalResults" .=) <$> _gTotalResults,
("startIndex" .=) <$> _gStartIndex,
("previousLink" .=) <$> _gPreviousLink])
data McfDataRowsItemItem = McfDataRowsItemItem'
{ _mdriiPrimitiveValue :: !(Maybe Text)
, _mdriiConversionPathValue :: !(Maybe [McfDataRowsItemItemConversionPathValueItem])
} deriving (Eq,Show,Data,Typeable,Generic)
mcfDataRowsItemItem
:: McfDataRowsItemItem
mcfDataRowsItemItem =
McfDataRowsItemItem'
{ _mdriiPrimitiveValue = Nothing
, _mdriiConversionPathValue = Nothing
}
mdriiPrimitiveValue :: Lens' McfDataRowsItemItem (Maybe Text)
mdriiPrimitiveValue
= lens _mdriiPrimitiveValue
(\ s a -> s{_mdriiPrimitiveValue = a})
mdriiConversionPathValue :: Lens' McfDataRowsItemItem [McfDataRowsItemItemConversionPathValueItem]
mdriiConversionPathValue
= lens _mdriiConversionPathValue
(\ s a -> s{_mdriiConversionPathValue = a})
. _Default
. _Coerce
instance FromJSON McfDataRowsItemItem where
parseJSON
= withObject "McfDataRowsItemItem"
(\ o ->
McfDataRowsItemItem' <$>
(o .:? "primitiveValue") <*>
(o .:? "conversionPathValue" .!= mempty))
instance ToJSON McfDataRowsItemItem where
toJSON McfDataRowsItemItem'{..}
= object
(catMaybes
[("primitiveValue" .=) <$> _mdriiPrimitiveValue,
("conversionPathValue" .=) <$>
_mdriiConversionPathValue])
newtype AccountPermissions = AccountPermissions'
{ _apEffective :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
accountPermissions
:: AccountPermissions
accountPermissions =
AccountPermissions'
{ _apEffective = Nothing
}
apEffective :: Lens' AccountPermissions [Text]
apEffective
= lens _apEffective (\ s a -> s{_apEffective = a}) .
_Default
. _Coerce
instance FromJSON AccountPermissions where
parseJSON
= withObject "AccountPermissions"
(\ o ->
AccountPermissions' <$>
(o .:? "effective" .!= mempty))
instance ToJSON AccountPermissions where
toJSON AccountPermissions'{..}
= object
(catMaybes [("effective" .=) <$> _apEffective])
data EntityUserLinkEntity = EntityUserLinkEntity'
{ _euleProFileRef :: !(Maybe ProFileRef)
, _euleAccountRef :: !(Maybe AccountRef)
, _euleWebPropertyRef :: !(Maybe WebPropertyRef)
} deriving (Eq,Show,Data,Typeable,Generic)
entityUserLinkEntity
:: EntityUserLinkEntity
entityUserLinkEntity =
EntityUserLinkEntity'
{ _euleProFileRef = Nothing
, _euleAccountRef = Nothing
, _euleWebPropertyRef = Nothing
}
euleProFileRef :: Lens' EntityUserLinkEntity (Maybe ProFileRef)
euleProFileRef
= lens _euleProFileRef
(\ s a -> s{_euleProFileRef = a})
euleAccountRef :: Lens' EntityUserLinkEntity (Maybe AccountRef)
euleAccountRef
= lens _euleAccountRef
(\ s a -> s{_euleAccountRef = a})
euleWebPropertyRef :: Lens' EntityUserLinkEntity (Maybe WebPropertyRef)
euleWebPropertyRef
= lens _euleWebPropertyRef
(\ s a -> s{_euleWebPropertyRef = a})
instance FromJSON EntityUserLinkEntity where
parseJSON
= withObject "EntityUserLinkEntity"
(\ o ->
EntityUserLinkEntity' <$>
(o .:? "profileRef") <*> (o .:? "accountRef") <*>
(o .:? "webPropertyRef"))
instance ToJSON EntityUserLinkEntity where
toJSON EntityUserLinkEntity'{..}
= object
(catMaybes
[("profileRef" .=) <$> _euleProFileRef,
("accountRef" .=) <$> _euleAccountRef,
("webPropertyRef" .=) <$> _euleWebPropertyRef])
data Account = Account'
{ _accChildLink :: !(Maybe AccountChildLink)
, _accKind :: !Text
, _accCreated :: !(Maybe DateTime')
, _accSelfLink :: !(Maybe Text)
, _accName :: !(Maybe Text)
, _accStarred :: !(Maybe Bool)
, _accId :: !(Maybe Text)
, _accUpdated :: !(Maybe DateTime')
, _accPermissions :: !(Maybe AccountPermissions)
} deriving (Eq,Show,Data,Typeable,Generic)
account
:: Account
account =
Account'
{ _accChildLink = Nothing
, _accKind = "analytics#account"
, _accCreated = Nothing
, _accSelfLink = Nothing
, _accName = Nothing
, _accStarred = Nothing
, _accId = Nothing
, _accUpdated = Nothing
, _accPermissions = Nothing
}
accChildLink :: Lens' Account (Maybe AccountChildLink)
accChildLink
= lens _accChildLink (\ s a -> s{_accChildLink = a})
accKind :: Lens' Account Text
accKind = lens _accKind (\ s a -> s{_accKind = a})
accCreated :: Lens' Account (Maybe UTCTime)
accCreated
= lens _accCreated (\ s a -> s{_accCreated = a}) .
mapping _DateTime
accSelfLink :: Lens' Account (Maybe Text)
accSelfLink
= lens _accSelfLink (\ s a -> s{_accSelfLink = a})
accName :: Lens' Account (Maybe Text)
accName = lens _accName (\ s a -> s{_accName = a})
accStarred :: Lens' Account (Maybe Bool)
accStarred
= lens _accStarred (\ s a -> s{_accStarred = a})
accId :: Lens' Account (Maybe Text)
accId = lens _accId (\ s a -> s{_accId = a})
accUpdated :: Lens' Account (Maybe UTCTime)
accUpdated
= lens _accUpdated (\ s a -> s{_accUpdated = a}) .
mapping _DateTime
accPermissions :: Lens' Account (Maybe AccountPermissions)
accPermissions
= lens _accPermissions
(\ s a -> s{_accPermissions = a})
instance FromJSON Account where
parseJSON
= withObject "Account"
(\ o ->
Account' <$>
(o .:? "childLink") <*>
(o .:? "kind" .!= "analytics#account")
<*> (o .:? "created")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "starred")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "permissions"))
instance ToJSON Account where
toJSON Account'{..}
= object
(catMaybes
[("childLink" .=) <$> _accChildLink,
Just ("kind" .= _accKind),
("created" .=) <$> _accCreated,
("selfLink" .=) <$> _accSelfLink,
("name" .=) <$> _accName,
("starred" .=) <$> _accStarred, ("id" .=) <$> _accId,
("updated" .=) <$> _accUpdated,
("permissions" .=) <$> _accPermissions])
data Experiment = Experiment'
{ _expParentLink :: !(Maybe ExperimentParentLink)
, _expEqualWeighting :: !(Maybe Bool)
, _expStatus :: !(Maybe Text)
, _expWebPropertyId :: !(Maybe Text)
, _expStartTime :: !(Maybe DateTime')
, _expSnippet :: !(Maybe Text)
, _expKind :: !Text
, _expCreated :: !(Maybe DateTime')
, _expReasonExperimentEnded :: !(Maybe Text)
, _expTrafficCoverage :: !(Maybe (Textual Double))
, _expEditableInGaUi :: !(Maybe Bool)
, _expMinimumExperimentLengthInDays :: !(Maybe (Textual Int32))
, _expProFileId :: !(Maybe Text)
, _expOptimizationType :: !(Maybe Text)
, _expSelfLink :: !(Maybe Text)
, _expAccountId :: !(Maybe Text)
, _expName :: !(Maybe Text)
, _expWinnerFound :: !(Maybe Bool)
, _expEndTime :: !(Maybe DateTime')
, _expVariations :: !(Maybe [ExperimentVariationsItem])
, _expInternalWebPropertyId :: !(Maybe Text)
, _expId :: !(Maybe Text)
, _expUpdated :: !(Maybe DateTime')
, _expRewriteVariationURLsAsOriginal :: !(Maybe Bool)
, _expObjectiveMetric :: !(Maybe Text)
, _expWinnerConfidenceLevel :: !(Maybe (Textual Double))
, _expServingFramework :: !(Maybe Text)
, _expDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
experiment
:: Experiment
experiment =
Experiment'
{ _expParentLink = Nothing
, _expEqualWeighting = Nothing
, _expStatus = Nothing
, _expWebPropertyId = Nothing
, _expStartTime = Nothing
, _expSnippet = Nothing
, _expKind = "analytics#experiment"
, _expCreated = Nothing
, _expReasonExperimentEnded = Nothing
, _expTrafficCoverage = Nothing
, _expEditableInGaUi = Nothing
, _expMinimumExperimentLengthInDays = Nothing
, _expProFileId = Nothing
, _expOptimizationType = Nothing
, _expSelfLink = Nothing
, _expAccountId = Nothing
, _expName = Nothing
, _expWinnerFound = Nothing
, _expEndTime = Nothing
, _expVariations = Nothing
, _expInternalWebPropertyId = Nothing
, _expId = Nothing
, _expUpdated = Nothing
, _expRewriteVariationURLsAsOriginal = Nothing
, _expObjectiveMetric = Nothing
, _expWinnerConfidenceLevel = Nothing
, _expServingFramework = Nothing
, _expDescription = Nothing
}
expParentLink :: Lens' Experiment (Maybe ExperimentParentLink)
expParentLink
= lens _expParentLink
(\ s a -> s{_expParentLink = a})
expEqualWeighting :: Lens' Experiment (Maybe Bool)
expEqualWeighting
= lens _expEqualWeighting
(\ s a -> s{_expEqualWeighting = a})
expStatus :: Lens' Experiment (Maybe Text)
expStatus
= lens _expStatus (\ s a -> s{_expStatus = a})
expWebPropertyId :: Lens' Experiment (Maybe Text)
expWebPropertyId
= lens _expWebPropertyId
(\ s a -> s{_expWebPropertyId = a})
expStartTime :: Lens' Experiment (Maybe UTCTime)
expStartTime
= lens _expStartTime (\ s a -> s{_expStartTime = a})
. mapping _DateTime
expSnippet :: Lens' Experiment (Maybe Text)
expSnippet
= lens _expSnippet (\ s a -> s{_expSnippet = a})
expKind :: Lens' Experiment Text
expKind = lens _expKind (\ s a -> s{_expKind = a})
expCreated :: Lens' Experiment (Maybe UTCTime)
expCreated
= lens _expCreated (\ s a -> s{_expCreated = a}) .
mapping _DateTime
expReasonExperimentEnded :: Lens' Experiment (Maybe Text)
expReasonExperimentEnded
= lens _expReasonExperimentEnded
(\ s a -> s{_expReasonExperimentEnded = a})
expTrafficCoverage :: Lens' Experiment (Maybe Double)
expTrafficCoverage
= lens _expTrafficCoverage
(\ s a -> s{_expTrafficCoverage = a})
. mapping _Coerce
expEditableInGaUi :: Lens' Experiment (Maybe Bool)
expEditableInGaUi
= lens _expEditableInGaUi
(\ s a -> s{_expEditableInGaUi = a})
expMinimumExperimentLengthInDays :: Lens' Experiment (Maybe Int32)
expMinimumExperimentLengthInDays
= lens _expMinimumExperimentLengthInDays
(\ s a -> s{_expMinimumExperimentLengthInDays = a})
. mapping _Coerce
expProFileId :: Lens' Experiment (Maybe Text)
expProFileId
= lens _expProFileId (\ s a -> s{_expProFileId = a})
expOptimizationType :: Lens' Experiment (Maybe Text)
expOptimizationType
= lens _expOptimizationType
(\ s a -> s{_expOptimizationType = a})
expSelfLink :: Lens' Experiment (Maybe Text)
expSelfLink
= lens _expSelfLink (\ s a -> s{_expSelfLink = a})
expAccountId :: Lens' Experiment (Maybe Text)
expAccountId
= lens _expAccountId (\ s a -> s{_expAccountId = a})
expName :: Lens' Experiment (Maybe Text)
expName = lens _expName (\ s a -> s{_expName = a})
expWinnerFound :: Lens' Experiment (Maybe Bool)
expWinnerFound
= lens _expWinnerFound
(\ s a -> s{_expWinnerFound = a})
expEndTime :: Lens' Experiment (Maybe UTCTime)
expEndTime
= lens _expEndTime (\ s a -> s{_expEndTime = a}) .
mapping _DateTime
expVariations :: Lens' Experiment [ExperimentVariationsItem]
expVariations
= lens _expVariations
(\ s a -> s{_expVariations = a})
. _Default
. _Coerce
expInternalWebPropertyId :: Lens' Experiment (Maybe Text)
expInternalWebPropertyId
= lens _expInternalWebPropertyId
(\ s a -> s{_expInternalWebPropertyId = a})
expId :: Lens' Experiment (Maybe Text)
expId = lens _expId (\ s a -> s{_expId = a})
expUpdated :: Lens' Experiment (Maybe UTCTime)
expUpdated
= lens _expUpdated (\ s a -> s{_expUpdated = a}) .
mapping _DateTime
expRewriteVariationURLsAsOriginal :: Lens' Experiment (Maybe Bool)
expRewriteVariationURLsAsOriginal
= lens _expRewriteVariationURLsAsOriginal
(\ s a -> s{_expRewriteVariationURLsAsOriginal = a})
expObjectiveMetric :: Lens' Experiment (Maybe Text)
expObjectiveMetric
= lens _expObjectiveMetric
(\ s a -> s{_expObjectiveMetric = a})
expWinnerConfidenceLevel :: Lens' Experiment (Maybe Double)
expWinnerConfidenceLevel
= lens _expWinnerConfidenceLevel
(\ s a -> s{_expWinnerConfidenceLevel = a})
. mapping _Coerce
expServingFramework :: Lens' Experiment (Maybe Text)
expServingFramework
= lens _expServingFramework
(\ s a -> s{_expServingFramework = a})
expDescription :: Lens' Experiment (Maybe Text)
expDescription
= lens _expDescription
(\ s a -> s{_expDescription = a})
instance FromJSON Experiment where
parseJSON
= withObject "Experiment"
(\ o ->
Experiment' <$>
(o .:? "parentLink") <*> (o .:? "equalWeighting") <*>
(o .:? "status")
<*> (o .:? "webPropertyId")
<*> (o .:? "startTime")
<*> (o .:? "snippet")
<*> (o .:? "kind" .!= "analytics#experiment")
<*> (o .:? "created")
<*> (o .:? "reasonExperimentEnded")
<*> (o .:? "trafficCoverage")
<*> (o .:? "editableInGaUi")
<*> (o .:? "minimumExperimentLengthInDays")
<*> (o .:? "profileId")
<*> (o .:? "optimizationType")
<*> (o .:? "selfLink")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "winnerFound")
<*> (o .:? "endTime")
<*> (o .:? "variations" .!= mempty)
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "rewriteVariationUrlsAsOriginal")
<*> (o .:? "objectiveMetric")
<*> (o .:? "winnerConfidenceLevel")
<*> (o .:? "servingFramework")
<*> (o .:? "description"))
instance ToJSON Experiment where
toJSON Experiment'{..}
= object
(catMaybes
[("parentLink" .=) <$> _expParentLink,
("equalWeighting" .=) <$> _expEqualWeighting,
("status" .=) <$> _expStatus,
("webPropertyId" .=) <$> _expWebPropertyId,
("startTime" .=) <$> _expStartTime,
("snippet" .=) <$> _expSnippet,
Just ("kind" .= _expKind),
("created" .=) <$> _expCreated,
("reasonExperimentEnded" .=) <$>
_expReasonExperimentEnded,
("trafficCoverage" .=) <$> _expTrafficCoverage,
("editableInGaUi" .=) <$> _expEditableInGaUi,
("minimumExperimentLengthInDays" .=) <$>
_expMinimumExperimentLengthInDays,
("profileId" .=) <$> _expProFileId,
("optimizationType" .=) <$> _expOptimizationType,
("selfLink" .=) <$> _expSelfLink,
("accountId" .=) <$> _expAccountId,
("name" .=) <$> _expName,
("winnerFound" .=) <$> _expWinnerFound,
("endTime" .=) <$> _expEndTime,
("variations" .=) <$> _expVariations,
("internalWebPropertyId" .=) <$>
_expInternalWebPropertyId,
("id" .=) <$> _expId, ("updated" .=) <$> _expUpdated,
("rewriteVariationUrlsAsOriginal" .=) <$>
_expRewriteVariationURLsAsOriginal,
("objectiveMetric" .=) <$> _expObjectiveMetric,
("winnerConfidenceLevel" .=) <$>
_expWinnerConfidenceLevel,
("servingFramework" .=) <$> _expServingFramework,
("description" .=) <$> _expDescription])
data EntityUserLinks = EntityUserLinks'
{ _eulNextLink :: !(Maybe Text)
, _eulItemsPerPage :: !(Maybe (Textual Int32))
, _eulKind :: !Text
, _eulItems :: !(Maybe [EntityUserLink])
, _eulTotalResults :: !(Maybe (Textual Int32))
, _eulStartIndex :: !(Maybe (Textual Int32))
, _eulPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
entityUserLinks
:: EntityUserLinks
entityUserLinks =
EntityUserLinks'
{ _eulNextLink = Nothing
, _eulItemsPerPage = Nothing
, _eulKind = "analytics#entityUserLinks"
, _eulItems = Nothing
, _eulTotalResults = Nothing
, _eulStartIndex = Nothing
, _eulPreviousLink = Nothing
}
eulNextLink :: Lens' EntityUserLinks (Maybe Text)
eulNextLink
= lens _eulNextLink (\ s a -> s{_eulNextLink = a})
eulItemsPerPage :: Lens' EntityUserLinks (Maybe Int32)
eulItemsPerPage
= lens _eulItemsPerPage
(\ s a -> s{_eulItemsPerPage = a})
. mapping _Coerce
eulKind :: Lens' EntityUserLinks Text
eulKind = lens _eulKind (\ s a -> s{_eulKind = a})
eulItems :: Lens' EntityUserLinks [EntityUserLink]
eulItems
= lens _eulItems (\ s a -> s{_eulItems = a}) .
_Default
. _Coerce
eulTotalResults :: Lens' EntityUserLinks (Maybe Int32)
eulTotalResults
= lens _eulTotalResults
(\ s a -> s{_eulTotalResults = a})
. mapping _Coerce
eulStartIndex :: Lens' EntityUserLinks (Maybe Int32)
eulStartIndex
= lens _eulStartIndex
(\ s a -> s{_eulStartIndex = a})
. mapping _Coerce
eulPreviousLink :: Lens' EntityUserLinks (Maybe Text)
eulPreviousLink
= lens _eulPreviousLink
(\ s a -> s{_eulPreviousLink = a})
instance FromJSON EntityUserLinks where
parseJSON
= withObject "EntityUserLinks"
(\ o ->
EntityUserLinks' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#entityUserLinks")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON EntityUserLinks where
toJSON EntityUserLinks'{..}
= object
(catMaybes
[("nextLink" .=) <$> _eulNextLink,
("itemsPerPage" .=) <$> _eulItemsPerPage,
Just ("kind" .= _eulKind),
("items" .=) <$> _eulItems,
("totalResults" .=) <$> _eulTotalResults,
("startIndex" .=) <$> _eulStartIndex,
("previousLink" .=) <$> _eulPreviousLink])
data AdWordsAccount = AdWordsAccount'
{ _awaAutoTaggingEnabled :: !(Maybe Bool)
, _awaKind :: !Text
, _awaCustomerId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
adWordsAccount
:: AdWordsAccount
adWordsAccount =
AdWordsAccount'
{ _awaAutoTaggingEnabled = Nothing
, _awaKind = "analytics#adWordsAccount"
, _awaCustomerId = Nothing
}
awaAutoTaggingEnabled :: Lens' AdWordsAccount (Maybe Bool)
awaAutoTaggingEnabled
= lens _awaAutoTaggingEnabled
(\ s a -> s{_awaAutoTaggingEnabled = a})
awaKind :: Lens' AdWordsAccount Text
awaKind = lens _awaKind (\ s a -> s{_awaKind = a})
awaCustomerId :: Lens' AdWordsAccount (Maybe Text)
awaCustomerId
= lens _awaCustomerId
(\ s a -> s{_awaCustomerId = a})
instance FromJSON AdWordsAccount where
parseJSON
= withObject "AdWordsAccount"
(\ o ->
AdWordsAccount' <$>
(o .:? "autoTaggingEnabled") <*>
(o .:? "kind" .!= "analytics#adWordsAccount")
<*> (o .:? "customerId"))
instance ToJSON AdWordsAccount where
toJSON AdWordsAccount'{..}
= object
(catMaybes
[("autoTaggingEnabled" .=) <$>
_awaAutoTaggingEnabled,
Just ("kind" .= _awaKind),
("customerId" .=) <$> _awaCustomerId])
data FilterRef = FilterRef'
{ _frKind :: !Text
, _frHref :: !(Maybe Text)
, _frAccountId :: !(Maybe Text)
, _frName :: !(Maybe Text)
, _frId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
filterRef
:: FilterRef
filterRef =
FilterRef'
{ _frKind = "analytics#filterRef"
, _frHref = Nothing
, _frAccountId = Nothing
, _frName = Nothing
, _frId = Nothing
}
frKind :: Lens' FilterRef Text
frKind = lens _frKind (\ s a -> s{_frKind = a})
frHref :: Lens' FilterRef (Maybe Text)
frHref = lens _frHref (\ s a -> s{_frHref = a})
frAccountId :: Lens' FilterRef (Maybe Text)
frAccountId
= lens _frAccountId (\ s a -> s{_frAccountId = a})
frName :: Lens' FilterRef (Maybe Text)
frName = lens _frName (\ s a -> s{_frName = a})
frId :: Lens' FilterRef (Maybe Text)
frId = lens _frId (\ s a -> s{_frId = a})
instance FromJSON FilterRef where
parseJSON
= withObject "FilterRef"
(\ o ->
FilterRef' <$>
(o .:? "kind" .!= "analytics#filterRef") <*>
(o .:? "href")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON FilterRef where
toJSON FilterRef'{..}
= object
(catMaybes
[Just ("kind" .= _frKind), ("href" .=) <$> _frHref,
("accountId" .=) <$> _frAccountId,
("name" .=) <$> _frName, ("id" .=) <$> _frId])
data GoalVisitTimeOnSiteDetails = GoalVisitTimeOnSiteDetails'
{ _gvtosdComparisonValue :: !(Maybe (Textual Int64))
, _gvtosdComparisonType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
goalVisitTimeOnSiteDetails
:: GoalVisitTimeOnSiteDetails
goalVisitTimeOnSiteDetails =
GoalVisitTimeOnSiteDetails'
{ _gvtosdComparisonValue = Nothing
, _gvtosdComparisonType = Nothing
}
gvtosdComparisonValue :: Lens' GoalVisitTimeOnSiteDetails (Maybe Int64)
gvtosdComparisonValue
= lens _gvtosdComparisonValue
(\ s a -> s{_gvtosdComparisonValue = a})
. mapping _Coerce
gvtosdComparisonType :: Lens' GoalVisitTimeOnSiteDetails (Maybe Text)
gvtosdComparisonType
= lens _gvtosdComparisonType
(\ s a -> s{_gvtosdComparisonType = a})
instance FromJSON GoalVisitTimeOnSiteDetails where
parseJSON
= withObject "GoalVisitTimeOnSiteDetails"
(\ o ->
GoalVisitTimeOnSiteDetails' <$>
(o .:? "comparisonValue") <*>
(o .:? "comparisonType"))
instance ToJSON GoalVisitTimeOnSiteDetails where
toJSON GoalVisitTimeOnSiteDetails'{..}
= object
(catMaybes
[("comparisonValue" .=) <$> _gvtosdComparisonValue,
("comparisonType" .=) <$> _gvtosdComparisonType])
data WebProperties = WebProperties'
{ _wpNextLink :: !(Maybe Text)
, _wpItemsPerPage :: !(Maybe (Textual Int32))
, _wpKind :: !Text
, _wpUsername :: !(Maybe Text)
, _wpItems :: !(Maybe [WebProperty])
, _wpTotalResults :: !(Maybe (Textual Int32))
, _wpStartIndex :: !(Maybe (Textual Int32))
, _wpPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
webProperties
:: WebProperties
webProperties =
WebProperties'
{ _wpNextLink = Nothing
, _wpItemsPerPage = Nothing
, _wpKind = "analytics#webproperties"
, _wpUsername = Nothing
, _wpItems = Nothing
, _wpTotalResults = Nothing
, _wpStartIndex = Nothing
, _wpPreviousLink = Nothing
}
wpNextLink :: Lens' WebProperties (Maybe Text)
wpNextLink
= lens _wpNextLink (\ s a -> s{_wpNextLink = a})
wpItemsPerPage :: Lens' WebProperties (Maybe Int32)
wpItemsPerPage
= lens _wpItemsPerPage
(\ s a -> s{_wpItemsPerPage = a})
. mapping _Coerce
wpKind :: Lens' WebProperties Text
wpKind = lens _wpKind (\ s a -> s{_wpKind = a})
wpUsername :: Lens' WebProperties (Maybe Text)
wpUsername
= lens _wpUsername (\ s a -> s{_wpUsername = a})
wpItems :: Lens' WebProperties [WebProperty]
wpItems
= lens _wpItems (\ s a -> s{_wpItems = a}) . _Default
. _Coerce
wpTotalResults :: Lens' WebProperties (Maybe Int32)
wpTotalResults
= lens _wpTotalResults
(\ s a -> s{_wpTotalResults = a})
. mapping _Coerce
wpStartIndex :: Lens' WebProperties (Maybe Int32)
wpStartIndex
= lens _wpStartIndex (\ s a -> s{_wpStartIndex = a})
. mapping _Coerce
wpPreviousLink :: Lens' WebProperties (Maybe Text)
wpPreviousLink
= lens _wpPreviousLink
(\ s a -> s{_wpPreviousLink = a})
instance FromJSON WebProperties where
parseJSON
= withObject "WebProperties"
(\ o ->
WebProperties' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#webproperties")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON WebProperties where
toJSON WebProperties'{..}
= object
(catMaybes
[("nextLink" .=) <$> _wpNextLink,
("itemsPerPage" .=) <$> _wpItemsPerPage,
Just ("kind" .= _wpKind),
("username" .=) <$> _wpUsername,
("items" .=) <$> _wpItems,
("totalResults" .=) <$> _wpTotalResults,
("startIndex" .=) <$> _wpStartIndex,
("previousLink" .=) <$> _wpPreviousLink])
data CustomMetrics = CustomMetrics'
{ _cmNextLink :: !(Maybe Text)
, _cmItemsPerPage :: !(Maybe (Textual Int32))
, _cmKind :: !Text
, _cmUsername :: !(Maybe Text)
, _cmItems :: !(Maybe [CustomMetric])
, _cmTotalResults :: !(Maybe (Textual Int32))
, _cmStartIndex :: !(Maybe (Textual Int32))
, _cmPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customMetrics
:: CustomMetrics
customMetrics =
CustomMetrics'
{ _cmNextLink = Nothing
, _cmItemsPerPage = Nothing
, _cmKind = "analytics#customMetrics"
, _cmUsername = Nothing
, _cmItems = Nothing
, _cmTotalResults = Nothing
, _cmStartIndex = Nothing
, _cmPreviousLink = Nothing
}
cmNextLink :: Lens' CustomMetrics (Maybe Text)
cmNextLink
= lens _cmNextLink (\ s a -> s{_cmNextLink = a})
cmItemsPerPage :: Lens' CustomMetrics (Maybe Int32)
cmItemsPerPage
= lens _cmItemsPerPage
(\ s a -> s{_cmItemsPerPage = a})
. mapping _Coerce
cmKind :: Lens' CustomMetrics Text
cmKind = lens _cmKind (\ s a -> s{_cmKind = a})
cmUsername :: Lens' CustomMetrics (Maybe Text)
cmUsername
= lens _cmUsername (\ s a -> s{_cmUsername = a})
cmItems :: Lens' CustomMetrics [CustomMetric]
cmItems
= lens _cmItems (\ s a -> s{_cmItems = a}) . _Default
. _Coerce
cmTotalResults :: Lens' CustomMetrics (Maybe Int32)
cmTotalResults
= lens _cmTotalResults
(\ s a -> s{_cmTotalResults = a})
. mapping _Coerce
cmStartIndex :: Lens' CustomMetrics (Maybe Int32)
cmStartIndex
= lens _cmStartIndex (\ s a -> s{_cmStartIndex = a})
. mapping _Coerce
cmPreviousLink :: Lens' CustomMetrics (Maybe Text)
cmPreviousLink
= lens _cmPreviousLink
(\ s a -> s{_cmPreviousLink = a})
instance FromJSON CustomMetrics where
parseJSON
= withObject "CustomMetrics"
(\ o ->
CustomMetrics' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#customMetrics")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON CustomMetrics where
toJSON CustomMetrics'{..}
= object
(catMaybes
[("nextLink" .=) <$> _cmNextLink,
("itemsPerPage" .=) <$> _cmItemsPerPage,
Just ("kind" .= _cmKind),
("username" .=) <$> _cmUsername,
("items" .=) <$> _cmItems,
("totalResults" .=) <$> _cmTotalResults,
("startIndex" .=) <$> _cmStartIndex,
("previousLink" .=) <$> _cmPreviousLink])
data FilterAdvancedDetails = FilterAdvancedDetails'
{ _fadExtractA :: !(Maybe Text)
, _fadFieldARequired :: !(Maybe Bool)
, _fadFieldA :: !(Maybe Text)
, _fadFieldBIndex :: !(Maybe (Textual Int32))
, _fadOutputToField :: !(Maybe Text)
, _fadOutputConstructor :: !(Maybe Text)
, _fadExtractB :: !(Maybe Text)
, _fadFieldAIndex :: !(Maybe (Textual Int32))
, _fadCaseSensitive :: !(Maybe Bool)
, _fadOutputToFieldIndex :: !(Maybe (Textual Int32))
, _fadFieldB :: !(Maybe Text)
, _fadFieldBRequired :: !(Maybe Bool)
, _fadOverrideOutputField :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
filterAdvancedDetails
:: FilterAdvancedDetails
filterAdvancedDetails =
FilterAdvancedDetails'
{ _fadExtractA = Nothing
, _fadFieldARequired = Nothing
, _fadFieldA = Nothing
, _fadFieldBIndex = Nothing
, _fadOutputToField = Nothing
, _fadOutputConstructor = Nothing
, _fadExtractB = Nothing
, _fadFieldAIndex = Nothing
, _fadCaseSensitive = Nothing
, _fadOutputToFieldIndex = Nothing
, _fadFieldB = Nothing
, _fadFieldBRequired = Nothing
, _fadOverrideOutputField = Nothing
}
fadExtractA :: Lens' FilterAdvancedDetails (Maybe Text)
fadExtractA
= lens _fadExtractA (\ s a -> s{_fadExtractA = a})
fadFieldARequired :: Lens' FilterAdvancedDetails (Maybe Bool)
fadFieldARequired
= lens _fadFieldARequired
(\ s a -> s{_fadFieldARequired = a})
fadFieldA :: Lens' FilterAdvancedDetails (Maybe Text)
fadFieldA
= lens _fadFieldA (\ s a -> s{_fadFieldA = a})
fadFieldBIndex :: Lens' FilterAdvancedDetails (Maybe Int32)
fadFieldBIndex
= lens _fadFieldBIndex
(\ s a -> s{_fadFieldBIndex = a})
. mapping _Coerce
fadOutputToField :: Lens' FilterAdvancedDetails (Maybe Text)
fadOutputToField
= lens _fadOutputToField
(\ s a -> s{_fadOutputToField = a})
fadOutputConstructor :: Lens' FilterAdvancedDetails (Maybe Text)
fadOutputConstructor
= lens _fadOutputConstructor
(\ s a -> s{_fadOutputConstructor = a})
fadExtractB :: Lens' FilterAdvancedDetails (Maybe Text)
fadExtractB
= lens _fadExtractB (\ s a -> s{_fadExtractB = a})
fadFieldAIndex :: Lens' FilterAdvancedDetails (Maybe Int32)
fadFieldAIndex
= lens _fadFieldAIndex
(\ s a -> s{_fadFieldAIndex = a})
. mapping _Coerce
fadCaseSensitive :: Lens' FilterAdvancedDetails (Maybe Bool)
fadCaseSensitive
= lens _fadCaseSensitive
(\ s a -> s{_fadCaseSensitive = a})
fadOutputToFieldIndex :: Lens' FilterAdvancedDetails (Maybe Int32)
fadOutputToFieldIndex
= lens _fadOutputToFieldIndex
(\ s a -> s{_fadOutputToFieldIndex = a})
. mapping _Coerce
fadFieldB :: Lens' FilterAdvancedDetails (Maybe Text)
fadFieldB
= lens _fadFieldB (\ s a -> s{_fadFieldB = a})
fadFieldBRequired :: Lens' FilterAdvancedDetails (Maybe Bool)
fadFieldBRequired
= lens _fadFieldBRequired
(\ s a -> s{_fadFieldBRequired = a})
fadOverrideOutputField :: Lens' FilterAdvancedDetails (Maybe Bool)
fadOverrideOutputField
= lens _fadOverrideOutputField
(\ s a -> s{_fadOverrideOutputField = a})
instance FromJSON FilterAdvancedDetails where
parseJSON
= withObject "FilterAdvancedDetails"
(\ o ->
FilterAdvancedDetails' <$>
(o .:? "extractA") <*> (o .:? "fieldARequired") <*>
(o .:? "fieldA")
<*> (o .:? "fieldBIndex")
<*> (o .:? "outputToField")
<*> (o .:? "outputConstructor")
<*> (o .:? "extractB")
<*> (o .:? "fieldAIndex")
<*> (o .:? "caseSensitive")
<*> (o .:? "outputToFieldIndex")
<*> (o .:? "fieldB")
<*> (o .:? "fieldBRequired")
<*> (o .:? "overrideOutputField"))
instance ToJSON FilterAdvancedDetails where
toJSON FilterAdvancedDetails'{..}
= object
(catMaybes
[("extractA" .=) <$> _fadExtractA,
("fieldARequired" .=) <$> _fadFieldARequired,
("fieldA" .=) <$> _fadFieldA,
("fieldBIndex" .=) <$> _fadFieldBIndex,
("outputToField" .=) <$> _fadOutputToField,
("outputConstructor" .=) <$> _fadOutputConstructor,
("extractB" .=) <$> _fadExtractB,
("fieldAIndex" .=) <$> _fadFieldAIndex,
("caseSensitive" .=) <$> _fadCaseSensitive,
("outputToFieldIndex" .=) <$> _fadOutputToFieldIndex,
("fieldB" .=) <$> _fadFieldB,
("fieldBRequired" .=) <$> _fadFieldBRequired,
("overrideOutputField" .=) <$>
_fadOverrideOutputField])
data AccountTreeResponse = AccountTreeResponse'
{ _atrtAccountSettings :: !(Maybe AccountTreeResponseAccountSettings)
, _atrtKind :: !Text
, _atrtProFile :: !(Maybe ProFile)
, _atrtAccount :: !(Maybe Account)
, _atrtWebProperty :: !(Maybe WebProperty)
} deriving (Eq,Show,Data,Typeable,Generic)
accountTreeResponse
:: AccountTreeResponse
accountTreeResponse =
AccountTreeResponse'
{ _atrtAccountSettings = Nothing
, _atrtKind = "analytics#accountTreeResponse"
, _atrtProFile = Nothing
, _atrtAccount = Nothing
, _atrtWebProperty = Nothing
}
atrtAccountSettings :: Lens' AccountTreeResponse (Maybe AccountTreeResponseAccountSettings)
atrtAccountSettings
= lens _atrtAccountSettings
(\ s a -> s{_atrtAccountSettings = a})
atrtKind :: Lens' AccountTreeResponse Text
atrtKind = lens _atrtKind (\ s a -> s{_atrtKind = a})
atrtProFile :: Lens' AccountTreeResponse (Maybe ProFile)
atrtProFile
= lens _atrtProFile (\ s a -> s{_atrtProFile = a})
atrtAccount :: Lens' AccountTreeResponse (Maybe Account)
atrtAccount
= lens _atrtAccount (\ s a -> s{_atrtAccount = a})
atrtWebProperty :: Lens' AccountTreeResponse (Maybe WebProperty)
atrtWebProperty
= lens _atrtWebProperty
(\ s a -> s{_atrtWebProperty = a})
instance FromJSON AccountTreeResponse where
parseJSON
= withObject "AccountTreeResponse"
(\ o ->
AccountTreeResponse' <$>
(o .:? "accountSettings") <*>
(o .:? "kind" .!= "analytics#accountTreeResponse")
<*> (o .:? "profile")
<*> (o .:? "account")
<*> (o .:? "webproperty"))
instance ToJSON AccountTreeResponse where
toJSON AccountTreeResponse'{..}
= object
(catMaybes
[("accountSettings" .=) <$> _atrtAccountSettings,
Just ("kind" .= _atrtKind),
("profile" .=) <$> _atrtProFile,
("account" .=) <$> _atrtAccount,
("webproperty" .=) <$> _atrtWebProperty])
data FilterUppercaseDetails = FilterUppercaseDetails'
{ _fudFieldIndex :: !(Maybe (Textual Int32))
, _fudField :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
filterUppercaseDetails
:: FilterUppercaseDetails
filterUppercaseDetails =
FilterUppercaseDetails'
{ _fudFieldIndex = Nothing
, _fudField = Nothing
}
fudFieldIndex :: Lens' FilterUppercaseDetails (Maybe Int32)
fudFieldIndex
= lens _fudFieldIndex
(\ s a -> s{_fudFieldIndex = a})
. mapping _Coerce
fudField :: Lens' FilterUppercaseDetails (Maybe Text)
fudField = lens _fudField (\ s a -> s{_fudField = a})
instance FromJSON FilterUppercaseDetails where
parseJSON
= withObject "FilterUppercaseDetails"
(\ o ->
FilterUppercaseDetails' <$>
(o .:? "fieldIndex") <*> (o .:? "field"))
instance ToJSON FilterUppercaseDetails where
toJSON FilterUppercaseDetails'{..}
= object
(catMaybes
[("fieldIndex" .=) <$> _fudFieldIndex,
("field" .=) <$> _fudField])
data CustomDataSourceChildLink = CustomDataSourceChildLink'
{ _cdsclHref :: !(Maybe Text)
, _cdsclType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customDataSourceChildLink
:: CustomDataSourceChildLink
customDataSourceChildLink =
CustomDataSourceChildLink'
{ _cdsclHref = Nothing
, _cdsclType = Nothing
}
cdsclHref :: Lens' CustomDataSourceChildLink (Maybe Text)
cdsclHref
= lens _cdsclHref (\ s a -> s{_cdsclHref = a})
cdsclType :: Lens' CustomDataSourceChildLink (Maybe Text)
cdsclType
= lens _cdsclType (\ s a -> s{_cdsclType = a})
instance FromJSON CustomDataSourceChildLink where
parseJSON
= withObject "CustomDataSourceChildLink"
(\ o ->
CustomDataSourceChildLink' <$>
(o .:? "href") <*> (o .:? "type"))
instance ToJSON CustomDataSourceChildLink where
toJSON CustomDataSourceChildLink'{..}
= object
(catMaybes
[("href" .=) <$> _cdsclHref,
("type" .=) <$> _cdsclType])
data IncludeConditions = IncludeConditions'
{ _icKind :: !Text
, _icDaysToLookBack :: !(Maybe (Textual Int32))
, _icMembershipDurationDays :: !(Maybe (Textual Int32))
, _icSegment :: !(Maybe Text)
, _icIsSmartList :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
includeConditions
:: IncludeConditions
includeConditions =
IncludeConditions'
{ _icKind = "analytics#includeConditions"
, _icDaysToLookBack = Nothing
, _icMembershipDurationDays = Nothing
, _icSegment = Nothing
, _icIsSmartList = Nothing
}
icKind :: Lens' IncludeConditions Text
icKind = lens _icKind (\ s a -> s{_icKind = a})
icDaysToLookBack :: Lens' IncludeConditions (Maybe Int32)
icDaysToLookBack
= lens _icDaysToLookBack
(\ s a -> s{_icDaysToLookBack = a})
. mapping _Coerce
icMembershipDurationDays :: Lens' IncludeConditions (Maybe Int32)
icMembershipDurationDays
= lens _icMembershipDurationDays
(\ s a -> s{_icMembershipDurationDays = a})
. mapping _Coerce
icSegment :: Lens' IncludeConditions (Maybe Text)
icSegment
= lens _icSegment (\ s a -> s{_icSegment = a})
icIsSmartList :: Lens' IncludeConditions (Maybe Bool)
icIsSmartList
= lens _icIsSmartList
(\ s a -> s{_icIsSmartList = a})
instance FromJSON IncludeConditions where
parseJSON
= withObject "IncludeConditions"
(\ o ->
IncludeConditions' <$>
(o .:? "kind" .!= "analytics#includeConditions") <*>
(o .:? "daysToLookBack")
<*> (o .:? "membershipDurationDays")
<*> (o .:? "segment")
<*> (o .:? "isSmartList"))
instance ToJSON IncludeConditions where
toJSON IncludeConditions'{..}
= object
(catMaybes
[Just ("kind" .= _icKind),
("daysToLookBack" .=) <$> _icDaysToLookBack,
("membershipDurationDays" .=) <$>
_icMembershipDurationDays,
("segment" .=) <$> _icSegment,
("isSmartList" .=) <$> _icIsSmartList])
data FilterParentLink = FilterParentLink'
{ _fplHref :: !(Maybe Text)
, _fplType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
filterParentLink
:: FilterParentLink
filterParentLink =
FilterParentLink'
{ _fplHref = Nothing
, _fplType = "analytics#account"
}
fplHref :: Lens' FilterParentLink (Maybe Text)
fplHref = lens _fplHref (\ s a -> s{_fplHref = a})
fplType :: Lens' FilterParentLink Text
fplType = lens _fplType (\ s a -> s{_fplType = a})
instance FromJSON FilterParentLink where
parseJSON
= withObject "FilterParentLink"
(\ o ->
FilterParentLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#account"))
instance ToJSON FilterParentLink where
toJSON FilterParentLink'{..}
= object
(catMaybes
[("href" .=) <$> _fplHref,
Just ("type" .= _fplType)])
data HashClientIdRequest = HashClientIdRequest'
{ _hClientId :: !(Maybe Text)
, _hWebPropertyId :: !(Maybe Text)
, _hKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
hashClientIdRequest
:: HashClientIdRequest
hashClientIdRequest =
HashClientIdRequest'
{ _hClientId = Nothing
, _hWebPropertyId = Nothing
, _hKind = "analytics#hashClientIdRequest"
}
hClientId :: Lens' HashClientIdRequest (Maybe Text)
hClientId
= lens _hClientId (\ s a -> s{_hClientId = a})
hWebPropertyId :: Lens' HashClientIdRequest (Maybe Text)
hWebPropertyId
= lens _hWebPropertyId
(\ s a -> s{_hWebPropertyId = a})
hKind :: Lens' HashClientIdRequest Text
hKind = lens _hKind (\ s a -> s{_hKind = a})
instance FromJSON HashClientIdRequest where
parseJSON
= withObject "HashClientIdRequest"
(\ o ->
HashClientIdRequest' <$>
(o .:? "clientId") <*> (o .:? "webPropertyId") <*>
(o .:? "kind" .!= "analytics#hashClientIdRequest"))
instance ToJSON HashClientIdRequest where
toJSON HashClientIdRequest'{..}
= object
(catMaybes
[("clientId" .=) <$> _hClientId,
("webPropertyId" .=) <$> _hWebPropertyId,
Just ("kind" .= _hKind)])
data RealtimeData = RealtimeData'
{ _rdProFileInfo :: !(Maybe RealtimeDataProFileInfo)
, _rdKind :: !Text
, _rdRows :: !(Maybe [[Text]])
, _rdSelfLink :: !(Maybe Text)
, _rdQuery :: !(Maybe RealtimeDataQuery)
, _rdColumnHeaders :: !(Maybe [RealtimeDataColumnHeadersItem])
, _rdId :: !(Maybe Text)
, _rdTotalResults :: !(Maybe (Textual Int32))
, _rdTotalsForAllResults :: !(Maybe RealtimeDataTotalsForAllResults)
} deriving (Eq,Show,Data,Typeable,Generic)
realtimeData
:: RealtimeData
realtimeData =
RealtimeData'
{ _rdProFileInfo = Nothing
, _rdKind = "analytics#realtimeData"
, _rdRows = Nothing
, _rdSelfLink = Nothing
, _rdQuery = Nothing
, _rdColumnHeaders = Nothing
, _rdId = Nothing
, _rdTotalResults = Nothing
, _rdTotalsForAllResults = Nothing
}
rdProFileInfo :: Lens' RealtimeData (Maybe RealtimeDataProFileInfo)
rdProFileInfo
= lens _rdProFileInfo
(\ s a -> s{_rdProFileInfo = a})
rdKind :: Lens' RealtimeData Text
rdKind = lens _rdKind (\ s a -> s{_rdKind = a})
rdRows :: Lens' RealtimeData [[Text]]
rdRows
= lens _rdRows (\ s a -> s{_rdRows = a}) . _Default .
_Coerce
rdSelfLink :: Lens' RealtimeData (Maybe Text)
rdSelfLink
= lens _rdSelfLink (\ s a -> s{_rdSelfLink = a})
rdQuery :: Lens' RealtimeData (Maybe RealtimeDataQuery)
rdQuery = lens _rdQuery (\ s a -> s{_rdQuery = a})
rdColumnHeaders :: Lens' RealtimeData [RealtimeDataColumnHeadersItem]
rdColumnHeaders
= lens _rdColumnHeaders
(\ s a -> s{_rdColumnHeaders = a})
. _Default
. _Coerce
rdId :: Lens' RealtimeData (Maybe Text)
rdId = lens _rdId (\ s a -> s{_rdId = a})
rdTotalResults :: Lens' RealtimeData (Maybe Int32)
rdTotalResults
= lens _rdTotalResults
(\ s a -> s{_rdTotalResults = a})
. mapping _Coerce
rdTotalsForAllResults :: Lens' RealtimeData (Maybe RealtimeDataTotalsForAllResults)
rdTotalsForAllResults
= lens _rdTotalsForAllResults
(\ s a -> s{_rdTotalsForAllResults = a})
instance FromJSON RealtimeData where
parseJSON
= withObject "RealtimeData"
(\ o ->
RealtimeData' <$>
(o .:? "profileInfo") <*>
(o .:? "kind" .!= "analytics#realtimeData")
<*> (o .:? "rows" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "query")
<*> (o .:? "columnHeaders" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "totalResults")
<*> (o .:? "totalsForAllResults"))
instance ToJSON RealtimeData where
toJSON RealtimeData'{..}
= object
(catMaybes
[("profileInfo" .=) <$> _rdProFileInfo,
Just ("kind" .= _rdKind), ("rows" .=) <$> _rdRows,
("selfLink" .=) <$> _rdSelfLink,
("query" .=) <$> _rdQuery,
("columnHeaders" .=) <$> _rdColumnHeaders,
("id" .=) <$> _rdId,
("totalResults" .=) <$> _rdTotalResults,
("totalsForAllResults" .=) <$>
_rdTotalsForAllResults])
data CustomMetric = CustomMetric'
{ _cusParentLink :: !(Maybe CustomMetricParentLink)
, _cusWebPropertyId :: !(Maybe Text)
, _cusKind :: !Text
, _cusMaxValue :: !(Maybe Text)
, _cusCreated :: !(Maybe DateTime')
, _cusMinValue :: !(Maybe Text)
, _cusActive :: !(Maybe Bool)
, _cusSelfLink :: !(Maybe Text)
, _cusAccountId :: !(Maybe Text)
, _cusName :: !(Maybe Text)
, _cusScope :: !(Maybe Text)
, _cusId :: !(Maybe Text)
, _cusUpdated :: !(Maybe DateTime')
, _cusType :: !(Maybe Text)
, _cusIndex :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
customMetric
:: CustomMetric
customMetric =
CustomMetric'
{ _cusParentLink = Nothing
, _cusWebPropertyId = Nothing
, _cusKind = "analytics#customMetric"
, _cusMaxValue = Nothing
, _cusCreated = Nothing
, _cusMinValue = Nothing
, _cusActive = Nothing
, _cusSelfLink = Nothing
, _cusAccountId = Nothing
, _cusName = Nothing
, _cusScope = Nothing
, _cusId = Nothing
, _cusUpdated = Nothing
, _cusType = Nothing
, _cusIndex = Nothing
}
cusParentLink :: Lens' CustomMetric (Maybe CustomMetricParentLink)
cusParentLink
= lens _cusParentLink
(\ s a -> s{_cusParentLink = a})
cusWebPropertyId :: Lens' CustomMetric (Maybe Text)
cusWebPropertyId
= lens _cusWebPropertyId
(\ s a -> s{_cusWebPropertyId = a})
cusKind :: Lens' CustomMetric Text
cusKind = lens _cusKind (\ s a -> s{_cusKind = a})
cusMaxValue :: Lens' CustomMetric (Maybe Text)
cusMaxValue
= lens _cusMaxValue (\ s a -> s{_cusMaxValue = a})
cusCreated :: Lens' CustomMetric (Maybe UTCTime)
cusCreated
= lens _cusCreated (\ s a -> s{_cusCreated = a}) .
mapping _DateTime
cusMinValue :: Lens' CustomMetric (Maybe Text)
cusMinValue
= lens _cusMinValue (\ s a -> s{_cusMinValue = a})
cusActive :: Lens' CustomMetric (Maybe Bool)
cusActive
= lens _cusActive (\ s a -> s{_cusActive = a})
cusSelfLink :: Lens' CustomMetric (Maybe Text)
cusSelfLink
= lens _cusSelfLink (\ s a -> s{_cusSelfLink = a})
cusAccountId :: Lens' CustomMetric (Maybe Text)
cusAccountId
= lens _cusAccountId (\ s a -> s{_cusAccountId = a})
cusName :: Lens' CustomMetric (Maybe Text)
cusName = lens _cusName (\ s a -> s{_cusName = a})
cusScope :: Lens' CustomMetric (Maybe Text)
cusScope = lens _cusScope (\ s a -> s{_cusScope = a})
cusId :: Lens' CustomMetric (Maybe Text)
cusId = lens _cusId (\ s a -> s{_cusId = a})
cusUpdated :: Lens' CustomMetric (Maybe UTCTime)
cusUpdated
= lens _cusUpdated (\ s a -> s{_cusUpdated = a}) .
mapping _DateTime
cusType :: Lens' CustomMetric (Maybe Text)
cusType = lens _cusType (\ s a -> s{_cusType = a})
cusIndex :: Lens' CustomMetric (Maybe Int32)
cusIndex
= lens _cusIndex (\ s a -> s{_cusIndex = a}) .
mapping _Coerce
instance FromJSON CustomMetric where
parseJSON
= withObject "CustomMetric"
(\ o ->
CustomMetric' <$>
(o .:? "parentLink") <*> (o .:? "webPropertyId") <*>
(o .:? "kind" .!= "analytics#customMetric")
<*> (o .:? "max_value")
<*> (o .:? "created")
<*> (o .:? "min_value")
<*> (o .:? "active")
<*> (o .:? "selfLink")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "scope")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "type")
<*> (o .:? "index"))
instance ToJSON CustomMetric where
toJSON CustomMetric'{..}
= object
(catMaybes
[("parentLink" .=) <$> _cusParentLink,
("webPropertyId" .=) <$> _cusWebPropertyId,
Just ("kind" .= _cusKind),
("max_value" .=) <$> _cusMaxValue,
("created" .=) <$> _cusCreated,
("min_value" .=) <$> _cusMinValue,
("active" .=) <$> _cusActive,
("selfLink" .=) <$> _cusSelfLink,
("accountId" .=) <$> _cusAccountId,
("name" .=) <$> _cusName, ("scope" .=) <$> _cusScope,
("id" .=) <$> _cusId, ("updated" .=) <$> _cusUpdated,
("type" .=) <$> _cusType,
("index" .=) <$> _cusIndex])
data ProFileSummary = ProFileSummary'
{ _pfsKind :: !Text
, _pfsName :: !(Maybe Text)
, _pfsStarred :: !(Maybe Bool)
, _pfsId :: !(Maybe Text)
, _pfsType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
proFileSummary
:: ProFileSummary
proFileSummary =
ProFileSummary'
{ _pfsKind = "analytics#profileSummary"
, _pfsName = Nothing
, _pfsStarred = Nothing
, _pfsId = Nothing
, _pfsType = Nothing
}
pfsKind :: Lens' ProFileSummary Text
pfsKind = lens _pfsKind (\ s a -> s{_pfsKind = a})
pfsName :: Lens' ProFileSummary (Maybe Text)
pfsName = lens _pfsName (\ s a -> s{_pfsName = a})
pfsStarred :: Lens' ProFileSummary (Maybe Bool)
pfsStarred
= lens _pfsStarred (\ s a -> s{_pfsStarred = a})
pfsId :: Lens' ProFileSummary (Maybe Text)
pfsId = lens _pfsId (\ s a -> s{_pfsId = a})
pfsType :: Lens' ProFileSummary (Maybe Text)
pfsType = lens _pfsType (\ s a -> s{_pfsType = a})
instance FromJSON ProFileSummary where
parseJSON
= withObject "ProFileSummary"
(\ o ->
ProFileSummary' <$>
(o .:? "kind" .!= "analytics#profileSummary") <*>
(o .:? "name")
<*> (o .:? "starred")
<*> (o .:? "id")
<*> (o .:? "type"))
instance ToJSON ProFileSummary where
toJSON ProFileSummary'{..}
= object
(catMaybes
[Just ("kind" .= _pfsKind), ("name" .=) <$> _pfsName,
("starred" .=) <$> _pfsStarred, ("id" .=) <$> _pfsId,
("type" .=) <$> _pfsType])
data CustomDimensionParentLink = CustomDimensionParentLink'
{ _cdplHref :: !(Maybe Text)
, _cdplType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
customDimensionParentLink
:: CustomDimensionParentLink
customDimensionParentLink =
CustomDimensionParentLink'
{ _cdplHref = Nothing
, _cdplType = "analytics#webproperty"
}
cdplHref :: Lens' CustomDimensionParentLink (Maybe Text)
cdplHref = lens _cdplHref (\ s a -> s{_cdplHref = a})
cdplType :: Lens' CustomDimensionParentLink Text
cdplType = lens _cdplType (\ s a -> s{_cdplType = a})
instance FromJSON CustomDimensionParentLink where
parseJSON
= withObject "CustomDimensionParentLink"
(\ o ->
CustomDimensionParentLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#webproperty"))
instance ToJSON CustomDimensionParentLink where
toJSON CustomDimensionParentLink'{..}
= object
(catMaybes
[("href" .=) <$> _cdplHref,
Just ("type" .= _cdplType)])
data WebProperty = WebProperty'
{ _wParentLink :: !(Maybe WebPropertyParentLink)
, _wChildLink :: !(Maybe WebPropertyChildLink)
, _wDefaultProFileId :: !(Maybe (Textual Int64))
, _wKind :: !Text
, _wCreated :: !(Maybe DateTime')
, _wDataRetentionTtl :: !(Maybe Text)
, _wDataRetentionResetOnNewActivity :: !(Maybe Bool)
, _wSelfLink :: !(Maybe Text)
, _wAccountId :: !(Maybe Text)
, _wName :: !(Maybe Text)
, _wStarred :: !(Maybe Bool)
, _wInternalWebPropertyId :: !(Maybe Text)
, _wId :: !(Maybe Text)
, _wUpdated :: !(Maybe DateTime')
, _wProFileCount :: !(Maybe (Textual Int32))
, _wPermissions :: !(Maybe WebPropertyPermissions)
, _wWebsiteURL :: !(Maybe Text)
, _wIndustryVertical :: !(Maybe Text)
, _wLevel :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
webProperty
:: WebProperty
webProperty =
WebProperty'
{ _wParentLink = Nothing
, _wChildLink = Nothing
, _wDefaultProFileId = Nothing
, _wKind = "analytics#webproperty"
, _wCreated = Nothing
, _wDataRetentionTtl = Nothing
, _wDataRetentionResetOnNewActivity = Nothing
, _wSelfLink = Nothing
, _wAccountId = Nothing
, _wName = Nothing
, _wStarred = Nothing
, _wInternalWebPropertyId = Nothing
, _wId = Nothing
, _wUpdated = Nothing
, _wProFileCount = Nothing
, _wPermissions = Nothing
, _wWebsiteURL = Nothing
, _wIndustryVertical = Nothing
, _wLevel = Nothing
}
wParentLink :: Lens' WebProperty (Maybe WebPropertyParentLink)
wParentLink
= lens _wParentLink (\ s a -> s{_wParentLink = a})
wChildLink :: Lens' WebProperty (Maybe WebPropertyChildLink)
wChildLink
= lens _wChildLink (\ s a -> s{_wChildLink = a})
wDefaultProFileId :: Lens' WebProperty (Maybe Int64)
wDefaultProFileId
= lens _wDefaultProFileId
(\ s a -> s{_wDefaultProFileId = a})
. mapping _Coerce
wKind :: Lens' WebProperty Text
wKind = lens _wKind (\ s a -> s{_wKind = a})
wCreated :: Lens' WebProperty (Maybe UTCTime)
wCreated
= lens _wCreated (\ s a -> s{_wCreated = a}) .
mapping _DateTime
wDataRetentionTtl :: Lens' WebProperty (Maybe Text)
wDataRetentionTtl
= lens _wDataRetentionTtl
(\ s a -> s{_wDataRetentionTtl = a})
wDataRetentionResetOnNewActivity :: Lens' WebProperty (Maybe Bool)
wDataRetentionResetOnNewActivity
= lens _wDataRetentionResetOnNewActivity
(\ s a -> s{_wDataRetentionResetOnNewActivity = a})
wSelfLink :: Lens' WebProperty (Maybe Text)
wSelfLink
= lens _wSelfLink (\ s a -> s{_wSelfLink = a})
wAccountId :: Lens' WebProperty (Maybe Text)
wAccountId
= lens _wAccountId (\ s a -> s{_wAccountId = a})
wName :: Lens' WebProperty (Maybe Text)
wName = lens _wName (\ s a -> s{_wName = a})
wStarred :: Lens' WebProperty (Maybe Bool)
wStarred = lens _wStarred (\ s a -> s{_wStarred = a})
wInternalWebPropertyId :: Lens' WebProperty (Maybe Text)
wInternalWebPropertyId
= lens _wInternalWebPropertyId
(\ s a -> s{_wInternalWebPropertyId = a})
wId :: Lens' WebProperty (Maybe Text)
wId = lens _wId (\ s a -> s{_wId = a})
wUpdated :: Lens' WebProperty (Maybe UTCTime)
wUpdated
= lens _wUpdated (\ s a -> s{_wUpdated = a}) .
mapping _DateTime
wProFileCount :: Lens' WebProperty (Maybe Int32)
wProFileCount
= lens _wProFileCount
(\ s a -> s{_wProFileCount = a})
. mapping _Coerce
wPermissions :: Lens' WebProperty (Maybe WebPropertyPermissions)
wPermissions
= lens _wPermissions (\ s a -> s{_wPermissions = a})
wWebsiteURL :: Lens' WebProperty (Maybe Text)
wWebsiteURL
= lens _wWebsiteURL (\ s a -> s{_wWebsiteURL = a})
wIndustryVertical :: Lens' WebProperty (Maybe Text)
wIndustryVertical
= lens _wIndustryVertical
(\ s a -> s{_wIndustryVertical = a})
wLevel :: Lens' WebProperty (Maybe Text)
wLevel = lens _wLevel (\ s a -> s{_wLevel = a})
instance FromJSON WebProperty where
parseJSON
= withObject "WebProperty"
(\ o ->
WebProperty' <$>
(o .:? "parentLink") <*> (o .:? "childLink") <*>
(o .:? "defaultProfileId")
<*> (o .:? "kind" .!= "analytics#webproperty")
<*> (o .:? "created")
<*> (o .:? "dataRetentionTtl")
<*> (o .:? "dataRetentionResetOnNewActivity")
<*> (o .:? "selfLink")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "starred")
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "profileCount")
<*> (o .:? "permissions")
<*> (o .:? "websiteUrl")
<*> (o .:? "industryVertical")
<*> (o .:? "level"))
instance ToJSON WebProperty where
toJSON WebProperty'{..}
= object
(catMaybes
[("parentLink" .=) <$> _wParentLink,
("childLink" .=) <$> _wChildLink,
("defaultProfileId" .=) <$> _wDefaultProFileId,
Just ("kind" .= _wKind),
("created" .=) <$> _wCreated,
("dataRetentionTtl" .=) <$> _wDataRetentionTtl,
("dataRetentionResetOnNewActivity" .=) <$>
_wDataRetentionResetOnNewActivity,
("selfLink" .=) <$> _wSelfLink,
("accountId" .=) <$> _wAccountId,
("name" .=) <$> _wName, ("starred" .=) <$> _wStarred,
("internalWebPropertyId" .=) <$>
_wInternalWebPropertyId,
("id" .=) <$> _wId, ("updated" .=) <$> _wUpdated,
("profileCount" .=) <$> _wProFileCount,
("permissions" .=) <$> _wPermissions,
("websiteUrl" .=) <$> _wWebsiteURL,
("industryVertical" .=) <$> _wIndustryVertical,
("level" .=) <$> _wLevel])
newtype WebPropertyPermissions = WebPropertyPermissions'
{ _wppEffective :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
webPropertyPermissions
:: WebPropertyPermissions
webPropertyPermissions =
WebPropertyPermissions'
{ _wppEffective = Nothing
}
wppEffective :: Lens' WebPropertyPermissions [Text]
wppEffective
= lens _wppEffective (\ s a -> s{_wppEffective = a})
. _Default
. _Coerce
instance FromJSON WebPropertyPermissions where
parseJSON
= withObject "WebPropertyPermissions"
(\ o ->
WebPropertyPermissions' <$>
(o .:? "effective" .!= mempty))
instance ToJSON WebPropertyPermissions where
toJSON WebPropertyPermissions'{..}
= object
(catMaybes [("effective" .=) <$> _wppEffective])
data EntityUserLink = EntityUserLink'
{ _euluKind :: !Text
, _euluUserRef :: !(Maybe UserRef)
, _euluSelfLink :: !(Maybe Text)
, _euluId :: !(Maybe Text)
, _euluPermissions :: !(Maybe EntityUserLinkPermissions)
, _euluEntity :: !(Maybe EntityUserLinkEntity)
} deriving (Eq,Show,Data,Typeable,Generic)
entityUserLink
:: EntityUserLink
entityUserLink =
EntityUserLink'
{ _euluKind = "analytics#entityUserLink"
, _euluUserRef = Nothing
, _euluSelfLink = Nothing
, _euluId = Nothing
, _euluPermissions = Nothing
, _euluEntity = Nothing
}
euluKind :: Lens' EntityUserLink Text
euluKind = lens _euluKind (\ s a -> s{_euluKind = a})
euluUserRef :: Lens' EntityUserLink (Maybe UserRef)
euluUserRef
= lens _euluUserRef (\ s a -> s{_euluUserRef = a})
euluSelfLink :: Lens' EntityUserLink (Maybe Text)
euluSelfLink
= lens _euluSelfLink (\ s a -> s{_euluSelfLink = a})
euluId :: Lens' EntityUserLink (Maybe Text)
euluId = lens _euluId (\ s a -> s{_euluId = a})
euluPermissions :: Lens' EntityUserLink (Maybe EntityUserLinkPermissions)
euluPermissions
= lens _euluPermissions
(\ s a -> s{_euluPermissions = a})
euluEntity :: Lens' EntityUserLink (Maybe EntityUserLinkEntity)
euluEntity
= lens _euluEntity (\ s a -> s{_euluEntity = a})
instance FromJSON EntityUserLink where
parseJSON
= withObject "EntityUserLink"
(\ o ->
EntityUserLink' <$>
(o .:? "kind" .!= "analytics#entityUserLink") <*>
(o .:? "userRef")
<*> (o .:? "selfLink")
<*> (o .:? "id")
<*> (o .:? "permissions")
<*> (o .:? "entity"))
instance ToJSON EntityUserLink where
toJSON EntityUserLink'{..}
= object
(catMaybes
[Just ("kind" .= _euluKind),
("userRef" .=) <$> _euluUserRef,
("selfLink" .=) <$> _euluSelfLink,
("id" .=) <$> _euluId,
("permissions" .=) <$> _euluPermissions,
("entity" .=) <$> _euluEntity])
data CustomDataSourceParentLink = CustomDataSourceParentLink'
{ _cdsplHref :: !(Maybe Text)
, _cdsplType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
customDataSourceParentLink
:: CustomDataSourceParentLink
customDataSourceParentLink =
CustomDataSourceParentLink'
{ _cdsplHref = Nothing
, _cdsplType = "analytics#webproperty"
}
cdsplHref :: Lens' CustomDataSourceParentLink (Maybe Text)
cdsplHref
= lens _cdsplHref (\ s a -> s{_cdsplHref = a})
cdsplType :: Lens' CustomDataSourceParentLink Text
cdsplType
= lens _cdsplType (\ s a -> s{_cdsplType = a})
instance FromJSON CustomDataSourceParentLink where
parseJSON
= withObject "CustomDataSourceParentLink"
(\ o ->
CustomDataSourceParentLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#webproperty"))
instance ToJSON CustomDataSourceParentLink where
toJSON CustomDataSourceParentLink'{..}
= object
(catMaybes
[("href" .=) <$> _cdsplHref,
Just ("type" .= _cdsplType)])
data GoalEventDetailsEventConditionsItem = GoalEventDetailsEventConditionsItem'
{ _gedeciMatchType :: !(Maybe Text)
, _gedeciExpression :: !(Maybe Text)
, _gedeciComparisonValue :: !(Maybe (Textual Int64))
, _gedeciType :: !(Maybe Text)
, _gedeciComparisonType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
goalEventDetailsEventConditionsItem
:: GoalEventDetailsEventConditionsItem
goalEventDetailsEventConditionsItem =
GoalEventDetailsEventConditionsItem'
{ _gedeciMatchType = Nothing
, _gedeciExpression = Nothing
, _gedeciComparisonValue = Nothing
, _gedeciType = Nothing
, _gedeciComparisonType = Nothing
}
gedeciMatchType :: Lens' GoalEventDetailsEventConditionsItem (Maybe Text)
gedeciMatchType
= lens _gedeciMatchType
(\ s a -> s{_gedeciMatchType = a})
gedeciExpression :: Lens' GoalEventDetailsEventConditionsItem (Maybe Text)
gedeciExpression
= lens _gedeciExpression
(\ s a -> s{_gedeciExpression = a})
gedeciComparisonValue :: Lens' GoalEventDetailsEventConditionsItem (Maybe Int64)
gedeciComparisonValue
= lens _gedeciComparisonValue
(\ s a -> s{_gedeciComparisonValue = a})
. mapping _Coerce
gedeciType :: Lens' GoalEventDetailsEventConditionsItem (Maybe Text)
gedeciType
= lens _gedeciType (\ s a -> s{_gedeciType = a})
gedeciComparisonType :: Lens' GoalEventDetailsEventConditionsItem (Maybe Text)
gedeciComparisonType
= lens _gedeciComparisonType
(\ s a -> s{_gedeciComparisonType = a})
instance FromJSON GoalEventDetailsEventConditionsItem
where
parseJSON
= withObject "GoalEventDetailsEventConditionsItem"
(\ o ->
GoalEventDetailsEventConditionsItem' <$>
(o .:? "matchType") <*> (o .:? "expression") <*>
(o .:? "comparisonValue")
<*> (o .:? "type")
<*> (o .:? "comparisonType"))
instance ToJSON GoalEventDetailsEventConditionsItem
where
toJSON GoalEventDetailsEventConditionsItem'{..}
= object
(catMaybes
[("matchType" .=) <$> _gedeciMatchType,
("expression" .=) <$> _gedeciExpression,
("comparisonValue" .=) <$> _gedeciComparisonValue,
("type" .=) <$> _gedeciType,
("comparisonType" .=) <$> _gedeciComparisonType])
data AccountTreeRequestAccountSettings = AccountTreeRequestAccountSettings'
{ _atrasShareWithSpeciaLists :: !(Maybe Bool)
, _atrasShareWithSupport :: !(Maybe Bool)
, _atrasShareAnonymouslyWithOthers :: !(Maybe Bool)
, _atrasShareWithGoogleProducts :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
accountTreeRequestAccountSettings
:: AccountTreeRequestAccountSettings
accountTreeRequestAccountSettings =
AccountTreeRequestAccountSettings'
{ _atrasShareWithSpeciaLists = Nothing
, _atrasShareWithSupport = Nothing
, _atrasShareAnonymouslyWithOthers = Nothing
, _atrasShareWithGoogleProducts = Nothing
}
atrasShareWithSpeciaLists :: Lens' AccountTreeRequestAccountSettings (Maybe Bool)
atrasShareWithSpeciaLists
= lens _atrasShareWithSpeciaLists
(\ s a -> s{_atrasShareWithSpeciaLists = a})
atrasShareWithSupport :: Lens' AccountTreeRequestAccountSettings (Maybe Bool)
atrasShareWithSupport
= lens _atrasShareWithSupport
(\ s a -> s{_atrasShareWithSupport = a})
atrasShareAnonymouslyWithOthers :: Lens' AccountTreeRequestAccountSettings (Maybe Bool)
atrasShareAnonymouslyWithOthers
= lens _atrasShareAnonymouslyWithOthers
(\ s a -> s{_atrasShareAnonymouslyWithOthers = a})
atrasShareWithGoogleProducts :: Lens' AccountTreeRequestAccountSettings (Maybe Bool)
atrasShareWithGoogleProducts
= lens _atrasShareWithGoogleProducts
(\ s a -> s{_atrasShareWithGoogleProducts = a})
instance FromJSON AccountTreeRequestAccountSettings
where
parseJSON
= withObject "AccountTreeRequestAccountSettings"
(\ o ->
AccountTreeRequestAccountSettings' <$>
(o .:? "shareWithSpecialists") <*>
(o .:? "shareWithSupport")
<*> (o .:? "shareAnonymouslyWithOthers")
<*> (o .:? "shareWithGoogleProducts"))
instance ToJSON AccountTreeRequestAccountSettings
where
toJSON AccountTreeRequestAccountSettings'{..}
= object
(catMaybes
[("shareWithSpecialists" .=) <$>
_atrasShareWithSpeciaLists,
("shareWithSupport" .=) <$> _atrasShareWithSupport,
("shareAnonymouslyWithOthers" .=) <$>
_atrasShareAnonymouslyWithOthers,
("shareWithGoogleProducts" .=) <$>
_atrasShareWithGoogleProducts])
data McfDataQuery = McfDataQuery'
{ _mdqMetrics :: !(Maybe [Text])
, _mdqSamplingLevel :: !(Maybe Text)
, _mdqFilters :: !(Maybe Text)
, _mdqIds :: !(Maybe Text)
, _mdqEndDate :: !(Maybe Text)
, _mdqSort :: !(Maybe [Text])
, _mdqDimensions :: !(Maybe Text)
, _mdqStartIndex :: !(Maybe (Textual Int32))
, _mdqMaxResults :: !(Maybe (Textual Int32))
, _mdqSegment :: !(Maybe Text)
, _mdqStartDate :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mcfDataQuery
:: McfDataQuery
mcfDataQuery =
McfDataQuery'
{ _mdqMetrics = Nothing
, _mdqSamplingLevel = Nothing
, _mdqFilters = Nothing
, _mdqIds = Nothing
, _mdqEndDate = Nothing
, _mdqSort = Nothing
, _mdqDimensions = Nothing
, _mdqStartIndex = Nothing
, _mdqMaxResults = Nothing
, _mdqSegment = Nothing
, _mdqStartDate = Nothing
}
mdqMetrics :: Lens' McfDataQuery [Text]
mdqMetrics
= lens _mdqMetrics (\ s a -> s{_mdqMetrics = a}) .
_Default
. _Coerce
mdqSamplingLevel :: Lens' McfDataQuery (Maybe Text)
mdqSamplingLevel
= lens _mdqSamplingLevel
(\ s a -> s{_mdqSamplingLevel = a})
mdqFilters :: Lens' McfDataQuery (Maybe Text)
mdqFilters
= lens _mdqFilters (\ s a -> s{_mdqFilters = a})
mdqIds :: Lens' McfDataQuery (Maybe Text)
mdqIds = lens _mdqIds (\ s a -> s{_mdqIds = a})
mdqEndDate :: Lens' McfDataQuery (Maybe Text)
mdqEndDate
= lens _mdqEndDate (\ s a -> s{_mdqEndDate = a})
mdqSort :: Lens' McfDataQuery [Text]
mdqSort
= lens _mdqSort (\ s a -> s{_mdqSort = a}) . _Default
. _Coerce
mdqDimensions :: Lens' McfDataQuery (Maybe Text)
mdqDimensions
= lens _mdqDimensions
(\ s a -> s{_mdqDimensions = a})
mdqStartIndex :: Lens' McfDataQuery (Maybe Int32)
mdqStartIndex
= lens _mdqStartIndex
(\ s a -> s{_mdqStartIndex = a})
. mapping _Coerce
mdqMaxResults :: Lens' McfDataQuery (Maybe Int32)
mdqMaxResults
= lens _mdqMaxResults
(\ s a -> s{_mdqMaxResults = a})
. mapping _Coerce
mdqSegment :: Lens' McfDataQuery (Maybe Text)
mdqSegment
= lens _mdqSegment (\ s a -> s{_mdqSegment = a})
mdqStartDate :: Lens' McfDataQuery (Maybe Text)
mdqStartDate
= lens _mdqStartDate (\ s a -> s{_mdqStartDate = a})
instance FromJSON McfDataQuery where
parseJSON
= withObject "McfDataQuery"
(\ o ->
McfDataQuery' <$>
(o .:? "metrics" .!= mempty) <*>
(o .:? "samplingLevel")
<*> (o .:? "filters")
<*> (o .:? "ids")
<*> (o .:? "end-date")
<*> (o .:? "sort" .!= mempty)
<*> (o .:? "dimensions")
<*> (o .:? "start-index")
<*> (o .:? "max-results")
<*> (o .:? "segment")
<*> (o .:? "start-date"))
instance ToJSON McfDataQuery where
toJSON McfDataQuery'{..}
= object
(catMaybes
[("metrics" .=) <$> _mdqMetrics,
("samplingLevel" .=) <$> _mdqSamplingLevel,
("filters" .=) <$> _mdqFilters,
("ids" .=) <$> _mdqIds,
("end-date" .=) <$> _mdqEndDate,
("sort" .=) <$> _mdqSort,
("dimensions" .=) <$> _mdqDimensions,
("start-index" .=) <$> _mdqStartIndex,
("max-results" .=) <$> _mdqMaxResults,
("segment" .=) <$> _mdqSegment,
("start-date" .=) <$> _mdqStartDate])
data Goal = Goal'
{ _goaParentLink :: !(Maybe GoalParentLink)
, _goaWebPropertyId :: !(Maybe Text)
, _goaKind :: !Text
, _goaCreated :: !(Maybe DateTime')
, _goaValue :: !(Maybe (Textual Double))
, _goaProFileId :: !(Maybe Text)
, _goaEventDetails :: !(Maybe GoalEventDetails)
, _goaActive :: !(Maybe Bool)
, _goaSelfLink :: !(Maybe Text)
, _goaVisitTimeOnSiteDetails :: !(Maybe GoalVisitTimeOnSiteDetails)
, _goaAccountId :: !(Maybe Text)
, _goaName :: !(Maybe Text)
, _goaInternalWebPropertyId :: !(Maybe Text)
, _goaId :: !(Maybe Text)
, _goaURLDestinationDetails :: !(Maybe GoalURLDestinationDetails)
, _goaVisitNumPagesDetails :: !(Maybe GoalVisitNumPagesDetails)
, _goaUpdated :: !(Maybe DateTime')
, _goaType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
goal
:: Goal
goal =
Goal'
{ _goaParentLink = Nothing
, _goaWebPropertyId = Nothing
, _goaKind = "analytics#goal"
, _goaCreated = Nothing
, _goaValue = Nothing
, _goaProFileId = Nothing
, _goaEventDetails = Nothing
, _goaActive = Nothing
, _goaSelfLink = Nothing
, _goaVisitTimeOnSiteDetails = Nothing
, _goaAccountId = Nothing
, _goaName = Nothing
, _goaInternalWebPropertyId = Nothing
, _goaId = Nothing
, _goaURLDestinationDetails = Nothing
, _goaVisitNumPagesDetails = Nothing
, _goaUpdated = Nothing
, _goaType = Nothing
}
goaParentLink :: Lens' Goal (Maybe GoalParentLink)
goaParentLink
= lens _goaParentLink
(\ s a -> s{_goaParentLink = a})
goaWebPropertyId :: Lens' Goal (Maybe Text)
goaWebPropertyId
= lens _goaWebPropertyId
(\ s a -> s{_goaWebPropertyId = a})
goaKind :: Lens' Goal Text
goaKind = lens _goaKind (\ s a -> s{_goaKind = a})
goaCreated :: Lens' Goal (Maybe UTCTime)
goaCreated
= lens _goaCreated (\ s a -> s{_goaCreated = a}) .
mapping _DateTime
goaValue :: Lens' Goal (Maybe Double)
goaValue
= lens _goaValue (\ s a -> s{_goaValue = a}) .
mapping _Coerce
goaProFileId :: Lens' Goal (Maybe Text)
goaProFileId
= lens _goaProFileId (\ s a -> s{_goaProFileId = a})
goaEventDetails :: Lens' Goal (Maybe GoalEventDetails)
goaEventDetails
= lens _goaEventDetails
(\ s a -> s{_goaEventDetails = a})
goaActive :: Lens' Goal (Maybe Bool)
goaActive
= lens _goaActive (\ s a -> s{_goaActive = a})
goaSelfLink :: Lens' Goal (Maybe Text)
goaSelfLink
= lens _goaSelfLink (\ s a -> s{_goaSelfLink = a})
goaVisitTimeOnSiteDetails :: Lens' Goal (Maybe GoalVisitTimeOnSiteDetails)
goaVisitTimeOnSiteDetails
= lens _goaVisitTimeOnSiteDetails
(\ s a -> s{_goaVisitTimeOnSiteDetails = a})
goaAccountId :: Lens' Goal (Maybe Text)
goaAccountId
= lens _goaAccountId (\ s a -> s{_goaAccountId = a})
goaName :: Lens' Goal (Maybe Text)
goaName = lens _goaName (\ s a -> s{_goaName = a})
goaInternalWebPropertyId :: Lens' Goal (Maybe Text)
goaInternalWebPropertyId
= lens _goaInternalWebPropertyId
(\ s a -> s{_goaInternalWebPropertyId = a})
goaId :: Lens' Goal (Maybe Text)
goaId = lens _goaId (\ s a -> s{_goaId = a})
goaURLDestinationDetails :: Lens' Goal (Maybe GoalURLDestinationDetails)
goaURLDestinationDetails
= lens _goaURLDestinationDetails
(\ s a -> s{_goaURLDestinationDetails = a})
goaVisitNumPagesDetails :: Lens' Goal (Maybe GoalVisitNumPagesDetails)
goaVisitNumPagesDetails
= lens _goaVisitNumPagesDetails
(\ s a -> s{_goaVisitNumPagesDetails = a})
goaUpdated :: Lens' Goal (Maybe UTCTime)
goaUpdated
= lens _goaUpdated (\ s a -> s{_goaUpdated = a}) .
mapping _DateTime
goaType :: Lens' Goal (Maybe Text)
goaType = lens _goaType (\ s a -> s{_goaType = a})
instance FromJSON Goal where
parseJSON
= withObject "Goal"
(\ o ->
Goal' <$>
(o .:? "parentLink") <*> (o .:? "webPropertyId") <*>
(o .:? "kind" .!= "analytics#goal")
<*> (o .:? "created")
<*> (o .:? "value")
<*> (o .:? "profileId")
<*> (o .:? "eventDetails")
<*> (o .:? "active")
<*> (o .:? "selfLink")
<*> (o .:? "visitTimeOnSiteDetails")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "id")
<*> (o .:? "urlDestinationDetails")
<*> (o .:? "visitNumPagesDetails")
<*> (o .:? "updated")
<*> (o .:? "type"))
instance ToJSON Goal where
toJSON Goal'{..}
= object
(catMaybes
[("parentLink" .=) <$> _goaParentLink,
("webPropertyId" .=) <$> _goaWebPropertyId,
Just ("kind" .= _goaKind),
("created" .=) <$> _goaCreated,
("value" .=) <$> _goaValue,
("profileId" .=) <$> _goaProFileId,
("eventDetails" .=) <$> _goaEventDetails,
("active" .=) <$> _goaActive,
("selfLink" .=) <$> _goaSelfLink,
("visitTimeOnSiteDetails" .=) <$>
_goaVisitTimeOnSiteDetails,
("accountId" .=) <$> _goaAccountId,
("name" .=) <$> _goaName,
("internalWebPropertyId" .=) <$>
_goaInternalWebPropertyId,
("id" .=) <$> _goaId,
("urlDestinationDetails" .=) <$>
_goaURLDestinationDetails,
("visitNumPagesDetails" .=) <$>
_goaVisitNumPagesDetails,
("updated" .=) <$> _goaUpdated,
("type" .=) <$> _goaType])
data AccountTicket = AccountTicket'
{ _atRedirectURI :: !(Maybe Text)
, _atKind :: !Text
, _atProFile :: !(Maybe ProFile)
, _atAccount :: !(Maybe Account)
, _atWebProperty :: !(Maybe WebProperty)
, _atId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountTicket
:: AccountTicket
accountTicket =
AccountTicket'
{ _atRedirectURI = Nothing
, _atKind = "analytics#accountTicket"
, _atProFile = Nothing
, _atAccount = Nothing
, _atWebProperty = Nothing
, _atId = Nothing
}
atRedirectURI :: Lens' AccountTicket (Maybe Text)
atRedirectURI
= lens _atRedirectURI
(\ s a -> s{_atRedirectURI = a})
atKind :: Lens' AccountTicket Text
atKind = lens _atKind (\ s a -> s{_atKind = a})
atProFile :: Lens' AccountTicket (Maybe ProFile)
atProFile
= lens _atProFile (\ s a -> s{_atProFile = a})
atAccount :: Lens' AccountTicket (Maybe Account)
atAccount
= lens _atAccount (\ s a -> s{_atAccount = a})
atWebProperty :: Lens' AccountTicket (Maybe WebProperty)
atWebProperty
= lens _atWebProperty
(\ s a -> s{_atWebProperty = a})
atId :: Lens' AccountTicket (Maybe Text)
atId = lens _atId (\ s a -> s{_atId = a})
instance FromJSON AccountTicket where
parseJSON
= withObject "AccountTicket"
(\ o ->
AccountTicket' <$>
(o .:? "redirectUri") <*>
(o .:? "kind" .!= "analytics#accountTicket")
<*> (o .:? "profile")
<*> (o .:? "account")
<*> (o .:? "webproperty")
<*> (o .:? "id"))
instance ToJSON AccountTicket where
toJSON AccountTicket'{..}
= object
(catMaybes
[("redirectUri" .=) <$> _atRedirectURI,
Just ("kind" .= _atKind),
("profile" .=) <$> _atProFile,
("account" .=) <$> _atAccount,
("webproperty" .=) <$> _atWebProperty,
("id" .=) <$> _atId])
data AccountSummary = AccountSummary'
{ _assKind :: !Text
, _assWebProperties :: !(Maybe [WebPropertySummary])
, _assName :: !(Maybe Text)
, _assStarred :: !(Maybe Bool)
, _assId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountSummary
:: AccountSummary
accountSummary =
AccountSummary'
{ _assKind = "analytics#accountSummary"
, _assWebProperties = Nothing
, _assName = Nothing
, _assStarred = Nothing
, _assId = Nothing
}
assKind :: Lens' AccountSummary Text
assKind = lens _assKind (\ s a -> s{_assKind = a})
assWebProperties :: Lens' AccountSummary [WebPropertySummary]
assWebProperties
= lens _assWebProperties
(\ s a -> s{_assWebProperties = a})
. _Default
. _Coerce
assName :: Lens' AccountSummary (Maybe Text)
assName = lens _assName (\ s a -> s{_assName = a})
assStarred :: Lens' AccountSummary (Maybe Bool)
assStarred
= lens _assStarred (\ s a -> s{_assStarred = a})
assId :: Lens' AccountSummary (Maybe Text)
assId = lens _assId (\ s a -> s{_assId = a})
instance FromJSON AccountSummary where
parseJSON
= withObject "AccountSummary"
(\ o ->
AccountSummary' <$>
(o .:? "kind" .!= "analytics#accountSummary") <*>
(o .:? "webProperties" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "starred")
<*> (o .:? "id"))
instance ToJSON AccountSummary where
toJSON AccountSummary'{..}
= object
(catMaybes
[Just ("kind" .= _assKind),
("webProperties" .=) <$> _assWebProperties,
("name" .=) <$> _assName,
("starred" .=) <$> _assStarred,
("id" .=) <$> _assId])
data RealtimeDataQuery = RealtimeDataQuery'
{ _rdqMetrics :: !(Maybe [Text])
, _rdqFilters :: !(Maybe Text)
, _rdqIds :: !(Maybe Text)
, _rdqSort :: !(Maybe [Text])
, _rdqDimensions :: !(Maybe Text)
, _rdqMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
realtimeDataQuery
:: RealtimeDataQuery
realtimeDataQuery =
RealtimeDataQuery'
{ _rdqMetrics = Nothing
, _rdqFilters = Nothing
, _rdqIds = Nothing
, _rdqSort = Nothing
, _rdqDimensions = Nothing
, _rdqMaxResults = Nothing
}
rdqMetrics :: Lens' RealtimeDataQuery [Text]
rdqMetrics
= lens _rdqMetrics (\ s a -> s{_rdqMetrics = a}) .
_Default
. _Coerce
rdqFilters :: Lens' RealtimeDataQuery (Maybe Text)
rdqFilters
= lens _rdqFilters (\ s a -> s{_rdqFilters = a})
rdqIds :: Lens' RealtimeDataQuery (Maybe Text)
rdqIds = lens _rdqIds (\ s a -> s{_rdqIds = a})
rdqSort :: Lens' RealtimeDataQuery [Text]
rdqSort
= lens _rdqSort (\ s a -> s{_rdqSort = a}) . _Default
. _Coerce
rdqDimensions :: Lens' RealtimeDataQuery (Maybe Text)
rdqDimensions
= lens _rdqDimensions
(\ s a -> s{_rdqDimensions = a})
rdqMaxResults :: Lens' RealtimeDataQuery (Maybe Int32)
rdqMaxResults
= lens _rdqMaxResults
(\ s a -> s{_rdqMaxResults = a})
. mapping _Coerce
instance FromJSON RealtimeDataQuery where
parseJSON
= withObject "RealtimeDataQuery"
(\ o ->
RealtimeDataQuery' <$>
(o .:? "metrics" .!= mempty) <*> (o .:? "filters")
<*> (o .:? "ids")
<*> (o .:? "sort" .!= mempty)
<*> (o .:? "dimensions")
<*> (o .:? "max-results"))
instance ToJSON RealtimeDataQuery where
toJSON RealtimeDataQuery'{..}
= object
(catMaybes
[("metrics" .=) <$> _rdqMetrics,
("filters" .=) <$> _rdqFilters,
("ids" .=) <$> _rdqIds, ("sort" .=) <$> _rdqSort,
("dimensions" .=) <$> _rdqDimensions,
("max-results" .=) <$> _rdqMaxResults])
data Columns = Columns'
{ _colEtag :: !(Maybe Text)
, _colKind :: !Text
, _colItems :: !(Maybe [Column])
, _colTotalResults :: !(Maybe (Textual Int32))
, _colAttributeNames :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
columns
:: Columns
columns =
Columns'
{ _colEtag = Nothing
, _colKind = "analytics#columns"
, _colItems = Nothing
, _colTotalResults = Nothing
, _colAttributeNames = Nothing
}
colEtag :: Lens' Columns (Maybe Text)
colEtag = lens _colEtag (\ s a -> s{_colEtag = a})
colKind :: Lens' Columns Text
colKind = lens _colKind (\ s a -> s{_colKind = a})
colItems :: Lens' Columns [Column]
colItems
= lens _colItems (\ s a -> s{_colItems = a}) .
_Default
. _Coerce
colTotalResults :: Lens' Columns (Maybe Int32)
colTotalResults
= lens _colTotalResults
(\ s a -> s{_colTotalResults = a})
. mapping _Coerce
colAttributeNames :: Lens' Columns [Text]
colAttributeNames
= lens _colAttributeNames
(\ s a -> s{_colAttributeNames = a})
. _Default
. _Coerce
instance FromJSON Columns where
parseJSON
= withObject "Columns"
(\ o ->
Columns' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "analytics#columns")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "attributeNames" .!= mempty))
instance ToJSON Columns where
toJSON Columns'{..}
= object
(catMaybes
[("etag" .=) <$> _colEtag, Just ("kind" .= _colKind),
("items" .=) <$> _colItems,
("totalResults" .=) <$> _colTotalResults,
("attributeNames" .=) <$> _colAttributeNames])
data FilterLowercaseDetails = FilterLowercaseDetails'
{ _fldFieldIndex :: !(Maybe (Textual Int32))
, _fldField :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
filterLowercaseDetails
:: FilterLowercaseDetails
filterLowercaseDetails =
FilterLowercaseDetails'
{ _fldFieldIndex = Nothing
, _fldField = Nothing
}
fldFieldIndex :: Lens' FilterLowercaseDetails (Maybe Int32)
fldFieldIndex
= lens _fldFieldIndex
(\ s a -> s{_fldFieldIndex = a})
. mapping _Coerce
fldField :: Lens' FilterLowercaseDetails (Maybe Text)
fldField = lens _fldField (\ s a -> s{_fldField = a})
instance FromJSON FilterLowercaseDetails where
parseJSON
= withObject "FilterLowercaseDetails"
(\ o ->
FilterLowercaseDetails' <$>
(o .:? "fieldIndex") <*> (o .:? "field"))
instance ToJSON FilterLowercaseDetails where
toJSON FilterLowercaseDetails'{..}
= object
(catMaybes
[("fieldIndex" .=) <$> _fldFieldIndex,
("field" .=) <$> _fldField])
data Filter = Filter'
{ _filParentLink :: !(Maybe FilterParentLink)
, _filAdvancedDetails :: !(Maybe FilterAdvancedDetails)
, _filUppercaseDetails :: !(Maybe FilterUppercaseDetails)
, _filLowercaseDetails :: !(Maybe FilterLowercaseDetails)
, _filKind :: !Text
, _filCreated :: !(Maybe DateTime')
, _filIncludeDetails :: !(Maybe FilterExpression)
, _filExcludeDetails :: !(Maybe FilterExpression)
, _filSelfLink :: !(Maybe Text)
, _filAccountId :: !(Maybe Text)
, _filName :: !(Maybe Text)
, _filId :: !(Maybe Text)
, _filUpdated :: !(Maybe DateTime')
, _filType :: !(Maybe Text)
, _filSearchAndReplaceDetails :: !(Maybe FilterSearchAndReplaceDetails)
} deriving (Eq,Show,Data,Typeable,Generic)
filter'
:: Filter
filter' =
Filter'
{ _filParentLink = Nothing
, _filAdvancedDetails = Nothing
, _filUppercaseDetails = Nothing
, _filLowercaseDetails = Nothing
, _filKind = "analytics#filter"
, _filCreated = Nothing
, _filIncludeDetails = Nothing
, _filExcludeDetails = Nothing
, _filSelfLink = Nothing
, _filAccountId = Nothing
, _filName = Nothing
, _filId = Nothing
, _filUpdated = Nothing
, _filType = Nothing
, _filSearchAndReplaceDetails = Nothing
}
filParentLink :: Lens' Filter (Maybe FilterParentLink)
filParentLink
= lens _filParentLink
(\ s a -> s{_filParentLink = a})
filAdvancedDetails :: Lens' Filter (Maybe FilterAdvancedDetails)
filAdvancedDetails
= lens _filAdvancedDetails
(\ s a -> s{_filAdvancedDetails = a})
filUppercaseDetails :: Lens' Filter (Maybe FilterUppercaseDetails)
filUppercaseDetails
= lens _filUppercaseDetails
(\ s a -> s{_filUppercaseDetails = a})
filLowercaseDetails :: Lens' Filter (Maybe FilterLowercaseDetails)
filLowercaseDetails
= lens _filLowercaseDetails
(\ s a -> s{_filLowercaseDetails = a})
filKind :: Lens' Filter Text
filKind = lens _filKind (\ s a -> s{_filKind = a})
filCreated :: Lens' Filter (Maybe UTCTime)
filCreated
= lens _filCreated (\ s a -> s{_filCreated = a}) .
mapping _DateTime
filIncludeDetails :: Lens' Filter (Maybe FilterExpression)
filIncludeDetails
= lens _filIncludeDetails
(\ s a -> s{_filIncludeDetails = a})
filExcludeDetails :: Lens' Filter (Maybe FilterExpression)
filExcludeDetails
= lens _filExcludeDetails
(\ s a -> s{_filExcludeDetails = a})
filSelfLink :: Lens' Filter (Maybe Text)
filSelfLink
= lens _filSelfLink (\ s a -> s{_filSelfLink = a})
filAccountId :: Lens' Filter (Maybe Text)
filAccountId
= lens _filAccountId (\ s a -> s{_filAccountId = a})
filName :: Lens' Filter (Maybe Text)
filName = lens _filName (\ s a -> s{_filName = a})
filId :: Lens' Filter (Maybe Text)
filId = lens _filId (\ s a -> s{_filId = a})
filUpdated :: Lens' Filter (Maybe UTCTime)
filUpdated
= lens _filUpdated (\ s a -> s{_filUpdated = a}) .
mapping _DateTime
filType :: Lens' Filter (Maybe Text)
filType = lens _filType (\ s a -> s{_filType = a})
filSearchAndReplaceDetails :: Lens' Filter (Maybe FilterSearchAndReplaceDetails)
filSearchAndReplaceDetails
= lens _filSearchAndReplaceDetails
(\ s a -> s{_filSearchAndReplaceDetails = a})
instance FromJSON Filter where
parseJSON
= withObject "Filter"
(\ o ->
Filter' <$>
(o .:? "parentLink") <*> (o .:? "advancedDetails")
<*> (o .:? "uppercaseDetails")
<*> (o .:? "lowercaseDetails")
<*> (o .:? "kind" .!= "analytics#filter")
<*> (o .:? "created")
<*> (o .:? "includeDetails")
<*> (o .:? "excludeDetails")
<*> (o .:? "selfLink")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "type")
<*> (o .:? "searchAndReplaceDetails"))
instance ToJSON Filter where
toJSON Filter'{..}
= object
(catMaybes
[("parentLink" .=) <$> _filParentLink,
("advancedDetails" .=) <$> _filAdvancedDetails,
("uppercaseDetails" .=) <$> _filUppercaseDetails,
("lowercaseDetails" .=) <$> _filLowercaseDetails,
Just ("kind" .= _filKind),
("created" .=) <$> _filCreated,
("includeDetails" .=) <$> _filIncludeDetails,
("excludeDetails" .=) <$> _filExcludeDetails,
("selfLink" .=) <$> _filSelfLink,
("accountId" .=) <$> _filAccountId,
("name" .=) <$> _filName, ("id" .=) <$> _filId,
("updated" .=) <$> _filUpdated,
("type" .=) <$> _filType,
("searchAndReplaceDetails" .=) <$>
_filSearchAndReplaceDetails])
data Uploads = Uploads'
{ _uplNextLink :: !(Maybe Text)
, _uplItemsPerPage :: !(Maybe (Textual Int32))
, _uplKind :: !Text
, _uplItems :: !(Maybe [Upload])
, _uplTotalResults :: !(Maybe (Textual Int32))
, _uplStartIndex :: !(Maybe (Textual Int32))
, _uplPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
uploads
:: Uploads
uploads =
Uploads'
{ _uplNextLink = Nothing
, _uplItemsPerPage = Nothing
, _uplKind = "analytics#uploads"
, _uplItems = Nothing
, _uplTotalResults = Nothing
, _uplStartIndex = Nothing
, _uplPreviousLink = Nothing
}
uplNextLink :: Lens' Uploads (Maybe Text)
uplNextLink
= lens _uplNextLink (\ s a -> s{_uplNextLink = a})
uplItemsPerPage :: Lens' Uploads (Maybe Int32)
uplItemsPerPage
= lens _uplItemsPerPage
(\ s a -> s{_uplItemsPerPage = a})
. mapping _Coerce
uplKind :: Lens' Uploads Text
uplKind = lens _uplKind (\ s a -> s{_uplKind = a})
uplItems :: Lens' Uploads [Upload]
uplItems
= lens _uplItems (\ s a -> s{_uplItems = a}) .
_Default
. _Coerce
uplTotalResults :: Lens' Uploads (Maybe Int32)
uplTotalResults
= lens _uplTotalResults
(\ s a -> s{_uplTotalResults = a})
. mapping _Coerce
uplStartIndex :: Lens' Uploads (Maybe Int32)
uplStartIndex
= lens _uplStartIndex
(\ s a -> s{_uplStartIndex = a})
. mapping _Coerce
uplPreviousLink :: Lens' Uploads (Maybe Text)
uplPreviousLink
= lens _uplPreviousLink
(\ s a -> s{_uplPreviousLink = a})
instance FromJSON Uploads where
parseJSON
= withObject "Uploads"
(\ o ->
Uploads' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#uploads")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON Uploads where
toJSON Uploads'{..}
= object
(catMaybes
[("nextLink" .=) <$> _uplNextLink,
("itemsPerPage" .=) <$> _uplItemsPerPage,
Just ("kind" .= _uplKind),
("items" .=) <$> _uplItems,
("totalResults" .=) <$> _uplTotalResults,
("startIndex" .=) <$> _uplStartIndex,
("previousLink" .=) <$> _uplPreviousLink])
data CustomDimensions = CustomDimensions'
{ _cdNextLink :: !(Maybe Text)
, _cdItemsPerPage :: !(Maybe (Textual Int32))
, _cdKind :: !Text
, _cdUsername :: !(Maybe Text)
, _cdItems :: !(Maybe [CustomDimension])
, _cdTotalResults :: !(Maybe (Textual Int32))
, _cdStartIndex :: !(Maybe (Textual Int32))
, _cdPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customDimensions
:: CustomDimensions
customDimensions =
CustomDimensions'
{ _cdNextLink = Nothing
, _cdItemsPerPage = Nothing
, _cdKind = "analytics#customDimensions"
, _cdUsername = Nothing
, _cdItems = Nothing
, _cdTotalResults = Nothing
, _cdStartIndex = Nothing
, _cdPreviousLink = Nothing
}
cdNextLink :: Lens' CustomDimensions (Maybe Text)
cdNextLink
= lens _cdNextLink (\ s a -> s{_cdNextLink = a})
cdItemsPerPage :: Lens' CustomDimensions (Maybe Int32)
cdItemsPerPage
= lens _cdItemsPerPage
(\ s a -> s{_cdItemsPerPage = a})
. mapping _Coerce
cdKind :: Lens' CustomDimensions Text
cdKind = lens _cdKind (\ s a -> s{_cdKind = a})
cdUsername :: Lens' CustomDimensions (Maybe Text)
cdUsername
= lens _cdUsername (\ s a -> s{_cdUsername = a})
cdItems :: Lens' CustomDimensions [CustomDimension]
cdItems
= lens _cdItems (\ s a -> s{_cdItems = a}) . _Default
. _Coerce
cdTotalResults :: Lens' CustomDimensions (Maybe Int32)
cdTotalResults
= lens _cdTotalResults
(\ s a -> s{_cdTotalResults = a})
. mapping _Coerce
cdStartIndex :: Lens' CustomDimensions (Maybe Int32)
cdStartIndex
= lens _cdStartIndex (\ s a -> s{_cdStartIndex = a})
. mapping _Coerce
cdPreviousLink :: Lens' CustomDimensions (Maybe Text)
cdPreviousLink
= lens _cdPreviousLink
(\ s a -> s{_cdPreviousLink = a})
instance FromJSON CustomDimensions where
parseJSON
= withObject "CustomDimensions"
(\ o ->
CustomDimensions' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#customDimensions")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON CustomDimensions where
toJSON CustomDimensions'{..}
= object
(catMaybes
[("nextLink" .=) <$> _cdNextLink,
("itemsPerPage" .=) <$> _cdItemsPerPage,
Just ("kind" .= _cdKind),
("username" .=) <$> _cdUsername,
("items" .=) <$> _cdItems,
("totalResults" .=) <$> _cdTotalResults,
("startIndex" .=) <$> _cdStartIndex,
("previousLink" .=) <$> _cdPreviousLink])
data Segments = Segments'
{ _sNextLink :: !(Maybe Text)
, _sItemsPerPage :: !(Maybe (Textual Int32))
, _sKind :: !Text
, _sUsername :: !(Maybe Text)
, _sItems :: !(Maybe [Segment])
, _sTotalResults :: !(Maybe (Textual Int32))
, _sStartIndex :: !(Maybe (Textual Int32))
, _sPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
segments
:: Segments
segments =
Segments'
{ _sNextLink = Nothing
, _sItemsPerPage = Nothing
, _sKind = "analytics#segments"
, _sUsername = Nothing
, _sItems = Nothing
, _sTotalResults = Nothing
, _sStartIndex = Nothing
, _sPreviousLink = Nothing
}
sNextLink :: Lens' Segments (Maybe Text)
sNextLink
= lens _sNextLink (\ s a -> s{_sNextLink = a})
sItemsPerPage :: Lens' Segments (Maybe Int32)
sItemsPerPage
= lens _sItemsPerPage
(\ s a -> s{_sItemsPerPage = a})
. mapping _Coerce
sKind :: Lens' Segments Text
sKind = lens _sKind (\ s a -> s{_sKind = a})
sUsername :: Lens' Segments (Maybe Text)
sUsername
= lens _sUsername (\ s a -> s{_sUsername = a})
sItems :: Lens' Segments [Segment]
sItems
= lens _sItems (\ s a -> s{_sItems = a}) . _Default .
_Coerce
sTotalResults :: Lens' Segments (Maybe Int32)
sTotalResults
= lens _sTotalResults
(\ s a -> s{_sTotalResults = a})
. mapping _Coerce
sStartIndex :: Lens' Segments (Maybe Int32)
sStartIndex
= lens _sStartIndex (\ s a -> s{_sStartIndex = a}) .
mapping _Coerce
sPreviousLink :: Lens' Segments (Maybe Text)
sPreviousLink
= lens _sPreviousLink
(\ s a -> s{_sPreviousLink = a})
instance FromJSON Segments where
parseJSON
= withObject "Segments"
(\ o ->
Segments' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#segments")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON Segments where
toJSON Segments'{..}
= object
(catMaybes
[("nextLink" .=) <$> _sNextLink,
("itemsPerPage" .=) <$> _sItemsPerPage,
Just ("kind" .= _sKind),
("username" .=) <$> _sUsername,
("items" .=) <$> _sItems,
("totalResults" .=) <$> _sTotalResults,
("startIndex" .=) <$> _sStartIndex,
("previousLink" .=) <$> _sPreviousLink])
data GaDataDataTable = GaDataDataTable'
{ _gddtCols :: !(Maybe [GaDataDataTableColsItem])
, _gddtRows :: !(Maybe [GaDataDataTableRowsItem])
} deriving (Eq,Show,Data,Typeable,Generic)
gaDataDataTable
:: GaDataDataTable
gaDataDataTable =
GaDataDataTable'
{ _gddtCols = Nothing
, _gddtRows = Nothing
}
gddtCols :: Lens' GaDataDataTable [GaDataDataTableColsItem]
gddtCols
= lens _gddtCols (\ s a -> s{_gddtCols = a}) .
_Default
. _Coerce
gddtRows :: Lens' GaDataDataTable [GaDataDataTableRowsItem]
gddtRows
= lens _gddtRows (\ s a -> s{_gddtRows = a}) .
_Default
. _Coerce
instance FromJSON GaDataDataTable where
parseJSON
= withObject "GaDataDataTable"
(\ o ->
GaDataDataTable' <$>
(o .:? "cols" .!= mempty) <*>
(o .:? "rows" .!= mempty))
instance ToJSON GaDataDataTable where
toJSON GaDataDataTable'{..}
= object
(catMaybes
[("cols" .=) <$> _gddtCols,
("rows" .=) <$> _gddtRows])
newtype EntityAdWordsLinkEntity = EntityAdWordsLinkEntity'
{ _eawleWebPropertyRef :: Maybe WebPropertyRef
} deriving (Eq,Show,Data,Typeable,Generic)
entityAdWordsLinkEntity
:: EntityAdWordsLinkEntity
entityAdWordsLinkEntity =
EntityAdWordsLinkEntity'
{ _eawleWebPropertyRef = Nothing
}
eawleWebPropertyRef :: Lens' EntityAdWordsLinkEntity (Maybe WebPropertyRef)
eawleWebPropertyRef
= lens _eawleWebPropertyRef
(\ s a -> s{_eawleWebPropertyRef = a})
instance FromJSON EntityAdWordsLinkEntity where
parseJSON
= withObject "EntityAdWordsLinkEntity"
(\ o ->
EntityAdWordsLinkEntity' <$>
(o .:? "webPropertyRef"))
instance ToJSON EntityAdWordsLinkEntity where
toJSON EntityAdWordsLinkEntity'{..}
= object
(catMaybes
[("webPropertyRef" .=) <$> _eawleWebPropertyRef])
data RemarketingAudienceStateBasedAudienceDefinition = RemarketingAudienceStateBasedAudienceDefinition'
{ _rasbadExcludeConditions :: !(Maybe RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions)
, _rasbadIncludeConditions :: !(Maybe IncludeConditions)
} deriving (Eq,Show,Data,Typeable,Generic)
remarketingAudienceStateBasedAudienceDefinition
:: RemarketingAudienceStateBasedAudienceDefinition
remarketingAudienceStateBasedAudienceDefinition =
RemarketingAudienceStateBasedAudienceDefinition'
{ _rasbadExcludeConditions = Nothing
, _rasbadIncludeConditions = Nothing
}
rasbadExcludeConditions :: Lens' RemarketingAudienceStateBasedAudienceDefinition (Maybe RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions)
rasbadExcludeConditions
= lens _rasbadExcludeConditions
(\ s a -> s{_rasbadExcludeConditions = a})
rasbadIncludeConditions :: Lens' RemarketingAudienceStateBasedAudienceDefinition (Maybe IncludeConditions)
rasbadIncludeConditions
= lens _rasbadIncludeConditions
(\ s a -> s{_rasbadIncludeConditions = a})
instance FromJSON
RemarketingAudienceStateBasedAudienceDefinition where
parseJSON
= withObject
"RemarketingAudienceStateBasedAudienceDefinition"
(\ o ->
RemarketingAudienceStateBasedAudienceDefinition' <$>
(o .:? "excludeConditions") <*>
(o .:? "includeConditions"))
instance ToJSON
RemarketingAudienceStateBasedAudienceDefinition where
toJSON
RemarketingAudienceStateBasedAudienceDefinition'{..}
= object
(catMaybes
[("excludeConditions" .=) <$>
_rasbadExcludeConditions,
("includeConditions" .=) <$>
_rasbadIncludeConditions])
data AccountTreeResponseAccountSettings = AccountTreeResponseAccountSettings'
{ _aShareWithSpeciaLists :: !(Maybe Bool)
, _aShareWithSupport :: !(Maybe Bool)
, _aShareAnonymouslyWithOthers :: !(Maybe Bool)
, _aShareWithGoogleProducts :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
accountTreeResponseAccountSettings
:: AccountTreeResponseAccountSettings
accountTreeResponseAccountSettings =
AccountTreeResponseAccountSettings'
{ _aShareWithSpeciaLists = Nothing
, _aShareWithSupport = Nothing
, _aShareAnonymouslyWithOthers = Nothing
, _aShareWithGoogleProducts = Nothing
}
aShareWithSpeciaLists :: Lens' AccountTreeResponseAccountSettings (Maybe Bool)
aShareWithSpeciaLists
= lens _aShareWithSpeciaLists
(\ s a -> s{_aShareWithSpeciaLists = a})
aShareWithSupport :: Lens' AccountTreeResponseAccountSettings (Maybe Bool)
aShareWithSupport
= lens _aShareWithSupport
(\ s a -> s{_aShareWithSupport = a})
aShareAnonymouslyWithOthers :: Lens' AccountTreeResponseAccountSettings (Maybe Bool)
aShareAnonymouslyWithOthers
= lens _aShareAnonymouslyWithOthers
(\ s a -> s{_aShareAnonymouslyWithOthers = a})
aShareWithGoogleProducts :: Lens' AccountTreeResponseAccountSettings (Maybe Bool)
aShareWithGoogleProducts
= lens _aShareWithGoogleProducts
(\ s a -> s{_aShareWithGoogleProducts = a})
instance FromJSON AccountTreeResponseAccountSettings
where
parseJSON
= withObject "AccountTreeResponseAccountSettings"
(\ o ->
AccountTreeResponseAccountSettings' <$>
(o .:? "shareWithSpecialists") <*>
(o .:? "shareWithSupport")
<*> (o .:? "shareAnonymouslyWithOthers")
<*> (o .:? "shareWithGoogleProducts"))
instance ToJSON AccountTreeResponseAccountSettings
where
toJSON AccountTreeResponseAccountSettings'{..}
= object
(catMaybes
[("shareWithSpecialists" .=) <$>
_aShareWithSpeciaLists,
("shareWithSupport" .=) <$> _aShareWithSupport,
("shareAnonymouslyWithOthers" .=) <$>
_aShareAnonymouslyWithOthers,
("shareWithGoogleProducts" .=) <$>
_aShareWithGoogleProducts])
data GoalURLDestinationDetails = GoalURLDestinationDetails'
{ _guddURL :: !(Maybe Text)
, _guddMatchType :: !(Maybe Text)
, _guddSteps :: !(Maybe [GoalURLDestinationDetailsStepsItem])
, _guddCaseSensitive :: !(Maybe Bool)
, _guddFirstStepRequired :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
goalURLDestinationDetails
:: GoalURLDestinationDetails
goalURLDestinationDetails =
GoalURLDestinationDetails'
{ _guddURL = Nothing
, _guddMatchType = Nothing
, _guddSteps = Nothing
, _guddCaseSensitive = Nothing
, _guddFirstStepRequired = Nothing
}
guddURL :: Lens' GoalURLDestinationDetails (Maybe Text)
guddURL = lens _guddURL (\ s a -> s{_guddURL = a})
guddMatchType :: Lens' GoalURLDestinationDetails (Maybe Text)
guddMatchType
= lens _guddMatchType
(\ s a -> s{_guddMatchType = a})
guddSteps :: Lens' GoalURLDestinationDetails [GoalURLDestinationDetailsStepsItem]
guddSteps
= lens _guddSteps (\ s a -> s{_guddSteps = a}) .
_Default
. _Coerce
guddCaseSensitive :: Lens' GoalURLDestinationDetails (Maybe Bool)
guddCaseSensitive
= lens _guddCaseSensitive
(\ s a -> s{_guddCaseSensitive = a})
guddFirstStepRequired :: Lens' GoalURLDestinationDetails (Maybe Bool)
guddFirstStepRequired
= lens _guddFirstStepRequired
(\ s a -> s{_guddFirstStepRequired = a})
instance FromJSON GoalURLDestinationDetails where
parseJSON
= withObject "GoalURLDestinationDetails"
(\ o ->
GoalURLDestinationDetails' <$>
(o .:? "url") <*> (o .:? "matchType") <*>
(o .:? "steps" .!= mempty)
<*> (o .:? "caseSensitive")
<*> (o .:? "firstStepRequired"))
instance ToJSON GoalURLDestinationDetails where
toJSON GoalURLDestinationDetails'{..}
= object
(catMaybes
[("url" .=) <$> _guddURL,
("matchType" .=) <$> _guddMatchType,
("steps" .=) <$> _guddSteps,
("caseSensitive" .=) <$> _guddCaseSensitive,
("firstStepRequired" .=) <$> _guddFirstStepRequired])
data ProFileFilterLinks = ProFileFilterLinks'
{ _pfflNextLink :: !(Maybe Text)
, _pfflItemsPerPage :: !(Maybe (Textual Int32))
, _pfflKind :: !Text
, _pfflUsername :: !(Maybe Text)
, _pfflItems :: !(Maybe [ProFileFilterLink])
, _pfflTotalResults :: !(Maybe (Textual Int32))
, _pfflStartIndex :: !(Maybe (Textual Int32))
, _pfflPreviousLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
proFileFilterLinks
:: ProFileFilterLinks
proFileFilterLinks =
ProFileFilterLinks'
{ _pfflNextLink = Nothing
, _pfflItemsPerPage = Nothing
, _pfflKind = "analytics#profileFilterLinks"
, _pfflUsername = Nothing
, _pfflItems = Nothing
, _pfflTotalResults = Nothing
, _pfflStartIndex = Nothing
, _pfflPreviousLink = Nothing
}
pfflNextLink :: Lens' ProFileFilterLinks (Maybe Text)
pfflNextLink
= lens _pfflNextLink (\ s a -> s{_pfflNextLink = a})
pfflItemsPerPage :: Lens' ProFileFilterLinks (Maybe Int32)
pfflItemsPerPage
= lens _pfflItemsPerPage
(\ s a -> s{_pfflItemsPerPage = a})
. mapping _Coerce
pfflKind :: Lens' ProFileFilterLinks Text
pfflKind = lens _pfflKind (\ s a -> s{_pfflKind = a})
pfflUsername :: Lens' ProFileFilterLinks (Maybe Text)
pfflUsername
= lens _pfflUsername (\ s a -> s{_pfflUsername = a})
pfflItems :: Lens' ProFileFilterLinks [ProFileFilterLink]
pfflItems
= lens _pfflItems (\ s a -> s{_pfflItems = a}) .
_Default
. _Coerce
pfflTotalResults :: Lens' ProFileFilterLinks (Maybe Int32)
pfflTotalResults
= lens _pfflTotalResults
(\ s a -> s{_pfflTotalResults = a})
. mapping _Coerce
pfflStartIndex :: Lens' ProFileFilterLinks (Maybe Int32)
pfflStartIndex
= lens _pfflStartIndex
(\ s a -> s{_pfflStartIndex = a})
. mapping _Coerce
pfflPreviousLink :: Lens' ProFileFilterLinks (Maybe Text)
pfflPreviousLink
= lens _pfflPreviousLink
(\ s a -> s{_pfflPreviousLink = a})
instance FromJSON ProFileFilterLinks where
parseJSON
= withObject "ProFileFilterLinks"
(\ o ->
ProFileFilterLinks' <$>
(o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
(o .:? "kind" .!= "analytics#profileFilterLinks")
<*> (o .:? "username")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "totalResults")
<*> (o .:? "startIndex")
<*> (o .:? "previousLink"))
instance ToJSON ProFileFilterLinks where
toJSON ProFileFilterLinks'{..}
= object
(catMaybes
[("nextLink" .=) <$> _pfflNextLink,
("itemsPerPage" .=) <$> _pfflItemsPerPage,
Just ("kind" .= _pfflKind),
("username" .=) <$> _pfflUsername,
("items" .=) <$> _pfflItems,
("totalResults" .=) <$> _pfflTotalResults,
("startIndex" .=) <$> _pfflStartIndex,
("previousLink" .=) <$> _pfflPreviousLink])
data WebPropertyParentLink = WebPropertyParentLink'
{ _wpplHref :: !(Maybe Text)
, _wpplType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
webPropertyParentLink
:: WebPropertyParentLink
webPropertyParentLink =
WebPropertyParentLink'
{ _wpplHref = Nothing
, _wpplType = "analytics#account"
}
wpplHref :: Lens' WebPropertyParentLink (Maybe Text)
wpplHref = lens _wpplHref (\ s a -> s{_wpplHref = a})
wpplType :: Lens' WebPropertyParentLink Text
wpplType = lens _wpplType (\ s a -> s{_wpplType = a})
instance FromJSON WebPropertyParentLink where
parseJSON
= withObject "WebPropertyParentLink"
(\ o ->
WebPropertyParentLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#account"))
instance ToJSON WebPropertyParentLink where
toJSON WebPropertyParentLink'{..}
= object
(catMaybes
[("href" .=) <$> _wpplHref,
Just ("type" .= _wpplType)])
data GaDataProFileInfo = GaDataProFileInfo'
{ _gdpfiWebPropertyId :: !(Maybe Text)
, _gdpfiProFileId :: !(Maybe Text)
, _gdpfiProFileName :: !(Maybe Text)
, _gdpfiAccountId :: !(Maybe Text)
, _gdpfiInternalWebPropertyId :: !(Maybe Text)
, _gdpfiTableId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
gaDataProFileInfo
:: GaDataProFileInfo
gaDataProFileInfo =
GaDataProFileInfo'
{ _gdpfiWebPropertyId = Nothing
, _gdpfiProFileId = Nothing
, _gdpfiProFileName = Nothing
, _gdpfiAccountId = Nothing
, _gdpfiInternalWebPropertyId = Nothing
, _gdpfiTableId = Nothing
}
gdpfiWebPropertyId :: Lens' GaDataProFileInfo (Maybe Text)
gdpfiWebPropertyId
= lens _gdpfiWebPropertyId
(\ s a -> s{_gdpfiWebPropertyId = a})
gdpfiProFileId :: Lens' GaDataProFileInfo (Maybe Text)
gdpfiProFileId
= lens _gdpfiProFileId
(\ s a -> s{_gdpfiProFileId = a})
gdpfiProFileName :: Lens' GaDataProFileInfo (Maybe Text)
gdpfiProFileName
= lens _gdpfiProFileName
(\ s a -> s{_gdpfiProFileName = a})
gdpfiAccountId :: Lens' GaDataProFileInfo (Maybe Text)
gdpfiAccountId
= lens _gdpfiAccountId
(\ s a -> s{_gdpfiAccountId = a})
gdpfiInternalWebPropertyId :: Lens' GaDataProFileInfo (Maybe Text)
gdpfiInternalWebPropertyId
= lens _gdpfiInternalWebPropertyId
(\ s a -> s{_gdpfiInternalWebPropertyId = a})
gdpfiTableId :: Lens' GaDataProFileInfo (Maybe Text)
gdpfiTableId
= lens _gdpfiTableId (\ s a -> s{_gdpfiTableId = a})
instance FromJSON GaDataProFileInfo where
parseJSON
= withObject "GaDataProFileInfo"
(\ o ->
GaDataProFileInfo' <$>
(o .:? "webPropertyId") <*> (o .:? "profileId") <*>
(o .:? "profileName")
<*> (o .:? "accountId")
<*> (o .:? "internalWebPropertyId")
<*> (o .:? "tableId"))
instance ToJSON GaDataProFileInfo where
toJSON GaDataProFileInfo'{..}
= object
(catMaybes
[("webPropertyId" .=) <$> _gdpfiWebPropertyId,
("profileId" .=) <$> _gdpfiProFileId,
("profileName" .=) <$> _gdpfiProFileName,
("accountId" .=) <$> _gdpfiAccountId,
("internalWebPropertyId" .=) <$>
_gdpfiInternalWebPropertyId,
("tableId" .=) <$> _gdpfiTableId])
data Upload = Upload'
{ _uuStatus :: !(Maybe Text)
, _uuKind :: !Text
, _uuCustomDataSourceId :: !(Maybe Text)
, _uuUploadTime :: !(Maybe DateTime')
, _uuAccountId :: !(Maybe (Textual Int64))
, _uuId :: !(Maybe Text)
, _uuErrors :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
upload
:: Upload
upload =
Upload'
{ _uuStatus = Nothing
, _uuKind = "analytics#upload"
, _uuCustomDataSourceId = Nothing
, _uuUploadTime = Nothing
, _uuAccountId = Nothing
, _uuId = Nothing
, _uuErrors = Nothing
}
uuStatus :: Lens' Upload (Maybe Text)
uuStatus = lens _uuStatus (\ s a -> s{_uuStatus = a})
uuKind :: Lens' Upload Text
uuKind = lens _uuKind (\ s a -> s{_uuKind = a})
uuCustomDataSourceId :: Lens' Upload (Maybe Text)
uuCustomDataSourceId
= lens _uuCustomDataSourceId
(\ s a -> s{_uuCustomDataSourceId = a})
uuUploadTime :: Lens' Upload (Maybe UTCTime)
uuUploadTime
= lens _uuUploadTime (\ s a -> s{_uuUploadTime = a})
. mapping _DateTime
uuAccountId :: Lens' Upload (Maybe Int64)
uuAccountId
= lens _uuAccountId (\ s a -> s{_uuAccountId = a}) .
mapping _Coerce
uuId :: Lens' Upload (Maybe Text)
uuId = lens _uuId (\ s a -> s{_uuId = a})
uuErrors :: Lens' Upload [Text]
uuErrors
= lens _uuErrors (\ s a -> s{_uuErrors = a}) .
_Default
. _Coerce
instance FromJSON Upload where
parseJSON
= withObject "Upload"
(\ o ->
Upload' <$>
(o .:? "status") <*>
(o .:? "kind" .!= "analytics#upload")
<*> (o .:? "customDataSourceId")
<*> (o .:? "uploadTime")
<*> (o .:? "accountId")
<*> (o .:? "id")
<*> (o .:? "errors" .!= mempty))
instance ToJSON Upload where
toJSON Upload'{..}
= object
(catMaybes
[("status" .=) <$> _uuStatus,
Just ("kind" .= _uuKind),
("customDataSourceId" .=) <$> _uuCustomDataSourceId,
("uploadTime" .=) <$> _uuUploadTime,
("accountId" .=) <$> _uuAccountId,
("id" .=) <$> _uuId, ("errors" .=) <$> _uuErrors])
data CustomDimension = CustomDimension'
{ _cddParentLink :: !(Maybe CustomDimensionParentLink)
, _cddWebPropertyId :: !(Maybe Text)
, _cddKind :: !Text
, _cddCreated :: !(Maybe DateTime')
, _cddActive :: !(Maybe Bool)
, _cddSelfLink :: !(Maybe Text)
, _cddAccountId :: !(Maybe Text)
, _cddName :: !(Maybe Text)
, _cddScope :: !(Maybe Text)
, _cddId :: !(Maybe Text)
, _cddUpdated :: !(Maybe DateTime')
, _cddIndex :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
customDimension
:: CustomDimension
customDimension =
CustomDimension'
{ _cddParentLink = Nothing
, _cddWebPropertyId = Nothing
, _cddKind = "analytics#customDimension"
, _cddCreated = Nothing
, _cddActive = Nothing
, _cddSelfLink = Nothing
, _cddAccountId = Nothing
, _cddName = Nothing
, _cddScope = Nothing
, _cddId = Nothing
, _cddUpdated = Nothing
, _cddIndex = Nothing
}
cddParentLink :: Lens' CustomDimension (Maybe CustomDimensionParentLink)
cddParentLink
= lens _cddParentLink
(\ s a -> s{_cddParentLink = a})
cddWebPropertyId :: Lens' CustomDimension (Maybe Text)
cddWebPropertyId
= lens _cddWebPropertyId
(\ s a -> s{_cddWebPropertyId = a})
cddKind :: Lens' CustomDimension Text
cddKind = lens _cddKind (\ s a -> s{_cddKind = a})
cddCreated :: Lens' CustomDimension (Maybe UTCTime)
cddCreated
= lens _cddCreated (\ s a -> s{_cddCreated = a}) .
mapping _DateTime
cddActive :: Lens' CustomDimension (Maybe Bool)
cddActive
= lens _cddActive (\ s a -> s{_cddActive = a})
cddSelfLink :: Lens' CustomDimension (Maybe Text)
cddSelfLink
= lens _cddSelfLink (\ s a -> s{_cddSelfLink = a})
cddAccountId :: Lens' CustomDimension (Maybe Text)
cddAccountId
= lens _cddAccountId (\ s a -> s{_cddAccountId = a})
cddName :: Lens' CustomDimension (Maybe Text)
cddName = lens _cddName (\ s a -> s{_cddName = a})
cddScope :: Lens' CustomDimension (Maybe Text)
cddScope = lens _cddScope (\ s a -> s{_cddScope = a})
cddId :: Lens' CustomDimension (Maybe Text)
cddId = lens _cddId (\ s a -> s{_cddId = a})
cddUpdated :: Lens' CustomDimension (Maybe UTCTime)
cddUpdated
= lens _cddUpdated (\ s a -> s{_cddUpdated = a}) .
mapping _DateTime
cddIndex :: Lens' CustomDimension (Maybe Int32)
cddIndex
= lens _cddIndex (\ s a -> s{_cddIndex = a}) .
mapping _Coerce
instance FromJSON CustomDimension where
parseJSON
= withObject "CustomDimension"
(\ o ->
CustomDimension' <$>
(o .:? "parentLink") <*> (o .:? "webPropertyId") <*>
(o .:? "kind" .!= "analytics#customDimension")
<*> (o .:? "created")
<*> (o .:? "active")
<*> (o .:? "selfLink")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "scope")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "index"))
instance ToJSON CustomDimension where
toJSON CustomDimension'{..}
= object
(catMaybes
[("parentLink" .=) <$> _cddParentLink,
("webPropertyId" .=) <$> _cddWebPropertyId,
Just ("kind" .= _cddKind),
("created" .=) <$> _cddCreated,
("active" .=) <$> _cddActive,
("selfLink" .=) <$> _cddSelfLink,
("accountId" .=) <$> _cddAccountId,
("name" .=) <$> _cddName, ("scope" .=) <$> _cddScope,
("id" .=) <$> _cddId, ("updated" .=) <$> _cddUpdated,
("index" .=) <$> _cddIndex])
data Segment = Segment'
{ _segDefinition :: !(Maybe Text)
, _segKind :: !Text
, _segCreated :: !(Maybe DateTime')
, _segSelfLink :: !(Maybe Text)
, _segName :: !(Maybe Text)
, _segId :: !(Maybe Text)
, _segUpdated :: !(Maybe DateTime')
, _segType :: !(Maybe Text)
, _segSegmentId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
segment
:: Segment
segment =
Segment'
{ _segDefinition = Nothing
, _segKind = "analytics#segment"
, _segCreated = Nothing
, _segSelfLink = Nothing
, _segName = Nothing
, _segId = Nothing
, _segUpdated = Nothing
, _segType = Nothing
, _segSegmentId = Nothing
}
segDefinition :: Lens' Segment (Maybe Text)
segDefinition
= lens _segDefinition
(\ s a -> s{_segDefinition = a})
segKind :: Lens' Segment Text
segKind = lens _segKind (\ s a -> s{_segKind = a})
segCreated :: Lens' Segment (Maybe UTCTime)
segCreated
= lens _segCreated (\ s a -> s{_segCreated = a}) .
mapping _DateTime
segSelfLink :: Lens' Segment (Maybe Text)
segSelfLink
= lens _segSelfLink (\ s a -> s{_segSelfLink = a})
segName :: Lens' Segment (Maybe Text)
segName = lens _segName (\ s a -> s{_segName = a})
segId :: Lens' Segment (Maybe Text)
segId = lens _segId (\ s a -> s{_segId = a})
segUpdated :: Lens' Segment (Maybe UTCTime)
segUpdated
= lens _segUpdated (\ s a -> s{_segUpdated = a}) .
mapping _DateTime
segType :: Lens' Segment (Maybe Text)
segType = lens _segType (\ s a -> s{_segType = a})
segSegmentId :: Lens' Segment (Maybe Text)
segSegmentId
= lens _segSegmentId (\ s a -> s{_segSegmentId = a})
instance FromJSON Segment where
parseJSON
= withObject "Segment"
(\ o ->
Segment' <$>
(o .:? "definition") <*>
(o .:? "kind" .!= "analytics#segment")
<*> (o .:? "created")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "type")
<*> (o .:? "segmentId"))
instance ToJSON Segment where
toJSON Segment'{..}
= object
(catMaybes
[("definition" .=) <$> _segDefinition,
Just ("kind" .= _segKind),
("created" .=) <$> _segCreated,
("selfLink" .=) <$> _segSelfLink,
("name" .=) <$> _segName, ("id" .=) <$> _segId,
("updated" .=) <$> _segUpdated,
("type" .=) <$> _segType,
("segmentId" .=) <$> _segSegmentId])
data AccountChildLink = AccountChildLink'
{ _aclHref :: !(Maybe Text)
, _aclType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountChildLink
:: AccountChildLink
accountChildLink =
AccountChildLink'
{ _aclHref = Nothing
, _aclType = "analytics#webproperties"
}
aclHref :: Lens' AccountChildLink (Maybe Text)
aclHref = lens _aclHref (\ s a -> s{_aclHref = a})
aclType :: Lens' AccountChildLink Text
aclType = lens _aclType (\ s a -> s{_aclType = a})
instance FromJSON AccountChildLink where
parseJSON
= withObject "AccountChildLink"
(\ o ->
AccountChildLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#webproperties"))
instance ToJSON AccountChildLink where
toJSON AccountChildLink'{..}
= object
(catMaybes
[("href" .=) <$> _aclHref,
Just ("type" .= _aclType)])
data ProFileFilterLink = ProFileFilterLink'
{ _proProFileRef :: !(Maybe ProFileRef)
, _proKind :: !Text
, _proFilterRef :: !(Maybe FilterRef)
, _proSelfLink :: !(Maybe Text)
, _proId :: !(Maybe Text)
, _proRank :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
proFileFilterLink
:: ProFileFilterLink
proFileFilterLink =
ProFileFilterLink'
{ _proProFileRef = Nothing
, _proKind = "analytics#profileFilterLink"
, _proFilterRef = Nothing
, _proSelfLink = Nothing
, _proId = Nothing
, _proRank = Nothing
}
proProFileRef :: Lens' ProFileFilterLink (Maybe ProFileRef)
proProFileRef
= lens _proProFileRef
(\ s a -> s{_proProFileRef = a})
proKind :: Lens' ProFileFilterLink Text
proKind = lens _proKind (\ s a -> s{_proKind = a})
proFilterRef :: Lens' ProFileFilterLink (Maybe FilterRef)
proFilterRef
= lens _proFilterRef (\ s a -> s{_proFilterRef = a})
proSelfLink :: Lens' ProFileFilterLink (Maybe Text)
proSelfLink
= lens _proSelfLink (\ s a -> s{_proSelfLink = a})
proId :: Lens' ProFileFilterLink (Maybe Text)
proId = lens _proId (\ s a -> s{_proId = a})
proRank :: Lens' ProFileFilterLink (Maybe Int32)
proRank
= lens _proRank (\ s a -> s{_proRank = a}) .
mapping _Coerce
instance FromJSON ProFileFilterLink where
parseJSON
= withObject "ProFileFilterLink"
(\ o ->
ProFileFilterLink' <$>
(o .:? "profileRef") <*>
(o .:? "kind" .!= "analytics#profileFilterLink")
<*> (o .:? "filterRef")
<*> (o .:? "selfLink")
<*> (o .:? "id")
<*> (o .:? "rank"))
instance ToJSON ProFileFilterLink where
toJSON ProFileFilterLink'{..}
= object
(catMaybes
[("profileRef" .=) <$> _proProFileRef,
Just ("kind" .= _proKind),
("filterRef" .=) <$> _proFilterRef,
("selfLink" .=) <$> _proSelfLink,
("id" .=) <$> _proId, ("rank" .=) <$> _proRank])
data CustomMetricParentLink = CustomMetricParentLink'
{ _cmplHref :: !(Maybe Text)
, _cmplType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
customMetricParentLink
:: CustomMetricParentLink
customMetricParentLink =
CustomMetricParentLink'
{ _cmplHref = Nothing
, _cmplType = "analytics#webproperty"
}
cmplHref :: Lens' CustomMetricParentLink (Maybe Text)
cmplHref = lens _cmplHref (\ s a -> s{_cmplHref = a})
cmplType :: Lens' CustomMetricParentLink Text
cmplType = lens _cmplType (\ s a -> s{_cmplType = a})
instance FromJSON CustomMetricParentLink where
parseJSON
= withObject "CustomMetricParentLink"
(\ o ->
CustomMetricParentLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#webproperty"))
instance ToJSON CustomMetricParentLink where
toJSON CustomMetricParentLink'{..}
= object
(catMaybes
[("href" .=) <$> _cmplHref,
Just ("type" .= _cmplType)])
data Column = Column'
{ _ccKind :: !Text
, _ccAttributes :: !(Maybe ColumnAttributes)
, _ccId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
column
:: Column
column =
Column'
{ _ccKind = "analytics#column"
, _ccAttributes = Nothing
, _ccId = Nothing
}
ccKind :: Lens' Column Text
ccKind = lens _ccKind (\ s a -> s{_ccKind = a})
ccAttributes :: Lens' Column (Maybe ColumnAttributes)
ccAttributes
= lens _ccAttributes (\ s a -> s{_ccAttributes = a})
ccId :: Lens' Column (Maybe Text)
ccId = lens _ccId (\ s a -> s{_ccId = a})
instance FromJSON Column where
parseJSON
= withObject "Column"
(\ o ->
Column' <$>
(o .:? "kind" .!= "analytics#column") <*>
(o .:? "attributes")
<*> (o .:? "id"))
instance ToJSON Column where
toJSON Column'{..}
= object
(catMaybes
[Just ("kind" .= _ccKind),
("attributes" .=) <$> _ccAttributes,
("id" .=) <$> _ccId])
newtype RemarketingAudienceAudienceDefinition = RemarketingAudienceAudienceDefinition'
{ _raadIncludeConditions :: Maybe IncludeConditions
} deriving (Eq,Show,Data,Typeable,Generic)
remarketingAudienceAudienceDefinition
:: RemarketingAudienceAudienceDefinition
remarketingAudienceAudienceDefinition =
RemarketingAudienceAudienceDefinition'
{ _raadIncludeConditions = Nothing
}
raadIncludeConditions :: Lens' RemarketingAudienceAudienceDefinition (Maybe IncludeConditions)
raadIncludeConditions
= lens _raadIncludeConditions
(\ s a -> s{_raadIncludeConditions = a})
instance FromJSON
RemarketingAudienceAudienceDefinition where
parseJSON
= withObject "RemarketingAudienceAudienceDefinition"
(\ o ->
RemarketingAudienceAudienceDefinition' <$>
(o .:? "includeConditions"))
instance ToJSON RemarketingAudienceAudienceDefinition
where
toJSON RemarketingAudienceAudienceDefinition'{..}
= object
(catMaybes
[("includeConditions" .=) <$>
_raadIncludeConditions])
data GaDataDataTableColsItem = GaDataDataTableColsItem'
{ _gddtciId :: !(Maybe Text)
, _gddtciType :: !(Maybe Text)
, _gddtciLabel :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
gaDataDataTableColsItem
:: GaDataDataTableColsItem
gaDataDataTableColsItem =
GaDataDataTableColsItem'
{ _gddtciId = Nothing
, _gddtciType = Nothing
, _gddtciLabel = Nothing
}
gddtciId :: Lens' GaDataDataTableColsItem (Maybe Text)
gddtciId = lens _gddtciId (\ s a -> s{_gddtciId = a})
gddtciType :: Lens' GaDataDataTableColsItem (Maybe Text)
gddtciType
= lens _gddtciType (\ s a -> s{_gddtciType = a})
gddtciLabel :: Lens' GaDataDataTableColsItem (Maybe Text)
gddtciLabel
= lens _gddtciLabel (\ s a -> s{_gddtciLabel = a})
instance FromJSON GaDataDataTableColsItem where
parseJSON
= withObject "GaDataDataTableColsItem"
(\ o ->
GaDataDataTableColsItem' <$>
(o .:? "id") <*> (o .:? "type") <*> (o .:? "label"))
instance ToJSON GaDataDataTableColsItem where
toJSON GaDataDataTableColsItem'{..}
= object
(catMaybes
[("id" .=) <$> _gddtciId,
("type" .=) <$> _gddtciType,
("label" .=) <$> _gddtciLabel])
data ExperimentVariationsItem = ExperimentVariationsItem'
{ _eviStatus :: !(Maybe Text)
, _eviWeight :: !(Maybe (Textual Double))
, _eviURL :: !(Maybe Text)
, _eviWon :: !(Maybe Bool)
, _eviName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
experimentVariationsItem
:: ExperimentVariationsItem
experimentVariationsItem =
ExperimentVariationsItem'
{ _eviStatus = Nothing
, _eviWeight = Nothing
, _eviURL = Nothing
, _eviWon = Nothing
, _eviName = Nothing
}
eviStatus :: Lens' ExperimentVariationsItem (Maybe Text)
eviStatus
= lens _eviStatus (\ s a -> s{_eviStatus = a})
eviWeight :: Lens' ExperimentVariationsItem (Maybe Double)
eviWeight
= lens _eviWeight (\ s a -> s{_eviWeight = a}) .
mapping _Coerce
eviURL :: Lens' ExperimentVariationsItem (Maybe Text)
eviURL = lens _eviURL (\ s a -> s{_eviURL = a})
eviWon :: Lens' ExperimentVariationsItem (Maybe Bool)
eviWon = lens _eviWon (\ s a -> s{_eviWon = a})
eviName :: Lens' ExperimentVariationsItem (Maybe Text)
eviName = lens _eviName (\ s a -> s{_eviName = a})
instance FromJSON ExperimentVariationsItem where
parseJSON
= withObject "ExperimentVariationsItem"
(\ o ->
ExperimentVariationsItem' <$>
(o .:? "status") <*> (o .:? "weight") <*>
(o .:? "url")
<*> (o .:? "won")
<*> (o .:? "name"))
instance ToJSON ExperimentVariationsItem where
toJSON ExperimentVariationsItem'{..}
= object
(catMaybes
[("status" .=) <$> _eviStatus,
("weight" .=) <$> _eviWeight, ("url" .=) <$> _eviURL,
("won" .=) <$> _eviWon, ("name" .=) <$> _eviName])
data RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions = RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions'
{ _rasbadecExclusionDuration :: !(Maybe Text)
, _rasbadecSegment :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
remarketingAudienceStateBasedAudienceDefinitionExcludeConditions
:: RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
remarketingAudienceStateBasedAudienceDefinitionExcludeConditions =
RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions'
{ _rasbadecExclusionDuration = Nothing
, _rasbadecSegment = Nothing
}
rasbadecExclusionDuration :: Lens' RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions (Maybe Text)
rasbadecExclusionDuration
= lens _rasbadecExclusionDuration
(\ s a -> s{_rasbadecExclusionDuration = a})
rasbadecSegment :: Lens' RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions (Maybe Text)
rasbadecSegment
= lens _rasbadecSegment
(\ s a -> s{_rasbadecSegment = a})
instance FromJSON
RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
where
parseJSON
= withObject
"RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions"
(\ o ->
RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions'
<$>
(o .:? "exclusionDuration") <*> (o .:? "segment"))
instance ToJSON
RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
where
toJSON
RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions'{..}
= object
(catMaybes
[("exclusionDuration" .=) <$>
_rasbadecExclusionDuration,
("segment" .=) <$> _rasbadecSegment])
newtype McfDataTotalsForAllResults = McfDataTotalsForAllResults'
{ _mdtfarAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
mcfDataTotalsForAllResults
:: HashMap Text Text
-> McfDataTotalsForAllResults
mcfDataTotalsForAllResults pMdtfarAddtional_ =
McfDataTotalsForAllResults'
{ _mdtfarAddtional = _Coerce # pMdtfarAddtional_
}
mdtfarAddtional :: Lens' McfDataTotalsForAllResults (HashMap Text Text)
mdtfarAddtional
= lens _mdtfarAddtional
(\ s a -> s{_mdtfarAddtional = a})
. _Coerce
instance FromJSON McfDataTotalsForAllResults where
parseJSON
= withObject "McfDataTotalsForAllResults"
(\ o ->
McfDataTotalsForAllResults' <$> (parseJSONObject o))
instance ToJSON McfDataTotalsForAllResults where
toJSON = toJSON . _mdtfarAddtional
data UserDeletionRequestId = UserDeletionRequestId'
{ _udriUserId :: !(Maybe Text)
, _udriType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userDeletionRequestId
:: UserDeletionRequestId
userDeletionRequestId =
UserDeletionRequestId'
{ _udriUserId = Nothing
, _udriType = Nothing
}
udriUserId :: Lens' UserDeletionRequestId (Maybe Text)
udriUserId
= lens _udriUserId (\ s a -> s{_udriUserId = a})
udriType :: Lens' UserDeletionRequestId (Maybe Text)
udriType = lens _udriType (\ s a -> s{_udriType = a})
instance FromJSON UserDeletionRequestId where
parseJSON
= withObject "UserDeletionRequestId"
(\ o ->
UserDeletionRequestId' <$>
(o .:? "userId") <*> (o .:? "type"))
instance ToJSON UserDeletionRequestId where
toJSON UserDeletionRequestId'{..}
= object
(catMaybes
[("userId" .=) <$> _udriUserId,
("type" .=) <$> _udriType])
data UnSampledReportCloudStorageDownloadDetails = UnSampledReportCloudStorageDownloadDetails'
{ _usrcsddObjectId :: !(Maybe Text)
, _usrcsddBucketId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
unSampledReportCloudStorageDownloadDetails
:: UnSampledReportCloudStorageDownloadDetails
unSampledReportCloudStorageDownloadDetails =
UnSampledReportCloudStorageDownloadDetails'
{ _usrcsddObjectId = Nothing
, _usrcsddBucketId = Nothing
}
usrcsddObjectId :: Lens' UnSampledReportCloudStorageDownloadDetails (Maybe Text)
usrcsddObjectId
= lens _usrcsddObjectId
(\ s a -> s{_usrcsddObjectId = a})
usrcsddBucketId :: Lens' UnSampledReportCloudStorageDownloadDetails (Maybe Text)
usrcsddBucketId
= lens _usrcsddBucketId
(\ s a -> s{_usrcsddBucketId = a})
instance FromJSON
UnSampledReportCloudStorageDownloadDetails where
parseJSON
= withObject
"UnSampledReportCloudStorageDownloadDetails"
(\ o ->
UnSampledReportCloudStorageDownloadDetails' <$>
(o .:? "objectId") <*> (o .:? "bucketId"))
instance ToJSON
UnSampledReportCloudStorageDownloadDetails where
toJSON
UnSampledReportCloudStorageDownloadDetails'{..}
= object
(catMaybes
[("objectId" .=) <$> _usrcsddObjectId,
("bucketId" .=) <$> _usrcsddBucketId])
data ProFileChildLink = ProFileChildLink'
{ _pfclHref :: !(Maybe Text)
, _pfclType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
proFileChildLink
:: ProFileChildLink
proFileChildLink =
ProFileChildLink'
{ _pfclHref = Nothing
, _pfclType = "analytics#goals"
}
pfclHref :: Lens' ProFileChildLink (Maybe Text)
pfclHref = lens _pfclHref (\ s a -> s{_pfclHref = a})
pfclType :: Lens' ProFileChildLink Text
pfclType = lens _pfclType (\ s a -> s{_pfclType = a})
instance FromJSON ProFileChildLink where
parseJSON
= withObject "ProFileChildLink"
(\ o ->
ProFileChildLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#goals"))
instance ToJSON ProFileChildLink where
toJSON ProFileChildLink'{..}
= object
(catMaybes
[("href" .=) <$> _pfclHref,
Just ("type" .= _pfclType)])
data GaDataColumnHeadersItem = GaDataColumnHeadersItem'
{ _gdchiColumnType :: !(Maybe Text)
, _gdchiName :: !(Maybe Text)
, _gdchiDataType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
gaDataColumnHeadersItem
:: GaDataColumnHeadersItem
gaDataColumnHeadersItem =
GaDataColumnHeadersItem'
{ _gdchiColumnType = Nothing
, _gdchiName = Nothing
, _gdchiDataType = Nothing
}
gdchiColumnType :: Lens' GaDataColumnHeadersItem (Maybe Text)
gdchiColumnType
= lens _gdchiColumnType
(\ s a -> s{_gdchiColumnType = a})
gdchiName :: Lens' GaDataColumnHeadersItem (Maybe Text)
gdchiName
= lens _gdchiName (\ s a -> s{_gdchiName = a})
gdchiDataType :: Lens' GaDataColumnHeadersItem (Maybe Text)
gdchiDataType
= lens _gdchiDataType
(\ s a -> s{_gdchiDataType = a})
instance FromJSON GaDataColumnHeadersItem where
parseJSON
= withObject "GaDataColumnHeadersItem"
(\ o ->
GaDataColumnHeadersItem' <$>
(o .:? "columnType") <*> (o .:? "name") <*>
(o .:? "dataType"))
instance ToJSON GaDataColumnHeadersItem where
toJSON GaDataColumnHeadersItem'{..}
= object
(catMaybes
[("columnType" .=) <$> _gdchiColumnType,
("name" .=) <$> _gdchiName,
("dataType" .=) <$> _gdchiDataType])
data GoalParentLink = GoalParentLink'
{ _gplHref :: !(Maybe Text)
, _gplType :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
goalParentLink
:: GoalParentLink
goalParentLink =
GoalParentLink'
{ _gplHref = Nothing
, _gplType = "analytics#profile"
}
gplHref :: Lens' GoalParentLink (Maybe Text)
gplHref = lens _gplHref (\ s a -> s{_gplHref = a})
gplType :: Lens' GoalParentLink Text
gplType = lens _gplType (\ s a -> s{_gplType = a})
instance FromJSON GoalParentLink where
parseJSON
= withObject "GoalParentLink"
(\ o ->
GoalParentLink' <$>
(o .:? "href") <*>
(o .:? "type" .!= "analytics#profile"))
instance ToJSON GoalParentLink where
toJSON GoalParentLink'{..}
= object
(catMaybes
[("href" .=) <$> _gplHref,
Just ("type" .= _gplType)])
newtype ColumnAttributes = ColumnAttributes'
{ _caAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
columnAttributes
:: HashMap Text Text
-> ColumnAttributes
columnAttributes pCaAddtional_ =
ColumnAttributes'
{ _caAddtional = _Coerce # pCaAddtional_
}
caAddtional :: Lens' ColumnAttributes (HashMap Text Text)
caAddtional
= lens _caAddtional (\ s a -> s{_caAddtional = a}) .
_Coerce
instance FromJSON ColumnAttributes where
parseJSON
= withObject "ColumnAttributes"
(\ o -> ColumnAttributes' <$> (parseJSONObject o))
instance ToJSON ColumnAttributes where
toJSON = toJSON . _caAddtional