module Network.Google.DFAReporting.Types.Product where
import Network.Google.DFAReporting.Types.Sum
import Network.Google.Prelude
data FileList = FileList
{ _flEtag :: !(Maybe Text)
, _flNextPageToken :: !(Maybe Text)
, _flKind :: !Text
, _flItems :: !(Maybe [File])
} deriving (Eq,Show,Data,Typeable,Generic)
fileList
:: FileList
fileList =
FileList
{ _flEtag = Nothing
, _flNextPageToken = Nothing
, _flKind = "dfareporting#fileList"
, _flItems = Nothing
}
flEtag :: Lens' FileList (Maybe Text)
flEtag = lens _flEtag (\ s a -> s{_flEtag = a})
flNextPageToken :: Lens' FileList (Maybe Text)
flNextPageToken
= lens _flNextPageToken
(\ s a -> s{_flNextPageToken = a})
flKind :: Lens' FileList Text
flKind = lens _flKind (\ s a -> s{_flKind = a})
flItems :: Lens' FileList [File]
flItems
= lens _flItems (\ s a -> s{_flItems = a}) . _Default
. _Coerce
instance FromJSON FileList where
parseJSON
= withObject "FileList"
(\ o ->
FileList <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "dfareporting#fileList")
<*> (o .:? "items" .!= mempty))
instance ToJSON FileList where
toJSON FileList{..}
= object
(catMaybes
[("etag" .=) <$> _flEtag,
("nextPageToken" .=) <$> _flNextPageToken,
Just ("kind" .= _flKind), ("items" .=) <$> _flItems])
data OptimizationActivity = OptimizationActivity
{ _oaWeight :: !(Maybe (Textual Int32))
, _oaFloodlightActivityId :: !(Maybe (Textual Int64))
, _oaFloodlightActivityIdDimensionValue :: !(Maybe DimensionValue)
} deriving (Eq,Show,Data,Typeable,Generic)
optimizationActivity
:: OptimizationActivity
optimizationActivity =
OptimizationActivity
{ _oaWeight = Nothing
, _oaFloodlightActivityId = Nothing
, _oaFloodlightActivityIdDimensionValue = Nothing
}
oaWeight :: Lens' OptimizationActivity (Maybe Int32)
oaWeight
= lens _oaWeight (\ s a -> s{_oaWeight = a}) .
mapping _Coerce
oaFloodlightActivityId :: Lens' OptimizationActivity (Maybe Int64)
oaFloodlightActivityId
= lens _oaFloodlightActivityId
(\ s a -> s{_oaFloodlightActivityId = a})
. mapping _Coerce
oaFloodlightActivityIdDimensionValue :: Lens' OptimizationActivity (Maybe DimensionValue)
oaFloodlightActivityIdDimensionValue
= lens _oaFloodlightActivityIdDimensionValue
(\ s a ->
s{_oaFloodlightActivityIdDimensionValue = a})
instance FromJSON OptimizationActivity where
parseJSON
= withObject "OptimizationActivity"
(\ o ->
OptimizationActivity <$>
(o .:? "weight") <*> (o .:? "floodlightActivityId")
<*> (o .:? "floodlightActivityIdDimensionValue"))
instance ToJSON OptimizationActivity where
toJSON OptimizationActivity{..}
= object
(catMaybes
[("weight" .=) <$> _oaWeight,
("floodlightActivityId" .=) <$>
_oaFloodlightActivityId,
("floodlightActivityIdDimensionValue" .=) <$>
_oaFloodlightActivityIdDimensionValue])
newtype ListPopulationClause = ListPopulationClause
{ _lpcTerms :: Maybe [ListPopulationTerm]
} deriving (Eq,Show,Data,Typeable,Generic)
listPopulationClause
:: ListPopulationClause
listPopulationClause =
ListPopulationClause
{ _lpcTerms = Nothing
}
lpcTerms :: Lens' ListPopulationClause [ListPopulationTerm]
lpcTerms
= lens _lpcTerms (\ s a -> s{_lpcTerms = a}) .
_Default
. _Coerce
instance FromJSON ListPopulationClause where
parseJSON
= withObject "ListPopulationClause"
(\ o ->
ListPopulationClause <$> (o .:? "terms" .!= mempty))
instance ToJSON ListPopulationClause where
toJSON ListPopulationClause{..}
= object (catMaybes [("terms" .=) <$> _lpcTerms])
data CreativeCustomEvent = CreativeCustomEvent
{ _cceAdvertiserCustomEventType :: !(Maybe CreativeCustomEventAdvertiserCustomEventType)
, _cceAdvertiserCustomEventName :: !(Maybe Text)
, _cceExitURL :: !(Maybe Text)
, _cceTargetType :: !(Maybe CreativeCustomEventTargetType)
, _ccePopupWindowProperties :: !(Maybe PopupWindowProperties)
, _cceVideoReportingId :: !(Maybe Text)
, _cceId :: !(Maybe (Textual Int64))
, _cceArtworkLabel :: !(Maybe Text)
, _cceArtworkType :: !(Maybe CreativeCustomEventArtworkType)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeCustomEvent
:: CreativeCustomEvent
creativeCustomEvent =
CreativeCustomEvent
{ _cceAdvertiserCustomEventType = Nothing
, _cceAdvertiserCustomEventName = Nothing
, _cceExitURL = Nothing
, _cceTargetType = Nothing
, _ccePopupWindowProperties = Nothing
, _cceVideoReportingId = Nothing
, _cceId = Nothing
, _cceArtworkLabel = Nothing
, _cceArtworkType = Nothing
}
cceAdvertiserCustomEventType :: Lens' CreativeCustomEvent (Maybe CreativeCustomEventAdvertiserCustomEventType)
cceAdvertiserCustomEventType
= lens _cceAdvertiserCustomEventType
(\ s a -> s{_cceAdvertiserCustomEventType = a})
cceAdvertiserCustomEventName :: Lens' CreativeCustomEvent (Maybe Text)
cceAdvertiserCustomEventName
= lens _cceAdvertiserCustomEventName
(\ s a -> s{_cceAdvertiserCustomEventName = a})
cceExitURL :: Lens' CreativeCustomEvent (Maybe Text)
cceExitURL
= lens _cceExitURL (\ s a -> s{_cceExitURL = a})
cceTargetType :: Lens' CreativeCustomEvent (Maybe CreativeCustomEventTargetType)
cceTargetType
= lens _cceTargetType
(\ s a -> s{_cceTargetType = a})
ccePopupWindowProperties :: Lens' CreativeCustomEvent (Maybe PopupWindowProperties)
ccePopupWindowProperties
= lens _ccePopupWindowProperties
(\ s a -> s{_ccePopupWindowProperties = a})
cceVideoReportingId :: Lens' CreativeCustomEvent (Maybe Text)
cceVideoReportingId
= lens _cceVideoReportingId
(\ s a -> s{_cceVideoReportingId = a})
cceId :: Lens' CreativeCustomEvent (Maybe Int64)
cceId
= lens _cceId (\ s a -> s{_cceId = a}) .
mapping _Coerce
cceArtworkLabel :: Lens' CreativeCustomEvent (Maybe Text)
cceArtworkLabel
= lens _cceArtworkLabel
(\ s a -> s{_cceArtworkLabel = a})
cceArtworkType :: Lens' CreativeCustomEvent (Maybe CreativeCustomEventArtworkType)
cceArtworkType
= lens _cceArtworkType
(\ s a -> s{_cceArtworkType = a})
instance FromJSON CreativeCustomEvent where
parseJSON
= withObject "CreativeCustomEvent"
(\ o ->
CreativeCustomEvent <$>
(o .:? "advertiserCustomEventType") <*>
(o .:? "advertiserCustomEventName")
<*> (o .:? "exitUrl")
<*> (o .:? "targetType")
<*> (o .:? "popupWindowProperties")
<*> (o .:? "videoReportingId")
<*> (o .:? "id")
<*> (o .:? "artworkLabel")
<*> (o .:? "artworkType"))
instance ToJSON CreativeCustomEvent where
toJSON CreativeCustomEvent{..}
= object
(catMaybes
[("advertiserCustomEventType" .=) <$>
_cceAdvertiserCustomEventType,
("advertiserCustomEventName" .=) <$>
_cceAdvertiserCustomEventName,
("exitUrl" .=) <$> _cceExitURL,
("targetType" .=) <$> _cceTargetType,
("popupWindowProperties" .=) <$>
_ccePopupWindowProperties,
("videoReportingId" .=) <$> _cceVideoReportingId,
("id" .=) <$> _cceId,
("artworkLabel" .=) <$> _cceArtworkLabel,
("artworkType" .=) <$> _cceArtworkType])
data ClickTag = ClickTag
{ _ctValue :: !(Maybe Text)
, _ctName :: !(Maybe Text)
, _ctEventName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clickTag
:: ClickTag
clickTag =
ClickTag
{ _ctValue = Nothing
, _ctName = Nothing
, _ctEventName = Nothing
}
ctValue :: Lens' ClickTag (Maybe Text)
ctValue = lens _ctValue (\ s a -> s{_ctValue = a})
ctName :: Lens' ClickTag (Maybe Text)
ctName = lens _ctName (\ s a -> s{_ctName = a})
ctEventName :: Lens' ClickTag (Maybe Text)
ctEventName
= lens _ctEventName (\ s a -> s{_ctEventName = a})
instance FromJSON ClickTag where
parseJSON
= withObject "ClickTag"
(\ o ->
ClickTag <$>
(o .:? "value") <*> (o .:? "name") <*>
(o .:? "eventName"))
instance ToJSON ClickTag where
toJSON ClickTag{..}
= object
(catMaybes
[("value" .=) <$> _ctValue, ("name" .=) <$> _ctName,
("eventName" .=) <$> _ctEventName])
data CampaignsListResponse = CampaignsListResponse
{ _clrNextPageToken :: !(Maybe Text)
, _clrCampaigns :: !(Maybe [Campaign])
, _clrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
campaignsListResponse
:: CampaignsListResponse
campaignsListResponse =
CampaignsListResponse
{ _clrNextPageToken = Nothing
, _clrCampaigns = Nothing
, _clrKind = "dfareporting#campaignsListResponse"
}
clrNextPageToken :: Lens' CampaignsListResponse (Maybe Text)
clrNextPageToken
= lens _clrNextPageToken
(\ s a -> s{_clrNextPageToken = a})
clrCampaigns :: Lens' CampaignsListResponse [Campaign]
clrCampaigns
= lens _clrCampaigns (\ s a -> s{_clrCampaigns = a})
. _Default
. _Coerce
clrKind :: Lens' CampaignsListResponse Text
clrKind = lens _clrKind (\ s a -> s{_clrKind = a})
instance FromJSON CampaignsListResponse where
parseJSON
= withObject "CampaignsListResponse"
(\ o ->
CampaignsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "campaigns" .!= mempty)
<*>
(o .:? "kind" .!=
"dfareporting#campaignsListResponse"))
instance ToJSON CampaignsListResponse where
toJSON CampaignsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _clrNextPageToken,
("campaigns" .=) <$> _clrCampaigns,
Just ("kind" .= _clrKind)])
data GeoTargeting = GeoTargeting
{ _gtRegions :: !(Maybe [Region])
, _gtCountries :: !(Maybe [Country])
, _gtCities :: !(Maybe [City])
, _gtMetros :: !(Maybe [Metro])
, _gtExcludeCountries :: !(Maybe Bool)
, _gtPostalCodes :: !(Maybe [PostalCode])
} deriving (Eq,Show,Data,Typeable,Generic)
geoTargeting
:: GeoTargeting
geoTargeting =
GeoTargeting
{ _gtRegions = Nothing
, _gtCountries = Nothing
, _gtCities = Nothing
, _gtMetros = Nothing
, _gtExcludeCountries = Nothing
, _gtPostalCodes = Nothing
}
gtRegions :: Lens' GeoTargeting [Region]
gtRegions
= lens _gtRegions (\ s a -> s{_gtRegions = a}) .
_Default
. _Coerce
gtCountries :: Lens' GeoTargeting [Country]
gtCountries
= lens _gtCountries (\ s a -> s{_gtCountries = a}) .
_Default
. _Coerce
gtCities :: Lens' GeoTargeting [City]
gtCities
= lens _gtCities (\ s a -> s{_gtCities = a}) .
_Default
. _Coerce
gtMetros :: Lens' GeoTargeting [Metro]
gtMetros
= lens _gtMetros (\ s a -> s{_gtMetros = a}) .
_Default
. _Coerce
gtExcludeCountries :: Lens' GeoTargeting (Maybe Bool)
gtExcludeCountries
= lens _gtExcludeCountries
(\ s a -> s{_gtExcludeCountries = a})
gtPostalCodes :: Lens' GeoTargeting [PostalCode]
gtPostalCodes
= lens _gtPostalCodes
(\ s a -> s{_gtPostalCodes = a})
. _Default
. _Coerce
instance FromJSON GeoTargeting where
parseJSON
= withObject "GeoTargeting"
(\ o ->
GeoTargeting <$>
(o .:? "regions" .!= mempty) <*>
(o .:? "countries" .!= mempty)
<*> (o .:? "cities" .!= mempty)
<*> (o .:? "metros" .!= mempty)
<*> (o .:? "excludeCountries")
<*> (o .:? "postalCodes" .!= mempty))
instance ToJSON GeoTargeting where
toJSON GeoTargeting{..}
= object
(catMaybes
[("regions" .=) <$> _gtRegions,
("countries" .=) <$> _gtCountries,
("cities" .=) <$> _gtCities,
("metros" .=) <$> _gtMetros,
("excludeCountries" .=) <$> _gtExcludeCountries,
("postalCodes" .=) <$> _gtPostalCodes])
data ReachReportCompatibleFields = ReachReportCompatibleFields
{ _rrcfMetrics :: !(Maybe [Metric])
, _rrcfReachByFrequencyMetrics :: !(Maybe [Metric])
, _rrcfKind :: !Text
, _rrcfDimensionFilters :: !(Maybe [Dimension])
, _rrcfPivotedActivityMetrics :: !(Maybe [Metric])
, _rrcfDimensions :: !(Maybe [Dimension])
} deriving (Eq,Show,Data,Typeable,Generic)
reachReportCompatibleFields
:: ReachReportCompatibleFields
reachReportCompatibleFields =
ReachReportCompatibleFields
{ _rrcfMetrics = Nothing
, _rrcfReachByFrequencyMetrics = Nothing
, _rrcfKind = "dfareporting#reachReportCompatibleFields"
, _rrcfDimensionFilters = Nothing
, _rrcfPivotedActivityMetrics = Nothing
, _rrcfDimensions = Nothing
}
rrcfMetrics :: Lens' ReachReportCompatibleFields [Metric]
rrcfMetrics
= lens _rrcfMetrics (\ s a -> s{_rrcfMetrics = a}) .
_Default
. _Coerce
rrcfReachByFrequencyMetrics :: Lens' ReachReportCompatibleFields [Metric]
rrcfReachByFrequencyMetrics
= lens _rrcfReachByFrequencyMetrics
(\ s a -> s{_rrcfReachByFrequencyMetrics = a})
. _Default
. _Coerce
rrcfKind :: Lens' ReachReportCompatibleFields Text
rrcfKind = lens _rrcfKind (\ s a -> s{_rrcfKind = a})
rrcfDimensionFilters :: Lens' ReachReportCompatibleFields [Dimension]
rrcfDimensionFilters
= lens _rrcfDimensionFilters
(\ s a -> s{_rrcfDimensionFilters = a})
. _Default
. _Coerce
rrcfPivotedActivityMetrics :: Lens' ReachReportCompatibleFields [Metric]
rrcfPivotedActivityMetrics
= lens _rrcfPivotedActivityMetrics
(\ s a -> s{_rrcfPivotedActivityMetrics = a})
. _Default
. _Coerce
rrcfDimensions :: Lens' ReachReportCompatibleFields [Dimension]
rrcfDimensions
= lens _rrcfDimensions
(\ s a -> s{_rrcfDimensions = a})
. _Default
. _Coerce
instance FromJSON ReachReportCompatibleFields where
parseJSON
= withObject "ReachReportCompatibleFields"
(\ o ->
ReachReportCompatibleFields <$>
(o .:? "metrics" .!= mempty) <*>
(o .:? "reachByFrequencyMetrics" .!= mempty)
<*>
(o .:? "kind" .!=
"dfareporting#reachReportCompatibleFields")
<*> (o .:? "dimensionFilters" .!= mempty)
<*> (o .:? "pivotedActivityMetrics" .!= mempty)
<*> (o .:? "dimensions" .!= mempty))
instance ToJSON ReachReportCompatibleFields where
toJSON ReachReportCompatibleFields{..}
= object
(catMaybes
[("metrics" .=) <$> _rrcfMetrics,
("reachByFrequencyMetrics" .=) <$>
_rrcfReachByFrequencyMetrics,
Just ("kind" .= _rrcfKind),
("dimensionFilters" .=) <$> _rrcfDimensionFilters,
("pivotedActivityMetrics" .=) <$>
_rrcfPivotedActivityMetrics,
("dimensions" .=) <$> _rrcfDimensions])
data Browser = Browser
{ _bMinorVersion :: !(Maybe Text)
, _bKind :: !Text
, _bBrowserVersionId :: !(Maybe (Textual Int64))
, _bMajorVersion :: !(Maybe Text)
, _bName :: !(Maybe Text)
, _bDartId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
browser
:: Browser
browser =
Browser
{ _bMinorVersion = Nothing
, _bKind = "dfareporting#browser"
, _bBrowserVersionId = Nothing
, _bMajorVersion = Nothing
, _bName = Nothing
, _bDartId = Nothing
}
bMinorVersion :: Lens' Browser (Maybe Text)
bMinorVersion
= lens _bMinorVersion
(\ s a -> s{_bMinorVersion = a})
bKind :: Lens' Browser Text
bKind = lens _bKind (\ s a -> s{_bKind = a})
bBrowserVersionId :: Lens' Browser (Maybe Int64)
bBrowserVersionId
= lens _bBrowserVersionId
(\ s a -> s{_bBrowserVersionId = a})
. mapping _Coerce
bMajorVersion :: Lens' Browser (Maybe Text)
bMajorVersion
= lens _bMajorVersion
(\ s a -> s{_bMajorVersion = a})
bName :: Lens' Browser (Maybe Text)
bName = lens _bName (\ s a -> s{_bName = a})
bDartId :: Lens' Browser (Maybe Int64)
bDartId
= lens _bDartId (\ s a -> s{_bDartId = a}) .
mapping _Coerce
instance FromJSON Browser where
parseJSON
= withObject "Browser"
(\ o ->
Browser <$>
(o .:? "minorVersion") <*>
(o .:? "kind" .!= "dfareporting#browser")
<*> (o .:? "browserVersionId")
<*> (o .:? "majorVersion")
<*> (o .:? "name")
<*> (o .:? "dartId"))
instance ToJSON Browser where
toJSON Browser{..}
= object
(catMaybes
[("minorVersion" .=) <$> _bMinorVersion,
Just ("kind" .= _bKind),
("browserVersionId" .=) <$> _bBrowserVersionId,
("majorVersion" .=) <$> _bMajorVersion,
("name" .=) <$> _bName, ("dartId" .=) <$> _bDartId])
data CreativeGroupAssignment = CreativeGroupAssignment
{ _cgaCreativeGroupNumber :: !(Maybe CreativeGroupAssignmentCreativeGroupNumber)
, _cgaCreativeGroupId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
creativeGroupAssignment
:: CreativeGroupAssignment
creativeGroupAssignment =
CreativeGroupAssignment
{ _cgaCreativeGroupNumber = Nothing
, _cgaCreativeGroupId = Nothing
}
cgaCreativeGroupNumber :: Lens' CreativeGroupAssignment (Maybe CreativeGroupAssignmentCreativeGroupNumber)
cgaCreativeGroupNumber
= lens _cgaCreativeGroupNumber
(\ s a -> s{_cgaCreativeGroupNumber = a})
cgaCreativeGroupId :: Lens' CreativeGroupAssignment (Maybe Int64)
cgaCreativeGroupId
= lens _cgaCreativeGroupId
(\ s a -> s{_cgaCreativeGroupId = a})
. mapping _Coerce
instance FromJSON CreativeGroupAssignment where
parseJSON
= withObject "CreativeGroupAssignment"
(\ o ->
CreativeGroupAssignment <$>
(o .:? "creativeGroupNumber") <*>
(o .:? "creativeGroupId"))
instance ToJSON CreativeGroupAssignment where
toJSON CreativeGroupAssignment{..}
= object
(catMaybes
[("creativeGroupNumber" .=) <$>
_cgaCreativeGroupNumber,
("creativeGroupId" .=) <$> _cgaCreativeGroupId])
data DirectorySiteSettings = DirectorySiteSettings
{ _dssInterstitialPlacementAccepted :: !(Maybe Bool)
, _dssDfpSettings :: !(Maybe DfpSettings)
, _dssVerificationTagOptOut :: !(Maybe Bool)
, _dssActiveViewOptOut :: !(Maybe Bool)
, _dssVideoActiveViewOptOut :: !(Maybe Bool)
, _dssInstreamVideoPlacementAccepted :: !(Maybe Bool)
, _dssNielsenOCROptOut :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
directorySiteSettings
:: DirectorySiteSettings
directorySiteSettings =
DirectorySiteSettings
{ _dssInterstitialPlacementAccepted = Nothing
, _dssDfpSettings = Nothing
, _dssVerificationTagOptOut = Nothing
, _dssActiveViewOptOut = Nothing
, _dssVideoActiveViewOptOut = Nothing
, _dssInstreamVideoPlacementAccepted = Nothing
, _dssNielsenOCROptOut = Nothing
}
dssInterstitialPlacementAccepted :: Lens' DirectorySiteSettings (Maybe Bool)
dssInterstitialPlacementAccepted
= lens _dssInterstitialPlacementAccepted
(\ s a -> s{_dssInterstitialPlacementAccepted = a})
dssDfpSettings :: Lens' DirectorySiteSettings (Maybe DfpSettings)
dssDfpSettings
= lens _dssDfpSettings
(\ s a -> s{_dssDfpSettings = a})
dssVerificationTagOptOut :: Lens' DirectorySiteSettings (Maybe Bool)
dssVerificationTagOptOut
= lens _dssVerificationTagOptOut
(\ s a -> s{_dssVerificationTagOptOut = a})
dssActiveViewOptOut :: Lens' DirectorySiteSettings (Maybe Bool)
dssActiveViewOptOut
= lens _dssActiveViewOptOut
(\ s a -> s{_dssActiveViewOptOut = a})
dssVideoActiveViewOptOut :: Lens' DirectorySiteSettings (Maybe Bool)
dssVideoActiveViewOptOut
= lens _dssVideoActiveViewOptOut
(\ s a -> s{_dssVideoActiveViewOptOut = a})
dssInstreamVideoPlacementAccepted :: Lens' DirectorySiteSettings (Maybe Bool)
dssInstreamVideoPlacementAccepted
= lens _dssInstreamVideoPlacementAccepted
(\ s a -> s{_dssInstreamVideoPlacementAccepted = a})
dssNielsenOCROptOut :: Lens' DirectorySiteSettings (Maybe Bool)
dssNielsenOCROptOut
= lens _dssNielsenOCROptOut
(\ s a -> s{_dssNielsenOCROptOut = a})
instance FromJSON DirectorySiteSettings where
parseJSON
= withObject "DirectorySiteSettings"
(\ o ->
DirectorySiteSettings <$>
(o .:? "interstitialPlacementAccepted") <*>
(o .:? "dfp_settings")
<*> (o .:? "verificationTagOptOut")
<*> (o .:? "activeViewOptOut")
<*> (o .:? "videoActiveViewOptOut")
<*> (o .:? "instream_video_placement_accepted")
<*> (o .:? "nielsenOcrOptOut"))
instance ToJSON DirectorySiteSettings where
toJSON DirectorySiteSettings{..}
= object
(catMaybes
[("interstitialPlacementAccepted" .=) <$>
_dssInterstitialPlacementAccepted,
("dfp_settings" .=) <$> _dssDfpSettings,
("verificationTagOptOut" .=) <$>
_dssVerificationTagOptOut,
("activeViewOptOut" .=) <$> _dssActiveViewOptOut,
("videoActiveViewOptOut" .=) <$>
_dssVideoActiveViewOptOut,
("instream_video_placement_accepted" .=) <$>
_dssInstreamVideoPlacementAccepted,
("nielsenOcrOptOut" .=) <$> _dssNielsenOCROptOut])
data ListPopulationRule = ListPopulationRule
{ _lprFloodlightActivityName :: !(Maybe Text)
, _lprFloodlightActivityId :: !(Maybe (Textual Int64))
, _lprListPopulationClauses :: !(Maybe [ListPopulationClause])
} deriving (Eq,Show,Data,Typeable,Generic)
listPopulationRule
:: ListPopulationRule
listPopulationRule =
ListPopulationRule
{ _lprFloodlightActivityName = Nothing
, _lprFloodlightActivityId = Nothing
, _lprListPopulationClauses = Nothing
}
lprFloodlightActivityName :: Lens' ListPopulationRule (Maybe Text)
lprFloodlightActivityName
= lens _lprFloodlightActivityName
(\ s a -> s{_lprFloodlightActivityName = a})
lprFloodlightActivityId :: Lens' ListPopulationRule (Maybe Int64)
lprFloodlightActivityId
= lens _lprFloodlightActivityId
(\ s a -> s{_lprFloodlightActivityId = a})
. mapping _Coerce
lprListPopulationClauses :: Lens' ListPopulationRule [ListPopulationClause]
lprListPopulationClauses
= lens _lprListPopulationClauses
(\ s a -> s{_lprListPopulationClauses = a})
. _Default
. _Coerce
instance FromJSON ListPopulationRule where
parseJSON
= withObject "ListPopulationRule"
(\ o ->
ListPopulationRule <$>
(o .:? "floodlightActivityName") <*>
(o .:? "floodlightActivityId")
<*> (o .:? "listPopulationClauses" .!= mempty))
instance ToJSON ListPopulationRule where
toJSON ListPopulationRule{..}
= object
(catMaybes
[("floodlightActivityName" .=) <$>
_lprFloodlightActivityName,
("floodlightActivityId" .=) <$>
_lprFloodlightActivityId,
("listPopulationClauses" .=) <$>
_lprListPopulationClauses])
data SizesListResponse = SizesListResponse
{ _slrKind :: !Text
, _slrSizes :: !(Maybe [Size])
} deriving (Eq,Show,Data,Typeable,Generic)
sizesListResponse
:: SizesListResponse
sizesListResponse =
SizesListResponse
{ _slrKind = "dfareporting#sizesListResponse"
, _slrSizes = Nothing
}
slrKind :: Lens' SizesListResponse Text
slrKind = lens _slrKind (\ s a -> s{_slrKind = a})
slrSizes :: Lens' SizesListResponse [Size]
slrSizes
= lens _slrSizes (\ s a -> s{_slrSizes = a}) .
_Default
. _Coerce
instance FromJSON SizesListResponse where
parseJSON
= withObject "SizesListResponse"
(\ o ->
SizesListResponse <$>
(o .:? "kind" .!= "dfareporting#sizesListResponse")
<*> (o .:? "sizes" .!= mempty))
instance ToJSON SizesListResponse where
toJSON SizesListResponse{..}
= object
(catMaybes
[Just ("kind" .= _slrKind),
("sizes" .=) <$> _slrSizes])
data CreativeRotation = CreativeRotation
{ _crWeightCalculationStrategy :: !(Maybe CreativeRotationWeightCalculationStrategy)
, _crCreativeAssignments :: !(Maybe [CreativeAssignment])
, _crCreativeOptimizationConfigurationId :: !(Maybe (Textual Int64))
, _crType :: !(Maybe CreativeRotationType)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeRotation
:: CreativeRotation
creativeRotation =
CreativeRotation
{ _crWeightCalculationStrategy = Nothing
, _crCreativeAssignments = Nothing
, _crCreativeOptimizationConfigurationId = Nothing
, _crType = Nothing
}
crWeightCalculationStrategy :: Lens' CreativeRotation (Maybe CreativeRotationWeightCalculationStrategy)
crWeightCalculationStrategy
= lens _crWeightCalculationStrategy
(\ s a -> s{_crWeightCalculationStrategy = a})
crCreativeAssignments :: Lens' CreativeRotation [CreativeAssignment]
crCreativeAssignments
= lens _crCreativeAssignments
(\ s a -> s{_crCreativeAssignments = a})
. _Default
. _Coerce
crCreativeOptimizationConfigurationId :: Lens' CreativeRotation (Maybe Int64)
crCreativeOptimizationConfigurationId
= lens _crCreativeOptimizationConfigurationId
(\ s a ->
s{_crCreativeOptimizationConfigurationId = a})
. mapping _Coerce
crType :: Lens' CreativeRotation (Maybe CreativeRotationType)
crType = lens _crType (\ s a -> s{_crType = a})
instance FromJSON CreativeRotation where
parseJSON
= withObject "CreativeRotation"
(\ o ->
CreativeRotation <$>
(o .:? "weightCalculationStrategy") <*>
(o .:? "creativeAssignments" .!= mempty)
<*> (o .:? "creativeOptimizationConfigurationId")
<*> (o .:? "type"))
instance ToJSON CreativeRotation where
toJSON CreativeRotation{..}
= object
(catMaybes
[("weightCalculationStrategy" .=) <$>
_crWeightCalculationStrategy,
("creativeAssignments" .=) <$>
_crCreativeAssignments,
("creativeOptimizationConfigurationId" .=) <$>
_crCreativeOptimizationConfigurationId,
("type" .=) <$> _crType])
data TechnologyTargeting = TechnologyTargeting
{ _ttMobileCarriers :: !(Maybe [MobileCarrier])
, _ttOperatingSystemVersions :: !(Maybe [OperatingSystemVersion])
, _ttPlatformTypes :: !(Maybe [PlatformType])
, _ttBrowsers :: !(Maybe [Browser])
, _ttConnectionTypes :: !(Maybe [ConnectionType])
, _ttOperatingSystems :: !(Maybe [OperatingSystem])
} deriving (Eq,Show,Data,Typeable,Generic)
technologyTargeting
:: TechnologyTargeting
technologyTargeting =
TechnologyTargeting
{ _ttMobileCarriers = Nothing
, _ttOperatingSystemVersions = Nothing
, _ttPlatformTypes = Nothing
, _ttBrowsers = Nothing
, _ttConnectionTypes = Nothing
, _ttOperatingSystems = Nothing
}
ttMobileCarriers :: Lens' TechnologyTargeting [MobileCarrier]
ttMobileCarriers
= lens _ttMobileCarriers
(\ s a -> s{_ttMobileCarriers = a})
. _Default
. _Coerce
ttOperatingSystemVersions :: Lens' TechnologyTargeting [OperatingSystemVersion]
ttOperatingSystemVersions
= lens _ttOperatingSystemVersions
(\ s a -> s{_ttOperatingSystemVersions = a})
. _Default
. _Coerce
ttPlatformTypes :: Lens' TechnologyTargeting [PlatformType]
ttPlatformTypes
= lens _ttPlatformTypes
(\ s a -> s{_ttPlatformTypes = a})
. _Default
. _Coerce
ttBrowsers :: Lens' TechnologyTargeting [Browser]
ttBrowsers
= lens _ttBrowsers (\ s a -> s{_ttBrowsers = a}) .
_Default
. _Coerce
ttConnectionTypes :: Lens' TechnologyTargeting [ConnectionType]
ttConnectionTypes
= lens _ttConnectionTypes
(\ s a -> s{_ttConnectionTypes = a})
. _Default
. _Coerce
ttOperatingSystems :: Lens' TechnologyTargeting [OperatingSystem]
ttOperatingSystems
= lens _ttOperatingSystems
(\ s a -> s{_ttOperatingSystems = a})
. _Default
. _Coerce
instance FromJSON TechnologyTargeting where
parseJSON
= withObject "TechnologyTargeting"
(\ o ->
TechnologyTargeting <$>
(o .:? "mobileCarriers" .!= mempty) <*>
(o .:? "operatingSystemVersions" .!= mempty)
<*> (o .:? "platformTypes" .!= mempty)
<*> (o .:? "browsers" .!= mempty)
<*> (o .:? "connectionTypes" .!= mempty)
<*> (o .:? "operatingSystems" .!= mempty))
instance ToJSON TechnologyTargeting where
toJSON TechnologyTargeting{..}
= object
(catMaybes
[("mobileCarriers" .=) <$> _ttMobileCarriers,
("operatingSystemVersions" .=) <$>
_ttOperatingSystemVersions,
("platformTypes" .=) <$> _ttPlatformTypes,
("browsers" .=) <$> _ttBrowsers,
("connectionTypes" .=) <$> _ttConnectionTypes,
("operatingSystems" .=) <$> _ttOperatingSystems])
data InventoryItem = InventoryItem
{ _iiPlacementStrategyId :: !(Maybe (Textual Int64))
, _iiEstimatedClickThroughRate :: !(Maybe (Textual Int64))
, _iiPricing :: !(Maybe Pricing)
, _iiKind :: !Text
, _iiAdvertiserId :: !(Maybe (Textual Int64))
, _iiRfpId :: !(Maybe (Textual Int64))
, _iiContentCategoryId :: !(Maybe (Textual Int64))
, _iiInPlan :: !(Maybe Bool)
, _iiAccountId :: !(Maybe (Textual Int64))
, _iiName :: !(Maybe Text)
, _iiAdSlots :: !(Maybe [AdSlot])
, _iiNegotiationChannelId :: !(Maybe (Textual Int64))
, _iiLastModifiedInfo :: !(Maybe LastModifiedInfo)
, _iiId :: !(Maybe (Textual Int64))
, _iiEstimatedConversionRate :: !(Maybe (Textual Int64))
, _iiProjectId :: !(Maybe (Textual Int64))
, _iiSubAccountId :: !(Maybe (Textual Int64))
, _iiOrderId :: !(Maybe (Textual Int64))
, _iiSiteId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
inventoryItem
:: InventoryItem
inventoryItem =
InventoryItem
{ _iiPlacementStrategyId = Nothing
, _iiEstimatedClickThroughRate = Nothing
, _iiPricing = Nothing
, _iiKind = "dfareporting#inventoryItem"
, _iiAdvertiserId = Nothing
, _iiRfpId = Nothing
, _iiContentCategoryId = Nothing
, _iiInPlan = Nothing
, _iiAccountId = Nothing
, _iiName = Nothing
, _iiAdSlots = Nothing
, _iiNegotiationChannelId = Nothing
, _iiLastModifiedInfo = Nothing
, _iiId = Nothing
, _iiEstimatedConversionRate = Nothing
, _iiProjectId = Nothing
, _iiSubAccountId = Nothing
, _iiOrderId = Nothing
, _iiSiteId = Nothing
}
iiPlacementStrategyId :: Lens' InventoryItem (Maybe Int64)
iiPlacementStrategyId
= lens _iiPlacementStrategyId
(\ s a -> s{_iiPlacementStrategyId = a})
. mapping _Coerce
iiEstimatedClickThroughRate :: Lens' InventoryItem (Maybe Int64)
iiEstimatedClickThroughRate
= lens _iiEstimatedClickThroughRate
(\ s a -> s{_iiEstimatedClickThroughRate = a})
. mapping _Coerce
iiPricing :: Lens' InventoryItem (Maybe Pricing)
iiPricing
= lens _iiPricing (\ s a -> s{_iiPricing = a})
iiKind :: Lens' InventoryItem Text
iiKind = lens _iiKind (\ s a -> s{_iiKind = a})
iiAdvertiserId :: Lens' InventoryItem (Maybe Int64)
iiAdvertiserId
= lens _iiAdvertiserId
(\ s a -> s{_iiAdvertiserId = a})
. mapping _Coerce
iiRfpId :: Lens' InventoryItem (Maybe Int64)
iiRfpId
= lens _iiRfpId (\ s a -> s{_iiRfpId = a}) .
mapping _Coerce
iiContentCategoryId :: Lens' InventoryItem (Maybe Int64)
iiContentCategoryId
= lens _iiContentCategoryId
(\ s a -> s{_iiContentCategoryId = a})
. mapping _Coerce
iiInPlan :: Lens' InventoryItem (Maybe Bool)
iiInPlan = lens _iiInPlan (\ s a -> s{_iiInPlan = a})
iiAccountId :: Lens' InventoryItem (Maybe Int64)
iiAccountId
= lens _iiAccountId (\ s a -> s{_iiAccountId = a}) .
mapping _Coerce
iiName :: Lens' InventoryItem (Maybe Text)
iiName = lens _iiName (\ s a -> s{_iiName = a})
iiAdSlots :: Lens' InventoryItem [AdSlot]
iiAdSlots
= lens _iiAdSlots (\ s a -> s{_iiAdSlots = a}) .
_Default
. _Coerce
iiNegotiationChannelId :: Lens' InventoryItem (Maybe Int64)
iiNegotiationChannelId
= lens _iiNegotiationChannelId
(\ s a -> s{_iiNegotiationChannelId = a})
. mapping _Coerce
iiLastModifiedInfo :: Lens' InventoryItem (Maybe LastModifiedInfo)
iiLastModifiedInfo
= lens _iiLastModifiedInfo
(\ s a -> s{_iiLastModifiedInfo = a})
iiId :: Lens' InventoryItem (Maybe Int64)
iiId
= lens _iiId (\ s a -> s{_iiId = a}) .
mapping _Coerce
iiEstimatedConversionRate :: Lens' InventoryItem (Maybe Int64)
iiEstimatedConversionRate
= lens _iiEstimatedConversionRate
(\ s a -> s{_iiEstimatedConversionRate = a})
. mapping _Coerce
iiProjectId :: Lens' InventoryItem (Maybe Int64)
iiProjectId
= lens _iiProjectId (\ s a -> s{_iiProjectId = a}) .
mapping _Coerce
iiSubAccountId :: Lens' InventoryItem (Maybe Int64)
iiSubAccountId
= lens _iiSubAccountId
(\ s a -> s{_iiSubAccountId = a})
. mapping _Coerce
iiOrderId :: Lens' InventoryItem (Maybe Int64)
iiOrderId
= lens _iiOrderId (\ s a -> s{_iiOrderId = a}) .
mapping _Coerce
iiSiteId :: Lens' InventoryItem (Maybe Int64)
iiSiteId
= lens _iiSiteId (\ s a -> s{_iiSiteId = a}) .
mapping _Coerce
instance FromJSON InventoryItem where
parseJSON
= withObject "InventoryItem"
(\ o ->
InventoryItem <$>
(o .:? "placementStrategyId") <*>
(o .:? "estimatedClickThroughRate")
<*> (o .:? "pricing")
<*> (o .:? "kind" .!= "dfareporting#inventoryItem")
<*> (o .:? "advertiserId")
<*> (o .:? "rfpId")
<*> (o .:? "contentCategoryId")
<*> (o .:? "inPlan")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "adSlots" .!= mempty)
<*> (o .:? "negotiationChannelId")
<*> (o .:? "lastModifiedInfo")
<*> (o .:? "id")
<*> (o .:? "estimatedConversionRate")
<*> (o .:? "projectId")
<*> (o .:? "subaccountId")
<*> (o .:? "orderId")
<*> (o .:? "siteId"))
instance ToJSON InventoryItem where
toJSON InventoryItem{..}
= object
(catMaybes
[("placementStrategyId" .=) <$>
_iiPlacementStrategyId,
("estimatedClickThroughRate" .=) <$>
_iiEstimatedClickThroughRate,
("pricing" .=) <$> _iiPricing,
Just ("kind" .= _iiKind),
("advertiserId" .=) <$> _iiAdvertiserId,
("rfpId" .=) <$> _iiRfpId,
("contentCategoryId" .=) <$> _iiContentCategoryId,
("inPlan" .=) <$> _iiInPlan,
("accountId" .=) <$> _iiAccountId,
("name" .=) <$> _iiName,
("adSlots" .=) <$> _iiAdSlots,
("negotiationChannelId" .=) <$>
_iiNegotiationChannelId,
("lastModifiedInfo" .=) <$> _iiLastModifiedInfo,
("id" .=) <$> _iiId,
("estimatedConversionRate" .=) <$>
_iiEstimatedConversionRate,
("projectId" .=) <$> _iiProjectId,
("subaccountId" .=) <$> _iiSubAccountId,
("orderId" .=) <$> _iiOrderId,
("siteId" .=) <$> _iiSiteId])
data ProjectsListResponse = ProjectsListResponse
{ _plrNextPageToken :: !(Maybe Text)
, _plrKind :: !Text
, _plrProjects :: !(Maybe [Project])
} deriving (Eq,Show,Data,Typeable,Generic)
projectsListResponse
:: ProjectsListResponse
projectsListResponse =
ProjectsListResponse
{ _plrNextPageToken = Nothing
, _plrKind = "dfareporting#projectsListResponse"
, _plrProjects = Nothing
}
plrNextPageToken :: Lens' ProjectsListResponse (Maybe Text)
plrNextPageToken
= lens _plrNextPageToken
(\ s a -> s{_plrNextPageToken = a})
plrKind :: Lens' ProjectsListResponse Text
plrKind = lens _plrKind (\ s a -> s{_plrKind = a})
plrProjects :: Lens' ProjectsListResponse [Project]
plrProjects
= lens _plrProjects (\ s a -> s{_plrProjects = a}) .
_Default
. _Coerce
instance FromJSON ProjectsListResponse where
parseJSON
= withObject "ProjectsListResponse"
(\ o ->
ProjectsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#projectsListResponse")
<*> (o .:? "projects" .!= mempty))
instance ToJSON ProjectsListResponse where
toJSON ProjectsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _plrNextPageToken,
Just ("kind" .= _plrKind),
("projects" .=) <$> _plrProjects])
data AdsListResponse = AdsListResponse
{ _alrNextPageToken :: !(Maybe Text)
, _alrKind :: !Text
, _alrAds :: !(Maybe [Ad])
} deriving (Eq,Show,Data,Typeable,Generic)
adsListResponse
:: AdsListResponse
adsListResponse =
AdsListResponse
{ _alrNextPageToken = Nothing
, _alrKind = "dfareporting#adsListResponse"
, _alrAds = Nothing
}
alrNextPageToken :: Lens' AdsListResponse (Maybe Text)
alrNextPageToken
= lens _alrNextPageToken
(\ s a -> s{_alrNextPageToken = a})
alrKind :: Lens' AdsListResponse Text
alrKind = lens _alrKind (\ s a -> s{_alrKind = a})
alrAds :: Lens' AdsListResponse [Ad]
alrAds
= lens _alrAds (\ s a -> s{_alrAds = a}) . _Default .
_Coerce
instance FromJSON AdsListResponse where
parseJSON
= withObject "AdsListResponse"
(\ o ->
AdsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "dfareporting#adsListResponse")
<*> (o .:? "ads" .!= mempty))
instance ToJSON AdsListResponse where
toJSON AdsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _alrNextPageToken,
Just ("kind" .= _alrKind), ("ads" .=) <$> _alrAds])
data ListPopulationTerm = ListPopulationTerm
{ _lptOperator :: !(Maybe ListPopulationTermOperator)
, _lptValue :: !(Maybe Text)
, _lptVariableFriendlyName :: !(Maybe Text)
, _lptNegation :: !(Maybe Bool)
, _lptVariableName :: !(Maybe Text)
, _lptRemarketingListId :: !(Maybe (Textual Int64))
, _lptType :: !(Maybe ListPopulationTermType)
, _lptContains :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
listPopulationTerm
:: ListPopulationTerm
listPopulationTerm =
ListPopulationTerm
{ _lptOperator = Nothing
, _lptValue = Nothing
, _lptVariableFriendlyName = Nothing
, _lptNegation = Nothing
, _lptVariableName = Nothing
, _lptRemarketingListId = Nothing
, _lptType = Nothing
, _lptContains = Nothing
}
lptOperator :: Lens' ListPopulationTerm (Maybe ListPopulationTermOperator)
lptOperator
= lens _lptOperator (\ s a -> s{_lptOperator = a})
lptValue :: Lens' ListPopulationTerm (Maybe Text)
lptValue = lens _lptValue (\ s a -> s{_lptValue = a})
lptVariableFriendlyName :: Lens' ListPopulationTerm (Maybe Text)
lptVariableFriendlyName
= lens _lptVariableFriendlyName
(\ s a -> s{_lptVariableFriendlyName = a})
lptNegation :: Lens' ListPopulationTerm (Maybe Bool)
lptNegation
= lens _lptNegation (\ s a -> s{_lptNegation = a})
lptVariableName :: Lens' ListPopulationTerm (Maybe Text)
lptVariableName
= lens _lptVariableName
(\ s a -> s{_lptVariableName = a})
lptRemarketingListId :: Lens' ListPopulationTerm (Maybe Int64)
lptRemarketingListId
= lens _lptRemarketingListId
(\ s a -> s{_lptRemarketingListId = a})
. mapping _Coerce
lptType :: Lens' ListPopulationTerm (Maybe ListPopulationTermType)
lptType = lens _lptType (\ s a -> s{_lptType = a})
lptContains :: Lens' ListPopulationTerm (Maybe Bool)
lptContains
= lens _lptContains (\ s a -> s{_lptContains = a})
instance FromJSON ListPopulationTerm where
parseJSON
= withObject "ListPopulationTerm"
(\ o ->
ListPopulationTerm <$>
(o .:? "operator") <*> (o .:? "value") <*>
(o .:? "variableFriendlyName")
<*> (o .:? "negation")
<*> (o .:? "variableName")
<*> (o .:? "remarketingListId")
<*> (o .:? "type")
<*> (o .:? "contains"))
instance ToJSON ListPopulationTerm where
toJSON ListPopulationTerm{..}
= object
(catMaybes
[("operator" .=) <$> _lptOperator,
("value" .=) <$> _lptValue,
("variableFriendlyName" .=) <$>
_lptVariableFriendlyName,
("negation" .=) <$> _lptNegation,
("variableName" .=) <$> _lptVariableName,
("remarketingListId" .=) <$> _lptRemarketingListId,
("type" .=) <$> _lptType,
("contains" .=) <$> _lptContains])
data TagSettings = TagSettings
{ _tsDynamicTagEnabled :: !(Maybe Bool)
, _tsImageTagEnabled :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
tagSettings
:: TagSettings
tagSettings =
TagSettings
{ _tsDynamicTagEnabled = Nothing
, _tsImageTagEnabled = Nothing
}
tsDynamicTagEnabled :: Lens' TagSettings (Maybe Bool)
tsDynamicTagEnabled
= lens _tsDynamicTagEnabled
(\ s a -> s{_tsDynamicTagEnabled = a})
tsImageTagEnabled :: Lens' TagSettings (Maybe Bool)
tsImageTagEnabled
= lens _tsImageTagEnabled
(\ s a -> s{_tsImageTagEnabled = a})
instance FromJSON TagSettings where
parseJSON
= withObject "TagSettings"
(\ o ->
TagSettings <$>
(o .:? "dynamicTagEnabled") <*>
(o .:? "imageTagEnabled"))
instance ToJSON TagSettings where
toJSON TagSettings{..}
= object
(catMaybes
[("dynamicTagEnabled" .=) <$> _tsDynamicTagEnabled,
("imageTagEnabled" .=) <$> _tsImageTagEnabled])
data SubAccountsListResponse = SubAccountsListResponse
{ _salrNextPageToken :: !(Maybe Text)
, _salrKind :: !Text
, _salrSubAccounts :: !(Maybe [SubAccount])
} deriving (Eq,Show,Data,Typeable,Generic)
subAccountsListResponse
:: SubAccountsListResponse
subAccountsListResponse =
SubAccountsListResponse
{ _salrNextPageToken = Nothing
, _salrKind = "dfareporting#subaccountsListResponse"
, _salrSubAccounts = Nothing
}
salrNextPageToken :: Lens' SubAccountsListResponse (Maybe Text)
salrNextPageToken
= lens _salrNextPageToken
(\ s a -> s{_salrNextPageToken = a})
salrKind :: Lens' SubAccountsListResponse Text
salrKind = lens _salrKind (\ s a -> s{_salrKind = a})
salrSubAccounts :: Lens' SubAccountsListResponse [SubAccount]
salrSubAccounts
= lens _salrSubAccounts
(\ s a -> s{_salrSubAccounts = a})
. _Default
. _Coerce
instance FromJSON SubAccountsListResponse where
parseJSON
= withObject "SubAccountsListResponse"
(\ o ->
SubAccountsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#subaccountsListResponse")
<*> (o .:? "subaccounts" .!= mempty))
instance ToJSON SubAccountsListResponse where
toJSON SubAccountsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _salrNextPageToken,
Just ("kind" .= _salrKind),
("subaccounts" .=) <$> _salrSubAccounts])
data DirectorySiteContact = DirectorySiteContact
{ _dscEmail :: !(Maybe Text)
, _dscPhone :: !(Maybe Text)
, _dscLastName :: !(Maybe Text)
, _dscKind :: !Text
, _dscAddress :: !(Maybe Text)
, _dscRole :: !(Maybe DirectorySiteContactRole)
, _dscFirstName :: !(Maybe Text)
, _dscId :: !(Maybe (Textual Int64))
, _dscTitle :: !(Maybe Text)
, _dscType :: !(Maybe DirectorySiteContactType)
} deriving (Eq,Show,Data,Typeable,Generic)
directorySiteContact
:: DirectorySiteContact
directorySiteContact =
DirectorySiteContact
{ _dscEmail = Nothing
, _dscPhone = Nothing
, _dscLastName = Nothing
, _dscKind = "dfareporting#directorySiteContact"
, _dscAddress = Nothing
, _dscRole = Nothing
, _dscFirstName = Nothing
, _dscId = Nothing
, _dscTitle = Nothing
, _dscType = Nothing
}
dscEmail :: Lens' DirectorySiteContact (Maybe Text)
dscEmail = lens _dscEmail (\ s a -> s{_dscEmail = a})
dscPhone :: Lens' DirectorySiteContact (Maybe Text)
dscPhone = lens _dscPhone (\ s a -> s{_dscPhone = a})
dscLastName :: Lens' DirectorySiteContact (Maybe Text)
dscLastName
= lens _dscLastName (\ s a -> s{_dscLastName = a})
dscKind :: Lens' DirectorySiteContact Text
dscKind = lens _dscKind (\ s a -> s{_dscKind = a})
dscAddress :: Lens' DirectorySiteContact (Maybe Text)
dscAddress
= lens _dscAddress (\ s a -> s{_dscAddress = a})
dscRole :: Lens' DirectorySiteContact (Maybe DirectorySiteContactRole)
dscRole = lens _dscRole (\ s a -> s{_dscRole = a})
dscFirstName :: Lens' DirectorySiteContact (Maybe Text)
dscFirstName
= lens _dscFirstName (\ s a -> s{_dscFirstName = a})
dscId :: Lens' DirectorySiteContact (Maybe Int64)
dscId
= lens _dscId (\ s a -> s{_dscId = a}) .
mapping _Coerce
dscTitle :: Lens' DirectorySiteContact (Maybe Text)
dscTitle = lens _dscTitle (\ s a -> s{_dscTitle = a})
dscType :: Lens' DirectorySiteContact (Maybe DirectorySiteContactType)
dscType = lens _dscType (\ s a -> s{_dscType = a})
instance FromJSON DirectorySiteContact where
parseJSON
= withObject "DirectorySiteContact"
(\ o ->
DirectorySiteContact <$>
(o .:? "email") <*> (o .:? "phone") <*>
(o .:? "lastName")
<*>
(o .:? "kind" .!=
"dfareporting#directorySiteContact")
<*> (o .:? "address")
<*> (o .:? "role")
<*> (o .:? "firstName")
<*> (o .:? "id")
<*> (o .:? "title")
<*> (o .:? "type"))
instance ToJSON DirectorySiteContact where
toJSON DirectorySiteContact{..}
= object
(catMaybes
[("email" .=) <$> _dscEmail,
("phone" .=) <$> _dscPhone,
("lastName" .=) <$> _dscLastName,
Just ("kind" .= _dscKind),
("address" .=) <$> _dscAddress,
("role" .=) <$> _dscRole,
("firstName" .=) <$> _dscFirstName,
("id" .=) <$> _dscId, ("title" .=) <$> _dscTitle,
("type" .=) <$> _dscType])
data RegionsListResponse = RegionsListResponse
{ _rlrKind :: !Text
, _rlrRegions :: !(Maybe [Region])
} deriving (Eq,Show,Data,Typeable,Generic)
regionsListResponse
:: RegionsListResponse
regionsListResponse =
RegionsListResponse
{ _rlrKind = "dfareporting#regionsListResponse"
, _rlrRegions = Nothing
}
rlrKind :: Lens' RegionsListResponse Text
rlrKind = lens _rlrKind (\ s a -> s{_rlrKind = a})
rlrRegions :: Lens' RegionsListResponse [Region]
rlrRegions
= lens _rlrRegions (\ s a -> s{_rlrRegions = a}) .
_Default
. _Coerce
instance FromJSON RegionsListResponse where
parseJSON
= withObject "RegionsListResponse"
(\ o ->
RegionsListResponse <$>
(o .:? "kind" .!= "dfareporting#regionsListResponse")
<*> (o .:? "regions" .!= mempty))
instance ToJSON RegionsListResponse where
toJSON RegionsListResponse{..}
= object
(catMaybes
[Just ("kind" .= _rlrKind),
("regions" .=) <$> _rlrRegions])
data FloodlightActivityDynamicTag = FloodlightActivityDynamicTag
{ _fadtTag :: !(Maybe Text)
, _fadtName :: !(Maybe Text)
, _fadtId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivityDynamicTag
:: FloodlightActivityDynamicTag
floodlightActivityDynamicTag =
FloodlightActivityDynamicTag
{ _fadtTag = Nothing
, _fadtName = Nothing
, _fadtId = Nothing
}
fadtTag :: Lens' FloodlightActivityDynamicTag (Maybe Text)
fadtTag = lens _fadtTag (\ s a -> s{_fadtTag = a})
fadtName :: Lens' FloodlightActivityDynamicTag (Maybe Text)
fadtName = lens _fadtName (\ s a -> s{_fadtName = a})
fadtId :: Lens' FloodlightActivityDynamicTag (Maybe Int64)
fadtId
= lens _fadtId (\ s a -> s{_fadtId = a}) .
mapping _Coerce
instance FromJSON FloodlightActivityDynamicTag where
parseJSON
= withObject "FloodlightActivityDynamicTag"
(\ o ->
FloodlightActivityDynamicTag <$>
(o .:? "tag") <*> (o .:? "name") <*> (o .:? "id"))
instance ToJSON FloodlightActivityDynamicTag where
toJSON FloodlightActivityDynamicTag{..}
= object
(catMaybes
[("tag" .=) <$> _fadtTag, ("name" .=) <$> _fadtName,
("id" .=) <$> _fadtId])
data DirectorySite = DirectorySite
{ _dsCurrencyId :: !(Maybe (Textual Int64))
, _dsSettings :: !(Maybe DirectorySiteSettings)
, _dsInterstitialTagFormats :: !(Maybe [DirectorySiteInterstitialTagFormatsItem])
, _dsKind :: !Text
, _dsURL :: !(Maybe Text)
, _dsIdDimensionValue :: !(Maybe DimensionValue)
, _dsInpageTagFormats :: !(Maybe [DirectorySiteInpageTagFormatsItem])
, _dsActive :: !(Maybe Bool)
, _dsName :: !(Maybe Text)
, _dsId :: !(Maybe (Textual Int64))
, _dsCountryId :: !(Maybe (Textual Int64))
, _dsContactAssignments :: !(Maybe [DirectorySiteContactAssignment])
, _dsDescription :: !(Maybe Text)
, _dsParentId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
directorySite
:: DirectorySite
directorySite =
DirectorySite
{ _dsCurrencyId = Nothing
, _dsSettings = Nothing
, _dsInterstitialTagFormats = Nothing
, _dsKind = "dfareporting#directorySite"
, _dsURL = Nothing
, _dsIdDimensionValue = Nothing
, _dsInpageTagFormats = Nothing
, _dsActive = Nothing
, _dsName = Nothing
, _dsId = Nothing
, _dsCountryId = Nothing
, _dsContactAssignments = Nothing
, _dsDescription = Nothing
, _dsParentId = Nothing
}
dsCurrencyId :: Lens' DirectorySite (Maybe Int64)
dsCurrencyId
= lens _dsCurrencyId (\ s a -> s{_dsCurrencyId = a})
. mapping _Coerce
dsSettings :: Lens' DirectorySite (Maybe DirectorySiteSettings)
dsSettings
= lens _dsSettings (\ s a -> s{_dsSettings = a})
dsInterstitialTagFormats :: Lens' DirectorySite [DirectorySiteInterstitialTagFormatsItem]
dsInterstitialTagFormats
= lens _dsInterstitialTagFormats
(\ s a -> s{_dsInterstitialTagFormats = a})
. _Default
. _Coerce
dsKind :: Lens' DirectorySite Text
dsKind = lens _dsKind (\ s a -> s{_dsKind = a})
dsURL :: Lens' DirectorySite (Maybe Text)
dsURL = lens _dsURL (\ s a -> s{_dsURL = a})
dsIdDimensionValue :: Lens' DirectorySite (Maybe DimensionValue)
dsIdDimensionValue
= lens _dsIdDimensionValue
(\ s a -> s{_dsIdDimensionValue = a})
dsInpageTagFormats :: Lens' DirectorySite [DirectorySiteInpageTagFormatsItem]
dsInpageTagFormats
= lens _dsInpageTagFormats
(\ s a -> s{_dsInpageTagFormats = a})
. _Default
. _Coerce
dsActive :: Lens' DirectorySite (Maybe Bool)
dsActive = lens _dsActive (\ s a -> s{_dsActive = a})
dsName :: Lens' DirectorySite (Maybe Text)
dsName = lens _dsName (\ s a -> s{_dsName = a})
dsId :: Lens' DirectorySite (Maybe Int64)
dsId
= lens _dsId (\ s a -> s{_dsId = a}) .
mapping _Coerce
dsCountryId :: Lens' DirectorySite (Maybe Int64)
dsCountryId
= lens _dsCountryId (\ s a -> s{_dsCountryId = a}) .
mapping _Coerce
dsContactAssignments :: Lens' DirectorySite [DirectorySiteContactAssignment]
dsContactAssignments
= lens _dsContactAssignments
(\ s a -> s{_dsContactAssignments = a})
. _Default
. _Coerce
dsDescription :: Lens' DirectorySite (Maybe Text)
dsDescription
= lens _dsDescription
(\ s a -> s{_dsDescription = a})
dsParentId :: Lens' DirectorySite (Maybe Int64)
dsParentId
= lens _dsParentId (\ s a -> s{_dsParentId = a}) .
mapping _Coerce
instance FromJSON DirectorySite where
parseJSON
= withObject "DirectorySite"
(\ o ->
DirectorySite <$>
(o .:? "currencyId") <*> (o .:? "settings") <*>
(o .:? "interstitialTagFormats" .!= mempty)
<*> (o .:? "kind" .!= "dfareporting#directorySite")
<*> (o .:? "url")
<*> (o .:? "idDimensionValue")
<*> (o .:? "inpageTagFormats" .!= mempty)
<*> (o .:? "active")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "countryId")
<*> (o .:? "contactAssignments" .!= mempty)
<*> (o .:? "description")
<*> (o .:? "parentId"))
instance ToJSON DirectorySite where
toJSON DirectorySite{..}
= object
(catMaybes
[("currencyId" .=) <$> _dsCurrencyId,
("settings" .=) <$> _dsSettings,
("interstitialTagFormats" .=) <$>
_dsInterstitialTagFormats,
Just ("kind" .= _dsKind), ("url" .=) <$> _dsURL,
("idDimensionValue" .=) <$> _dsIdDimensionValue,
("inpageTagFormats" .=) <$> _dsInpageTagFormats,
("active" .=) <$> _dsActive, ("name" .=) <$> _dsName,
("id" .=) <$> _dsId,
("countryId" .=) <$> _dsCountryId,
("contactAssignments" .=) <$> _dsContactAssignments,
("description" .=) <$> _dsDescription,
("parentId" .=) <$> _dsParentId])
data ReportFloodlightCriteriaReportProperties = ReportFloodlightCriteriaReportProperties
{ _rfcrpIncludeUnattributedIPConversions :: !(Maybe Bool)
, _rfcrpIncludeUnattributedCookieConversions :: !(Maybe Bool)
, _rfcrpIncludeAttributedIPConversions :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
reportFloodlightCriteriaReportProperties
:: ReportFloodlightCriteriaReportProperties
reportFloodlightCriteriaReportProperties =
ReportFloodlightCriteriaReportProperties
{ _rfcrpIncludeUnattributedIPConversions = Nothing
, _rfcrpIncludeUnattributedCookieConversions = Nothing
, _rfcrpIncludeAttributedIPConversions = Nothing
}
rfcrpIncludeUnattributedIPConversions :: Lens' ReportFloodlightCriteriaReportProperties (Maybe Bool)
rfcrpIncludeUnattributedIPConversions
= lens _rfcrpIncludeUnattributedIPConversions
(\ s a ->
s{_rfcrpIncludeUnattributedIPConversions = a})
rfcrpIncludeUnattributedCookieConversions :: Lens' ReportFloodlightCriteriaReportProperties (Maybe Bool)
rfcrpIncludeUnattributedCookieConversions
= lens _rfcrpIncludeUnattributedCookieConversions
(\ s a ->
s{_rfcrpIncludeUnattributedCookieConversions = a})
rfcrpIncludeAttributedIPConversions :: Lens' ReportFloodlightCriteriaReportProperties (Maybe Bool)
rfcrpIncludeAttributedIPConversions
= lens _rfcrpIncludeAttributedIPConversions
(\ s a ->
s{_rfcrpIncludeAttributedIPConversions = a})
instance FromJSON
ReportFloodlightCriteriaReportProperties where
parseJSON
= withObject
"ReportFloodlightCriteriaReportProperties"
(\ o ->
ReportFloodlightCriteriaReportProperties <$>
(o .:? "includeUnattributedIPConversions") <*>
(o .:? "includeUnattributedCookieConversions")
<*> (o .:? "includeAttributedIPConversions"))
instance ToJSON
ReportFloodlightCriteriaReportProperties where
toJSON ReportFloodlightCriteriaReportProperties{..}
= object
(catMaybes
[("includeUnattributedIPConversions" .=) <$>
_rfcrpIncludeUnattributedIPConversions,
("includeUnattributedCookieConversions" .=) <$>
_rfcrpIncludeUnattributedCookieConversions,
("includeAttributedIPConversions" .=) <$>
_rfcrpIncludeAttributedIPConversions])
data FloodlightActivityGroup = FloodlightActivityGroup
{ _fagTagString :: !(Maybe Text)
, _fagFloodlightConfigurationId :: !(Maybe (Textual Int64))
, _fagKind :: !Text
, _fagAdvertiserId :: !(Maybe (Textual Int64))
, _fagAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _fagIdDimensionValue :: !(Maybe DimensionValue)
, _fagAccountId :: !(Maybe (Textual Int64))
, _fagName :: !(Maybe Text)
, _fagId :: !(Maybe (Textual Int64))
, _fagSubAccountId :: !(Maybe (Textual Int64))
, _fagType :: !(Maybe FloodlightActivityGroupType)
, _fagFloodlightConfigurationIdDimensionValue :: !(Maybe DimensionValue)
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivityGroup
:: FloodlightActivityGroup
floodlightActivityGroup =
FloodlightActivityGroup
{ _fagTagString = Nothing
, _fagFloodlightConfigurationId = Nothing
, _fagKind = "dfareporting#floodlightActivityGroup"
, _fagAdvertiserId = Nothing
, _fagAdvertiserIdDimensionValue = Nothing
, _fagIdDimensionValue = Nothing
, _fagAccountId = Nothing
, _fagName = Nothing
, _fagId = Nothing
, _fagSubAccountId = Nothing
, _fagType = Nothing
, _fagFloodlightConfigurationIdDimensionValue = Nothing
}
fagTagString :: Lens' FloodlightActivityGroup (Maybe Text)
fagTagString
= lens _fagTagString (\ s a -> s{_fagTagString = a})
fagFloodlightConfigurationId :: Lens' FloodlightActivityGroup (Maybe Int64)
fagFloodlightConfigurationId
= lens _fagFloodlightConfigurationId
(\ s a -> s{_fagFloodlightConfigurationId = a})
. mapping _Coerce
fagKind :: Lens' FloodlightActivityGroup Text
fagKind = lens _fagKind (\ s a -> s{_fagKind = a})
fagAdvertiserId :: Lens' FloodlightActivityGroup (Maybe Int64)
fagAdvertiserId
= lens _fagAdvertiserId
(\ s a -> s{_fagAdvertiserId = a})
. mapping _Coerce
fagAdvertiserIdDimensionValue :: Lens' FloodlightActivityGroup (Maybe DimensionValue)
fagAdvertiserIdDimensionValue
= lens _fagAdvertiserIdDimensionValue
(\ s a -> s{_fagAdvertiserIdDimensionValue = a})
fagIdDimensionValue :: Lens' FloodlightActivityGroup (Maybe DimensionValue)
fagIdDimensionValue
= lens _fagIdDimensionValue
(\ s a -> s{_fagIdDimensionValue = a})
fagAccountId :: Lens' FloodlightActivityGroup (Maybe Int64)
fagAccountId
= lens _fagAccountId (\ s a -> s{_fagAccountId = a})
. mapping _Coerce
fagName :: Lens' FloodlightActivityGroup (Maybe Text)
fagName = lens _fagName (\ s a -> s{_fagName = a})
fagId :: Lens' FloodlightActivityGroup (Maybe Int64)
fagId
= lens _fagId (\ s a -> s{_fagId = a}) .
mapping _Coerce
fagSubAccountId :: Lens' FloodlightActivityGroup (Maybe Int64)
fagSubAccountId
= lens _fagSubAccountId
(\ s a -> s{_fagSubAccountId = a})
. mapping _Coerce
fagType :: Lens' FloodlightActivityGroup (Maybe FloodlightActivityGroupType)
fagType = lens _fagType (\ s a -> s{_fagType = a})
fagFloodlightConfigurationIdDimensionValue :: Lens' FloodlightActivityGroup (Maybe DimensionValue)
fagFloodlightConfigurationIdDimensionValue
= lens _fagFloodlightConfigurationIdDimensionValue
(\ s a ->
s{_fagFloodlightConfigurationIdDimensionValue = a})
instance FromJSON FloodlightActivityGroup where
parseJSON
= withObject "FloodlightActivityGroup"
(\ o ->
FloodlightActivityGroup <$>
(o .:? "tagString") <*>
(o .:? "floodlightConfigurationId")
<*>
(o .:? "kind" .!=
"dfareporting#floodlightActivityGroup")
<*> (o .:? "advertiserId")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "idDimensionValue")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "subaccountId")
<*> (o .:? "type")
<*>
(o .:? "floodlightConfigurationIdDimensionValue"))
instance ToJSON FloodlightActivityGroup where
toJSON FloodlightActivityGroup{..}
= object
(catMaybes
[("tagString" .=) <$> _fagTagString,
("floodlightConfigurationId" .=) <$>
_fagFloodlightConfigurationId,
Just ("kind" .= _fagKind),
("advertiserId" .=) <$> _fagAdvertiserId,
("advertiserIdDimensionValue" .=) <$>
_fagAdvertiserIdDimensionValue,
("idDimensionValue" .=) <$> _fagIdDimensionValue,
("accountId" .=) <$> _fagAccountId,
("name" .=) <$> _fagName, ("id" .=) <$> _fagId,
("subaccountId" .=) <$> _fagSubAccountId,
("type" .=) <$> _fagType,
("floodlightConfigurationIdDimensionValue" .=) <$>
_fagFloodlightConfigurationIdDimensionValue])
data CrossDimensionReachReportCompatibleFields = CrossDimensionReachReportCompatibleFields
{ _cdrrcfMetrics :: !(Maybe [Metric])
, _cdrrcfBreakdown :: !(Maybe [Dimension])
, _cdrrcfKind :: !Text
, _cdrrcfDimensionFilters :: !(Maybe [Dimension])
, _cdrrcfOverlapMetrics :: !(Maybe [Metric])
} deriving (Eq,Show,Data,Typeable,Generic)
crossDimensionReachReportCompatibleFields
:: CrossDimensionReachReportCompatibleFields
crossDimensionReachReportCompatibleFields =
CrossDimensionReachReportCompatibleFields
{ _cdrrcfMetrics = Nothing
, _cdrrcfBreakdown = Nothing
, _cdrrcfKind = "dfareporting#crossDimensionReachReportCompatibleFields"
, _cdrrcfDimensionFilters = Nothing
, _cdrrcfOverlapMetrics = Nothing
}
cdrrcfMetrics :: Lens' CrossDimensionReachReportCompatibleFields [Metric]
cdrrcfMetrics
= lens _cdrrcfMetrics
(\ s a -> s{_cdrrcfMetrics = a})
. _Default
. _Coerce
cdrrcfBreakdown :: Lens' CrossDimensionReachReportCompatibleFields [Dimension]
cdrrcfBreakdown
= lens _cdrrcfBreakdown
(\ s a -> s{_cdrrcfBreakdown = a})
. _Default
. _Coerce
cdrrcfKind :: Lens' CrossDimensionReachReportCompatibleFields Text
cdrrcfKind
= lens _cdrrcfKind (\ s a -> s{_cdrrcfKind = a})
cdrrcfDimensionFilters :: Lens' CrossDimensionReachReportCompatibleFields [Dimension]
cdrrcfDimensionFilters
= lens _cdrrcfDimensionFilters
(\ s a -> s{_cdrrcfDimensionFilters = a})
. _Default
. _Coerce
cdrrcfOverlapMetrics :: Lens' CrossDimensionReachReportCompatibleFields [Metric]
cdrrcfOverlapMetrics
= lens _cdrrcfOverlapMetrics
(\ s a -> s{_cdrrcfOverlapMetrics = a})
. _Default
. _Coerce
instance FromJSON
CrossDimensionReachReportCompatibleFields where
parseJSON
= withObject
"CrossDimensionReachReportCompatibleFields"
(\ o ->
CrossDimensionReachReportCompatibleFields <$>
(o .:? "metrics" .!= mempty) <*>
(o .:? "breakdown" .!= mempty)
<*>
(o .:? "kind" .!=
"dfareporting#crossDimensionReachReportCompatibleFields")
<*> (o .:? "dimensionFilters" .!= mempty)
<*> (o .:? "overlapMetrics" .!= mempty))
instance ToJSON
CrossDimensionReachReportCompatibleFields where
toJSON CrossDimensionReachReportCompatibleFields{..}
= object
(catMaybes
[("metrics" .=) <$> _cdrrcfMetrics,
("breakdown" .=) <$> _cdrrcfBreakdown,
Just ("kind" .= _cdrrcfKind),
("dimensionFilters" .=) <$> _cdrrcfDimensionFilters,
("overlapMetrics" .=) <$> _cdrrcfOverlapMetrics])
data FsCommand = FsCommand
{ _fcPositionOption :: !(Maybe FsCommandPositionOption)
, _fcLeft :: !(Maybe (Textual Int32))
, _fcWindowHeight :: !(Maybe (Textual Int32))
, _fcWindowWidth :: !(Maybe (Textual Int32))
, _fcTop :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
fsCommand
:: FsCommand
fsCommand =
FsCommand
{ _fcPositionOption = Nothing
, _fcLeft = Nothing
, _fcWindowHeight = Nothing
, _fcWindowWidth = Nothing
, _fcTop = Nothing
}
fcPositionOption :: Lens' FsCommand (Maybe FsCommandPositionOption)
fcPositionOption
= lens _fcPositionOption
(\ s a -> s{_fcPositionOption = a})
fcLeft :: Lens' FsCommand (Maybe Int32)
fcLeft
= lens _fcLeft (\ s a -> s{_fcLeft = a}) .
mapping _Coerce
fcWindowHeight :: Lens' FsCommand (Maybe Int32)
fcWindowHeight
= lens _fcWindowHeight
(\ s a -> s{_fcWindowHeight = a})
. mapping _Coerce
fcWindowWidth :: Lens' FsCommand (Maybe Int32)
fcWindowWidth
= lens _fcWindowWidth
(\ s a -> s{_fcWindowWidth = a})
. mapping _Coerce
fcTop :: Lens' FsCommand (Maybe Int32)
fcTop
= lens _fcTop (\ s a -> s{_fcTop = a}) .
mapping _Coerce
instance FromJSON FsCommand where
parseJSON
= withObject "FsCommand"
(\ o ->
FsCommand <$>
(o .:? "positionOption") <*> (o .:? "left") <*>
(o .:? "windowHeight")
<*> (o .:? "windowWidth")
<*> (o .:? "top"))
instance ToJSON FsCommand where
toJSON FsCommand{..}
= object
(catMaybes
[("positionOption" .=) <$> _fcPositionOption,
("left" .=) <$> _fcLeft,
("windowHeight" .=) <$> _fcWindowHeight,
("windowWidth" .=) <$> _fcWindowWidth,
("top" .=) <$> _fcTop])
data PlacementAssignment = PlacementAssignment
{ _paPlacementId :: !(Maybe (Textual Int64))
, _paPlacementIdDimensionValue :: !(Maybe DimensionValue)
, _paActive :: !(Maybe Bool)
, _paSSLRequired :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
placementAssignment
:: PlacementAssignment
placementAssignment =
PlacementAssignment
{ _paPlacementId = Nothing
, _paPlacementIdDimensionValue = Nothing
, _paActive = Nothing
, _paSSLRequired = Nothing
}
paPlacementId :: Lens' PlacementAssignment (Maybe Int64)
paPlacementId
= lens _paPlacementId
(\ s a -> s{_paPlacementId = a})
. mapping _Coerce
paPlacementIdDimensionValue :: Lens' PlacementAssignment (Maybe DimensionValue)
paPlacementIdDimensionValue
= lens _paPlacementIdDimensionValue
(\ s a -> s{_paPlacementIdDimensionValue = a})
paActive :: Lens' PlacementAssignment (Maybe Bool)
paActive = lens _paActive (\ s a -> s{_paActive = a})
paSSLRequired :: Lens' PlacementAssignment (Maybe Bool)
paSSLRequired
= lens _paSSLRequired
(\ s a -> s{_paSSLRequired = a})
instance FromJSON PlacementAssignment where
parseJSON
= withObject "PlacementAssignment"
(\ o ->
PlacementAssignment <$>
(o .:? "placementId") <*>
(o .:? "placementIdDimensionValue")
<*> (o .:? "active")
<*> (o .:? "sslRequired"))
instance ToJSON PlacementAssignment where
toJSON PlacementAssignment{..}
= object
(catMaybes
[("placementId" .=) <$> _paPlacementId,
("placementIdDimensionValue" .=) <$>
_paPlacementIdDimensionValue,
("active" .=) <$> _paActive,
("sslRequired" .=) <$> _paSSLRequired])
data CreativeFieldValue = CreativeFieldValue
{ _cfvKind :: !Text
, _cfvValue :: !(Maybe Text)
, _cfvId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldValue
:: CreativeFieldValue
creativeFieldValue =
CreativeFieldValue
{ _cfvKind = "dfareporting#creativeFieldValue"
, _cfvValue = Nothing
, _cfvId = Nothing
}
cfvKind :: Lens' CreativeFieldValue Text
cfvKind = lens _cfvKind (\ s a -> s{_cfvKind = a})
cfvValue :: Lens' CreativeFieldValue (Maybe Text)
cfvValue = lens _cfvValue (\ s a -> s{_cfvValue = a})
cfvId :: Lens' CreativeFieldValue (Maybe Int64)
cfvId
= lens _cfvId (\ s a -> s{_cfvId = a}) .
mapping _Coerce
instance FromJSON CreativeFieldValue where
parseJSON
= withObject "CreativeFieldValue"
(\ o ->
CreativeFieldValue <$>
(o .:? "kind" .!= "dfareporting#creativeFieldValue")
<*> (o .:? "value")
<*> (o .:? "id"))
instance ToJSON CreativeFieldValue where
toJSON CreativeFieldValue{..}
= object
(catMaybes
[Just ("kind" .= _cfvKind),
("value" .=) <$> _cfvValue, ("id" .=) <$> _cfvId])
data DimensionValueRequest = DimensionValueRequest
{ _dvrKind :: !Text
, _dvrEndDate :: !(Maybe Date')
, _dvrFilters :: !(Maybe [DimensionFilter])
, _dvrStartDate :: !(Maybe Date')
, _dvrDimensionName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dimensionValueRequest
:: DimensionValueRequest
dimensionValueRequest =
DimensionValueRequest
{ _dvrKind = "dfareporting#dimensionValueRequest"
, _dvrEndDate = Nothing
, _dvrFilters = Nothing
, _dvrStartDate = Nothing
, _dvrDimensionName = Nothing
}
dvrKind :: Lens' DimensionValueRequest Text
dvrKind = lens _dvrKind (\ s a -> s{_dvrKind = a})
dvrEndDate :: Lens' DimensionValueRequest (Maybe Day)
dvrEndDate
= lens _dvrEndDate (\ s a -> s{_dvrEndDate = a}) .
mapping _Date
dvrFilters :: Lens' DimensionValueRequest [DimensionFilter]
dvrFilters
= lens _dvrFilters (\ s a -> s{_dvrFilters = a}) .
_Default
. _Coerce
dvrStartDate :: Lens' DimensionValueRequest (Maybe Day)
dvrStartDate
= lens _dvrStartDate (\ s a -> s{_dvrStartDate = a})
. mapping _Date
dvrDimensionName :: Lens' DimensionValueRequest (Maybe Text)
dvrDimensionName
= lens _dvrDimensionName
(\ s a -> s{_dvrDimensionName = a})
instance FromJSON DimensionValueRequest where
parseJSON
= withObject "DimensionValueRequest"
(\ o ->
DimensionValueRequest <$>
(o .:? "kind" .!=
"dfareporting#dimensionValueRequest")
<*> (o .:? "endDate")
<*> (o .:? "filters" .!= mempty)
<*> (o .:? "startDate")
<*> (o .:? "dimensionName"))
instance ToJSON DimensionValueRequest where
toJSON DimensionValueRequest{..}
= object
(catMaybes
[Just ("kind" .= _dvrKind),
("endDate" .=) <$> _dvrEndDate,
("filters" .=) <$> _dvrFilters,
("startDate" .=) <$> _dvrStartDate,
("dimensionName" .=) <$> _dvrDimensionName])
data FloodlightConfigurationsListResponse = FloodlightConfigurationsListResponse
{ _fclrKind :: !Text
, _fclrFloodlightConfigurations :: !(Maybe [FloodlightConfiguration])
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightConfigurationsListResponse
:: FloodlightConfigurationsListResponse
floodlightConfigurationsListResponse =
FloodlightConfigurationsListResponse
{ _fclrKind = "dfareporting#floodlightConfigurationsListResponse"
, _fclrFloodlightConfigurations = Nothing
}
fclrKind :: Lens' FloodlightConfigurationsListResponse Text
fclrKind = lens _fclrKind (\ s a -> s{_fclrKind = a})
fclrFloodlightConfigurations :: Lens' FloodlightConfigurationsListResponse [FloodlightConfiguration]
fclrFloodlightConfigurations
= lens _fclrFloodlightConfigurations
(\ s a -> s{_fclrFloodlightConfigurations = a})
. _Default
. _Coerce
instance FromJSON
FloodlightConfigurationsListResponse where
parseJSON
= withObject "FloodlightConfigurationsListResponse"
(\ o ->
FloodlightConfigurationsListResponse <$>
(o .:? "kind" .!=
"dfareporting#floodlightConfigurationsListResponse")
<*> (o .:? "floodlightConfigurations" .!= mempty))
instance ToJSON FloodlightConfigurationsListResponse
where
toJSON FloodlightConfigurationsListResponse{..}
= object
(catMaybes
[Just ("kind" .= _fclrKind),
("floodlightConfigurations" .=) <$>
_fclrFloodlightConfigurations])
data FloodlightActivitiesListResponse = FloodlightActivitiesListResponse
{ _falrNextPageToken :: !(Maybe Text)
, _falrKind :: !Text
, _falrFloodlightActivities :: !(Maybe [FloodlightActivity])
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivitiesListResponse
:: FloodlightActivitiesListResponse
floodlightActivitiesListResponse =
FloodlightActivitiesListResponse
{ _falrNextPageToken = Nothing
, _falrKind = "dfareporting#floodlightActivitiesListResponse"
, _falrFloodlightActivities = Nothing
}
falrNextPageToken :: Lens' FloodlightActivitiesListResponse (Maybe Text)
falrNextPageToken
= lens _falrNextPageToken
(\ s a -> s{_falrNextPageToken = a})
falrKind :: Lens' FloodlightActivitiesListResponse Text
falrKind = lens _falrKind (\ s a -> s{_falrKind = a})
falrFloodlightActivities :: Lens' FloodlightActivitiesListResponse [FloodlightActivity]
falrFloodlightActivities
= lens _falrFloodlightActivities
(\ s a -> s{_falrFloodlightActivities = a})
. _Default
. _Coerce
instance FromJSON FloodlightActivitiesListResponse
where
parseJSON
= withObject "FloodlightActivitiesListResponse"
(\ o ->
FloodlightActivitiesListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#floodlightActivitiesListResponse")
<*> (o .:? "floodlightActivities" .!= mempty))
instance ToJSON FloodlightActivitiesListResponse
where
toJSON FloodlightActivitiesListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _falrNextPageToken,
Just ("kind" .= _falrKind),
("floodlightActivities" .=) <$>
_falrFloodlightActivities])
data CreativeFieldAssignment = CreativeFieldAssignment
{ _cfaCreativeFieldId :: !(Maybe (Textual Int64))
, _cfaCreativeFieldValueId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldAssignment
:: CreativeFieldAssignment
creativeFieldAssignment =
CreativeFieldAssignment
{ _cfaCreativeFieldId = Nothing
, _cfaCreativeFieldValueId = Nothing
}
cfaCreativeFieldId :: Lens' CreativeFieldAssignment (Maybe Int64)
cfaCreativeFieldId
= lens _cfaCreativeFieldId
(\ s a -> s{_cfaCreativeFieldId = a})
. mapping _Coerce
cfaCreativeFieldValueId :: Lens' CreativeFieldAssignment (Maybe Int64)
cfaCreativeFieldValueId
= lens _cfaCreativeFieldValueId
(\ s a -> s{_cfaCreativeFieldValueId = a})
. mapping _Coerce
instance FromJSON CreativeFieldAssignment where
parseJSON
= withObject "CreativeFieldAssignment"
(\ o ->
CreativeFieldAssignment <$>
(o .:? "creativeFieldId") <*>
(o .:? "creativeFieldValueId"))
instance ToJSON CreativeFieldAssignment where
toJSON CreativeFieldAssignment{..}
= object
(catMaybes
[("creativeFieldId" .=) <$> _cfaCreativeFieldId,
("creativeFieldValueId" .=) <$>
_cfaCreativeFieldValueId])
data AdvertiserGroup = AdvertiserGroup
{ _agKind :: !Text
, _agAccountId :: !(Maybe (Textual Int64))
, _agName :: !(Maybe Text)
, _agId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
advertiserGroup
:: AdvertiserGroup
advertiserGroup =
AdvertiserGroup
{ _agKind = "dfareporting#advertiserGroup"
, _agAccountId = Nothing
, _agName = Nothing
, _agId = Nothing
}
agKind :: Lens' AdvertiserGroup Text
agKind = lens _agKind (\ s a -> s{_agKind = a})
agAccountId :: Lens' AdvertiserGroup (Maybe Int64)
agAccountId
= lens _agAccountId (\ s a -> s{_agAccountId = a}) .
mapping _Coerce
agName :: Lens' AdvertiserGroup (Maybe Text)
agName = lens _agName (\ s a -> s{_agName = a})
agId :: Lens' AdvertiserGroup (Maybe Int64)
agId
= lens _agId (\ s a -> s{_agId = a}) .
mapping _Coerce
instance FromJSON AdvertiserGroup where
parseJSON
= withObject "AdvertiserGroup"
(\ o ->
AdvertiserGroup <$>
(o .:? "kind" .!= "dfareporting#advertiserGroup") <*>
(o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON AdvertiserGroup where
toJSON AdvertiserGroup{..}
= object
(catMaybes
[Just ("kind" .= _agKind),
("accountId" .=) <$> _agAccountId,
("name" .=) <$> _agName, ("id" .=) <$> _agId])
data TagData = TagData
{ _tdClickTag :: !(Maybe Text)
, _tdFormat :: !(Maybe TagDataFormat)
, _tdCreativeId :: !(Maybe (Textual Int64))
, _tdAdId :: !(Maybe (Textual Int64))
, _tdImpressionTag :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
tagData
:: TagData
tagData =
TagData
{ _tdClickTag = Nothing
, _tdFormat = Nothing
, _tdCreativeId = Nothing
, _tdAdId = Nothing
, _tdImpressionTag = Nothing
}
tdClickTag :: Lens' TagData (Maybe Text)
tdClickTag
= lens _tdClickTag (\ s a -> s{_tdClickTag = a})
tdFormat :: Lens' TagData (Maybe TagDataFormat)
tdFormat = lens _tdFormat (\ s a -> s{_tdFormat = a})
tdCreativeId :: Lens' TagData (Maybe Int64)
tdCreativeId
= lens _tdCreativeId (\ s a -> s{_tdCreativeId = a})
. mapping _Coerce
tdAdId :: Lens' TagData (Maybe Int64)
tdAdId
= lens _tdAdId (\ s a -> s{_tdAdId = a}) .
mapping _Coerce
tdImpressionTag :: Lens' TagData (Maybe Text)
tdImpressionTag
= lens _tdImpressionTag
(\ s a -> s{_tdImpressionTag = a})
instance FromJSON TagData where
parseJSON
= withObject "TagData"
(\ o ->
TagData <$>
(o .:? "clickTag") <*> (o .:? "format") <*>
(o .:? "creativeId")
<*> (o .:? "adId")
<*> (o .:? "impressionTag"))
instance ToJSON TagData where
toJSON TagData{..}
= object
(catMaybes
[("clickTag" .=) <$> _tdClickTag,
("format" .=) <$> _tdFormat,
("creativeId" .=) <$> _tdCreativeId,
("adId" .=) <$> _tdAdId,
("impressionTag" .=) <$> _tdImpressionTag])
data DayPartTargeting = DayPartTargeting
{ _dptDaysOfWeek :: !(Maybe [DayPartTargetingDaysOfWeekItem])
, _dptHoursOfDay :: !(Maybe [Textual Int32])
, _dptUserLocalTime :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
dayPartTargeting
:: DayPartTargeting
dayPartTargeting =
DayPartTargeting
{ _dptDaysOfWeek = Nothing
, _dptHoursOfDay = Nothing
, _dptUserLocalTime = Nothing
}
dptDaysOfWeek :: Lens' DayPartTargeting [DayPartTargetingDaysOfWeekItem]
dptDaysOfWeek
= lens _dptDaysOfWeek
(\ s a -> s{_dptDaysOfWeek = a})
. _Default
. _Coerce
dptHoursOfDay :: Lens' DayPartTargeting [Int32]
dptHoursOfDay
= lens _dptHoursOfDay
(\ s a -> s{_dptHoursOfDay = a})
. _Default
. _Coerce
dptUserLocalTime :: Lens' DayPartTargeting (Maybe Bool)
dptUserLocalTime
= lens _dptUserLocalTime
(\ s a -> s{_dptUserLocalTime = a})
instance FromJSON DayPartTargeting where
parseJSON
= withObject "DayPartTargeting"
(\ o ->
DayPartTargeting <$>
(o .:? "daysOfWeek" .!= mempty) <*>
(o .:? "hoursOfDay" .!= mempty)
<*> (o .:? "userLocalTime"))
instance ToJSON DayPartTargeting where
toJSON DayPartTargeting{..}
= object
(catMaybes
[("daysOfWeek" .=) <$> _dptDaysOfWeek,
("hoursOfDay" .=) <$> _dptHoursOfDay,
("userLocalTime" .=) <$> _dptUserLocalTime])
data CreativeOptimizationConfiguration = CreativeOptimizationConfiguration
{ _cocOptimizationModel :: !(Maybe CreativeOptimizationConfigurationOptimizationModel)
, _cocName :: !(Maybe Text)
, _cocOptimizationActivitys :: !(Maybe [OptimizationActivity])
, _cocId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
creativeOptimizationConfiguration
:: CreativeOptimizationConfiguration
creativeOptimizationConfiguration =
CreativeOptimizationConfiguration
{ _cocOptimizationModel = Nothing
, _cocName = Nothing
, _cocOptimizationActivitys = Nothing
, _cocId = Nothing
}
cocOptimizationModel :: Lens' CreativeOptimizationConfiguration (Maybe CreativeOptimizationConfigurationOptimizationModel)
cocOptimizationModel
= lens _cocOptimizationModel
(\ s a -> s{_cocOptimizationModel = a})
cocName :: Lens' CreativeOptimizationConfiguration (Maybe Text)
cocName = lens _cocName (\ s a -> s{_cocName = a})
cocOptimizationActivitys :: Lens' CreativeOptimizationConfiguration [OptimizationActivity]
cocOptimizationActivitys
= lens _cocOptimizationActivitys
(\ s a -> s{_cocOptimizationActivitys = a})
. _Default
. _Coerce
cocId :: Lens' CreativeOptimizationConfiguration (Maybe Int64)
cocId
= lens _cocId (\ s a -> s{_cocId = a}) .
mapping _Coerce
instance FromJSON CreativeOptimizationConfiguration
where
parseJSON
= withObject "CreativeOptimizationConfiguration"
(\ o ->
CreativeOptimizationConfiguration <$>
(o .:? "optimizationModel") <*> (o .:? "name") <*>
(o .:? "optimizationActivitys" .!= mempty)
<*> (o .:? "id"))
instance ToJSON CreativeOptimizationConfiguration
where
toJSON CreativeOptimizationConfiguration{..}
= object
(catMaybes
[("optimizationModel" .=) <$> _cocOptimizationModel,
("name" .=) <$> _cocName,
("optimizationActivitys" .=) <$>
_cocOptimizationActivitys,
("id" .=) <$> _cocId])
data ReportCriteria = ReportCriteria
{ _rcMetricNames :: !(Maybe [Text])
, _rcCustomRichMediaEvents :: !(Maybe CustomRichMediaEvents)
, _rcDimensionFilters :: !(Maybe [DimensionValue])
, _rcActivities :: !(Maybe Activities)
, _rcDateRange :: !(Maybe DateRange)
, _rcDimensions :: !(Maybe [SortedDimension])
} deriving (Eq,Show,Data,Typeable,Generic)
reportCriteria
:: ReportCriteria
reportCriteria =
ReportCriteria
{ _rcMetricNames = Nothing
, _rcCustomRichMediaEvents = Nothing
, _rcDimensionFilters = Nothing
, _rcActivities = Nothing
, _rcDateRange = Nothing
, _rcDimensions = Nothing
}
rcMetricNames :: Lens' ReportCriteria [Text]
rcMetricNames
= lens _rcMetricNames
(\ s a -> s{_rcMetricNames = a})
. _Default
. _Coerce
rcCustomRichMediaEvents :: Lens' ReportCriteria (Maybe CustomRichMediaEvents)
rcCustomRichMediaEvents
= lens _rcCustomRichMediaEvents
(\ s a -> s{_rcCustomRichMediaEvents = a})
rcDimensionFilters :: Lens' ReportCriteria [DimensionValue]
rcDimensionFilters
= lens _rcDimensionFilters
(\ s a -> s{_rcDimensionFilters = a})
. _Default
. _Coerce
rcActivities :: Lens' ReportCriteria (Maybe Activities)
rcActivities
= lens _rcActivities (\ s a -> s{_rcActivities = a})
rcDateRange :: Lens' ReportCriteria (Maybe DateRange)
rcDateRange
= lens _rcDateRange (\ s a -> s{_rcDateRange = a})
rcDimensions :: Lens' ReportCriteria [SortedDimension]
rcDimensions
= lens _rcDimensions (\ s a -> s{_rcDimensions = a})
. _Default
. _Coerce
instance FromJSON ReportCriteria where
parseJSON
= withObject "ReportCriteria"
(\ o ->
ReportCriteria <$>
(o .:? "metricNames" .!= mempty) <*>
(o .:? "customRichMediaEvents")
<*> (o .:? "dimensionFilters" .!= mempty)
<*> (o .:? "activities")
<*> (o .:? "dateRange")
<*> (o .:? "dimensions" .!= mempty))
instance ToJSON ReportCriteria where
toJSON ReportCriteria{..}
= object
(catMaybes
[("metricNames" .=) <$> _rcMetricNames,
("customRichMediaEvents" .=) <$>
_rcCustomRichMediaEvents,
("dimensionFilters" .=) <$> _rcDimensionFilters,
("activities" .=) <$> _rcActivities,
("dateRange" .=) <$> _rcDateRange,
("dimensions" .=) <$> _rcDimensions])
data PlacementStrategiesListResponse = PlacementStrategiesListResponse
{ _pslrPlacementStrategies :: !(Maybe [PlacementStrategy])
, _pslrNextPageToken :: !(Maybe Text)
, _pslrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
placementStrategiesListResponse
:: PlacementStrategiesListResponse
placementStrategiesListResponse =
PlacementStrategiesListResponse
{ _pslrPlacementStrategies = Nothing
, _pslrNextPageToken = Nothing
, _pslrKind = "dfareporting#placementStrategiesListResponse"
}
pslrPlacementStrategies :: Lens' PlacementStrategiesListResponse [PlacementStrategy]
pslrPlacementStrategies
= lens _pslrPlacementStrategies
(\ s a -> s{_pslrPlacementStrategies = a})
. _Default
. _Coerce
pslrNextPageToken :: Lens' PlacementStrategiesListResponse (Maybe Text)
pslrNextPageToken
= lens _pslrNextPageToken
(\ s a -> s{_pslrNextPageToken = a})
pslrKind :: Lens' PlacementStrategiesListResponse Text
pslrKind = lens _pslrKind (\ s a -> s{_pslrKind = a})
instance FromJSON PlacementStrategiesListResponse
where
parseJSON
= withObject "PlacementStrategiesListResponse"
(\ o ->
PlacementStrategiesListResponse <$>
(o .:? "placementStrategies" .!= mempty) <*>
(o .:? "nextPageToken")
<*>
(o .:? "kind" .!=
"dfareporting#placementStrategiesListResponse"))
instance ToJSON PlacementStrategiesListResponse where
toJSON PlacementStrategiesListResponse{..}
= object
(catMaybes
[("placementStrategies" .=) <$>
_pslrPlacementStrategies,
("nextPageToken" .=) <$> _pslrNextPageToken,
Just ("kind" .= _pslrKind)])
data SubAccount = SubAccount
{ _saKind :: !Text
, _saAvailablePermissionIds :: !(Maybe [Textual Int64])
, _saAccountId :: !(Maybe (Textual Int64))
, _saName :: !(Maybe Text)
, _saId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
subAccount
:: SubAccount
subAccount =
SubAccount
{ _saKind = "dfareporting#subaccount"
, _saAvailablePermissionIds = Nothing
, _saAccountId = Nothing
, _saName = Nothing
, _saId = Nothing
}
saKind :: Lens' SubAccount Text
saKind = lens _saKind (\ s a -> s{_saKind = a})
saAvailablePermissionIds :: Lens' SubAccount [Int64]
saAvailablePermissionIds
= lens _saAvailablePermissionIds
(\ s a -> s{_saAvailablePermissionIds = a})
. _Default
. _Coerce
saAccountId :: Lens' SubAccount (Maybe Int64)
saAccountId
= lens _saAccountId (\ s a -> s{_saAccountId = a}) .
mapping _Coerce
saName :: Lens' SubAccount (Maybe Text)
saName = lens _saName (\ s a -> s{_saName = a})
saId :: Lens' SubAccount (Maybe Int64)
saId
= lens _saId (\ s a -> s{_saId = a}) .
mapping _Coerce
instance FromJSON SubAccount where
parseJSON
= withObject "SubAccount"
(\ o ->
SubAccount <$>
(o .:? "kind" .!= "dfareporting#subaccount") <*>
(o .:? "availablePermissionIds" .!= mempty)
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON SubAccount where
toJSON SubAccount{..}
= object
(catMaybes
[Just ("kind" .= _saKind),
("availablePermissionIds" .=) <$>
_saAvailablePermissionIds,
("accountId" .=) <$> _saAccountId,
("name" .=) <$> _saName, ("id" .=) <$> _saId])
data InventoryItemsListResponse = InventoryItemsListResponse
{ _iilrInventoryItems :: !(Maybe [InventoryItem])
, _iilrNextPageToken :: !(Maybe Text)
, _iilrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
inventoryItemsListResponse
:: InventoryItemsListResponse
inventoryItemsListResponse =
InventoryItemsListResponse
{ _iilrInventoryItems = Nothing
, _iilrNextPageToken = Nothing
, _iilrKind = "dfareporting#inventoryItemsListResponse"
}
iilrInventoryItems :: Lens' InventoryItemsListResponse [InventoryItem]
iilrInventoryItems
= lens _iilrInventoryItems
(\ s a -> s{_iilrInventoryItems = a})
. _Default
. _Coerce
iilrNextPageToken :: Lens' InventoryItemsListResponse (Maybe Text)
iilrNextPageToken
= lens _iilrNextPageToken
(\ s a -> s{_iilrNextPageToken = a})
iilrKind :: Lens' InventoryItemsListResponse Text
iilrKind = lens _iilrKind (\ s a -> s{_iilrKind = a})
instance FromJSON InventoryItemsListResponse where
parseJSON
= withObject "InventoryItemsListResponse"
(\ o ->
InventoryItemsListResponse <$>
(o .:? "inventoryItems" .!= mempty) <*>
(o .:? "nextPageToken")
<*>
(o .:? "kind" .!=
"dfareporting#inventoryItemsListResponse"))
instance ToJSON InventoryItemsListResponse where
toJSON InventoryItemsListResponse{..}
= object
(catMaybes
[("inventoryItems" .=) <$> _iilrInventoryItems,
("nextPageToken" .=) <$> _iilrNextPageToken,
Just ("kind" .= _iilrKind)])
data Ad = Ad
{ _aCreativeGroupAssignments :: !(Maybe [CreativeGroupAssignment])
, _aGeoTargeting :: !(Maybe GeoTargeting)
, _aCreativeRotation :: !(Maybe CreativeRotation)
, _aTechnologyTargeting :: !(Maybe TechnologyTargeting)
, _aAudienceSegmentId :: !(Maybe (Textual Int64))
, _aDayPartTargeting :: !(Maybe DayPartTargeting)
, _aSize :: !(Maybe Size)
, _aStartTime :: !(Maybe DateTime')
, _aKind :: !Text
, _aClickThroughURLSuffixProperties :: !(Maybe ClickThroughURLSuffixProperties)
, _aCampaignIdDimensionValue :: !(Maybe DimensionValue)
, _aAdvertiserId :: !(Maybe (Textual Int64))
, _aAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _aSSLCompliant :: !(Maybe Bool)
, _aCampaignId :: !(Maybe (Textual Int64))
, _aIdDimensionValue :: !(Maybe DimensionValue)
, _aClickThroughURL :: !(Maybe ClickThroughURL)
, _aDeliverySchedule :: !(Maybe DeliverySchedule)
, _aEventTagOverrides :: !(Maybe [EventTagOverride])
, _aActive :: !(Maybe Bool)
, _aAccountId :: !(Maybe (Textual Int64))
, _aName :: !(Maybe Text)
, _aKeyValueTargetingExpression :: !(Maybe KeyValueTargetingExpression)
, _aEndTime :: !(Maybe DateTime')
, _aCreateInfo :: !(Maybe LastModifiedInfo)
, _aLastModifiedInfo :: !(Maybe LastModifiedInfo)
, _aId :: !(Maybe (Textual Int64))
, _aSSLRequired :: !(Maybe Bool)
, _aComments :: !(Maybe Text)
, _aSubAccountId :: !(Maybe (Textual Int64))
, _aType :: !(Maybe AdType)
, _aRemarketingListExpression :: !(Maybe ListTargetingExpression)
, _aDynamicClickTracker :: !(Maybe Bool)
, _aCompatibility :: !(Maybe AdCompatibility)
, _aArchived :: !(Maybe Bool)
, _aDefaultClickThroughEventTagProperties :: !(Maybe DefaultClickThroughEventTagProperties)
, _aPlacementAssignments :: !(Maybe [PlacementAssignment])
} deriving (Eq,Show,Data,Typeable,Generic)
ad
:: Ad
ad =
Ad
{ _aCreativeGroupAssignments = Nothing
, _aGeoTargeting = Nothing
, _aCreativeRotation = Nothing
, _aTechnologyTargeting = Nothing
, _aAudienceSegmentId = Nothing
, _aDayPartTargeting = Nothing
, _aSize = Nothing
, _aStartTime = Nothing
, _aKind = "dfareporting#ad"
, _aClickThroughURLSuffixProperties = Nothing
, _aCampaignIdDimensionValue = Nothing
, _aAdvertiserId = Nothing
, _aAdvertiserIdDimensionValue = Nothing
, _aSSLCompliant = Nothing
, _aCampaignId = Nothing
, _aIdDimensionValue = Nothing
, _aClickThroughURL = Nothing
, _aDeliverySchedule = Nothing
, _aEventTagOverrides = Nothing
, _aActive = Nothing
, _aAccountId = Nothing
, _aName = Nothing
, _aKeyValueTargetingExpression = Nothing
, _aEndTime = Nothing
, _aCreateInfo = Nothing
, _aLastModifiedInfo = Nothing
, _aId = Nothing
, _aSSLRequired = Nothing
, _aComments = Nothing
, _aSubAccountId = Nothing
, _aType = Nothing
, _aRemarketingListExpression = Nothing
, _aDynamicClickTracker = Nothing
, _aCompatibility = Nothing
, _aArchived = Nothing
, _aDefaultClickThroughEventTagProperties = Nothing
, _aPlacementAssignments = Nothing
}
aCreativeGroupAssignments :: Lens' Ad [CreativeGroupAssignment]
aCreativeGroupAssignments
= lens _aCreativeGroupAssignments
(\ s a -> s{_aCreativeGroupAssignments = a})
. _Default
. _Coerce
aGeoTargeting :: Lens' Ad (Maybe GeoTargeting)
aGeoTargeting
= lens _aGeoTargeting
(\ s a -> s{_aGeoTargeting = a})
aCreativeRotation :: Lens' Ad (Maybe CreativeRotation)
aCreativeRotation
= lens _aCreativeRotation
(\ s a -> s{_aCreativeRotation = a})
aTechnologyTargeting :: Lens' Ad (Maybe TechnologyTargeting)
aTechnologyTargeting
= lens _aTechnologyTargeting
(\ s a -> s{_aTechnologyTargeting = a})
aAudienceSegmentId :: Lens' Ad (Maybe Int64)
aAudienceSegmentId
= lens _aAudienceSegmentId
(\ s a -> s{_aAudienceSegmentId = a})
. mapping _Coerce
aDayPartTargeting :: Lens' Ad (Maybe DayPartTargeting)
aDayPartTargeting
= lens _aDayPartTargeting
(\ s a -> s{_aDayPartTargeting = a})
aSize :: Lens' Ad (Maybe Size)
aSize = lens _aSize (\ s a -> s{_aSize = a})
aStartTime :: Lens' Ad (Maybe UTCTime)
aStartTime
= lens _aStartTime (\ s a -> s{_aStartTime = a}) .
mapping _DateTime
aKind :: Lens' Ad Text
aKind = lens _aKind (\ s a -> s{_aKind = a})
aClickThroughURLSuffixProperties :: Lens' Ad (Maybe ClickThroughURLSuffixProperties)
aClickThroughURLSuffixProperties
= lens _aClickThroughURLSuffixProperties
(\ s a -> s{_aClickThroughURLSuffixProperties = a})
aCampaignIdDimensionValue :: Lens' Ad (Maybe DimensionValue)
aCampaignIdDimensionValue
= lens _aCampaignIdDimensionValue
(\ s a -> s{_aCampaignIdDimensionValue = a})
aAdvertiserId :: Lens' Ad (Maybe Int64)
aAdvertiserId
= lens _aAdvertiserId
(\ s a -> s{_aAdvertiserId = a})
. mapping _Coerce
aAdvertiserIdDimensionValue :: Lens' Ad (Maybe DimensionValue)
aAdvertiserIdDimensionValue
= lens _aAdvertiserIdDimensionValue
(\ s a -> s{_aAdvertiserIdDimensionValue = a})
aSSLCompliant :: Lens' Ad (Maybe Bool)
aSSLCompliant
= lens _aSSLCompliant
(\ s a -> s{_aSSLCompliant = a})
aCampaignId :: Lens' Ad (Maybe Int64)
aCampaignId
= lens _aCampaignId (\ s a -> s{_aCampaignId = a}) .
mapping _Coerce
aIdDimensionValue :: Lens' Ad (Maybe DimensionValue)
aIdDimensionValue
= lens _aIdDimensionValue
(\ s a -> s{_aIdDimensionValue = a})
aClickThroughURL :: Lens' Ad (Maybe ClickThroughURL)
aClickThroughURL
= lens _aClickThroughURL
(\ s a -> s{_aClickThroughURL = a})
aDeliverySchedule :: Lens' Ad (Maybe DeliverySchedule)
aDeliverySchedule
= lens _aDeliverySchedule
(\ s a -> s{_aDeliverySchedule = a})
aEventTagOverrides :: Lens' Ad [EventTagOverride]
aEventTagOverrides
= lens _aEventTagOverrides
(\ s a -> s{_aEventTagOverrides = a})
. _Default
. _Coerce
aActive :: Lens' Ad (Maybe Bool)
aActive = lens _aActive (\ s a -> s{_aActive = a})
aAccountId :: Lens' Ad (Maybe Int64)
aAccountId
= lens _aAccountId (\ s a -> s{_aAccountId = a}) .
mapping _Coerce
aName :: Lens' Ad (Maybe Text)
aName = lens _aName (\ s a -> s{_aName = a})
aKeyValueTargetingExpression :: Lens' Ad (Maybe KeyValueTargetingExpression)
aKeyValueTargetingExpression
= lens _aKeyValueTargetingExpression
(\ s a -> s{_aKeyValueTargetingExpression = a})
aEndTime :: Lens' Ad (Maybe UTCTime)
aEndTime
= lens _aEndTime (\ s a -> s{_aEndTime = a}) .
mapping _DateTime
aCreateInfo :: Lens' Ad (Maybe LastModifiedInfo)
aCreateInfo
= lens _aCreateInfo (\ s a -> s{_aCreateInfo = a})
aLastModifiedInfo :: Lens' Ad (Maybe LastModifiedInfo)
aLastModifiedInfo
= lens _aLastModifiedInfo
(\ s a -> s{_aLastModifiedInfo = a})
aId :: Lens' Ad (Maybe Int64)
aId
= lens _aId (\ s a -> s{_aId = a}) . mapping _Coerce
aSSLRequired :: Lens' Ad (Maybe Bool)
aSSLRequired
= lens _aSSLRequired (\ s a -> s{_aSSLRequired = a})
aComments :: Lens' Ad (Maybe Text)
aComments
= lens _aComments (\ s a -> s{_aComments = a})
aSubAccountId :: Lens' Ad (Maybe Int64)
aSubAccountId
= lens _aSubAccountId
(\ s a -> s{_aSubAccountId = a})
. mapping _Coerce
aType :: Lens' Ad (Maybe AdType)
aType = lens _aType (\ s a -> s{_aType = a})
aRemarketingListExpression :: Lens' Ad (Maybe ListTargetingExpression)
aRemarketingListExpression
= lens _aRemarketingListExpression
(\ s a -> s{_aRemarketingListExpression = a})
aDynamicClickTracker :: Lens' Ad (Maybe Bool)
aDynamicClickTracker
= lens _aDynamicClickTracker
(\ s a -> s{_aDynamicClickTracker = a})
aCompatibility :: Lens' Ad (Maybe AdCompatibility)
aCompatibility
= lens _aCompatibility
(\ s a -> s{_aCompatibility = a})
aArchived :: Lens' Ad (Maybe Bool)
aArchived
= lens _aArchived (\ s a -> s{_aArchived = a})
aDefaultClickThroughEventTagProperties :: Lens' Ad (Maybe DefaultClickThroughEventTagProperties)
aDefaultClickThroughEventTagProperties
= lens _aDefaultClickThroughEventTagProperties
(\ s a ->
s{_aDefaultClickThroughEventTagProperties = a})
aPlacementAssignments :: Lens' Ad [PlacementAssignment]
aPlacementAssignments
= lens _aPlacementAssignments
(\ s a -> s{_aPlacementAssignments = a})
. _Default
. _Coerce
instance FromJSON Ad where
parseJSON
= withObject "Ad"
(\ o ->
Ad <$>
(o .:? "creativeGroupAssignments" .!= mempty) <*>
(o .:? "geoTargeting")
<*> (o .:? "creativeRotation")
<*> (o .:? "technologyTargeting")
<*> (o .:? "audienceSegmentId")
<*> (o .:? "dayPartTargeting")
<*> (o .:? "size")
<*> (o .:? "startTime")
<*> (o .:? "kind" .!= "dfareporting#ad")
<*> (o .:? "clickThroughUrlSuffixProperties")
<*> (o .:? "campaignIdDimensionValue")
<*> (o .:? "advertiserId")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "sslCompliant")
<*> (o .:? "campaignId")
<*> (o .:? "idDimensionValue")
<*> (o .:? "clickThroughUrl")
<*> (o .:? "deliverySchedule")
<*> (o .:? "eventTagOverrides" .!= mempty)
<*> (o .:? "active")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "keyValueTargetingExpression")
<*> (o .:? "endTime")
<*> (o .:? "createInfo")
<*> (o .:? "lastModifiedInfo")
<*> (o .:? "id")
<*> (o .:? "sslRequired")
<*> (o .:? "comments")
<*> (o .:? "subaccountId")
<*> (o .:? "type")
<*> (o .:? "remarketingListExpression")
<*> (o .:? "dynamicClickTracker")
<*> (o .:? "compatibility")
<*> (o .:? "archived")
<*> (o .:? "defaultClickThroughEventTagProperties")
<*> (o .:? "placementAssignments" .!= mempty))
instance ToJSON Ad where
toJSON Ad{..}
= object
(catMaybes
[("creativeGroupAssignments" .=) <$>
_aCreativeGroupAssignments,
("geoTargeting" .=) <$> _aGeoTargeting,
("creativeRotation" .=) <$> _aCreativeRotation,
("technologyTargeting" .=) <$> _aTechnologyTargeting,
("audienceSegmentId" .=) <$> _aAudienceSegmentId,
("dayPartTargeting" .=) <$> _aDayPartTargeting,
("size" .=) <$> _aSize,
("startTime" .=) <$> _aStartTime,
Just ("kind" .= _aKind),
("clickThroughUrlSuffixProperties" .=) <$>
_aClickThroughURLSuffixProperties,
("campaignIdDimensionValue" .=) <$>
_aCampaignIdDimensionValue,
("advertiserId" .=) <$> _aAdvertiserId,
("advertiserIdDimensionValue" .=) <$>
_aAdvertiserIdDimensionValue,
("sslCompliant" .=) <$> _aSSLCompliant,
("campaignId" .=) <$> _aCampaignId,
("idDimensionValue" .=) <$> _aIdDimensionValue,
("clickThroughUrl" .=) <$> _aClickThroughURL,
("deliverySchedule" .=) <$> _aDeliverySchedule,
("eventTagOverrides" .=) <$> _aEventTagOverrides,
("active" .=) <$> _aActive,
("accountId" .=) <$> _aAccountId,
("name" .=) <$> _aName,
("keyValueTargetingExpression" .=) <$>
_aKeyValueTargetingExpression,
("endTime" .=) <$> _aEndTime,
("createInfo" .=) <$> _aCreateInfo,
("lastModifiedInfo" .=) <$> _aLastModifiedInfo,
("id" .=) <$> _aId,
("sslRequired" .=) <$> _aSSLRequired,
("comments" .=) <$> _aComments,
("subaccountId" .=) <$> _aSubAccountId,
("type" .=) <$> _aType,
("remarketingListExpression" .=) <$>
_aRemarketingListExpression,
("dynamicClickTracker" .=) <$> _aDynamicClickTracker,
("compatibility" .=) <$> _aCompatibility,
("archived" .=) <$> _aArchived,
("defaultClickThroughEventTagProperties" .=) <$>
_aDefaultClickThroughEventTagProperties,
("placementAssignments" .=) <$>
_aPlacementAssignments])
data Project = Project
{ _pTargetClicks :: !(Maybe (Textual Int64))
, _pClientBillingCode :: !(Maybe Text)
, _pTargetCpmNanos :: !(Maybe (Textual Int64))
, _pTargetConversions :: !(Maybe (Textual Int64))
, _pBudget :: !(Maybe (Textual Int64))
, _pKind :: !Text
, _pAdvertiserId :: !(Maybe (Textual Int64))
, _pEndDate :: !(Maybe Date')
, _pOverview :: !(Maybe Text)
, _pTargetImpressions :: !(Maybe (Textual Int64))
, _pStartDate :: !(Maybe Date')
, _pTargetCpcNanos :: !(Maybe (Textual Int64))
, _pAccountId :: !(Maybe (Textual Int64))
, _pName :: !(Maybe Text)
, _pLastModifiedInfo :: !(Maybe LastModifiedInfo)
, _pId :: !(Maybe (Textual Int64))
, _pAudienceAgeGroup :: !(Maybe ProjectAudienceAgeGroup)
, _pSubAccountId :: !(Maybe (Textual Int64))
, _pAudienceGender :: !(Maybe ProjectAudienceGender)
, _pClientName :: !(Maybe Text)
, _pTargetCpaNanos :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
project
:: Project
project =
Project
{ _pTargetClicks = Nothing
, _pClientBillingCode = Nothing
, _pTargetCpmNanos = Nothing
, _pTargetConversions = Nothing
, _pBudget = Nothing
, _pKind = "dfareporting#project"
, _pAdvertiserId = Nothing
, _pEndDate = Nothing
, _pOverview = Nothing
, _pTargetImpressions = Nothing
, _pStartDate = Nothing
, _pTargetCpcNanos = Nothing
, _pAccountId = Nothing
, _pName = Nothing
, _pLastModifiedInfo = Nothing
, _pId = Nothing
, _pAudienceAgeGroup = Nothing
, _pSubAccountId = Nothing
, _pAudienceGender = Nothing
, _pClientName = Nothing
, _pTargetCpaNanos = Nothing
}
pTargetClicks :: Lens' Project (Maybe Int64)
pTargetClicks
= lens _pTargetClicks
(\ s a -> s{_pTargetClicks = a})
. mapping _Coerce
pClientBillingCode :: Lens' Project (Maybe Text)
pClientBillingCode
= lens _pClientBillingCode
(\ s a -> s{_pClientBillingCode = a})
pTargetCpmNanos :: Lens' Project (Maybe Int64)
pTargetCpmNanos
= lens _pTargetCpmNanos
(\ s a -> s{_pTargetCpmNanos = a})
. mapping _Coerce
pTargetConversions :: Lens' Project (Maybe Int64)
pTargetConversions
= lens _pTargetConversions
(\ s a -> s{_pTargetConversions = a})
. mapping _Coerce
pBudget :: Lens' Project (Maybe Int64)
pBudget
= lens _pBudget (\ s a -> s{_pBudget = a}) .
mapping _Coerce
pKind :: Lens' Project Text
pKind = lens _pKind (\ s a -> s{_pKind = a})
pAdvertiserId :: Lens' Project (Maybe Int64)
pAdvertiserId
= lens _pAdvertiserId
(\ s a -> s{_pAdvertiserId = a})
. mapping _Coerce
pEndDate :: Lens' Project (Maybe Day)
pEndDate
= lens _pEndDate (\ s a -> s{_pEndDate = a}) .
mapping _Date
pOverview :: Lens' Project (Maybe Text)
pOverview
= lens _pOverview (\ s a -> s{_pOverview = a})
pTargetImpressions :: Lens' Project (Maybe Int64)
pTargetImpressions
= lens _pTargetImpressions
(\ s a -> s{_pTargetImpressions = a})
. mapping _Coerce
pStartDate :: Lens' Project (Maybe Day)
pStartDate
= lens _pStartDate (\ s a -> s{_pStartDate = a}) .
mapping _Date
pTargetCpcNanos :: Lens' Project (Maybe Int64)
pTargetCpcNanos
= lens _pTargetCpcNanos
(\ s a -> s{_pTargetCpcNanos = a})
. mapping _Coerce
pAccountId :: Lens' Project (Maybe Int64)
pAccountId
= lens _pAccountId (\ s a -> s{_pAccountId = a}) .
mapping _Coerce
pName :: Lens' Project (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a})
pLastModifiedInfo :: Lens' Project (Maybe LastModifiedInfo)
pLastModifiedInfo
= lens _pLastModifiedInfo
(\ s a -> s{_pLastModifiedInfo = a})
pId :: Lens' Project (Maybe Int64)
pId
= lens _pId (\ s a -> s{_pId = a}) . mapping _Coerce
pAudienceAgeGroup :: Lens' Project (Maybe ProjectAudienceAgeGroup)
pAudienceAgeGroup
= lens _pAudienceAgeGroup
(\ s a -> s{_pAudienceAgeGroup = a})
pSubAccountId :: Lens' Project (Maybe Int64)
pSubAccountId
= lens _pSubAccountId
(\ s a -> s{_pSubAccountId = a})
. mapping _Coerce
pAudienceGender :: Lens' Project (Maybe ProjectAudienceGender)
pAudienceGender
= lens _pAudienceGender
(\ s a -> s{_pAudienceGender = a})
pClientName :: Lens' Project (Maybe Text)
pClientName
= lens _pClientName (\ s a -> s{_pClientName = a})
pTargetCpaNanos :: Lens' Project (Maybe Int64)
pTargetCpaNanos
= lens _pTargetCpaNanos
(\ s a -> s{_pTargetCpaNanos = a})
. mapping _Coerce
instance FromJSON Project where
parseJSON
= withObject "Project"
(\ o ->
Project <$>
(o .:? "targetClicks") <*>
(o .:? "clientBillingCode")
<*> (o .:? "targetCpmNanos")
<*> (o .:? "targetConversions")
<*> (o .:? "budget")
<*> (o .:? "kind" .!= "dfareporting#project")
<*> (o .:? "advertiserId")
<*> (o .:? "endDate")
<*> (o .:? "overview")
<*> (o .:? "targetImpressions")
<*> (o .:? "startDate")
<*> (o .:? "targetCpcNanos")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "lastModifiedInfo")
<*> (o .:? "id")
<*> (o .:? "audienceAgeGroup")
<*> (o .:? "subaccountId")
<*> (o .:? "audienceGender")
<*> (o .:? "clientName")
<*> (o .:? "targetCpaNanos"))
instance ToJSON Project where
toJSON Project{..}
= object
(catMaybes
[("targetClicks" .=) <$> _pTargetClicks,
("clientBillingCode" .=) <$> _pClientBillingCode,
("targetCpmNanos" .=) <$> _pTargetCpmNanos,
("targetConversions" .=) <$> _pTargetConversions,
("budget" .=) <$> _pBudget, Just ("kind" .= _pKind),
("advertiserId" .=) <$> _pAdvertiserId,
("endDate" .=) <$> _pEndDate,
("overview" .=) <$> _pOverview,
("targetImpressions" .=) <$> _pTargetImpressions,
("startDate" .=) <$> _pStartDate,
("targetCpcNanos" .=) <$> _pTargetCpcNanos,
("accountId" .=) <$> _pAccountId,
("name" .=) <$> _pName,
("lastModifiedInfo" .=) <$> _pLastModifiedInfo,
("id" .=) <$> _pId,
("audienceAgeGroup" .=) <$> _pAudienceAgeGroup,
("subaccountId" .=) <$> _pSubAccountId,
("audienceGender" .=) <$> _pAudienceGender,
("clientName" .=) <$> _pClientName,
("targetCpaNanos" .=) <$> _pTargetCpaNanos])
data ReportFloodlightCriteria = ReportFloodlightCriteria
{ _rfcReportProperties :: !(Maybe ReportFloodlightCriteriaReportProperties)
, _rfcMetricNames :: !(Maybe [Text])
, _rfcCustomRichMediaEvents :: !(Maybe [DimensionValue])
, _rfcDimensionFilters :: !(Maybe [DimensionValue])
, _rfcDateRange :: !(Maybe DateRange)
, _rfcFloodlightConfigId :: !(Maybe DimensionValue)
, _rfcDimensions :: !(Maybe [SortedDimension])
} deriving (Eq,Show,Data,Typeable,Generic)
reportFloodlightCriteria
:: ReportFloodlightCriteria
reportFloodlightCriteria =
ReportFloodlightCriteria
{ _rfcReportProperties = Nothing
, _rfcMetricNames = Nothing
, _rfcCustomRichMediaEvents = Nothing
, _rfcDimensionFilters = Nothing
, _rfcDateRange = Nothing
, _rfcFloodlightConfigId = Nothing
, _rfcDimensions = Nothing
}
rfcReportProperties :: Lens' ReportFloodlightCriteria (Maybe ReportFloodlightCriteriaReportProperties)
rfcReportProperties
= lens _rfcReportProperties
(\ s a -> s{_rfcReportProperties = a})
rfcMetricNames :: Lens' ReportFloodlightCriteria [Text]
rfcMetricNames
= lens _rfcMetricNames
(\ s a -> s{_rfcMetricNames = a})
. _Default
. _Coerce
rfcCustomRichMediaEvents :: Lens' ReportFloodlightCriteria [DimensionValue]
rfcCustomRichMediaEvents
= lens _rfcCustomRichMediaEvents
(\ s a -> s{_rfcCustomRichMediaEvents = a})
. _Default
. _Coerce
rfcDimensionFilters :: Lens' ReportFloodlightCriteria [DimensionValue]
rfcDimensionFilters
= lens _rfcDimensionFilters
(\ s a -> s{_rfcDimensionFilters = a})
. _Default
. _Coerce
rfcDateRange :: Lens' ReportFloodlightCriteria (Maybe DateRange)
rfcDateRange
= lens _rfcDateRange (\ s a -> s{_rfcDateRange = a})
rfcFloodlightConfigId :: Lens' ReportFloodlightCriteria (Maybe DimensionValue)
rfcFloodlightConfigId
= lens _rfcFloodlightConfigId
(\ s a -> s{_rfcFloodlightConfigId = a})
rfcDimensions :: Lens' ReportFloodlightCriteria [SortedDimension]
rfcDimensions
= lens _rfcDimensions
(\ s a -> s{_rfcDimensions = a})
. _Default
. _Coerce
instance FromJSON ReportFloodlightCriteria where
parseJSON
= withObject "ReportFloodlightCriteria"
(\ o ->
ReportFloodlightCriteria <$>
(o .:? "reportProperties") <*>
(o .:? "metricNames" .!= mempty)
<*> (o .:? "customRichMediaEvents" .!= mempty)
<*> (o .:? "dimensionFilters" .!= mempty)
<*> (o .:? "dateRange")
<*> (o .:? "floodlightConfigId")
<*> (o .:? "dimensions" .!= mempty))
instance ToJSON ReportFloodlightCriteria where
toJSON ReportFloodlightCriteria{..}
= object
(catMaybes
[("reportProperties" .=) <$> _rfcReportProperties,
("metricNames" .=) <$> _rfcMetricNames,
("customRichMediaEvents" .=) <$>
_rfcCustomRichMediaEvents,
("dimensionFilters" .=) <$> _rfcDimensionFilters,
("dateRange" .=) <$> _rfcDateRange,
("floodlightConfigId" .=) <$> _rfcFloodlightConfigId,
("dimensions" .=) <$> _rfcDimensions])
data Size = Size
{ _sHeight :: !(Maybe (Textual Int32))
, _sKind :: !Text
, _sWidth :: !(Maybe (Textual Int32))
, _sIab :: !(Maybe Bool)
, _sId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
size
:: Size
size =
Size
{ _sHeight = Nothing
, _sKind = "dfareporting#size"
, _sWidth = Nothing
, _sIab = Nothing
, _sId = Nothing
}
sHeight :: Lens' Size (Maybe Int32)
sHeight
= lens _sHeight (\ s a -> s{_sHeight = a}) .
mapping _Coerce
sKind :: Lens' Size Text
sKind = lens _sKind (\ s a -> s{_sKind = a})
sWidth :: Lens' Size (Maybe Int32)
sWidth
= lens _sWidth (\ s a -> s{_sWidth = a}) .
mapping _Coerce
sIab :: Lens' Size (Maybe Bool)
sIab = lens _sIab (\ s a -> s{_sIab = a})
sId :: Lens' Size (Maybe Int64)
sId
= lens _sId (\ s a -> s{_sId = a}) . mapping _Coerce
instance FromJSON Size where
parseJSON
= withObject "Size"
(\ o ->
Size <$>
(o .:? "height") <*>
(o .:? "kind" .!= "dfareporting#size")
<*> (o .:? "width")
<*> (o .:? "iab")
<*> (o .:? "id"))
instance ToJSON Size where
toJSON Size{..}
= object
(catMaybes
[("height" .=) <$> _sHeight, Just ("kind" .= _sKind),
("width" .=) <$> _sWidth, ("iab" .=) <$> _sIab,
("id" .=) <$> _sId])
data ObjectFilter = ObjectFilter
{ _ofStatus :: !(Maybe ObjectFilterStatus)
, _ofKind :: !Text
, _ofObjectIds :: !(Maybe [Textual Int64])
} deriving (Eq,Show,Data,Typeable,Generic)
objectFilter
:: ObjectFilter
objectFilter =
ObjectFilter
{ _ofStatus = Nothing
, _ofKind = "dfareporting#objectFilter"
, _ofObjectIds = Nothing
}
ofStatus :: Lens' ObjectFilter (Maybe ObjectFilterStatus)
ofStatus = lens _ofStatus (\ s a -> s{_ofStatus = a})
ofKind :: Lens' ObjectFilter Text
ofKind = lens _ofKind (\ s a -> s{_ofKind = a})
ofObjectIds :: Lens' ObjectFilter [Int64]
ofObjectIds
= lens _ofObjectIds (\ s a -> s{_ofObjectIds = a}) .
_Default
. _Coerce
instance FromJSON ObjectFilter where
parseJSON
= withObject "ObjectFilter"
(\ o ->
ObjectFilter <$>
(o .:? "status") <*>
(o .:? "kind" .!= "dfareporting#objectFilter")
<*> (o .:? "objectIds" .!= mempty))
instance ToJSON ObjectFilter where
toJSON ObjectFilter{..}
= object
(catMaybes
[("status" .=) <$> _ofStatus,
Just ("kind" .= _ofKind),
("objectIds" .=) <$> _ofObjectIds])
data ReportsConfiguration = ReportsConfiguration
{ _rcExposureToConversionEnabled :: !(Maybe Bool)
, _rcReportGenerationTimeZoneId :: !(Maybe (Textual Int64))
, _rcLookbackConfiguration :: !(Maybe LookbackConfiguration)
} deriving (Eq,Show,Data,Typeable,Generic)
reportsConfiguration
:: ReportsConfiguration
reportsConfiguration =
ReportsConfiguration
{ _rcExposureToConversionEnabled = Nothing
, _rcReportGenerationTimeZoneId = Nothing
, _rcLookbackConfiguration = Nothing
}
rcExposureToConversionEnabled :: Lens' ReportsConfiguration (Maybe Bool)
rcExposureToConversionEnabled
= lens _rcExposureToConversionEnabled
(\ s a -> s{_rcExposureToConversionEnabled = a})
rcReportGenerationTimeZoneId :: Lens' ReportsConfiguration (Maybe Int64)
rcReportGenerationTimeZoneId
= lens _rcReportGenerationTimeZoneId
(\ s a -> s{_rcReportGenerationTimeZoneId = a})
. mapping _Coerce
rcLookbackConfiguration :: Lens' ReportsConfiguration (Maybe LookbackConfiguration)
rcLookbackConfiguration
= lens _rcLookbackConfiguration
(\ s a -> s{_rcLookbackConfiguration = a})
instance FromJSON ReportsConfiguration where
parseJSON
= withObject "ReportsConfiguration"
(\ o ->
ReportsConfiguration <$>
(o .:? "exposureToConversionEnabled") <*>
(o .:? "reportGenerationTimeZoneId")
<*> (o .:? "lookbackConfiguration"))
instance ToJSON ReportsConfiguration where
toJSON ReportsConfiguration{..}
= object
(catMaybes
[("exposureToConversionEnabled" .=) <$>
_rcExposureToConversionEnabled,
("reportGenerationTimeZoneId" .=) <$>
_rcReportGenerationTimeZoneId,
("lookbackConfiguration" .=) <$>
_rcLookbackConfiguration])
data PricingSchedule = PricingSchedule
{ _psTestingStartDate :: !(Maybe Date')
, _psFloodlightActivityId :: !(Maybe (Textual Int64))
, _psEndDate :: !(Maybe Date')
, _psDisregardOverdelivery :: !(Maybe Bool)
, _psStartDate :: !(Maybe Date')
, _psCapCostOption :: !(Maybe PricingScheduleCapCostOption)
, _psPricingType :: !(Maybe PricingSchedulePricingType)
, _psPricingPeriods :: !(Maybe [PricingSchedulePricingPeriod])
, _psFlighted :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
pricingSchedule
:: PricingSchedule
pricingSchedule =
PricingSchedule
{ _psTestingStartDate = Nothing
, _psFloodlightActivityId = Nothing
, _psEndDate = Nothing
, _psDisregardOverdelivery = Nothing
, _psStartDate = Nothing
, _psCapCostOption = Nothing
, _psPricingType = Nothing
, _psPricingPeriods = Nothing
, _psFlighted = Nothing
}
psTestingStartDate :: Lens' PricingSchedule (Maybe Day)
psTestingStartDate
= lens _psTestingStartDate
(\ s a -> s{_psTestingStartDate = a})
. mapping _Date
psFloodlightActivityId :: Lens' PricingSchedule (Maybe Int64)
psFloodlightActivityId
= lens _psFloodlightActivityId
(\ s a -> s{_psFloodlightActivityId = a})
. mapping _Coerce
psEndDate :: Lens' PricingSchedule (Maybe Day)
psEndDate
= lens _psEndDate (\ s a -> s{_psEndDate = a}) .
mapping _Date
psDisregardOverdelivery :: Lens' PricingSchedule (Maybe Bool)
psDisregardOverdelivery
= lens _psDisregardOverdelivery
(\ s a -> s{_psDisregardOverdelivery = a})
psStartDate :: Lens' PricingSchedule (Maybe Day)
psStartDate
= lens _psStartDate (\ s a -> s{_psStartDate = a}) .
mapping _Date
psCapCostOption :: Lens' PricingSchedule (Maybe PricingScheduleCapCostOption)
psCapCostOption
= lens _psCapCostOption
(\ s a -> s{_psCapCostOption = a})
psPricingType :: Lens' PricingSchedule (Maybe PricingSchedulePricingType)
psPricingType
= lens _psPricingType
(\ s a -> s{_psPricingType = a})
psPricingPeriods :: Lens' PricingSchedule [PricingSchedulePricingPeriod]
psPricingPeriods
= lens _psPricingPeriods
(\ s a -> s{_psPricingPeriods = a})
. _Default
. _Coerce
psFlighted :: Lens' PricingSchedule (Maybe Bool)
psFlighted
= lens _psFlighted (\ s a -> s{_psFlighted = a})
instance FromJSON PricingSchedule where
parseJSON
= withObject "PricingSchedule"
(\ o ->
PricingSchedule <$>
(o .:? "testingStartDate") <*>
(o .:? "floodlightActivityId")
<*> (o .:? "endDate")
<*> (o .:? "disregardOverdelivery")
<*> (o .:? "startDate")
<*> (o .:? "capCostOption")
<*> (o .:? "pricingType")
<*> (o .:? "pricingPeriods" .!= mempty)
<*> (o .:? "flighted"))
instance ToJSON PricingSchedule where
toJSON PricingSchedule{..}
= object
(catMaybes
[("testingStartDate" .=) <$> _psTestingStartDate,
("floodlightActivityId" .=) <$>
_psFloodlightActivityId,
("endDate" .=) <$> _psEndDate,
("disregardOverdelivery" .=) <$>
_psDisregardOverdelivery,
("startDate" .=) <$> _psStartDate,
("capCostOption" .=) <$> _psCapCostOption,
("pricingType" .=) <$> _psPricingType,
("pricingPeriods" .=) <$> _psPricingPeriods,
("flighted" .=) <$> _psFlighted])
data PostalCode = PostalCode
{ _pcKind :: !Text
, _pcCode :: !(Maybe Text)
, _pcCountryCode :: !(Maybe Text)
, _pcId :: !(Maybe Text)
, _pcCountryDartId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
postalCode
:: PostalCode
postalCode =
PostalCode
{ _pcKind = "dfareporting#postalCode"
, _pcCode = Nothing
, _pcCountryCode = Nothing
, _pcId = Nothing
, _pcCountryDartId = Nothing
}
pcKind :: Lens' PostalCode Text
pcKind = lens _pcKind (\ s a -> s{_pcKind = a})
pcCode :: Lens' PostalCode (Maybe Text)
pcCode = lens _pcCode (\ s a -> s{_pcCode = a})
pcCountryCode :: Lens' PostalCode (Maybe Text)
pcCountryCode
= lens _pcCountryCode
(\ s a -> s{_pcCountryCode = a})
pcId :: Lens' PostalCode (Maybe Text)
pcId = lens _pcId (\ s a -> s{_pcId = a})
pcCountryDartId :: Lens' PostalCode (Maybe Int64)
pcCountryDartId
= lens _pcCountryDartId
(\ s a -> s{_pcCountryDartId = a})
. mapping _Coerce
instance FromJSON PostalCode where
parseJSON
= withObject "PostalCode"
(\ o ->
PostalCode <$>
(o .:? "kind" .!= "dfareporting#postalCode") <*>
(o .:? "code")
<*> (o .:? "countryCode")
<*> (o .:? "id")
<*> (o .:? "countryDartId"))
instance ToJSON PostalCode where
toJSON PostalCode{..}
= object
(catMaybes
[Just ("kind" .= _pcKind), ("code" .=) <$> _pcCode,
("countryCode" .=) <$> _pcCountryCode,
("id" .=) <$> _pcId,
("countryDartId" .=) <$> _pcCountryDartId])
data AccountPermissionsListResponse = AccountPermissionsListResponse
{ _aplrKind :: !Text
, _aplrAccountPermissions :: !(Maybe [AccountPermission])
} deriving (Eq,Show,Data,Typeable,Generic)
accountPermissionsListResponse
:: AccountPermissionsListResponse
accountPermissionsListResponse =
AccountPermissionsListResponse
{ _aplrKind = "dfareporting#accountPermissionsListResponse"
, _aplrAccountPermissions = Nothing
}
aplrKind :: Lens' AccountPermissionsListResponse Text
aplrKind = lens _aplrKind (\ s a -> s{_aplrKind = a})
aplrAccountPermissions :: Lens' AccountPermissionsListResponse [AccountPermission]
aplrAccountPermissions
= lens _aplrAccountPermissions
(\ s a -> s{_aplrAccountPermissions = a})
. _Default
. _Coerce
instance FromJSON AccountPermissionsListResponse
where
parseJSON
= withObject "AccountPermissionsListResponse"
(\ o ->
AccountPermissionsListResponse <$>
(o .:? "kind" .!=
"dfareporting#accountPermissionsListResponse")
<*> (o .:? "accountPermissions" .!= mempty))
instance ToJSON AccountPermissionsListResponse where
toJSON AccountPermissionsListResponse{..}
= object
(catMaybes
[Just ("kind" .= _aplrKind),
("accountPermissions" .=) <$>
_aplrAccountPermissions])
data Country = Country
{ _cKind :: !Text
, _cName :: !(Maybe Text)
, _cCountryCode :: !(Maybe Text)
, _cDartId :: !(Maybe (Textual Int64))
, _cSSLEnabled :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
country
:: Country
country =
Country
{ _cKind = "dfareporting#country"
, _cName = Nothing
, _cCountryCode = Nothing
, _cDartId = Nothing
, _cSSLEnabled = Nothing
}
cKind :: Lens' Country Text
cKind = lens _cKind (\ s a -> s{_cKind = a})
cName :: Lens' Country (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cCountryCode :: Lens' Country (Maybe Text)
cCountryCode
= lens _cCountryCode (\ s a -> s{_cCountryCode = a})
cDartId :: Lens' Country (Maybe Int64)
cDartId
= lens _cDartId (\ s a -> s{_cDartId = a}) .
mapping _Coerce
cSSLEnabled :: Lens' Country (Maybe Bool)
cSSLEnabled
= lens _cSSLEnabled (\ s a -> s{_cSSLEnabled = a})
instance FromJSON Country where
parseJSON
= withObject "Country"
(\ o ->
Country <$>
(o .:? "kind" .!= "dfareporting#country") <*>
(o .:? "name")
<*> (o .:? "countryCode")
<*> (o .:? "dartId")
<*> (o .:? "sslEnabled"))
instance ToJSON Country where
toJSON Country{..}
= object
(catMaybes
[Just ("kind" .= _cKind), ("name" .=) <$> _cName,
("countryCode" .=) <$> _cCountryCode,
("dartId" .=) <$> _cDartId,
("sslEnabled" .=) <$> _cSSLEnabled])
data OperatingSystemVersionsListResponse = OperatingSystemVersionsListResponse
{ _osvlrKind :: !Text
, _osvlrOperatingSystemVersions :: !(Maybe [OperatingSystemVersion])
} deriving (Eq,Show,Data,Typeable,Generic)
operatingSystemVersionsListResponse
:: OperatingSystemVersionsListResponse
operatingSystemVersionsListResponse =
OperatingSystemVersionsListResponse
{ _osvlrKind = "dfareporting#operatingSystemVersionsListResponse"
, _osvlrOperatingSystemVersions = Nothing
}
osvlrKind :: Lens' OperatingSystemVersionsListResponse Text
osvlrKind
= lens _osvlrKind (\ s a -> s{_osvlrKind = a})
osvlrOperatingSystemVersions :: Lens' OperatingSystemVersionsListResponse [OperatingSystemVersion]
osvlrOperatingSystemVersions
= lens _osvlrOperatingSystemVersions
(\ s a -> s{_osvlrOperatingSystemVersions = a})
. _Default
. _Coerce
instance FromJSON OperatingSystemVersionsListResponse
where
parseJSON
= withObject "OperatingSystemVersionsListResponse"
(\ o ->
OperatingSystemVersionsListResponse <$>
(o .:? "kind" .!=
"dfareporting#operatingSystemVersionsListResponse")
<*> (o .:? "operatingSystemVersions" .!= mempty))
instance ToJSON OperatingSystemVersionsListResponse
where
toJSON OperatingSystemVersionsListResponse{..}
= object
(catMaybes
[Just ("kind" .= _osvlrKind),
("operatingSystemVersions" .=) <$>
_osvlrOperatingSystemVersions])
data ClickThroughURLSuffixProperties = ClickThroughURLSuffixProperties
{ _ctuspOverrideInheritedSuffix :: !(Maybe Bool)
, _ctuspClickThroughURLSuffix :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clickThroughURLSuffixProperties
:: ClickThroughURLSuffixProperties
clickThroughURLSuffixProperties =
ClickThroughURLSuffixProperties
{ _ctuspOverrideInheritedSuffix = Nothing
, _ctuspClickThroughURLSuffix = Nothing
}
ctuspOverrideInheritedSuffix :: Lens' ClickThroughURLSuffixProperties (Maybe Bool)
ctuspOverrideInheritedSuffix
= lens _ctuspOverrideInheritedSuffix
(\ s a -> s{_ctuspOverrideInheritedSuffix = a})
ctuspClickThroughURLSuffix :: Lens' ClickThroughURLSuffixProperties (Maybe Text)
ctuspClickThroughURLSuffix
= lens _ctuspClickThroughURLSuffix
(\ s a -> s{_ctuspClickThroughURLSuffix = a})
instance FromJSON ClickThroughURLSuffixProperties
where
parseJSON
= withObject "ClickThroughURLSuffixProperties"
(\ o ->
ClickThroughURLSuffixProperties <$>
(o .:? "overrideInheritedSuffix") <*>
(o .:? "clickThroughUrlSuffix"))
instance ToJSON ClickThroughURLSuffixProperties where
toJSON ClickThroughURLSuffixProperties{..}
= object
(catMaybes
[("overrideInheritedSuffix" .=) <$>
_ctuspOverrideInheritedSuffix,
("clickThroughUrlSuffix" .=) <$>
_ctuspClickThroughURLSuffix])
data Pricing = Pricing
{ _priEndDate :: !(Maybe Date')
, _priStartDate :: !(Maybe Date')
, _priGroupType :: !(Maybe PricingGroupType)
, _priPricingType :: !(Maybe PricingPricingType)
, _priFlights :: !(Maybe [Flight])
, _priCapCostType :: !(Maybe PricingCapCostType)
} deriving (Eq,Show,Data,Typeable,Generic)
pricing
:: Pricing
pricing =
Pricing
{ _priEndDate = Nothing
, _priStartDate = Nothing
, _priGroupType = Nothing
, _priPricingType = Nothing
, _priFlights = Nothing
, _priCapCostType = Nothing
}
priEndDate :: Lens' Pricing (Maybe Day)
priEndDate
= lens _priEndDate (\ s a -> s{_priEndDate = a}) .
mapping _Date
priStartDate :: Lens' Pricing (Maybe Day)
priStartDate
= lens _priStartDate (\ s a -> s{_priStartDate = a})
. mapping _Date
priGroupType :: Lens' Pricing (Maybe PricingGroupType)
priGroupType
= lens _priGroupType (\ s a -> s{_priGroupType = a})
priPricingType :: Lens' Pricing (Maybe PricingPricingType)
priPricingType
= lens _priPricingType
(\ s a -> s{_priPricingType = a})
priFlights :: Lens' Pricing [Flight]
priFlights
= lens _priFlights (\ s a -> s{_priFlights = a}) .
_Default
. _Coerce
priCapCostType :: Lens' Pricing (Maybe PricingCapCostType)
priCapCostType
= lens _priCapCostType
(\ s a -> s{_priCapCostType = a})
instance FromJSON Pricing where
parseJSON
= withObject "Pricing"
(\ o ->
Pricing <$>
(o .:? "endDate") <*> (o .:? "startDate") <*>
(o .:? "groupType")
<*> (o .:? "pricingType")
<*> (o .:? "flights" .!= mempty)
<*> (o .:? "capCostType"))
instance ToJSON Pricing where
toJSON Pricing{..}
= object
(catMaybes
[("endDate" .=) <$> _priEndDate,
("startDate" .=) <$> _priStartDate,
("groupType" .=) <$> _priGroupType,
("pricingType" .=) <$> _priPricingType,
("flights" .=) <$> _priFlights,
("capCostType" .=) <$> _priCapCostType])
data AudienceSegmentGroup = AudienceSegmentGroup
{ _asgAudienceSegments :: !(Maybe [AudienceSegment])
, _asgName :: !(Maybe Text)
, _asgId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
audienceSegmentGroup
:: AudienceSegmentGroup
audienceSegmentGroup =
AudienceSegmentGroup
{ _asgAudienceSegments = Nothing
, _asgName = Nothing
, _asgId = Nothing
}
asgAudienceSegments :: Lens' AudienceSegmentGroup [AudienceSegment]
asgAudienceSegments
= lens _asgAudienceSegments
(\ s a -> s{_asgAudienceSegments = a})
. _Default
. _Coerce
asgName :: Lens' AudienceSegmentGroup (Maybe Text)
asgName = lens _asgName (\ s a -> s{_asgName = a})
asgId :: Lens' AudienceSegmentGroup (Maybe Int64)
asgId
= lens _asgId (\ s a -> s{_asgId = a}) .
mapping _Coerce
instance FromJSON AudienceSegmentGroup where
parseJSON
= withObject "AudienceSegmentGroup"
(\ o ->
AudienceSegmentGroup <$>
(o .:? "audienceSegments" .!= mempty) <*>
(o .:? "name")
<*> (o .:? "id"))
instance ToJSON AudienceSegmentGroup where
toJSON AudienceSegmentGroup{..}
= object
(catMaybes
[("audienceSegments" .=) <$> _asgAudienceSegments,
("name" .=) <$> _asgName, ("id" .=) <$> _asgId])
data OperatingSystem = OperatingSystem
{ _osDesktop :: !(Maybe Bool)
, _osKind :: !Text
, _osName :: !(Maybe Text)
, _osMobile :: !(Maybe Bool)
, _osDartId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
operatingSystem
:: OperatingSystem
operatingSystem =
OperatingSystem
{ _osDesktop = Nothing
, _osKind = "dfareporting#operatingSystem"
, _osName = Nothing
, _osMobile = Nothing
, _osDartId = Nothing
}
osDesktop :: Lens' OperatingSystem (Maybe Bool)
osDesktop
= lens _osDesktop (\ s a -> s{_osDesktop = a})
osKind :: Lens' OperatingSystem Text
osKind = lens _osKind (\ s a -> s{_osKind = a})
osName :: Lens' OperatingSystem (Maybe Text)
osName = lens _osName (\ s a -> s{_osName = a})
osMobile :: Lens' OperatingSystem (Maybe Bool)
osMobile = lens _osMobile (\ s a -> s{_osMobile = a})
osDartId :: Lens' OperatingSystem (Maybe Int64)
osDartId
= lens _osDartId (\ s a -> s{_osDartId = a}) .
mapping _Coerce
instance FromJSON OperatingSystem where
parseJSON
= withObject "OperatingSystem"
(\ o ->
OperatingSystem <$>
(o .:? "desktop") <*>
(o .:? "kind" .!= "dfareporting#operatingSystem")
<*> (o .:? "name")
<*> (o .:? "mobile")
<*> (o .:? "dartId"))
instance ToJSON OperatingSystem where
toJSON OperatingSystem{..}
= object
(catMaybes
[("desktop" .=) <$> _osDesktop,
Just ("kind" .= _osKind), ("name" .=) <$> _osName,
("mobile" .=) <$> _osMobile,
("dartId" .=) <$> _osDartId])
data Flight = Flight
{ _fRateOrCost :: !(Maybe (Textual Int64))
, _fEndDate :: !(Maybe Date')
, _fStartDate :: !(Maybe Date')
, _fUnits :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
flight
:: Flight
flight =
Flight
{ _fRateOrCost = Nothing
, _fEndDate = Nothing
, _fStartDate = Nothing
, _fUnits = Nothing
}
fRateOrCost :: Lens' Flight (Maybe Int64)
fRateOrCost
= lens _fRateOrCost (\ s a -> s{_fRateOrCost = a}) .
mapping _Coerce
fEndDate :: Lens' Flight (Maybe Day)
fEndDate
= lens _fEndDate (\ s a -> s{_fEndDate = a}) .
mapping _Date
fStartDate :: Lens' Flight (Maybe Day)
fStartDate
= lens _fStartDate (\ s a -> s{_fStartDate = a}) .
mapping _Date
fUnits :: Lens' Flight (Maybe Int64)
fUnits
= lens _fUnits (\ s a -> s{_fUnits = a}) .
mapping _Coerce
instance FromJSON Flight where
parseJSON
= withObject "Flight"
(\ o ->
Flight <$>
(o .:? "rateOrCost") <*> (o .:? "endDate") <*>
(o .:? "startDate")
<*> (o .:? "units"))
instance ToJSON Flight where
toJSON Flight{..}
= object
(catMaybes
[("rateOrCost" .=) <$> _fRateOrCost,
("endDate" .=) <$> _fEndDate,
("startDate" .=) <$> _fStartDate,
("units" .=) <$> _fUnits])
data CitiesListResponse = CitiesListResponse
{ _citKind :: !Text
, _citCities :: !(Maybe [City])
} deriving (Eq,Show,Data,Typeable,Generic)
citiesListResponse
:: CitiesListResponse
citiesListResponse =
CitiesListResponse
{ _citKind = "dfareporting#citiesListResponse"
, _citCities = Nothing
}
citKind :: Lens' CitiesListResponse Text
citKind = lens _citKind (\ s a -> s{_citKind = a})
citCities :: Lens' CitiesListResponse [City]
citCities
= lens _citCities (\ s a -> s{_citCities = a}) .
_Default
. _Coerce
instance FromJSON CitiesListResponse where
parseJSON
= withObject "CitiesListResponse"
(\ o ->
CitiesListResponse <$>
(o .:? "kind" .!= "dfareporting#citiesListResponse")
<*> (o .:? "cities" .!= mempty))
instance ToJSON CitiesListResponse where
toJSON CitiesListResponse{..}
= object
(catMaybes
[Just ("kind" .= _citKind),
("cities" .=) <$> _citCities])
data Dimension = Dimension
{ _dKind :: !Text
, _dName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dimension
:: Dimension
dimension =
Dimension
{ _dKind = "dfareporting#dimension"
, _dName = Nothing
}
dKind :: Lens' Dimension Text
dKind = lens _dKind (\ s a -> s{_dKind = a})
dName :: Lens' Dimension (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a})
instance FromJSON Dimension where
parseJSON
= withObject "Dimension"
(\ o ->
Dimension <$>
(o .:? "kind" .!= "dfareporting#dimension") <*>
(o .:? "name"))
instance ToJSON Dimension where
toJSON Dimension{..}
= object
(catMaybes
[Just ("kind" .= _dKind), ("name" .=) <$> _dName])
data ReportReachCriteria = ReportReachCriteria
{ _rrcReachByFrequencyMetricNames :: !(Maybe [Text])
, _rrcEnableAllDimensionCombinations :: !(Maybe Bool)
, _rrcMetricNames :: !(Maybe [Text])
, _rrcCustomRichMediaEvents :: !(Maybe CustomRichMediaEvents)
, _rrcDimensionFilters :: !(Maybe [DimensionValue])
, _rrcActivities :: !(Maybe Activities)
, _rrcDateRange :: !(Maybe DateRange)
, _rrcDimensions :: !(Maybe [SortedDimension])
} deriving (Eq,Show,Data,Typeable,Generic)
reportReachCriteria
:: ReportReachCriteria
reportReachCriteria =
ReportReachCriteria
{ _rrcReachByFrequencyMetricNames = Nothing
, _rrcEnableAllDimensionCombinations = Nothing
, _rrcMetricNames = Nothing
, _rrcCustomRichMediaEvents = Nothing
, _rrcDimensionFilters = Nothing
, _rrcActivities = Nothing
, _rrcDateRange = Nothing
, _rrcDimensions = Nothing
}
rrcReachByFrequencyMetricNames :: Lens' ReportReachCriteria [Text]
rrcReachByFrequencyMetricNames
= lens _rrcReachByFrequencyMetricNames
(\ s a -> s{_rrcReachByFrequencyMetricNames = a})
. _Default
. _Coerce
rrcEnableAllDimensionCombinations :: Lens' ReportReachCriteria (Maybe Bool)
rrcEnableAllDimensionCombinations
= lens _rrcEnableAllDimensionCombinations
(\ s a -> s{_rrcEnableAllDimensionCombinations = a})
rrcMetricNames :: Lens' ReportReachCriteria [Text]
rrcMetricNames
= lens _rrcMetricNames
(\ s a -> s{_rrcMetricNames = a})
. _Default
. _Coerce
rrcCustomRichMediaEvents :: Lens' ReportReachCriteria (Maybe CustomRichMediaEvents)
rrcCustomRichMediaEvents
= lens _rrcCustomRichMediaEvents
(\ s a -> s{_rrcCustomRichMediaEvents = a})
rrcDimensionFilters :: Lens' ReportReachCriteria [DimensionValue]
rrcDimensionFilters
= lens _rrcDimensionFilters
(\ s a -> s{_rrcDimensionFilters = a})
. _Default
. _Coerce
rrcActivities :: Lens' ReportReachCriteria (Maybe Activities)
rrcActivities
= lens _rrcActivities
(\ s a -> s{_rrcActivities = a})
rrcDateRange :: Lens' ReportReachCriteria (Maybe DateRange)
rrcDateRange
= lens _rrcDateRange (\ s a -> s{_rrcDateRange = a})
rrcDimensions :: Lens' ReportReachCriteria [SortedDimension]
rrcDimensions
= lens _rrcDimensions
(\ s a -> s{_rrcDimensions = a})
. _Default
. _Coerce
instance FromJSON ReportReachCriteria where
parseJSON
= withObject "ReportReachCriteria"
(\ o ->
ReportReachCriteria <$>
(o .:? "reachByFrequencyMetricNames" .!= mempty) <*>
(o .:? "enableAllDimensionCombinations")
<*> (o .:? "metricNames" .!= mempty)
<*> (o .:? "customRichMediaEvents")
<*> (o .:? "dimensionFilters" .!= mempty)
<*> (o .:? "activities")
<*> (o .:? "dateRange")
<*> (o .:? "dimensions" .!= mempty))
instance ToJSON ReportReachCriteria where
toJSON ReportReachCriteria{..}
= object
(catMaybes
[("reachByFrequencyMetricNames" .=) <$>
_rrcReachByFrequencyMetricNames,
("enableAllDimensionCombinations" .=) <$>
_rrcEnableAllDimensionCombinations,
("metricNames" .=) <$> _rrcMetricNames,
("customRichMediaEvents" .=) <$>
_rrcCustomRichMediaEvents,
("dimensionFilters" .=) <$> _rrcDimensionFilters,
("activities" .=) <$> _rrcActivities,
("dateRange" .=) <$> _rrcDateRange,
("dimensions" .=) <$> _rrcDimensions])
data CustomRichMediaEvents = CustomRichMediaEvents
{ _crmeKind :: !Text
, _crmeFilteredEventIds :: !(Maybe [DimensionValue])
} deriving (Eq,Show,Data,Typeable,Generic)
customRichMediaEvents
:: CustomRichMediaEvents
customRichMediaEvents =
CustomRichMediaEvents
{ _crmeKind = "dfareporting#customRichMediaEvents"
, _crmeFilteredEventIds = Nothing
}
crmeKind :: Lens' CustomRichMediaEvents Text
crmeKind = lens _crmeKind (\ s a -> s{_crmeKind = a})
crmeFilteredEventIds :: Lens' CustomRichMediaEvents [DimensionValue]
crmeFilteredEventIds
= lens _crmeFilteredEventIds
(\ s a -> s{_crmeFilteredEventIds = a})
. _Default
. _Coerce
instance FromJSON CustomRichMediaEvents where
parseJSON
= withObject "CustomRichMediaEvents"
(\ o ->
CustomRichMediaEvents <$>
(o .:? "kind" .!=
"dfareporting#customRichMediaEvents")
<*> (o .:? "filteredEventIds" .!= mempty))
instance ToJSON CustomRichMediaEvents where
toJSON CustomRichMediaEvents{..}
= object
(catMaybes
[Just ("kind" .= _crmeKind),
("filteredEventIds" .=) <$> _crmeFilteredEventIds])
data TargetableRemarketingListsListResponse = TargetableRemarketingListsListResponse
{ _trllrNextPageToken :: !(Maybe Text)
, _trllrKind :: !Text
, _trllrTargetableRemarketingLists :: !(Maybe [TargetableRemarketingList])
} deriving (Eq,Show,Data,Typeable,Generic)
targetableRemarketingListsListResponse
:: TargetableRemarketingListsListResponse
targetableRemarketingListsListResponse =
TargetableRemarketingListsListResponse
{ _trllrNextPageToken = Nothing
, _trllrKind = "dfareporting#targetableRemarketingListsListResponse"
, _trllrTargetableRemarketingLists = Nothing
}
trllrNextPageToken :: Lens' TargetableRemarketingListsListResponse (Maybe Text)
trllrNextPageToken
= lens _trllrNextPageToken
(\ s a -> s{_trllrNextPageToken = a})
trllrKind :: Lens' TargetableRemarketingListsListResponse Text
trllrKind
= lens _trllrKind (\ s a -> s{_trllrKind = a})
trllrTargetableRemarketingLists :: Lens' TargetableRemarketingListsListResponse [TargetableRemarketingList]
trllrTargetableRemarketingLists
= lens _trllrTargetableRemarketingLists
(\ s a -> s{_trllrTargetableRemarketingLists = a})
. _Default
. _Coerce
instance FromJSON
TargetableRemarketingListsListResponse where
parseJSON
= withObject "TargetableRemarketingListsListResponse"
(\ o ->
TargetableRemarketingListsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#targetableRemarketingListsListResponse")
<*> (o .:? "targetableRemarketingLists" .!= mempty))
instance ToJSON
TargetableRemarketingListsListResponse where
toJSON TargetableRemarketingListsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _trllrNextPageToken,
Just ("kind" .= _trllrKind),
("targetableRemarketingLists" .=) <$>
_trllrTargetableRemarketingLists])
data ChangeLogsListResponse = ChangeLogsListResponse
{ _cllrNextPageToken :: !(Maybe Text)
, _cllrKind :: !Text
, _cllrChangeLogs :: !(Maybe [ChangeLog])
} deriving (Eq,Show,Data,Typeable,Generic)
changeLogsListResponse
:: ChangeLogsListResponse
changeLogsListResponse =
ChangeLogsListResponse
{ _cllrNextPageToken = Nothing
, _cllrKind = "dfareporting#changeLogsListResponse"
, _cllrChangeLogs = Nothing
}
cllrNextPageToken :: Lens' ChangeLogsListResponse (Maybe Text)
cllrNextPageToken
= lens _cllrNextPageToken
(\ s a -> s{_cllrNextPageToken = a})
cllrKind :: Lens' ChangeLogsListResponse Text
cllrKind = lens _cllrKind (\ s a -> s{_cllrKind = a})
cllrChangeLogs :: Lens' ChangeLogsListResponse [ChangeLog]
cllrChangeLogs
= lens _cllrChangeLogs
(\ s a -> s{_cllrChangeLogs = a})
. _Default
. _Coerce
instance FromJSON ChangeLogsListResponse where
parseJSON
= withObject "ChangeLogsListResponse"
(\ o ->
ChangeLogsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#changeLogsListResponse")
<*> (o .:? "changeLogs" .!= mempty))
instance ToJSON ChangeLogsListResponse where
toJSON ChangeLogsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _cllrNextPageToken,
Just ("kind" .= _cllrKind),
("changeLogs" .=) <$> _cllrChangeLogs])
data AccountUserProFile = AccountUserProFile
{ _aupfEmail :: !(Maybe Text)
, _aupfUserRoleFilter :: !(Maybe ObjectFilter)
, _aupfAdvertiserFilter :: !(Maybe ObjectFilter)
, _aupfUserRoleId :: !(Maybe (Textual Int64))
, _aupfKind :: !Text
, _aupfLocale :: !(Maybe Text)
, _aupfSiteFilter :: !(Maybe ObjectFilter)
, _aupfTraffickerType :: !(Maybe AccountUserProFileTraffickerType)
, _aupfActive :: !(Maybe Bool)
, _aupfAccountId :: !(Maybe (Textual Int64))
, _aupfName :: !(Maybe Text)
, _aupfId :: !(Maybe (Textual Int64))
, _aupfUserAccessType :: !(Maybe AccountUserProFileUserAccessType)
, _aupfComments :: !(Maybe Text)
, _aupfSubAccountId :: !(Maybe (Textual Int64))
, _aupfCampaignFilter :: !(Maybe ObjectFilter)
} deriving (Eq,Show,Data,Typeable,Generic)
accountUserProFile
:: AccountUserProFile
accountUserProFile =
AccountUserProFile
{ _aupfEmail = Nothing
, _aupfUserRoleFilter = Nothing
, _aupfAdvertiserFilter = Nothing
, _aupfUserRoleId = Nothing
, _aupfKind = "dfareporting#accountUserProfile"
, _aupfLocale = Nothing
, _aupfSiteFilter = Nothing
, _aupfTraffickerType = Nothing
, _aupfActive = Nothing
, _aupfAccountId = Nothing
, _aupfName = Nothing
, _aupfId = Nothing
, _aupfUserAccessType = Nothing
, _aupfComments = Nothing
, _aupfSubAccountId = Nothing
, _aupfCampaignFilter = Nothing
}
aupfEmail :: Lens' AccountUserProFile (Maybe Text)
aupfEmail
= lens _aupfEmail (\ s a -> s{_aupfEmail = a})
aupfUserRoleFilter :: Lens' AccountUserProFile (Maybe ObjectFilter)
aupfUserRoleFilter
= lens _aupfUserRoleFilter
(\ s a -> s{_aupfUserRoleFilter = a})
aupfAdvertiserFilter :: Lens' AccountUserProFile (Maybe ObjectFilter)
aupfAdvertiserFilter
= lens _aupfAdvertiserFilter
(\ s a -> s{_aupfAdvertiserFilter = a})
aupfUserRoleId :: Lens' AccountUserProFile (Maybe Int64)
aupfUserRoleId
= lens _aupfUserRoleId
(\ s a -> s{_aupfUserRoleId = a})
. mapping _Coerce
aupfKind :: Lens' AccountUserProFile Text
aupfKind = lens _aupfKind (\ s a -> s{_aupfKind = a})
aupfLocale :: Lens' AccountUserProFile (Maybe Text)
aupfLocale
= lens _aupfLocale (\ s a -> s{_aupfLocale = a})
aupfSiteFilter :: Lens' AccountUserProFile (Maybe ObjectFilter)
aupfSiteFilter
= lens _aupfSiteFilter
(\ s a -> s{_aupfSiteFilter = a})
aupfTraffickerType :: Lens' AccountUserProFile (Maybe AccountUserProFileTraffickerType)
aupfTraffickerType
= lens _aupfTraffickerType
(\ s a -> s{_aupfTraffickerType = a})
aupfActive :: Lens' AccountUserProFile (Maybe Bool)
aupfActive
= lens _aupfActive (\ s a -> s{_aupfActive = a})
aupfAccountId :: Lens' AccountUserProFile (Maybe Int64)
aupfAccountId
= lens _aupfAccountId
(\ s a -> s{_aupfAccountId = a})
. mapping _Coerce
aupfName :: Lens' AccountUserProFile (Maybe Text)
aupfName = lens _aupfName (\ s a -> s{_aupfName = a})
aupfId :: Lens' AccountUserProFile (Maybe Int64)
aupfId
= lens _aupfId (\ s a -> s{_aupfId = a}) .
mapping _Coerce
aupfUserAccessType :: Lens' AccountUserProFile (Maybe AccountUserProFileUserAccessType)
aupfUserAccessType
= lens _aupfUserAccessType
(\ s a -> s{_aupfUserAccessType = a})
aupfComments :: Lens' AccountUserProFile (Maybe Text)
aupfComments
= lens _aupfComments (\ s a -> s{_aupfComments = a})
aupfSubAccountId :: Lens' AccountUserProFile (Maybe Int64)
aupfSubAccountId
= lens _aupfSubAccountId
(\ s a -> s{_aupfSubAccountId = a})
. mapping _Coerce
aupfCampaignFilter :: Lens' AccountUserProFile (Maybe ObjectFilter)
aupfCampaignFilter
= lens _aupfCampaignFilter
(\ s a -> s{_aupfCampaignFilter = a})
instance FromJSON AccountUserProFile where
parseJSON
= withObject "AccountUserProFile"
(\ o ->
AccountUserProFile <$>
(o .:? "email") <*> (o .:? "userRoleFilter") <*>
(o .:? "advertiserFilter")
<*> (o .:? "userRoleId")
<*>
(o .:? "kind" .!= "dfareporting#accountUserProfile")
<*> (o .:? "locale")
<*> (o .:? "siteFilter")
<*> (o .:? "traffickerType")
<*> (o .:? "active")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "userAccessType")
<*> (o .:? "comments")
<*> (o .:? "subaccountId")
<*> (o .:? "campaignFilter"))
instance ToJSON AccountUserProFile where
toJSON AccountUserProFile{..}
= object
(catMaybes
[("email" .=) <$> _aupfEmail,
("userRoleFilter" .=) <$> _aupfUserRoleFilter,
("advertiserFilter" .=) <$> _aupfAdvertiserFilter,
("userRoleId" .=) <$> _aupfUserRoleId,
Just ("kind" .= _aupfKind),
("locale" .=) <$> _aupfLocale,
("siteFilter" .=) <$> _aupfSiteFilter,
("traffickerType" .=) <$> _aupfTraffickerType,
("active" .=) <$> _aupfActive,
("accountId" .=) <$> _aupfAccountId,
("name" .=) <$> _aupfName, ("id" .=) <$> _aupfId,
("userAccessType" .=) <$> _aupfUserAccessType,
("comments" .=) <$> _aupfComments,
("subaccountId" .=) <$> _aupfSubAccountId,
("campaignFilter" .=) <$> _aupfCampaignFilter])
data DimensionValue = DimensionValue
{ _dvEtag :: !(Maybe Text)
, _dvKind :: !Text
, _dvValue :: !(Maybe Text)
, _dvMatchType :: !(Maybe DimensionValueMatchType)
, _dvDimensionName :: !(Maybe Text)
, _dvId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dimensionValue
:: DimensionValue
dimensionValue =
DimensionValue
{ _dvEtag = Nothing
, _dvKind = "dfareporting#dimensionValue"
, _dvValue = Nothing
, _dvMatchType = Nothing
, _dvDimensionName = Nothing
, _dvId = Nothing
}
dvEtag :: Lens' DimensionValue (Maybe Text)
dvEtag = lens _dvEtag (\ s a -> s{_dvEtag = a})
dvKind :: Lens' DimensionValue Text
dvKind = lens _dvKind (\ s a -> s{_dvKind = a})
dvValue :: Lens' DimensionValue (Maybe Text)
dvValue = lens _dvValue (\ s a -> s{_dvValue = a})
dvMatchType :: Lens' DimensionValue (Maybe DimensionValueMatchType)
dvMatchType
= lens _dvMatchType (\ s a -> s{_dvMatchType = a})
dvDimensionName :: Lens' DimensionValue (Maybe Text)
dvDimensionName
= lens _dvDimensionName
(\ s a -> s{_dvDimensionName = a})
dvId :: Lens' DimensionValue (Maybe Text)
dvId = lens _dvId (\ s a -> s{_dvId = a})
instance FromJSON DimensionValue where
parseJSON
= withObject "DimensionValue"
(\ o ->
DimensionValue <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "dfareporting#dimensionValue")
<*> (o .:? "value")
<*> (o .:? "matchType")
<*> (o .:? "dimensionName")
<*> (o .:? "id"))
instance ToJSON DimensionValue where
toJSON DimensionValue{..}
= object
(catMaybes
[("etag" .=) <$> _dvEtag, Just ("kind" .= _dvKind),
("value" .=) <$> _dvValue,
("matchType" .=) <$> _dvMatchType,
("dimensionName" .=) <$> _dvDimensionName,
("id" .=) <$> _dvId])
data Activities = Activities
{ _actKind :: !Text
, _actMetricNames :: !(Maybe [Text])
, _actFilters :: !(Maybe [DimensionValue])
} deriving (Eq,Show,Data,Typeable,Generic)
activities
:: Activities
activities =
Activities
{ _actKind = "dfareporting#activities"
, _actMetricNames = Nothing
, _actFilters = Nothing
}
actKind :: Lens' Activities Text
actKind = lens _actKind (\ s a -> s{_actKind = a})
actMetricNames :: Lens' Activities [Text]
actMetricNames
= lens _actMetricNames
(\ s a -> s{_actMetricNames = a})
. _Default
. _Coerce
actFilters :: Lens' Activities [DimensionValue]
actFilters
= lens _actFilters (\ s a -> s{_actFilters = a}) .
_Default
. _Coerce
instance FromJSON Activities where
parseJSON
= withObject "Activities"
(\ o ->
Activities <$>
(o .:? "kind" .!= "dfareporting#activities") <*>
(o .:? "metricNames" .!= mempty)
<*> (o .:? "filters" .!= mempty))
instance ToJSON Activities where
toJSON Activities{..}
= object
(catMaybes
[Just ("kind" .= _actKind),
("metricNames" .=) <$> _actMetricNames,
("filters" .=) <$> _actFilters])
data UserRolePermissionGroupsListResponse = UserRolePermissionGroupsListResponse
{ _urpglrUserRolePermissionGroups :: !(Maybe [UserRolePermissionGroup])
, _urpglrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
userRolePermissionGroupsListResponse
:: UserRolePermissionGroupsListResponse
userRolePermissionGroupsListResponse =
UserRolePermissionGroupsListResponse
{ _urpglrUserRolePermissionGroups = Nothing
, _urpglrKind = "dfareporting#userRolePermissionGroupsListResponse"
}
urpglrUserRolePermissionGroups :: Lens' UserRolePermissionGroupsListResponse [UserRolePermissionGroup]
urpglrUserRolePermissionGroups
= lens _urpglrUserRolePermissionGroups
(\ s a -> s{_urpglrUserRolePermissionGroups = a})
. _Default
. _Coerce
urpglrKind :: Lens' UserRolePermissionGroupsListResponse Text
urpglrKind
= lens _urpglrKind (\ s a -> s{_urpglrKind = a})
instance FromJSON
UserRolePermissionGroupsListResponse where
parseJSON
= withObject "UserRolePermissionGroupsListResponse"
(\ o ->
UserRolePermissionGroupsListResponse <$>
(o .:? "userRolePermissionGroups" .!= mempty) <*>
(o .:? "kind" .!=
"dfareporting#userRolePermissionGroupsListResponse"))
instance ToJSON UserRolePermissionGroupsListResponse
where
toJSON UserRolePermissionGroupsListResponse{..}
= object
(catMaybes
[("userRolePermissionGroups" .=) <$>
_urpglrUserRolePermissionGroups,
Just ("kind" .= _urpglrKind)])
data PlacementTag = PlacementTag
{ _ptPlacementId :: !(Maybe (Textual Int64))
, _ptTagDatas :: !(Maybe [TagData])
} deriving (Eq,Show,Data,Typeable,Generic)
placementTag
:: PlacementTag
placementTag =
PlacementTag
{ _ptPlacementId = Nothing
, _ptTagDatas = Nothing
}
ptPlacementId :: Lens' PlacementTag (Maybe Int64)
ptPlacementId
= lens _ptPlacementId
(\ s a -> s{_ptPlacementId = a})
. mapping _Coerce
ptTagDatas :: Lens' PlacementTag [TagData]
ptTagDatas
= lens _ptTagDatas (\ s a -> s{_ptTagDatas = a}) .
_Default
. _Coerce
instance FromJSON PlacementTag where
parseJSON
= withObject "PlacementTag"
(\ o ->
PlacementTag <$>
(o .:? "placementId") <*>
(o .:? "tagDatas" .!= mempty))
instance ToJSON PlacementTag where
toJSON PlacementTag{..}
= object
(catMaybes
[("placementId" .=) <$> _ptPlacementId,
("tagDatas" .=) <$> _ptTagDatas])
data RemarketingListsListResponse = RemarketingListsListResponse
{ _rllrNextPageToken :: !(Maybe Text)
, _rllrRemarketingLists :: !(Maybe [RemarketingList])
, _rllrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
remarketingListsListResponse
:: RemarketingListsListResponse
remarketingListsListResponse =
RemarketingListsListResponse
{ _rllrNextPageToken = Nothing
, _rllrRemarketingLists = Nothing
, _rllrKind = "dfareporting#remarketingListsListResponse"
}
rllrNextPageToken :: Lens' RemarketingListsListResponse (Maybe Text)
rllrNextPageToken
= lens _rllrNextPageToken
(\ s a -> s{_rllrNextPageToken = a})
rllrRemarketingLists :: Lens' RemarketingListsListResponse [RemarketingList]
rllrRemarketingLists
= lens _rllrRemarketingLists
(\ s a -> s{_rllrRemarketingLists = a})
. _Default
. _Coerce
rllrKind :: Lens' RemarketingListsListResponse Text
rllrKind = lens _rllrKind (\ s a -> s{_rllrKind = a})
instance FromJSON RemarketingListsListResponse where
parseJSON
= withObject "RemarketingListsListResponse"
(\ o ->
RemarketingListsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "remarketingLists" .!= mempty)
<*>
(o .:? "kind" .!=
"dfareporting#remarketingListsListResponse"))
instance ToJSON RemarketingListsListResponse where
toJSON RemarketingListsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _rllrNextPageToken,
("remarketingLists" .=) <$> _rllrRemarketingLists,
Just ("kind" .= _rllrKind)])
data Creative = Creative
{ _creConvertFlashToHTML5 :: !(Maybe Bool)
, _creBackupImageTargetWindow :: !(Maybe TargetWindow)
, _creRenderingIdDimensionValue :: !(Maybe DimensionValue)
, _creCustomKeyValues :: !(Maybe [Text])
, _creVideoDuration :: !(Maybe (Textual Double))
, _creRenderingId :: !(Maybe (Textual Int64))
, _creThirdPartyBackupImageImpressionsURL :: !(Maybe Text)
, _creFsCommand :: !(Maybe FsCommand)
, _creAllowScriptAccess :: !(Maybe Bool)
, _creHTMLCodeLocked :: !(Maybe Bool)
, _creRequiredFlashPluginVersion :: !(Maybe Text)
, _creAuthoringTool :: !(Maybe CreativeAuthoringTool)
, _creSize :: !(Maybe Size)
, _creThirdPartyURLs :: !(Maybe [ThirdPartyTrackingURL])
, _creCounterCustomEvents :: !(Maybe [CreativeCustomEvent])
, _creKind :: !Text
, _creSSLOverride :: !(Maybe Bool)
, _creHTMLCode :: !(Maybe Text)
, _creAdvertiserId :: !(Maybe (Textual Int64))
, _creRequiredFlashVersion :: !(Maybe (Textual Int32))
, _creBackgRoundColor :: !(Maybe Text)
, _creAdTagKeys :: !(Maybe [Text])
, _creSkippable :: !(Maybe Bool)
, _creSSLCompliant :: !(Maybe Bool)
, _creIdDimensionValue :: !(Maybe DimensionValue)
, _creBackupImageReportingLabel :: !(Maybe Text)
, _creCommercialId :: !(Maybe Text)
, _creActive :: !(Maybe Bool)
, _creExitCustomEvents :: !(Maybe [CreativeCustomEvent])
, _creAccountId :: !(Maybe (Textual Int64))
, _creBackupImageClickThroughURL :: !(Maybe Text)
, _creName :: !(Maybe Text)
, _creOverrideCss :: !(Maybe Text)
, _creVideoDescription :: !(Maybe Text)
, _creClickTags :: !(Maybe [ClickTag])
, _creAdParameters :: !(Maybe Text)
, _creVersion :: !(Maybe (Textual Int32))
, _creLatestTraffickedCreativeId :: !(Maybe (Textual Int64))
, _creThirdPartyRichMediaImpressionsURL :: !(Maybe Text)
, _creLastModifiedInfo :: !(Maybe LastModifiedInfo)
, _creId :: !(Maybe (Textual Int64))
, _creStudioAdvertiserId :: !(Maybe (Textual Int64))
, _creCreativeAssets :: !(Maybe [CreativeAsset])
, _creSubAccountId :: !(Maybe (Textual Int64))
, _creType :: !(Maybe CreativeType)
, _creTimerCustomEvents :: !(Maybe [CreativeCustomEvent])
, _creStudioCreativeId :: !(Maybe (Textual Int64))
, _creCompatibility :: !(Maybe [CreativeCompatibilityItem])
, _creBackupImageFeatures :: !(Maybe [CreativeBackupImageFeaturesItem])
, _creArtworkType :: !(Maybe CreativeArtworkType)
, _creArchived :: !(Maybe Bool)
, _creCompanionCreatives :: !(Maybe [Textual Int64])
, _creTotalFileSize :: !(Maybe (Textual Int64))
, _creStudioTraffickedCreativeId :: !(Maybe (Textual Int64))
, _creRedirectURL :: !(Maybe Text)
, _creAutoAdvanceImages :: !(Maybe Bool)
, _creCreativeFieldAssignments :: !(Maybe [CreativeFieldAssignment])
} deriving (Eq,Show,Data,Typeable,Generic)
creative
:: Creative
creative =
Creative
{ _creConvertFlashToHTML5 = Nothing
, _creBackupImageTargetWindow = Nothing
, _creRenderingIdDimensionValue = Nothing
, _creCustomKeyValues = Nothing
, _creVideoDuration = Nothing
, _creRenderingId = Nothing
, _creThirdPartyBackupImageImpressionsURL = Nothing
, _creFsCommand = Nothing
, _creAllowScriptAccess = Nothing
, _creHTMLCodeLocked = Nothing
, _creRequiredFlashPluginVersion = Nothing
, _creAuthoringTool = Nothing
, _creSize = Nothing
, _creThirdPartyURLs = Nothing
, _creCounterCustomEvents = Nothing
, _creKind = "dfareporting#creative"
, _creSSLOverride = Nothing
, _creHTMLCode = Nothing
, _creAdvertiserId = Nothing
, _creRequiredFlashVersion = Nothing
, _creBackgRoundColor = Nothing
, _creAdTagKeys = Nothing
, _creSkippable = Nothing
, _creSSLCompliant = Nothing
, _creIdDimensionValue = Nothing
, _creBackupImageReportingLabel = Nothing
, _creCommercialId = Nothing
, _creActive = Nothing
, _creExitCustomEvents = Nothing
, _creAccountId = Nothing
, _creBackupImageClickThroughURL = Nothing
, _creName = Nothing
, _creOverrideCss = Nothing
, _creVideoDescription = Nothing
, _creClickTags = Nothing
, _creAdParameters = Nothing
, _creVersion = Nothing
, _creLatestTraffickedCreativeId = Nothing
, _creThirdPartyRichMediaImpressionsURL = Nothing
, _creLastModifiedInfo = Nothing
, _creId = Nothing
, _creStudioAdvertiserId = Nothing
, _creCreativeAssets = Nothing
, _creSubAccountId = Nothing
, _creType = Nothing
, _creTimerCustomEvents = Nothing
, _creStudioCreativeId = Nothing
, _creCompatibility = Nothing
, _creBackupImageFeatures = Nothing
, _creArtworkType = Nothing
, _creArchived = Nothing
, _creCompanionCreatives = Nothing
, _creTotalFileSize = Nothing
, _creStudioTraffickedCreativeId = Nothing
, _creRedirectURL = Nothing
, _creAutoAdvanceImages = Nothing
, _creCreativeFieldAssignments = Nothing
}
creConvertFlashToHTML5 :: Lens' Creative (Maybe Bool)
creConvertFlashToHTML5
= lens _creConvertFlashToHTML5
(\ s a -> s{_creConvertFlashToHTML5 = a})
creBackupImageTargetWindow :: Lens' Creative (Maybe TargetWindow)
creBackupImageTargetWindow
= lens _creBackupImageTargetWindow
(\ s a -> s{_creBackupImageTargetWindow = a})
creRenderingIdDimensionValue :: Lens' Creative (Maybe DimensionValue)
creRenderingIdDimensionValue
= lens _creRenderingIdDimensionValue
(\ s a -> s{_creRenderingIdDimensionValue = a})
creCustomKeyValues :: Lens' Creative [Text]
creCustomKeyValues
= lens _creCustomKeyValues
(\ s a -> s{_creCustomKeyValues = a})
. _Default
. _Coerce
creVideoDuration :: Lens' Creative (Maybe Double)
creVideoDuration
= lens _creVideoDuration
(\ s a -> s{_creVideoDuration = a})
. mapping _Coerce
creRenderingId :: Lens' Creative (Maybe Int64)
creRenderingId
= lens _creRenderingId
(\ s a -> s{_creRenderingId = a})
. mapping _Coerce
creThirdPartyBackupImageImpressionsURL :: Lens' Creative (Maybe Text)
creThirdPartyBackupImageImpressionsURL
= lens _creThirdPartyBackupImageImpressionsURL
(\ s a ->
s{_creThirdPartyBackupImageImpressionsURL = a})
creFsCommand :: Lens' Creative (Maybe FsCommand)
creFsCommand
= lens _creFsCommand (\ s a -> s{_creFsCommand = a})
creAllowScriptAccess :: Lens' Creative (Maybe Bool)
creAllowScriptAccess
= lens _creAllowScriptAccess
(\ s a -> s{_creAllowScriptAccess = a})
creHTMLCodeLocked :: Lens' Creative (Maybe Bool)
creHTMLCodeLocked
= lens _creHTMLCodeLocked
(\ s a -> s{_creHTMLCodeLocked = a})
creRequiredFlashPluginVersion :: Lens' Creative (Maybe Text)
creRequiredFlashPluginVersion
= lens _creRequiredFlashPluginVersion
(\ s a -> s{_creRequiredFlashPluginVersion = a})
creAuthoringTool :: Lens' Creative (Maybe CreativeAuthoringTool)
creAuthoringTool
= lens _creAuthoringTool
(\ s a -> s{_creAuthoringTool = a})
creSize :: Lens' Creative (Maybe Size)
creSize = lens _creSize (\ s a -> s{_creSize = a})
creThirdPartyURLs :: Lens' Creative [ThirdPartyTrackingURL]
creThirdPartyURLs
= lens _creThirdPartyURLs
(\ s a -> s{_creThirdPartyURLs = a})
. _Default
. _Coerce
creCounterCustomEvents :: Lens' Creative [CreativeCustomEvent]
creCounterCustomEvents
= lens _creCounterCustomEvents
(\ s a -> s{_creCounterCustomEvents = a})
. _Default
. _Coerce
creKind :: Lens' Creative Text
creKind = lens _creKind (\ s a -> s{_creKind = a})
creSSLOverride :: Lens' Creative (Maybe Bool)
creSSLOverride
= lens _creSSLOverride
(\ s a -> s{_creSSLOverride = a})
creHTMLCode :: Lens' Creative (Maybe Text)
creHTMLCode
= lens _creHTMLCode (\ s a -> s{_creHTMLCode = a})
creAdvertiserId :: Lens' Creative (Maybe Int64)
creAdvertiserId
= lens _creAdvertiserId
(\ s a -> s{_creAdvertiserId = a})
. mapping _Coerce
creRequiredFlashVersion :: Lens' Creative (Maybe Int32)
creRequiredFlashVersion
= lens _creRequiredFlashVersion
(\ s a -> s{_creRequiredFlashVersion = a})
. mapping _Coerce
creBackgRoundColor :: Lens' Creative (Maybe Text)
creBackgRoundColor
= lens _creBackgRoundColor
(\ s a -> s{_creBackgRoundColor = a})
creAdTagKeys :: Lens' Creative [Text]
creAdTagKeys
= lens _creAdTagKeys (\ s a -> s{_creAdTagKeys = a})
. _Default
. _Coerce
creSkippable :: Lens' Creative (Maybe Bool)
creSkippable
= lens _creSkippable (\ s a -> s{_creSkippable = a})
creSSLCompliant :: Lens' Creative (Maybe Bool)
creSSLCompliant
= lens _creSSLCompliant
(\ s a -> s{_creSSLCompliant = a})
creIdDimensionValue :: Lens' Creative (Maybe DimensionValue)
creIdDimensionValue
= lens _creIdDimensionValue
(\ s a -> s{_creIdDimensionValue = a})
creBackupImageReportingLabel :: Lens' Creative (Maybe Text)
creBackupImageReportingLabel
= lens _creBackupImageReportingLabel
(\ s a -> s{_creBackupImageReportingLabel = a})
creCommercialId :: Lens' Creative (Maybe Text)
creCommercialId
= lens _creCommercialId
(\ s a -> s{_creCommercialId = a})
creActive :: Lens' Creative (Maybe Bool)
creActive
= lens _creActive (\ s a -> s{_creActive = a})
creExitCustomEvents :: Lens' Creative [CreativeCustomEvent]
creExitCustomEvents
= lens _creExitCustomEvents
(\ s a -> s{_creExitCustomEvents = a})
. _Default
. _Coerce
creAccountId :: Lens' Creative (Maybe Int64)
creAccountId
= lens _creAccountId (\ s a -> s{_creAccountId = a})
. mapping _Coerce
creBackupImageClickThroughURL :: Lens' Creative (Maybe Text)
creBackupImageClickThroughURL
= lens _creBackupImageClickThroughURL
(\ s a -> s{_creBackupImageClickThroughURL = a})
creName :: Lens' Creative (Maybe Text)
creName = lens _creName (\ s a -> s{_creName = a})
creOverrideCss :: Lens' Creative (Maybe Text)
creOverrideCss
= lens _creOverrideCss
(\ s a -> s{_creOverrideCss = a})
creVideoDescription :: Lens' Creative (Maybe Text)
creVideoDescription
= lens _creVideoDescription
(\ s a -> s{_creVideoDescription = a})
creClickTags :: Lens' Creative [ClickTag]
creClickTags
= lens _creClickTags (\ s a -> s{_creClickTags = a})
. _Default
. _Coerce
creAdParameters :: Lens' Creative (Maybe Text)
creAdParameters
= lens _creAdParameters
(\ s a -> s{_creAdParameters = a})
creVersion :: Lens' Creative (Maybe Int32)
creVersion
= lens _creVersion (\ s a -> s{_creVersion = a}) .
mapping _Coerce
creLatestTraffickedCreativeId :: Lens' Creative (Maybe Int64)
creLatestTraffickedCreativeId
= lens _creLatestTraffickedCreativeId
(\ s a -> s{_creLatestTraffickedCreativeId = a})
. mapping _Coerce
creThirdPartyRichMediaImpressionsURL :: Lens' Creative (Maybe Text)
creThirdPartyRichMediaImpressionsURL
= lens _creThirdPartyRichMediaImpressionsURL
(\ s a ->
s{_creThirdPartyRichMediaImpressionsURL = a})
creLastModifiedInfo :: Lens' Creative (Maybe LastModifiedInfo)
creLastModifiedInfo
= lens _creLastModifiedInfo
(\ s a -> s{_creLastModifiedInfo = a})
creId :: Lens' Creative (Maybe Int64)
creId
= lens _creId (\ s a -> s{_creId = a}) .
mapping _Coerce
creStudioAdvertiserId :: Lens' Creative (Maybe Int64)
creStudioAdvertiserId
= lens _creStudioAdvertiserId
(\ s a -> s{_creStudioAdvertiserId = a})
. mapping _Coerce
creCreativeAssets :: Lens' Creative [CreativeAsset]
creCreativeAssets
= lens _creCreativeAssets
(\ s a -> s{_creCreativeAssets = a})
. _Default
. _Coerce
creSubAccountId :: Lens' Creative (Maybe Int64)
creSubAccountId
= lens _creSubAccountId
(\ s a -> s{_creSubAccountId = a})
. mapping _Coerce
creType :: Lens' Creative (Maybe CreativeType)
creType = lens _creType (\ s a -> s{_creType = a})
creTimerCustomEvents :: Lens' Creative [CreativeCustomEvent]
creTimerCustomEvents
= lens _creTimerCustomEvents
(\ s a -> s{_creTimerCustomEvents = a})
. _Default
. _Coerce
creStudioCreativeId :: Lens' Creative (Maybe Int64)
creStudioCreativeId
= lens _creStudioCreativeId
(\ s a -> s{_creStudioCreativeId = a})
. mapping _Coerce
creCompatibility :: Lens' Creative [CreativeCompatibilityItem]
creCompatibility
= lens _creCompatibility
(\ s a -> s{_creCompatibility = a})
. _Default
. _Coerce
creBackupImageFeatures :: Lens' Creative [CreativeBackupImageFeaturesItem]
creBackupImageFeatures
= lens _creBackupImageFeatures
(\ s a -> s{_creBackupImageFeatures = a})
. _Default
. _Coerce
creArtworkType :: Lens' Creative (Maybe CreativeArtworkType)
creArtworkType
= lens _creArtworkType
(\ s a -> s{_creArtworkType = a})
creArchived :: Lens' Creative (Maybe Bool)
creArchived
= lens _creArchived (\ s a -> s{_creArchived = a})
creCompanionCreatives :: Lens' Creative [Int64]
creCompanionCreatives
= lens _creCompanionCreatives
(\ s a -> s{_creCompanionCreatives = a})
. _Default
. _Coerce
creTotalFileSize :: Lens' Creative (Maybe Int64)
creTotalFileSize
= lens _creTotalFileSize
(\ s a -> s{_creTotalFileSize = a})
. mapping _Coerce
creStudioTraffickedCreativeId :: Lens' Creative (Maybe Int64)
creStudioTraffickedCreativeId
= lens _creStudioTraffickedCreativeId
(\ s a -> s{_creStudioTraffickedCreativeId = a})
. mapping _Coerce
creRedirectURL :: Lens' Creative (Maybe Text)
creRedirectURL
= lens _creRedirectURL
(\ s a -> s{_creRedirectURL = a})
creAutoAdvanceImages :: Lens' Creative (Maybe Bool)
creAutoAdvanceImages
= lens _creAutoAdvanceImages
(\ s a -> s{_creAutoAdvanceImages = a})
creCreativeFieldAssignments :: Lens' Creative [CreativeFieldAssignment]
creCreativeFieldAssignments
= lens _creCreativeFieldAssignments
(\ s a -> s{_creCreativeFieldAssignments = a})
. _Default
. _Coerce
instance FromJSON Creative where
parseJSON
= withObject "Creative"
(\ o ->
Creative <$>
(o .:? "convertFlashToHtml5") <*>
(o .:? "backupImageTargetWindow")
<*> (o .:? "renderingIdDimensionValue")
<*> (o .:? "customKeyValues" .!= mempty)
<*> (o .:? "videoDuration")
<*> (o .:? "renderingId")
<*> (o .:? "thirdPartyBackupImageImpressionsUrl")
<*> (o .:? "fsCommand")
<*> (o .:? "allowScriptAccess")
<*> (o .:? "htmlCodeLocked")
<*> (o .:? "requiredFlashPluginVersion")
<*> (o .:? "authoringTool")
<*> (o .:? "size")
<*> (o .:? "thirdPartyUrls" .!= mempty)
<*> (o .:? "counterCustomEvents" .!= mempty)
<*> (o .:? "kind" .!= "dfareporting#creative")
<*> (o .:? "sslOverride")
<*> (o .:? "htmlCode")
<*> (o .:? "advertiserId")
<*> (o .:? "requiredFlashVersion")
<*> (o .:? "backgroundColor")
<*> (o .:? "adTagKeys" .!= mempty)
<*> (o .:? "skippable")
<*> (o .:? "sslCompliant")
<*> (o .:? "idDimensionValue")
<*> (o .:? "backupImageReportingLabel")
<*> (o .:? "commercialId")
<*> (o .:? "active")
<*> (o .:? "exitCustomEvents" .!= mempty)
<*> (o .:? "accountId")
<*> (o .:? "backupImageClickThroughUrl")
<*> (o .:? "name")
<*> (o .:? "overrideCss")
<*> (o .:? "videoDescription")
<*> (o .:? "clickTags" .!= mempty)
<*> (o .:? "adParameters")
<*> (o .:? "version")
<*> (o .:? "latestTraffickedCreativeId")
<*> (o .:? "thirdPartyRichMediaImpressionsUrl")
<*> (o .:? "lastModifiedInfo")
<*> (o .:? "id")
<*> (o .:? "studioAdvertiserId")
<*> (o .:? "creativeAssets" .!= mempty)
<*> (o .:? "subaccountId")
<*> (o .:? "type")
<*> (o .:? "timerCustomEvents" .!= mempty)
<*> (o .:? "studioCreativeId")
<*> (o .:? "compatibility" .!= mempty)
<*> (o .:? "backupImageFeatures" .!= mempty)
<*> (o .:? "artworkType")
<*> (o .:? "archived")
<*> (o .:? "companionCreatives" .!= mempty)
<*> (o .:? "totalFileSize")
<*> (o .:? "studioTraffickedCreativeId")
<*> (o .:? "redirectUrl")
<*> (o .:? "auto_advance_images")
<*> (o .:? "creativeFieldAssignments" .!= mempty))
instance ToJSON Creative where
toJSON Creative{..}
= object
(catMaybes
[("convertFlashToHtml5" .=) <$>
_creConvertFlashToHTML5,
("backupImageTargetWindow" .=) <$>
_creBackupImageTargetWindow,
("renderingIdDimensionValue" .=) <$>
_creRenderingIdDimensionValue,
("customKeyValues" .=) <$> _creCustomKeyValues,
("videoDuration" .=) <$> _creVideoDuration,
("renderingId" .=) <$> _creRenderingId,
("thirdPartyBackupImageImpressionsUrl" .=) <$>
_creThirdPartyBackupImageImpressionsURL,
("fsCommand" .=) <$> _creFsCommand,
("allowScriptAccess" .=) <$> _creAllowScriptAccess,
("htmlCodeLocked" .=) <$> _creHTMLCodeLocked,
("requiredFlashPluginVersion" .=) <$>
_creRequiredFlashPluginVersion,
("authoringTool" .=) <$> _creAuthoringTool,
("size" .=) <$> _creSize,
("thirdPartyUrls" .=) <$> _creThirdPartyURLs,
("counterCustomEvents" .=) <$>
_creCounterCustomEvents,
Just ("kind" .= _creKind),
("sslOverride" .=) <$> _creSSLOverride,
("htmlCode" .=) <$> _creHTMLCode,
("advertiserId" .=) <$> _creAdvertiserId,
("requiredFlashVersion" .=) <$>
_creRequiredFlashVersion,
("backgroundColor" .=) <$> _creBackgRoundColor,
("adTagKeys" .=) <$> _creAdTagKeys,
("skippable" .=) <$> _creSkippable,
("sslCompliant" .=) <$> _creSSLCompliant,
("idDimensionValue" .=) <$> _creIdDimensionValue,
("backupImageReportingLabel" .=) <$>
_creBackupImageReportingLabel,
("commercialId" .=) <$> _creCommercialId,
("active" .=) <$> _creActive,
("exitCustomEvents" .=) <$> _creExitCustomEvents,
("accountId" .=) <$> _creAccountId,
("backupImageClickThroughUrl" .=) <$>
_creBackupImageClickThroughURL,
("name" .=) <$> _creName,
("overrideCss" .=) <$> _creOverrideCss,
("videoDescription" .=) <$> _creVideoDescription,
("clickTags" .=) <$> _creClickTags,
("adParameters" .=) <$> _creAdParameters,
("version" .=) <$> _creVersion,
("latestTraffickedCreativeId" .=) <$>
_creLatestTraffickedCreativeId,
("thirdPartyRichMediaImpressionsUrl" .=) <$>
_creThirdPartyRichMediaImpressionsURL,
("lastModifiedInfo" .=) <$> _creLastModifiedInfo,
("id" .=) <$> _creId,
("studioAdvertiserId" .=) <$> _creStudioAdvertiserId,
("creativeAssets" .=) <$> _creCreativeAssets,
("subaccountId" .=) <$> _creSubAccountId,
("type" .=) <$> _creType,
("timerCustomEvents" .=) <$> _creTimerCustomEvents,
("studioCreativeId" .=) <$> _creStudioCreativeId,
("compatibility" .=) <$> _creCompatibility,
("backupImageFeatures" .=) <$>
_creBackupImageFeatures,
("artworkType" .=) <$> _creArtworkType,
("archived" .=) <$> _creArchived,
("companionCreatives" .=) <$> _creCompanionCreatives,
("totalFileSize" .=) <$> _creTotalFileSize,
("studioTraffickedCreativeId" .=) <$>
_creStudioTraffickedCreativeId,
("redirectUrl" .=) <$> _creRedirectURL,
("auto_advance_images" .=) <$> _creAutoAdvanceImages,
("creativeFieldAssignments" .=) <$>
_creCreativeFieldAssignments])
data SiteContact = SiteContact
{ _scEmail :: !(Maybe Text)
, _scPhone :: !(Maybe Text)
, _scLastName :: !(Maybe Text)
, _scAddress :: !(Maybe Text)
, _scFirstName :: !(Maybe Text)
, _scId :: !(Maybe (Textual Int64))
, _scTitle :: !(Maybe Text)
, _scContactType :: !(Maybe SiteContactContactType)
} deriving (Eq,Show,Data,Typeable,Generic)
siteContact
:: SiteContact
siteContact =
SiteContact
{ _scEmail = Nothing
, _scPhone = Nothing
, _scLastName = Nothing
, _scAddress = Nothing
, _scFirstName = Nothing
, _scId = Nothing
, _scTitle = Nothing
, _scContactType = Nothing
}
scEmail :: Lens' SiteContact (Maybe Text)
scEmail = lens _scEmail (\ s a -> s{_scEmail = a})
scPhone :: Lens' SiteContact (Maybe Text)
scPhone = lens _scPhone (\ s a -> s{_scPhone = a})
scLastName :: Lens' SiteContact (Maybe Text)
scLastName
= lens _scLastName (\ s a -> s{_scLastName = a})
scAddress :: Lens' SiteContact (Maybe Text)
scAddress
= lens _scAddress (\ s a -> s{_scAddress = a})
scFirstName :: Lens' SiteContact (Maybe Text)
scFirstName
= lens _scFirstName (\ s a -> s{_scFirstName = a})
scId :: Lens' SiteContact (Maybe Int64)
scId
= lens _scId (\ s a -> s{_scId = a}) .
mapping _Coerce
scTitle :: Lens' SiteContact (Maybe Text)
scTitle = lens _scTitle (\ s a -> s{_scTitle = a})
scContactType :: Lens' SiteContact (Maybe SiteContactContactType)
scContactType
= lens _scContactType
(\ s a -> s{_scContactType = a})
instance FromJSON SiteContact where
parseJSON
= withObject "SiteContact"
(\ o ->
SiteContact <$>
(o .:? "email") <*> (o .:? "phone") <*>
(o .:? "lastName")
<*> (o .:? "address")
<*> (o .:? "firstName")
<*> (o .:? "id")
<*> (o .:? "title")
<*> (o .:? "contactType"))
instance ToJSON SiteContact where
toJSON SiteContact{..}
= object
(catMaybes
[("email" .=) <$> _scEmail,
("phone" .=) <$> _scPhone,
("lastName" .=) <$> _scLastName,
("address" .=) <$> _scAddress,
("firstName" .=) <$> _scFirstName,
("id" .=) <$> _scId, ("title" .=) <$> _scTitle,
("contactType" .=) <$> _scContactType])
data AccountsListResponse = AccountsListResponse
{ _accNextPageToken :: !(Maybe Text)
, _accAccounts :: !(Maybe [Account])
, _accKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsListResponse
:: AccountsListResponse
accountsListResponse =
AccountsListResponse
{ _accNextPageToken = Nothing
, _accAccounts = Nothing
, _accKind = "dfareporting#accountsListResponse"
}
accNextPageToken :: Lens' AccountsListResponse (Maybe Text)
accNextPageToken
= lens _accNextPageToken
(\ s a -> s{_accNextPageToken = a})
accAccounts :: Lens' AccountsListResponse [Account]
accAccounts
= lens _accAccounts (\ s a -> s{_accAccounts = a}) .
_Default
. _Coerce
accKind :: Lens' AccountsListResponse Text
accKind = lens _accKind (\ s a -> s{_accKind = a})
instance FromJSON AccountsListResponse where
parseJSON
= withObject "AccountsListResponse"
(\ o ->
AccountsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "accounts" .!= mempty)
<*>
(o .:? "kind" .!=
"dfareporting#accountsListResponse"))
instance ToJSON AccountsListResponse where
toJSON AccountsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _accNextPageToken,
("accounts" .=) <$> _accAccounts,
Just ("kind" .= _accKind)])
data DateRange = DateRange
{ _drKind :: !Text
, _drEndDate :: !(Maybe Date')
, _drStartDate :: !(Maybe Date')
, _drRelativeDateRange :: !(Maybe DateRangeRelativeDateRange)
} deriving (Eq,Show,Data,Typeable,Generic)
dateRange
:: DateRange
dateRange =
DateRange
{ _drKind = "dfareporting#dateRange"
, _drEndDate = Nothing
, _drStartDate = Nothing
, _drRelativeDateRange = Nothing
}
drKind :: Lens' DateRange Text
drKind = lens _drKind (\ s a -> s{_drKind = a})
drEndDate :: Lens' DateRange (Maybe Day)
drEndDate
= lens _drEndDate (\ s a -> s{_drEndDate = a}) .
mapping _Date
drStartDate :: Lens' DateRange (Maybe Day)
drStartDate
= lens _drStartDate (\ s a -> s{_drStartDate = a}) .
mapping _Date
drRelativeDateRange :: Lens' DateRange (Maybe DateRangeRelativeDateRange)
drRelativeDateRange
= lens _drRelativeDateRange
(\ s a -> s{_drRelativeDateRange = a})
instance FromJSON DateRange where
parseJSON
= withObject "DateRange"
(\ o ->
DateRange <$>
(o .:? "kind" .!= "dfareporting#dateRange") <*>
(o .:? "endDate")
<*> (o .:? "startDate")
<*> (o .:? "relativeDateRange"))
instance ToJSON DateRange where
toJSON DateRange{..}
= object
(catMaybes
[Just ("kind" .= _drKind),
("endDate" .=) <$> _drEndDate,
("startDate" .=) <$> _drStartDate,
("relativeDateRange" .=) <$> _drRelativeDateRange])
data Report = Report
{ _rDelivery :: !(Maybe ReportDelivery)
, _rEtag :: !(Maybe Text)
, _rOwnerProFileId :: !(Maybe (Textual Int64))
, _rSchedule :: !(Maybe ReportSchedule)
, _rPathToConversionCriteria :: !(Maybe ReportPathToConversionCriteria)
, _rKind :: !Text
, _rFormat :: !(Maybe ReportFormat)
, _rReachCriteria :: !(Maybe ReportReachCriteria)
, _rLastModifiedTime :: !(Maybe (Textual Word64))
, _rAccountId :: !(Maybe (Textual Int64))
, _rName :: !(Maybe Text)
, _rId :: !(Maybe (Textual Int64))
, _rCrossDimensionReachCriteria :: !(Maybe ReportCrossDimensionReachCriteria)
, _rType :: !(Maybe ReportType)
, _rSubAccountId :: !(Maybe (Textual Int64))
, _rFloodlightCriteria :: !(Maybe ReportFloodlightCriteria)
, _rCriteria :: !(Maybe ReportCriteria)
, _rFileName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
report
:: Report
report =
Report
{ _rDelivery = Nothing
, _rEtag = Nothing
, _rOwnerProFileId = Nothing
, _rSchedule = Nothing
, _rPathToConversionCriteria = Nothing
, _rKind = "dfareporting#report"
, _rFormat = Nothing
, _rReachCriteria = Nothing
, _rLastModifiedTime = Nothing
, _rAccountId = Nothing
, _rName = Nothing
, _rId = Nothing
, _rCrossDimensionReachCriteria = Nothing
, _rType = Nothing
, _rSubAccountId = Nothing
, _rFloodlightCriteria = Nothing
, _rCriteria = Nothing
, _rFileName = Nothing
}
rDelivery :: Lens' Report (Maybe ReportDelivery)
rDelivery
= lens _rDelivery (\ s a -> s{_rDelivery = a})
rEtag :: Lens' Report (Maybe Text)
rEtag = lens _rEtag (\ s a -> s{_rEtag = a})
rOwnerProFileId :: Lens' Report (Maybe Int64)
rOwnerProFileId
= lens _rOwnerProFileId
(\ s a -> s{_rOwnerProFileId = a})
. mapping _Coerce
rSchedule :: Lens' Report (Maybe ReportSchedule)
rSchedule
= lens _rSchedule (\ s a -> s{_rSchedule = a})
rPathToConversionCriteria :: Lens' Report (Maybe ReportPathToConversionCriteria)
rPathToConversionCriteria
= lens _rPathToConversionCriteria
(\ s a -> s{_rPathToConversionCriteria = a})
rKind :: Lens' Report Text
rKind = lens _rKind (\ s a -> s{_rKind = a})
rFormat :: Lens' Report (Maybe ReportFormat)
rFormat = lens _rFormat (\ s a -> s{_rFormat = a})
rReachCriteria :: Lens' Report (Maybe ReportReachCriteria)
rReachCriteria
= lens _rReachCriteria
(\ s a -> s{_rReachCriteria = a})
rLastModifiedTime :: Lens' Report (Maybe Word64)
rLastModifiedTime
= lens _rLastModifiedTime
(\ s a -> s{_rLastModifiedTime = a})
. mapping _Coerce
rAccountId :: Lens' Report (Maybe Int64)
rAccountId
= lens _rAccountId (\ s a -> s{_rAccountId = a}) .
mapping _Coerce
rName :: Lens' Report (Maybe Text)
rName = lens _rName (\ s a -> s{_rName = a})
rId :: Lens' Report (Maybe Int64)
rId
= lens _rId (\ s a -> s{_rId = a}) . mapping _Coerce
rCrossDimensionReachCriteria :: Lens' Report (Maybe ReportCrossDimensionReachCriteria)
rCrossDimensionReachCriteria
= lens _rCrossDimensionReachCriteria
(\ s a -> s{_rCrossDimensionReachCriteria = a})
rType :: Lens' Report (Maybe ReportType)
rType = lens _rType (\ s a -> s{_rType = a})
rSubAccountId :: Lens' Report (Maybe Int64)
rSubAccountId
= lens _rSubAccountId
(\ s a -> s{_rSubAccountId = a})
. mapping _Coerce
rFloodlightCriteria :: Lens' Report (Maybe ReportFloodlightCriteria)
rFloodlightCriteria
= lens _rFloodlightCriteria
(\ s a -> s{_rFloodlightCriteria = a})
rCriteria :: Lens' Report (Maybe ReportCriteria)
rCriteria
= lens _rCriteria (\ s a -> s{_rCriteria = a})
rFileName :: Lens' Report (Maybe Text)
rFileName
= lens _rFileName (\ s a -> s{_rFileName = a})
instance FromJSON Report where
parseJSON
= withObject "Report"
(\ o ->
Report <$>
(o .:? "delivery") <*> (o .:? "etag") <*>
(o .:? "ownerProfileId")
<*> (o .:? "schedule")
<*> (o .:? "pathToConversionCriteria")
<*> (o .:? "kind" .!= "dfareporting#report")
<*> (o .:? "format")
<*> (o .:? "reachCriteria")
<*> (o .:? "lastModifiedTime")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "crossDimensionReachCriteria")
<*> (o .:? "type")
<*> (o .:? "subAccountId")
<*> (o .:? "floodlightCriteria")
<*> (o .:? "criteria")
<*> (o .:? "fileName"))
instance ToJSON Report where
toJSON Report{..}
= object
(catMaybes
[("delivery" .=) <$> _rDelivery,
("etag" .=) <$> _rEtag,
("ownerProfileId" .=) <$> _rOwnerProFileId,
("schedule" .=) <$> _rSchedule,
("pathToConversionCriteria" .=) <$>
_rPathToConversionCriteria,
Just ("kind" .= _rKind), ("format" .=) <$> _rFormat,
("reachCriteria" .=) <$> _rReachCriteria,
("lastModifiedTime" .=) <$> _rLastModifiedTime,
("accountId" .=) <$> _rAccountId,
("name" .=) <$> _rName, ("id" .=) <$> _rId,
("crossDimensionReachCriteria" .=) <$>
_rCrossDimensionReachCriteria,
("type" .=) <$> _rType,
("subAccountId" .=) <$> _rSubAccountId,
("floodlightCriteria" .=) <$> _rFloodlightCriteria,
("criteria" .=) <$> _rCriteria,
("fileName" .=) <$> _rFileName])
data Campaign = Campaign
{ _camCreativeOptimizationConfiguration :: !(Maybe CreativeOptimizationConfiguration)
, _camCreativeGroupIds :: !(Maybe [Textual Int64])
, _camNielsenOCREnabled :: !(Maybe Bool)
, _camKind :: !Text
, _camClickThroughURLSuffixProperties :: !(Maybe ClickThroughURLSuffixProperties)
, _camAdvertiserId :: !(Maybe (Textual Int64))
, _camEndDate :: !(Maybe Date')
, _camAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _camIdDimensionValue :: !(Maybe DimensionValue)
, _camEventTagOverrides :: !(Maybe [EventTagOverride])
, _camLookbackConfiguration :: !(Maybe LookbackConfiguration)
, _camStartDate :: !(Maybe Date')
, _camAccountId :: !(Maybe (Textual Int64))
, _camComscoreVceEnabled :: !(Maybe Bool)
, _camName :: !(Maybe Text)
, _camAdvertiserGroupId :: !(Maybe (Textual Int64))
, _camBillingInvoiceCode :: !(Maybe Text)
, _camCreateInfo :: !(Maybe LastModifiedInfo)
, _camLastModifiedInfo :: !(Maybe LastModifiedInfo)
, _camId :: !(Maybe (Textual Int64))
, _camSubAccountId :: !(Maybe (Textual Int64))
, _camAdditionalCreativeOptimizationConfigurations :: !(Maybe [CreativeOptimizationConfiguration])
, _camExternalId :: !(Maybe Text)
, _camComment :: !(Maybe Text)
, _camAudienceSegmentGroups :: !(Maybe [AudienceSegmentGroup])
, _camArchived :: !(Maybe Bool)
, _camTraffickerEmails :: !(Maybe [Text])
, _camDefaultClickThroughEventTagProperties :: !(Maybe DefaultClickThroughEventTagProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
campaign
:: Campaign
campaign =
Campaign
{ _camCreativeOptimizationConfiguration = Nothing
, _camCreativeGroupIds = Nothing
, _camNielsenOCREnabled = Nothing
, _camKind = "dfareporting#campaign"
, _camClickThroughURLSuffixProperties = Nothing
, _camAdvertiserId = Nothing
, _camEndDate = Nothing
, _camAdvertiserIdDimensionValue = Nothing
, _camIdDimensionValue = Nothing
, _camEventTagOverrides = Nothing
, _camLookbackConfiguration = Nothing
, _camStartDate = Nothing
, _camAccountId = Nothing
, _camComscoreVceEnabled = Nothing
, _camName = Nothing
, _camAdvertiserGroupId = Nothing
, _camBillingInvoiceCode = Nothing
, _camCreateInfo = Nothing
, _camLastModifiedInfo = Nothing
, _camId = Nothing
, _camSubAccountId = Nothing
, _camAdditionalCreativeOptimizationConfigurations = Nothing
, _camExternalId = Nothing
, _camComment = Nothing
, _camAudienceSegmentGroups = Nothing
, _camArchived = Nothing
, _camTraffickerEmails = Nothing
, _camDefaultClickThroughEventTagProperties = Nothing
}
camCreativeOptimizationConfiguration :: Lens' Campaign (Maybe CreativeOptimizationConfiguration)
camCreativeOptimizationConfiguration
= lens _camCreativeOptimizationConfiguration
(\ s a ->
s{_camCreativeOptimizationConfiguration = a})
camCreativeGroupIds :: Lens' Campaign [Int64]
camCreativeGroupIds
= lens _camCreativeGroupIds
(\ s a -> s{_camCreativeGroupIds = a})
. _Default
. _Coerce
camNielsenOCREnabled :: Lens' Campaign (Maybe Bool)
camNielsenOCREnabled
= lens _camNielsenOCREnabled
(\ s a -> s{_camNielsenOCREnabled = a})
camKind :: Lens' Campaign Text
camKind = lens _camKind (\ s a -> s{_camKind = a})
camClickThroughURLSuffixProperties :: Lens' Campaign (Maybe ClickThroughURLSuffixProperties)
camClickThroughURLSuffixProperties
= lens _camClickThroughURLSuffixProperties
(\ s a -> s{_camClickThroughURLSuffixProperties = a})
camAdvertiserId :: Lens' Campaign (Maybe Int64)
camAdvertiserId
= lens _camAdvertiserId
(\ s a -> s{_camAdvertiserId = a})
. mapping _Coerce
camEndDate :: Lens' Campaign (Maybe Day)
camEndDate
= lens _camEndDate (\ s a -> s{_camEndDate = a}) .
mapping _Date
camAdvertiserIdDimensionValue :: Lens' Campaign (Maybe DimensionValue)
camAdvertiserIdDimensionValue
= lens _camAdvertiserIdDimensionValue
(\ s a -> s{_camAdvertiserIdDimensionValue = a})
camIdDimensionValue :: Lens' Campaign (Maybe DimensionValue)
camIdDimensionValue
= lens _camIdDimensionValue
(\ s a -> s{_camIdDimensionValue = a})
camEventTagOverrides :: Lens' Campaign [EventTagOverride]
camEventTagOverrides
= lens _camEventTagOverrides
(\ s a -> s{_camEventTagOverrides = a})
. _Default
. _Coerce
camLookbackConfiguration :: Lens' Campaign (Maybe LookbackConfiguration)
camLookbackConfiguration
= lens _camLookbackConfiguration
(\ s a -> s{_camLookbackConfiguration = a})
camStartDate :: Lens' Campaign (Maybe Day)
camStartDate
= lens _camStartDate (\ s a -> s{_camStartDate = a})
. mapping _Date
camAccountId :: Lens' Campaign (Maybe Int64)
camAccountId
= lens _camAccountId (\ s a -> s{_camAccountId = a})
. mapping _Coerce
camComscoreVceEnabled :: Lens' Campaign (Maybe Bool)
camComscoreVceEnabled
= lens _camComscoreVceEnabled
(\ s a -> s{_camComscoreVceEnabled = a})
camName :: Lens' Campaign (Maybe Text)
camName = lens _camName (\ s a -> s{_camName = a})
camAdvertiserGroupId :: Lens' Campaign (Maybe Int64)
camAdvertiserGroupId
= lens _camAdvertiserGroupId
(\ s a -> s{_camAdvertiserGroupId = a})
. mapping _Coerce
camBillingInvoiceCode :: Lens' Campaign (Maybe Text)
camBillingInvoiceCode
= lens _camBillingInvoiceCode
(\ s a -> s{_camBillingInvoiceCode = a})
camCreateInfo :: Lens' Campaign (Maybe LastModifiedInfo)
camCreateInfo
= lens _camCreateInfo
(\ s a -> s{_camCreateInfo = a})
camLastModifiedInfo :: Lens' Campaign (Maybe LastModifiedInfo)
camLastModifiedInfo
= lens _camLastModifiedInfo
(\ s a -> s{_camLastModifiedInfo = a})
camId :: Lens' Campaign (Maybe Int64)
camId
= lens _camId (\ s a -> s{_camId = a}) .
mapping _Coerce
camSubAccountId :: Lens' Campaign (Maybe Int64)
camSubAccountId
= lens _camSubAccountId
(\ s a -> s{_camSubAccountId = a})
. mapping _Coerce
camAdditionalCreativeOptimizationConfigurations :: Lens' Campaign [CreativeOptimizationConfiguration]
camAdditionalCreativeOptimizationConfigurations
= lens
_camAdditionalCreativeOptimizationConfigurations
(\ s a ->
s{_camAdditionalCreativeOptimizationConfigurations =
a})
. _Default
. _Coerce
camExternalId :: Lens' Campaign (Maybe Text)
camExternalId
= lens _camExternalId
(\ s a -> s{_camExternalId = a})
camComment :: Lens' Campaign (Maybe Text)
camComment
= lens _camComment (\ s a -> s{_camComment = a})
camAudienceSegmentGroups :: Lens' Campaign [AudienceSegmentGroup]
camAudienceSegmentGroups
= lens _camAudienceSegmentGroups
(\ s a -> s{_camAudienceSegmentGroups = a})
. _Default
. _Coerce
camArchived :: Lens' Campaign (Maybe Bool)
camArchived
= lens _camArchived (\ s a -> s{_camArchived = a})
camTraffickerEmails :: Lens' Campaign [Text]
camTraffickerEmails
= lens _camTraffickerEmails
(\ s a -> s{_camTraffickerEmails = a})
. _Default
. _Coerce
camDefaultClickThroughEventTagProperties :: Lens' Campaign (Maybe DefaultClickThroughEventTagProperties)
camDefaultClickThroughEventTagProperties
= lens _camDefaultClickThroughEventTagProperties
(\ s a ->
s{_camDefaultClickThroughEventTagProperties = a})
instance FromJSON Campaign where
parseJSON
= withObject "Campaign"
(\ o ->
Campaign <$>
(o .:? "creativeOptimizationConfiguration") <*>
(o .:? "creativeGroupIds" .!= mempty)
<*> (o .:? "nielsenOcrEnabled")
<*> (o .:? "kind" .!= "dfareporting#campaign")
<*> (o .:? "clickThroughUrlSuffixProperties")
<*> (o .:? "advertiserId")
<*> (o .:? "endDate")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "idDimensionValue")
<*> (o .:? "eventTagOverrides" .!= mempty)
<*> (o .:? "lookbackConfiguration")
<*> (o .:? "startDate")
<*> (o .:? "accountId")
<*> (o .:? "comscoreVceEnabled")
<*> (o .:? "name")
<*> (o .:? "advertiserGroupId")
<*> (o .:? "billingInvoiceCode")
<*> (o .:? "createInfo")
<*> (o .:? "lastModifiedInfo")
<*> (o .:? "id")
<*> (o .:? "subaccountId")
<*>
(o .:? "additionalCreativeOptimizationConfigurations"
.!= mempty)
<*> (o .:? "externalId")
<*> (o .:? "comment")
<*> (o .:? "audienceSegmentGroups" .!= mempty)
<*> (o .:? "archived")
<*> (o .:? "traffickerEmails" .!= mempty)
<*> (o .:? "defaultClickThroughEventTagProperties"))
instance ToJSON Campaign where
toJSON Campaign{..}
= object
(catMaybes
[("creativeOptimizationConfiguration" .=) <$>
_camCreativeOptimizationConfiguration,
("creativeGroupIds" .=) <$> _camCreativeGroupIds,
("nielsenOcrEnabled" .=) <$> _camNielsenOCREnabled,
Just ("kind" .= _camKind),
("clickThroughUrlSuffixProperties" .=) <$>
_camClickThroughURLSuffixProperties,
("advertiserId" .=) <$> _camAdvertiserId,
("endDate" .=) <$> _camEndDate,
("advertiserIdDimensionValue" .=) <$>
_camAdvertiserIdDimensionValue,
("idDimensionValue" .=) <$> _camIdDimensionValue,
("eventTagOverrides" .=) <$> _camEventTagOverrides,
("lookbackConfiguration" .=) <$>
_camLookbackConfiguration,
("startDate" .=) <$> _camStartDate,
("accountId" .=) <$> _camAccountId,
("comscoreVceEnabled" .=) <$> _camComscoreVceEnabled,
("name" .=) <$> _camName,
("advertiserGroupId" .=) <$> _camAdvertiserGroupId,
("billingInvoiceCode" .=) <$> _camBillingInvoiceCode,
("createInfo" .=) <$> _camCreateInfo,
("lastModifiedInfo" .=) <$> _camLastModifiedInfo,
("id" .=) <$> _camId,
("subaccountId" .=) <$> _camSubAccountId,
("additionalCreativeOptimizationConfigurations" .=)
<$> _camAdditionalCreativeOptimizationConfigurations,
("externalId" .=) <$> _camExternalId,
("comment" .=) <$> _camComment,
("audienceSegmentGroups" .=) <$>
_camAudienceSegmentGroups,
("archived" .=) <$> _camArchived,
("traffickerEmails" .=) <$> _camTraffickerEmails,
("defaultClickThroughEventTagProperties" .=) <$>
_camDefaultClickThroughEventTagProperties])
data ThirdPartyAuthenticationToken = ThirdPartyAuthenticationToken
{ _tpatValue :: !(Maybe Text)
, _tpatName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
thirdPartyAuthenticationToken
:: ThirdPartyAuthenticationToken
thirdPartyAuthenticationToken =
ThirdPartyAuthenticationToken
{ _tpatValue = Nothing
, _tpatName = Nothing
}
tpatValue :: Lens' ThirdPartyAuthenticationToken (Maybe Text)
tpatValue
= lens _tpatValue (\ s a -> s{_tpatValue = a})
tpatName :: Lens' ThirdPartyAuthenticationToken (Maybe Text)
tpatName = lens _tpatName (\ s a -> s{_tpatName = a})
instance FromJSON ThirdPartyAuthenticationToken where
parseJSON
= withObject "ThirdPartyAuthenticationToken"
(\ o ->
ThirdPartyAuthenticationToken <$>
(o .:? "value") <*> (o .:? "name"))
instance ToJSON ThirdPartyAuthenticationToken where
toJSON ThirdPartyAuthenticationToken{..}
= object
(catMaybes
[("value" .=) <$> _tpatValue,
("name" .=) <$> _tpatName])
data ClickThroughURL = ClickThroughURL
{ _ctuDefaultLandingPage :: !(Maybe Bool)
, _ctuComputedClickThroughURL :: !(Maybe Text)
, _ctuCustomClickThroughURL :: !(Maybe Text)
, _ctuLandingPageId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
clickThroughURL
:: ClickThroughURL
clickThroughURL =
ClickThroughURL
{ _ctuDefaultLandingPage = Nothing
, _ctuComputedClickThroughURL = Nothing
, _ctuCustomClickThroughURL = Nothing
, _ctuLandingPageId = Nothing
}
ctuDefaultLandingPage :: Lens' ClickThroughURL (Maybe Bool)
ctuDefaultLandingPage
= lens _ctuDefaultLandingPage
(\ s a -> s{_ctuDefaultLandingPage = a})
ctuComputedClickThroughURL :: Lens' ClickThroughURL (Maybe Text)
ctuComputedClickThroughURL
= lens _ctuComputedClickThroughURL
(\ s a -> s{_ctuComputedClickThroughURL = a})
ctuCustomClickThroughURL :: Lens' ClickThroughURL (Maybe Text)
ctuCustomClickThroughURL
= lens _ctuCustomClickThroughURL
(\ s a -> s{_ctuCustomClickThroughURL = a})
ctuLandingPageId :: Lens' ClickThroughURL (Maybe Int64)
ctuLandingPageId
= lens _ctuLandingPageId
(\ s a -> s{_ctuLandingPageId = a})
. mapping _Coerce
instance FromJSON ClickThroughURL where
parseJSON
= withObject "ClickThroughURL"
(\ o ->
ClickThroughURL <$>
(o .:? "defaultLandingPage") <*>
(o .:? "computedClickThroughUrl")
<*> (o .:? "customClickThroughUrl")
<*> (o .:? "landingPageId"))
instance ToJSON ClickThroughURL where
toJSON ClickThroughURL{..}
= object
(catMaybes
[("defaultLandingPage" .=) <$>
_ctuDefaultLandingPage,
("computedClickThroughUrl" .=) <$>
_ctuComputedClickThroughURL,
("customClickThroughUrl" .=) <$>
_ctuCustomClickThroughURL,
("landingPageId" .=) <$> _ctuLandingPageId])
data BrowsersListResponse = BrowsersListResponse
{ _blrKind :: !Text
, _blrBrowsers :: !(Maybe [Browser])
} deriving (Eq,Show,Data,Typeable,Generic)
browsersListResponse
:: BrowsersListResponse
browsersListResponse =
BrowsersListResponse
{ _blrKind = "dfareporting#browsersListResponse"
, _blrBrowsers = Nothing
}
blrKind :: Lens' BrowsersListResponse Text
blrKind = lens _blrKind (\ s a -> s{_blrKind = a})
blrBrowsers :: Lens' BrowsersListResponse [Browser]
blrBrowsers
= lens _blrBrowsers (\ s a -> s{_blrBrowsers = a}) .
_Default
. _Coerce
instance FromJSON BrowsersListResponse where
parseJSON
= withObject "BrowsersListResponse"
(\ o ->
BrowsersListResponse <$>
(o .:? "kind" .!=
"dfareporting#browsersListResponse")
<*> (o .:? "browsers" .!= mempty))
instance ToJSON BrowsersListResponse where
toJSON BrowsersListResponse{..}
= object
(catMaybes
[Just ("kind" .= _blrKind),
("browsers" .=) <$> _blrBrowsers])
data SiteSettings = SiteSettings
{ _ssDisableNewCookie :: !(Maybe Bool)
, _ssDisableBrandSafeAds :: !(Maybe Bool)
, _ssLookbackConfiguration :: !(Maybe LookbackConfiguration)
, _ssTagSetting :: !(Maybe TagSetting)
, _ssActiveViewOptOut :: !(Maybe Bool)
, _ssCreativeSettings :: !(Maybe CreativeSettings)
} deriving (Eq,Show,Data,Typeable,Generic)
siteSettings
:: SiteSettings
siteSettings =
SiteSettings
{ _ssDisableNewCookie = Nothing
, _ssDisableBrandSafeAds = Nothing
, _ssLookbackConfiguration = Nothing
, _ssTagSetting = Nothing
, _ssActiveViewOptOut = Nothing
, _ssCreativeSettings = Nothing
}
ssDisableNewCookie :: Lens' SiteSettings (Maybe Bool)
ssDisableNewCookie
= lens _ssDisableNewCookie
(\ s a -> s{_ssDisableNewCookie = a})
ssDisableBrandSafeAds :: Lens' SiteSettings (Maybe Bool)
ssDisableBrandSafeAds
= lens _ssDisableBrandSafeAds
(\ s a -> s{_ssDisableBrandSafeAds = a})
ssLookbackConfiguration :: Lens' SiteSettings (Maybe LookbackConfiguration)
ssLookbackConfiguration
= lens _ssLookbackConfiguration
(\ s a -> s{_ssLookbackConfiguration = a})
ssTagSetting :: Lens' SiteSettings (Maybe TagSetting)
ssTagSetting
= lens _ssTagSetting (\ s a -> s{_ssTagSetting = a})
ssActiveViewOptOut :: Lens' SiteSettings (Maybe Bool)
ssActiveViewOptOut
= lens _ssActiveViewOptOut
(\ s a -> s{_ssActiveViewOptOut = a})
ssCreativeSettings :: Lens' SiteSettings (Maybe CreativeSettings)
ssCreativeSettings
= lens _ssCreativeSettings
(\ s a -> s{_ssCreativeSettings = a})
instance FromJSON SiteSettings where
parseJSON
= withObject "SiteSettings"
(\ o ->
SiteSettings <$>
(o .:? "disableNewCookie") <*>
(o .:? "disableBrandSafeAds")
<*> (o .:? "lookbackConfiguration")
<*> (o .:? "tagSetting")
<*> (o .:? "activeViewOptOut")
<*> (o .:? "creativeSettings"))
instance ToJSON SiteSettings where
toJSON SiteSettings{..}
= object
(catMaybes
[("disableNewCookie" .=) <$> _ssDisableNewCookie,
("disableBrandSafeAds" .=) <$>
_ssDisableBrandSafeAds,
("lookbackConfiguration" .=) <$>
_ssLookbackConfiguration,
("tagSetting" .=) <$> _ssTagSetting,
("activeViewOptOut" .=) <$> _ssActiveViewOptOut,
("creativeSettings" .=) <$> _ssCreativeSettings])
data ContentCategoriesListResponse = ContentCategoriesListResponse
{ _cclrNextPageToken :: !(Maybe Text)
, _cclrKind :: !Text
, _cclrContentCategories :: !(Maybe [ContentCategory])
} deriving (Eq,Show,Data,Typeable,Generic)
contentCategoriesListResponse
:: ContentCategoriesListResponse
contentCategoriesListResponse =
ContentCategoriesListResponse
{ _cclrNextPageToken = Nothing
, _cclrKind = "dfareporting#contentCategoriesListResponse"
, _cclrContentCategories = Nothing
}
cclrNextPageToken :: Lens' ContentCategoriesListResponse (Maybe Text)
cclrNextPageToken
= lens _cclrNextPageToken
(\ s a -> s{_cclrNextPageToken = a})
cclrKind :: Lens' ContentCategoriesListResponse Text
cclrKind = lens _cclrKind (\ s a -> s{_cclrKind = a})
cclrContentCategories :: Lens' ContentCategoriesListResponse [ContentCategory]
cclrContentCategories
= lens _cclrContentCategories
(\ s a -> s{_cclrContentCategories = a})
. _Default
. _Coerce
instance FromJSON ContentCategoriesListResponse where
parseJSON
= withObject "ContentCategoriesListResponse"
(\ o ->
ContentCategoriesListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#contentCategoriesListResponse")
<*> (o .:? "contentCategories" .!= mempty))
instance ToJSON ContentCategoriesListResponse where
toJSON ContentCategoriesListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _cclrNextPageToken,
Just ("kind" .= _cclrKind),
("contentCategories" .=) <$> _cclrContentCategories])
data CreativesListResponse = CreativesListResponse
{ _clrlNextPageToken :: !(Maybe Text)
, _clrlKind :: !Text
, _clrlCreatives :: !(Maybe [Creative])
} deriving (Eq,Show,Data,Typeable,Generic)
creativesListResponse
:: CreativesListResponse
creativesListResponse =
CreativesListResponse
{ _clrlNextPageToken = Nothing
, _clrlKind = "dfareporting#creativesListResponse"
, _clrlCreatives = Nothing
}
clrlNextPageToken :: Lens' CreativesListResponse (Maybe Text)
clrlNextPageToken
= lens _clrlNextPageToken
(\ s a -> s{_clrlNextPageToken = a})
clrlKind :: Lens' CreativesListResponse Text
clrlKind = lens _clrlKind (\ s a -> s{_clrlKind = a})
clrlCreatives :: Lens' CreativesListResponse [Creative]
clrlCreatives
= lens _clrlCreatives
(\ s a -> s{_clrlCreatives = a})
. _Default
. _Coerce
instance FromJSON CreativesListResponse where
parseJSON
= withObject "CreativesListResponse"
(\ o ->
CreativesListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#creativesListResponse")
<*> (o .:? "creatives" .!= mempty))
instance ToJSON CreativesListResponse where
toJSON CreativesListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _clrlNextPageToken,
Just ("kind" .= _clrlKind),
("creatives" .=) <$> _clrlCreatives])
data Account = Account
{ _aaAccountPermissionIds :: !(Maybe [Textual Int64])
, _aaMaximumImageSize :: !(Maybe (Textual Int64))
, _aaCurrencyId :: !(Maybe (Textual Int64))
, _aaReportsConfiguration :: !(Maybe ReportsConfiguration)
, _aaNielsenOCREnabled :: !(Maybe Bool)
, _aaKind :: !Text
, _aaLocale :: !(Maybe Text)
, _aaActive :: !(Maybe Bool)
, _aaAvailablePermissionIds :: !(Maybe [Textual Int64])
, _aaTeaserSizeLimit :: !(Maybe (Textual Int64))
, _aaComscoreVceEnabled :: !(Maybe Bool)
, _aaActiveViewOptOut :: !(Maybe Bool)
, _aaName :: !(Maybe Text)
, _aaAccountProFile :: !(Maybe AccountAccountProFile)
, _aaId :: !(Maybe (Textual Int64))
, _aaCountryId :: !(Maybe (Textual Int64))
, _aaActiveAdsLimitTier :: !(Maybe AccountActiveAdsLimitTier)
, _aaDefaultCreativeSizeId :: !(Maybe (Textual Int64))
, _aaDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
account
:: Account
account =
Account
{ _aaAccountPermissionIds = Nothing
, _aaMaximumImageSize = Nothing
, _aaCurrencyId = Nothing
, _aaReportsConfiguration = Nothing
, _aaNielsenOCREnabled = Nothing
, _aaKind = "dfareporting#account"
, _aaLocale = Nothing
, _aaActive = Nothing
, _aaAvailablePermissionIds = Nothing
, _aaTeaserSizeLimit = Nothing
, _aaComscoreVceEnabled = Nothing
, _aaActiveViewOptOut = Nothing
, _aaName = Nothing
, _aaAccountProFile = Nothing
, _aaId = Nothing
, _aaCountryId = Nothing
, _aaActiveAdsLimitTier = Nothing
, _aaDefaultCreativeSizeId = Nothing
, _aaDescription = Nothing
}
aaAccountPermissionIds :: Lens' Account [Int64]
aaAccountPermissionIds
= lens _aaAccountPermissionIds
(\ s a -> s{_aaAccountPermissionIds = a})
. _Default
. _Coerce
aaMaximumImageSize :: Lens' Account (Maybe Int64)
aaMaximumImageSize
= lens _aaMaximumImageSize
(\ s a -> s{_aaMaximumImageSize = a})
. mapping _Coerce
aaCurrencyId :: Lens' Account (Maybe Int64)
aaCurrencyId
= lens _aaCurrencyId (\ s a -> s{_aaCurrencyId = a})
. mapping _Coerce
aaReportsConfiguration :: Lens' Account (Maybe ReportsConfiguration)
aaReportsConfiguration
= lens _aaReportsConfiguration
(\ s a -> s{_aaReportsConfiguration = a})
aaNielsenOCREnabled :: Lens' Account (Maybe Bool)
aaNielsenOCREnabled
= lens _aaNielsenOCREnabled
(\ s a -> s{_aaNielsenOCREnabled = a})
aaKind :: Lens' Account Text
aaKind = lens _aaKind (\ s a -> s{_aaKind = a})
aaLocale :: Lens' Account (Maybe Text)
aaLocale = lens _aaLocale (\ s a -> s{_aaLocale = a})
aaActive :: Lens' Account (Maybe Bool)
aaActive = lens _aaActive (\ s a -> s{_aaActive = a})
aaAvailablePermissionIds :: Lens' Account [Int64]
aaAvailablePermissionIds
= lens _aaAvailablePermissionIds
(\ s a -> s{_aaAvailablePermissionIds = a})
. _Default
. _Coerce
aaTeaserSizeLimit :: Lens' Account (Maybe Int64)
aaTeaserSizeLimit
= lens _aaTeaserSizeLimit
(\ s a -> s{_aaTeaserSizeLimit = a})
. mapping _Coerce
aaComscoreVceEnabled :: Lens' Account (Maybe Bool)
aaComscoreVceEnabled
= lens _aaComscoreVceEnabled
(\ s a -> s{_aaComscoreVceEnabled = a})
aaActiveViewOptOut :: Lens' Account (Maybe Bool)
aaActiveViewOptOut
= lens _aaActiveViewOptOut
(\ s a -> s{_aaActiveViewOptOut = a})
aaName :: Lens' Account (Maybe Text)
aaName = lens _aaName (\ s a -> s{_aaName = a})
aaAccountProFile :: Lens' Account (Maybe AccountAccountProFile)
aaAccountProFile
= lens _aaAccountProFile
(\ s a -> s{_aaAccountProFile = a})
aaId :: Lens' Account (Maybe Int64)
aaId
= lens _aaId (\ s a -> s{_aaId = a}) .
mapping _Coerce
aaCountryId :: Lens' Account (Maybe Int64)
aaCountryId
= lens _aaCountryId (\ s a -> s{_aaCountryId = a}) .
mapping _Coerce
aaActiveAdsLimitTier :: Lens' Account (Maybe AccountActiveAdsLimitTier)
aaActiveAdsLimitTier
= lens _aaActiveAdsLimitTier
(\ s a -> s{_aaActiveAdsLimitTier = a})
aaDefaultCreativeSizeId :: Lens' Account (Maybe Int64)
aaDefaultCreativeSizeId
= lens _aaDefaultCreativeSizeId
(\ s a -> s{_aaDefaultCreativeSizeId = a})
. mapping _Coerce
aaDescription :: Lens' Account (Maybe Text)
aaDescription
= lens _aaDescription
(\ s a -> s{_aaDescription = a})
instance FromJSON Account where
parseJSON
= withObject "Account"
(\ o ->
Account <$>
(o .:? "accountPermissionIds" .!= mempty) <*>
(o .:? "maximumImageSize")
<*> (o .:? "currencyId")
<*> (o .:? "reportsConfiguration")
<*> (o .:? "nielsenOcrEnabled")
<*> (o .:? "kind" .!= "dfareporting#account")
<*> (o .:? "locale")
<*> (o .:? "active")
<*> (o .:? "availablePermissionIds" .!= mempty)
<*> (o .:? "teaserSizeLimit")
<*> (o .:? "comscoreVceEnabled")
<*> (o .:? "activeViewOptOut")
<*> (o .:? "name")
<*> (o .:? "accountProfile")
<*> (o .:? "id")
<*> (o .:? "countryId")
<*> (o .:? "activeAdsLimitTier")
<*> (o .:? "defaultCreativeSizeId")
<*> (o .:? "description"))
instance ToJSON Account where
toJSON Account{..}
= object
(catMaybes
[("accountPermissionIds" .=) <$>
_aaAccountPermissionIds,
("maximumImageSize" .=) <$> _aaMaximumImageSize,
("currencyId" .=) <$> _aaCurrencyId,
("reportsConfiguration" .=) <$>
_aaReportsConfiguration,
("nielsenOcrEnabled" .=) <$> _aaNielsenOCREnabled,
Just ("kind" .= _aaKind),
("locale" .=) <$> _aaLocale,
("active" .=) <$> _aaActive,
("availablePermissionIds" .=) <$>
_aaAvailablePermissionIds,
("teaserSizeLimit" .=) <$> _aaTeaserSizeLimit,
("comscoreVceEnabled" .=) <$> _aaComscoreVceEnabled,
("activeViewOptOut" .=) <$> _aaActiveViewOptOut,
("name" .=) <$> _aaName,
("accountProfile" .=) <$> _aaAccountProFile,
("id" .=) <$> _aaId,
("countryId" .=) <$> _aaCountryId,
("activeAdsLimitTier" .=) <$> _aaActiveAdsLimitTier,
("defaultCreativeSizeId" .=) <$>
_aaDefaultCreativeSizeId,
("description" .=) <$> _aaDescription])
data AccountUserProFilesListResponse = AccountUserProFilesListResponse
{ _aupflrNextPageToken :: !(Maybe Text)
, _aupflrAccountUserProFiles :: !(Maybe [AccountUserProFile])
, _aupflrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountUserProFilesListResponse
:: AccountUserProFilesListResponse
accountUserProFilesListResponse =
AccountUserProFilesListResponse
{ _aupflrNextPageToken = Nothing
, _aupflrAccountUserProFiles = Nothing
, _aupflrKind = "dfareporting#accountUserProfilesListResponse"
}
aupflrNextPageToken :: Lens' AccountUserProFilesListResponse (Maybe Text)
aupflrNextPageToken
= lens _aupflrNextPageToken
(\ s a -> s{_aupflrNextPageToken = a})
aupflrAccountUserProFiles :: Lens' AccountUserProFilesListResponse [AccountUserProFile]
aupflrAccountUserProFiles
= lens _aupflrAccountUserProFiles
(\ s a -> s{_aupflrAccountUserProFiles = a})
. _Default
. _Coerce
aupflrKind :: Lens' AccountUserProFilesListResponse Text
aupflrKind
= lens _aupflrKind (\ s a -> s{_aupflrKind = a})
instance FromJSON AccountUserProFilesListResponse
where
parseJSON
= withObject "AccountUserProFilesListResponse"
(\ o ->
AccountUserProFilesListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "accountUserProfiles" .!= mempty)
<*>
(o .:? "kind" .!=
"dfareporting#accountUserProfilesListResponse"))
instance ToJSON AccountUserProFilesListResponse where
toJSON AccountUserProFilesListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _aupflrNextPageToken,
("accountUserProfiles" .=) <$>
_aupflrAccountUserProFiles,
Just ("kind" .= _aupflrKind)])
data ContentCategory = ContentCategory
{ _conKind :: !Text
, _conAccountId :: !(Maybe (Textual Int64))
, _conName :: !(Maybe Text)
, _conId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
contentCategory
:: ContentCategory
contentCategory =
ContentCategory
{ _conKind = "dfareporting#contentCategory"
, _conAccountId = Nothing
, _conName = Nothing
, _conId = Nothing
}
conKind :: Lens' ContentCategory Text
conKind = lens _conKind (\ s a -> s{_conKind = a})
conAccountId :: Lens' ContentCategory (Maybe Int64)
conAccountId
= lens _conAccountId (\ s a -> s{_conAccountId = a})
. mapping _Coerce
conName :: Lens' ContentCategory (Maybe Text)
conName = lens _conName (\ s a -> s{_conName = a})
conId :: Lens' ContentCategory (Maybe Int64)
conId
= lens _conId (\ s a -> s{_conId = a}) .
mapping _Coerce
instance FromJSON ContentCategory where
parseJSON
= withObject "ContentCategory"
(\ o ->
ContentCategory <$>
(o .:? "kind" .!= "dfareporting#contentCategory") <*>
(o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON ContentCategory where
toJSON ContentCategory{..}
= object
(catMaybes
[Just ("kind" .= _conKind),
("accountId" .=) <$> _conAccountId,
("name" .=) <$> _conName, ("id" .=) <$> _conId])
data ReportCompatibleFields = ReportCompatibleFields
{ _rcfMetrics :: !(Maybe [Metric])
, _rcfKind :: !Text
, _rcfDimensionFilters :: !(Maybe [Dimension])
, _rcfPivotedActivityMetrics :: !(Maybe [Metric])
, _rcfDimensions :: !(Maybe [Dimension])
} deriving (Eq,Show,Data,Typeable,Generic)
reportCompatibleFields
:: ReportCompatibleFields
reportCompatibleFields =
ReportCompatibleFields
{ _rcfMetrics = Nothing
, _rcfKind = "dfareporting#reportCompatibleFields"
, _rcfDimensionFilters = Nothing
, _rcfPivotedActivityMetrics = Nothing
, _rcfDimensions = Nothing
}
rcfMetrics :: Lens' ReportCompatibleFields [Metric]
rcfMetrics
= lens _rcfMetrics (\ s a -> s{_rcfMetrics = a}) .
_Default
. _Coerce
rcfKind :: Lens' ReportCompatibleFields Text
rcfKind = lens _rcfKind (\ s a -> s{_rcfKind = a})
rcfDimensionFilters :: Lens' ReportCompatibleFields [Dimension]
rcfDimensionFilters
= lens _rcfDimensionFilters
(\ s a -> s{_rcfDimensionFilters = a})
. _Default
. _Coerce
rcfPivotedActivityMetrics :: Lens' ReportCompatibleFields [Metric]
rcfPivotedActivityMetrics
= lens _rcfPivotedActivityMetrics
(\ s a -> s{_rcfPivotedActivityMetrics = a})
. _Default
. _Coerce
rcfDimensions :: Lens' ReportCompatibleFields [Dimension]
rcfDimensions
= lens _rcfDimensions
(\ s a -> s{_rcfDimensions = a})
. _Default
. _Coerce
instance FromJSON ReportCompatibleFields where
parseJSON
= withObject "ReportCompatibleFields"
(\ o ->
ReportCompatibleFields <$>
(o .:? "metrics" .!= mempty) <*>
(o .:? "kind" .!=
"dfareporting#reportCompatibleFields")
<*> (o .:? "dimensionFilters" .!= mempty)
<*> (o .:? "pivotedActivityMetrics" .!= mempty)
<*> (o .:? "dimensions" .!= mempty))
instance ToJSON ReportCompatibleFields where
toJSON ReportCompatibleFields{..}
= object
(catMaybes
[("metrics" .=) <$> _rcfMetrics,
Just ("kind" .= _rcfKind),
("dimensionFilters" .=) <$> _rcfDimensionFilters,
("pivotedActivityMetrics" .=) <$>
_rcfPivotedActivityMetrics,
("dimensions" .=) <$> _rcfDimensions])
data DeliverySchedule = DeliverySchedule
{ _dsHardCutoff :: !(Maybe Bool)
, _dsPriority :: !(Maybe DeliverySchedulePriority)
, _dsImpressionRatio :: !(Maybe (Textual Int64))
, _dsFrequencyCap :: !(Maybe FrequencyCap)
} deriving (Eq,Show,Data,Typeable,Generic)
deliverySchedule
:: DeliverySchedule
deliverySchedule =
DeliverySchedule
{ _dsHardCutoff = Nothing
, _dsPriority = Nothing
, _dsImpressionRatio = Nothing
, _dsFrequencyCap = Nothing
}
dsHardCutoff :: Lens' DeliverySchedule (Maybe Bool)
dsHardCutoff
= lens _dsHardCutoff (\ s a -> s{_dsHardCutoff = a})
dsPriority :: Lens' DeliverySchedule (Maybe DeliverySchedulePriority)
dsPriority
= lens _dsPriority (\ s a -> s{_dsPriority = a})
dsImpressionRatio :: Lens' DeliverySchedule (Maybe Int64)
dsImpressionRatio
= lens _dsImpressionRatio
(\ s a -> s{_dsImpressionRatio = a})
. mapping _Coerce
dsFrequencyCap :: Lens' DeliverySchedule (Maybe FrequencyCap)
dsFrequencyCap
= lens _dsFrequencyCap
(\ s a -> s{_dsFrequencyCap = a})
instance FromJSON DeliverySchedule where
parseJSON
= withObject "DeliverySchedule"
(\ o ->
DeliverySchedule <$>
(o .:? "hardCutoff") <*> (o .:? "priority") <*>
(o .:? "impressionRatio")
<*> (o .:? "frequencyCap"))
instance ToJSON DeliverySchedule where
toJSON DeliverySchedule{..}
= object
(catMaybes
[("hardCutoff" .=) <$> _dsHardCutoff,
("priority" .=) <$> _dsPriority,
("impressionRatio" .=) <$> _dsImpressionRatio,
("frequencyCap" .=) <$> _dsFrequencyCap])
data RemarketingList = RemarketingList
{ _rlListSize :: !(Maybe (Textual Int64))
, _rlListPopulationRule :: !(Maybe ListPopulationRule)
, _rlLifeSpan :: !(Maybe (Textual Int64))
, _rlKind :: !Text
, _rlAdvertiserId :: !(Maybe (Textual Int64))
, _rlAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _rlActive :: !(Maybe Bool)
, _rlAccountId :: !(Maybe (Textual Int64))
, _rlName :: !(Maybe Text)
, _rlListSource :: !(Maybe RemarketingListListSource)
, _rlId :: !(Maybe (Textual Int64))
, _rlSubAccountId :: !(Maybe (Textual Int64))
, _rlDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
remarketingList
:: RemarketingList
remarketingList =
RemarketingList
{ _rlListSize = Nothing
, _rlListPopulationRule = Nothing
, _rlLifeSpan = Nothing
, _rlKind = "dfareporting#remarketingList"
, _rlAdvertiserId = Nothing
, _rlAdvertiserIdDimensionValue = Nothing
, _rlActive = Nothing
, _rlAccountId = Nothing
, _rlName = Nothing
, _rlListSource = Nothing
, _rlId = Nothing
, _rlSubAccountId = Nothing
, _rlDescription = Nothing
}
rlListSize :: Lens' RemarketingList (Maybe Int64)
rlListSize
= lens _rlListSize (\ s a -> s{_rlListSize = a}) .
mapping _Coerce
rlListPopulationRule :: Lens' RemarketingList (Maybe ListPopulationRule)
rlListPopulationRule
= lens _rlListPopulationRule
(\ s a -> s{_rlListPopulationRule = a})
rlLifeSpan :: Lens' RemarketingList (Maybe Int64)
rlLifeSpan
= lens _rlLifeSpan (\ s a -> s{_rlLifeSpan = a}) .
mapping _Coerce
rlKind :: Lens' RemarketingList Text
rlKind = lens _rlKind (\ s a -> s{_rlKind = a})
rlAdvertiserId :: Lens' RemarketingList (Maybe Int64)
rlAdvertiserId
= lens _rlAdvertiserId
(\ s a -> s{_rlAdvertiserId = a})
. mapping _Coerce
rlAdvertiserIdDimensionValue :: Lens' RemarketingList (Maybe DimensionValue)
rlAdvertiserIdDimensionValue
= lens _rlAdvertiserIdDimensionValue
(\ s a -> s{_rlAdvertiserIdDimensionValue = a})
rlActive :: Lens' RemarketingList (Maybe Bool)
rlActive = lens _rlActive (\ s a -> s{_rlActive = a})
rlAccountId :: Lens' RemarketingList (Maybe Int64)
rlAccountId
= lens _rlAccountId (\ s a -> s{_rlAccountId = a}) .
mapping _Coerce
rlName :: Lens' RemarketingList (Maybe Text)
rlName = lens _rlName (\ s a -> s{_rlName = a})
rlListSource :: Lens' RemarketingList (Maybe RemarketingListListSource)
rlListSource
= lens _rlListSource (\ s a -> s{_rlListSource = a})
rlId :: Lens' RemarketingList (Maybe Int64)
rlId
= lens _rlId (\ s a -> s{_rlId = a}) .
mapping _Coerce
rlSubAccountId :: Lens' RemarketingList (Maybe Int64)
rlSubAccountId
= lens _rlSubAccountId
(\ s a -> s{_rlSubAccountId = a})
. mapping _Coerce
rlDescription :: Lens' RemarketingList (Maybe Text)
rlDescription
= lens _rlDescription
(\ s a -> s{_rlDescription = a})
instance FromJSON RemarketingList where
parseJSON
= withObject "RemarketingList"
(\ o ->
RemarketingList <$>
(o .:? "listSize") <*> (o .:? "listPopulationRule")
<*> (o .:? "lifeSpan")
<*> (o .:? "kind" .!= "dfareporting#remarketingList")
<*> (o .:? "advertiserId")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "active")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "listSource")
<*> (o .:? "id")
<*> (o .:? "subaccountId")
<*> (o .:? "description"))
instance ToJSON RemarketingList where
toJSON RemarketingList{..}
= object
(catMaybes
[("listSize" .=) <$> _rlListSize,
("listPopulationRule" .=) <$> _rlListPopulationRule,
("lifeSpan" .=) <$> _rlLifeSpan,
Just ("kind" .= _rlKind),
("advertiserId" .=) <$> _rlAdvertiserId,
("advertiserIdDimensionValue" .=) <$>
_rlAdvertiserIdDimensionValue,
("active" .=) <$> _rlActive,
("accountId" .=) <$> _rlAccountId,
("name" .=) <$> _rlName,
("listSource" .=) <$> _rlListSource,
("id" .=) <$> _rlId,
("subaccountId" .=) <$> _rlSubAccountId,
("description" .=) <$> _rlDescription])
data DimensionValueList = DimensionValueList
{ _dvlEtag :: !(Maybe Text)
, _dvlNextPageToken :: !(Maybe Text)
, _dvlKind :: !Text
, _dvlItems :: !(Maybe [DimensionValue])
} deriving (Eq,Show,Data,Typeable,Generic)
dimensionValueList
:: DimensionValueList
dimensionValueList =
DimensionValueList
{ _dvlEtag = Nothing
, _dvlNextPageToken = Nothing
, _dvlKind = "dfareporting#dimensionValueList"
, _dvlItems = Nothing
}
dvlEtag :: Lens' DimensionValueList (Maybe Text)
dvlEtag = lens _dvlEtag (\ s a -> s{_dvlEtag = a})
dvlNextPageToken :: Lens' DimensionValueList (Maybe Text)
dvlNextPageToken
= lens _dvlNextPageToken
(\ s a -> s{_dvlNextPageToken = a})
dvlKind :: Lens' DimensionValueList Text
dvlKind = lens _dvlKind (\ s a -> s{_dvlKind = a})
dvlItems :: Lens' DimensionValueList [DimensionValue]
dvlItems
= lens _dvlItems (\ s a -> s{_dvlItems = a}) .
_Default
. _Coerce
instance FromJSON DimensionValueList where
parseJSON
= withObject "DimensionValueList"
(\ o ->
DimensionValueList <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "dfareporting#dimensionValueList")
<*> (o .:? "items" .!= mempty))
instance ToJSON DimensionValueList where
toJSON DimensionValueList{..}
= object
(catMaybes
[("etag" .=) <$> _dvlEtag,
("nextPageToken" .=) <$> _dvlNextPageToken,
Just ("kind" .= _dvlKind),
("items" .=) <$> _dvlItems])
data FloodlightReportCompatibleFields = FloodlightReportCompatibleFields
{ _frcfMetrics :: !(Maybe [Metric])
, _frcfKind :: !Text
, _frcfDimensionFilters :: !(Maybe [Dimension])
, _frcfDimensions :: !(Maybe [Dimension])
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightReportCompatibleFields
:: FloodlightReportCompatibleFields
floodlightReportCompatibleFields =
FloodlightReportCompatibleFields
{ _frcfMetrics = Nothing
, _frcfKind = "dfareporting#floodlightReportCompatibleFields"
, _frcfDimensionFilters = Nothing
, _frcfDimensions = Nothing
}
frcfMetrics :: Lens' FloodlightReportCompatibleFields [Metric]
frcfMetrics
= lens _frcfMetrics (\ s a -> s{_frcfMetrics = a}) .
_Default
. _Coerce
frcfKind :: Lens' FloodlightReportCompatibleFields Text
frcfKind = lens _frcfKind (\ s a -> s{_frcfKind = a})
frcfDimensionFilters :: Lens' FloodlightReportCompatibleFields [Dimension]
frcfDimensionFilters
= lens _frcfDimensionFilters
(\ s a -> s{_frcfDimensionFilters = a})
. _Default
. _Coerce
frcfDimensions :: Lens' FloodlightReportCompatibleFields [Dimension]
frcfDimensions
= lens _frcfDimensions
(\ s a -> s{_frcfDimensions = a})
. _Default
. _Coerce
instance FromJSON FloodlightReportCompatibleFields
where
parseJSON
= withObject "FloodlightReportCompatibleFields"
(\ o ->
FloodlightReportCompatibleFields <$>
(o .:? "metrics" .!= mempty) <*>
(o .:? "kind" .!=
"dfareporting#floodlightReportCompatibleFields")
<*> (o .:? "dimensionFilters" .!= mempty)
<*> (o .:? "dimensions" .!= mempty))
instance ToJSON FloodlightReportCompatibleFields
where
toJSON FloodlightReportCompatibleFields{..}
= object
(catMaybes
[("metrics" .=) <$> _frcfMetrics,
Just ("kind" .= _frcfKind),
("dimensionFilters" .=) <$> _frcfDimensionFilters,
("dimensions" .=) <$> _frcfDimensions])
data UserRolePermissionGroup = UserRolePermissionGroup
{ _urpgKind :: !Text
, _urpgName :: !(Maybe Text)
, _urpgId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
userRolePermissionGroup
:: UserRolePermissionGroup
userRolePermissionGroup =
UserRolePermissionGroup
{ _urpgKind = "dfareporting#userRolePermissionGroup"
, _urpgName = Nothing
, _urpgId = Nothing
}
urpgKind :: Lens' UserRolePermissionGroup Text
urpgKind = lens _urpgKind (\ s a -> s{_urpgKind = a})
urpgName :: Lens' UserRolePermissionGroup (Maybe Text)
urpgName = lens _urpgName (\ s a -> s{_urpgName = a})
urpgId :: Lens' UserRolePermissionGroup (Maybe Int64)
urpgId
= lens _urpgId (\ s a -> s{_urpgId = a}) .
mapping _Coerce
instance FromJSON UserRolePermissionGroup where
parseJSON
= withObject "UserRolePermissionGroup"
(\ o ->
UserRolePermissionGroup <$>
(o .:? "kind" .!=
"dfareporting#userRolePermissionGroup")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON UserRolePermissionGroup where
toJSON UserRolePermissionGroup{..}
= object
(catMaybes
[Just ("kind" .= _urpgKind),
("name" .=) <$> _urpgName, ("id" .=) <$> _urpgId])
data TagSetting = TagSetting
{ _tsKeywordOption :: !(Maybe TagSettingKeywordOption)
, _tsIncludeClickThroughURLs :: !(Maybe Bool)
, _tsIncludeClickTracking :: !(Maybe Bool)
, _tsAdditionalKeyValues :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
tagSetting
:: TagSetting
tagSetting =
TagSetting
{ _tsKeywordOption = Nothing
, _tsIncludeClickThroughURLs = Nothing
, _tsIncludeClickTracking = Nothing
, _tsAdditionalKeyValues = Nothing
}
tsKeywordOption :: Lens' TagSetting (Maybe TagSettingKeywordOption)
tsKeywordOption
= lens _tsKeywordOption
(\ s a -> s{_tsKeywordOption = a})
tsIncludeClickThroughURLs :: Lens' TagSetting (Maybe Bool)
tsIncludeClickThroughURLs
= lens _tsIncludeClickThroughURLs
(\ s a -> s{_tsIncludeClickThroughURLs = a})
tsIncludeClickTracking :: Lens' TagSetting (Maybe Bool)
tsIncludeClickTracking
= lens _tsIncludeClickTracking
(\ s a -> s{_tsIncludeClickTracking = a})
tsAdditionalKeyValues :: Lens' TagSetting (Maybe Text)
tsAdditionalKeyValues
= lens _tsAdditionalKeyValues
(\ s a -> s{_tsAdditionalKeyValues = a})
instance FromJSON TagSetting where
parseJSON
= withObject "TagSetting"
(\ o ->
TagSetting <$>
(o .:? "keywordOption") <*>
(o .:? "includeClickThroughUrls")
<*> (o .:? "includeClickTracking")
<*> (o .:? "additionalKeyValues"))
instance ToJSON TagSetting where
toJSON TagSetting{..}
= object
(catMaybes
[("keywordOption" .=) <$> _tsKeywordOption,
("includeClickThroughUrls" .=) <$>
_tsIncludeClickThroughURLs,
("includeClickTracking" .=) <$>
_tsIncludeClickTracking,
("additionalKeyValues" .=) <$>
_tsAdditionalKeyValues])
data ReportPathToConversionCriteriaReportProperties = ReportPathToConversionCriteriaReportProperties
{ _rptccrpMaximumInteractionGap :: !(Maybe (Textual Int32))
, _rptccrpMaximumClickInteractions :: !(Maybe (Textual Int32))
, _rptccrpPivotOnInteractionPath :: !(Maybe Bool)
, _rptccrpMaximumImpressionInteractions :: !(Maybe (Textual Int32))
, _rptccrpIncludeUnattributedIPConversions :: !(Maybe Bool)
, _rptccrpImpressionsLookbackWindow :: !(Maybe (Textual Int32))
, _rptccrpClicksLookbackWindow :: !(Maybe (Textual Int32))
, _rptccrpIncludeUnattributedCookieConversions :: !(Maybe Bool)
, _rptccrpIncludeAttributedIPConversions :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
reportPathToConversionCriteriaReportProperties
:: ReportPathToConversionCriteriaReportProperties
reportPathToConversionCriteriaReportProperties =
ReportPathToConversionCriteriaReportProperties
{ _rptccrpMaximumInteractionGap = Nothing
, _rptccrpMaximumClickInteractions = Nothing
, _rptccrpPivotOnInteractionPath = Nothing
, _rptccrpMaximumImpressionInteractions = Nothing
, _rptccrpIncludeUnattributedIPConversions = Nothing
, _rptccrpImpressionsLookbackWindow = Nothing
, _rptccrpClicksLookbackWindow = Nothing
, _rptccrpIncludeUnattributedCookieConversions = Nothing
, _rptccrpIncludeAttributedIPConversions = Nothing
}
rptccrpMaximumInteractionGap :: Lens' ReportPathToConversionCriteriaReportProperties (Maybe Int32)
rptccrpMaximumInteractionGap
= lens _rptccrpMaximumInteractionGap
(\ s a -> s{_rptccrpMaximumInteractionGap = a})
. mapping _Coerce
rptccrpMaximumClickInteractions :: Lens' ReportPathToConversionCriteriaReportProperties (Maybe Int32)
rptccrpMaximumClickInteractions
= lens _rptccrpMaximumClickInteractions
(\ s a -> s{_rptccrpMaximumClickInteractions = a})
. mapping _Coerce
rptccrpPivotOnInteractionPath :: Lens' ReportPathToConversionCriteriaReportProperties (Maybe Bool)
rptccrpPivotOnInteractionPath
= lens _rptccrpPivotOnInteractionPath
(\ s a -> s{_rptccrpPivotOnInteractionPath = a})
rptccrpMaximumImpressionInteractions :: Lens' ReportPathToConversionCriteriaReportProperties (Maybe Int32)
rptccrpMaximumImpressionInteractions
= lens _rptccrpMaximumImpressionInteractions
(\ s a ->
s{_rptccrpMaximumImpressionInteractions = a})
. mapping _Coerce
rptccrpIncludeUnattributedIPConversions :: Lens' ReportPathToConversionCriteriaReportProperties (Maybe Bool)
rptccrpIncludeUnattributedIPConversions
= lens _rptccrpIncludeUnattributedIPConversions
(\ s a ->
s{_rptccrpIncludeUnattributedIPConversions = a})
rptccrpImpressionsLookbackWindow :: Lens' ReportPathToConversionCriteriaReportProperties (Maybe Int32)
rptccrpImpressionsLookbackWindow
= lens _rptccrpImpressionsLookbackWindow
(\ s a -> s{_rptccrpImpressionsLookbackWindow = a})
. mapping _Coerce
rptccrpClicksLookbackWindow :: Lens' ReportPathToConversionCriteriaReportProperties (Maybe Int32)
rptccrpClicksLookbackWindow
= lens _rptccrpClicksLookbackWindow
(\ s a -> s{_rptccrpClicksLookbackWindow = a})
. mapping _Coerce
rptccrpIncludeUnattributedCookieConversions :: Lens' ReportPathToConversionCriteriaReportProperties (Maybe Bool)
rptccrpIncludeUnattributedCookieConversions
= lens _rptccrpIncludeUnattributedCookieConversions
(\ s a ->
s{_rptccrpIncludeUnattributedCookieConversions = a})
rptccrpIncludeAttributedIPConversions :: Lens' ReportPathToConversionCriteriaReportProperties (Maybe Bool)
rptccrpIncludeAttributedIPConversions
= lens _rptccrpIncludeAttributedIPConversions
(\ s a ->
s{_rptccrpIncludeAttributedIPConversions = a})
instance FromJSON
ReportPathToConversionCriteriaReportProperties where
parseJSON
= withObject
"ReportPathToConversionCriteriaReportProperties"
(\ o ->
ReportPathToConversionCriteriaReportProperties <$>
(o .:? "maximumInteractionGap") <*>
(o .:? "maximumClickInteractions")
<*> (o .:? "pivotOnInteractionPath")
<*> (o .:? "maximumImpressionInteractions")
<*> (o .:? "includeUnattributedIPConversions")
<*> (o .:? "impressionsLookbackWindow")
<*> (o .:? "clicksLookbackWindow")
<*> (o .:? "includeUnattributedCookieConversions")
<*> (o .:? "includeAttributedIPConversions"))
instance ToJSON
ReportPathToConversionCriteriaReportProperties where
toJSON
ReportPathToConversionCriteriaReportProperties{..}
= object
(catMaybes
[("maximumInteractionGap" .=) <$>
_rptccrpMaximumInteractionGap,
("maximumClickInteractions" .=) <$>
_rptccrpMaximumClickInteractions,
("pivotOnInteractionPath" .=) <$>
_rptccrpPivotOnInteractionPath,
("maximumImpressionInteractions" .=) <$>
_rptccrpMaximumImpressionInteractions,
("includeUnattributedIPConversions" .=) <$>
_rptccrpIncludeUnattributedIPConversions,
("impressionsLookbackWindow" .=) <$>
_rptccrpImpressionsLookbackWindow,
("clicksLookbackWindow" .=) <$>
_rptccrpClicksLookbackWindow,
("includeUnattributedCookieConversions" .=) <$>
_rptccrpIncludeUnattributedCookieConversions,
("includeAttributedIPConversions" .=) <$>
_rptccrpIncludeAttributedIPConversions])
data UserRolePermissionsListResponse = UserRolePermissionsListResponse
{ _urplrKind :: !Text
, _urplrUserRolePermissions :: !(Maybe [UserRolePermission])
} deriving (Eq,Show,Data,Typeable,Generic)
userRolePermissionsListResponse
:: UserRolePermissionsListResponse
userRolePermissionsListResponse =
UserRolePermissionsListResponse
{ _urplrKind = "dfareporting#userRolePermissionsListResponse"
, _urplrUserRolePermissions = Nothing
}
urplrKind :: Lens' UserRolePermissionsListResponse Text
urplrKind
= lens _urplrKind (\ s a -> s{_urplrKind = a})
urplrUserRolePermissions :: Lens' UserRolePermissionsListResponse [UserRolePermission]
urplrUserRolePermissions
= lens _urplrUserRolePermissions
(\ s a -> s{_urplrUserRolePermissions = a})
. _Default
. _Coerce
instance FromJSON UserRolePermissionsListResponse
where
parseJSON
= withObject "UserRolePermissionsListResponse"
(\ o ->
UserRolePermissionsListResponse <$>
(o .:? "kind" .!=
"dfareporting#userRolePermissionsListResponse")
<*> (o .:? "userRolePermissions" .!= mempty))
instance ToJSON UserRolePermissionsListResponse where
toJSON UserRolePermissionsListResponse{..}
= object
(catMaybes
[Just ("kind" .= _urplrKind),
("userRolePermissions" .=) <$>
_urplrUserRolePermissions])
data PlacementGroupsListResponse = PlacementGroupsListResponse
{ _pglrNextPageToken :: !(Maybe Text)
, _pglrKind :: !Text
, _pglrPlacementGroups :: !(Maybe [PlacementGroup])
} deriving (Eq,Show,Data,Typeable,Generic)
placementGroupsListResponse
:: PlacementGroupsListResponse
placementGroupsListResponse =
PlacementGroupsListResponse
{ _pglrNextPageToken = Nothing
, _pglrKind = "dfareporting#placementGroupsListResponse"
, _pglrPlacementGroups = Nothing
}
pglrNextPageToken :: Lens' PlacementGroupsListResponse (Maybe Text)
pglrNextPageToken
= lens _pglrNextPageToken
(\ s a -> s{_pglrNextPageToken = a})
pglrKind :: Lens' PlacementGroupsListResponse Text
pglrKind = lens _pglrKind (\ s a -> s{_pglrKind = a})
pglrPlacementGroups :: Lens' PlacementGroupsListResponse [PlacementGroup]
pglrPlacementGroups
= lens _pglrPlacementGroups
(\ s a -> s{_pglrPlacementGroups = a})
. _Default
. _Coerce
instance FromJSON PlacementGroupsListResponse where
parseJSON
= withObject "PlacementGroupsListResponse"
(\ o ->
PlacementGroupsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#placementGroupsListResponse")
<*> (o .:? "placementGroups" .!= mempty))
instance ToJSON PlacementGroupsListResponse where
toJSON PlacementGroupsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _pglrNextPageToken,
Just ("kind" .= _pglrKind),
("placementGroups" .=) <$> _pglrPlacementGroups])
data MobileCarrier = MobileCarrier
{ _mcKind :: !Text
, _mcName :: !(Maybe Text)
, _mcCountryCode :: !(Maybe Text)
, _mcId :: !(Maybe (Textual Int64))
, _mcCountryDartId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
mobileCarrier
:: MobileCarrier
mobileCarrier =
MobileCarrier
{ _mcKind = "dfareporting#mobileCarrier"
, _mcName = Nothing
, _mcCountryCode = Nothing
, _mcId = Nothing
, _mcCountryDartId = Nothing
}
mcKind :: Lens' MobileCarrier Text
mcKind = lens _mcKind (\ s a -> s{_mcKind = a})
mcName :: Lens' MobileCarrier (Maybe Text)
mcName = lens _mcName (\ s a -> s{_mcName = a})
mcCountryCode :: Lens' MobileCarrier (Maybe Text)
mcCountryCode
= lens _mcCountryCode
(\ s a -> s{_mcCountryCode = a})
mcId :: Lens' MobileCarrier (Maybe Int64)
mcId
= lens _mcId (\ s a -> s{_mcId = a}) .
mapping _Coerce
mcCountryDartId :: Lens' MobileCarrier (Maybe Int64)
mcCountryDartId
= lens _mcCountryDartId
(\ s a -> s{_mcCountryDartId = a})
. mapping _Coerce
instance FromJSON MobileCarrier where
parseJSON
= withObject "MobileCarrier"
(\ o ->
MobileCarrier <$>
(o .:? "kind" .!= "dfareporting#mobileCarrier") <*>
(o .:? "name")
<*> (o .:? "countryCode")
<*> (o .:? "id")
<*> (o .:? "countryDartId"))
instance ToJSON MobileCarrier where
toJSON MobileCarrier{..}
= object
(catMaybes
[Just ("kind" .= _mcKind), ("name" .=) <$> _mcName,
("countryCode" .=) <$> _mcCountryCode,
("id" .=) <$> _mcId,
("countryDartId" .=) <$> _mcCountryDartId])
data LandingPage = LandingPage
{ _lpKind :: !Text
, _lpDefault :: !(Maybe Bool)
, _lpURL :: !(Maybe Text)
, _lpName :: !(Maybe Text)
, _lpId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
landingPage
:: LandingPage
landingPage =
LandingPage
{ _lpKind = "dfareporting#landingPage"
, _lpDefault = Nothing
, _lpURL = Nothing
, _lpName = Nothing
, _lpId = Nothing
}
lpKind :: Lens' LandingPage Text
lpKind = lens _lpKind (\ s a -> s{_lpKind = a})
lpDefault :: Lens' LandingPage (Maybe Bool)
lpDefault
= lens _lpDefault (\ s a -> s{_lpDefault = a})
lpURL :: Lens' LandingPage (Maybe Text)
lpURL = lens _lpURL (\ s a -> s{_lpURL = a})
lpName :: Lens' LandingPage (Maybe Text)
lpName = lens _lpName (\ s a -> s{_lpName = a})
lpId :: Lens' LandingPage (Maybe Int64)
lpId
= lens _lpId (\ s a -> s{_lpId = a}) .
mapping _Coerce
instance FromJSON LandingPage where
parseJSON
= withObject "LandingPage"
(\ o ->
LandingPage <$>
(o .:? "kind" .!= "dfareporting#landingPage") <*>
(o .:? "default")
<*> (o .:? "url")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON LandingPage where
toJSON LandingPage{..}
= object
(catMaybes
[Just ("kind" .= _lpKind),
("default" .=) <$> _lpDefault, ("url" .=) <$> _lpURL,
("name" .=) <$> _lpName, ("id" .=) <$> _lpId])
data ConnectionTypesListResponse = ConnectionTypesListResponse
{ _ctlrKind :: !Text
, _ctlrConnectionTypes :: !(Maybe [ConnectionType])
} deriving (Eq,Show,Data,Typeable,Generic)
connectionTypesListResponse
:: ConnectionTypesListResponse
connectionTypesListResponse =
ConnectionTypesListResponse
{ _ctlrKind = "dfareporting#connectionTypesListResponse"
, _ctlrConnectionTypes = Nothing
}
ctlrKind :: Lens' ConnectionTypesListResponse Text
ctlrKind = lens _ctlrKind (\ s a -> s{_ctlrKind = a})
ctlrConnectionTypes :: Lens' ConnectionTypesListResponse [ConnectionType]
ctlrConnectionTypes
= lens _ctlrConnectionTypes
(\ s a -> s{_ctlrConnectionTypes = a})
. _Default
. _Coerce
instance FromJSON ConnectionTypesListResponse where
parseJSON
= withObject "ConnectionTypesListResponse"
(\ o ->
ConnectionTypesListResponse <$>
(o .:? "kind" .!=
"dfareporting#connectionTypesListResponse")
<*> (o .:? "connectionTypes" .!= mempty))
instance ToJSON ConnectionTypesListResponse where
toJSON ConnectionTypesListResponse{..}
= object
(catMaybes
[Just ("kind" .= _ctlrKind),
("connectionTypes" .=) <$> _ctlrConnectionTypes])
data OrdersListResponse = OrdersListResponse
{ _olrNextPageToken :: !(Maybe Text)
, _olrKind :: !Text
, _olrOrders :: !(Maybe [Order])
} deriving (Eq,Show,Data,Typeable,Generic)
ordersListResponse
:: OrdersListResponse
ordersListResponse =
OrdersListResponse
{ _olrNextPageToken = Nothing
, _olrKind = "dfareporting#ordersListResponse"
, _olrOrders = Nothing
}
olrNextPageToken :: Lens' OrdersListResponse (Maybe Text)
olrNextPageToken
= lens _olrNextPageToken
(\ s a -> s{_olrNextPageToken = a})
olrKind :: Lens' OrdersListResponse Text
olrKind = lens _olrKind (\ s a -> s{_olrKind = a})
olrOrders :: Lens' OrdersListResponse [Order]
olrOrders
= lens _olrOrders (\ s a -> s{_olrOrders = a}) .
_Default
. _Coerce
instance FromJSON OrdersListResponse where
parseJSON
= withObject "OrdersListResponse"
(\ o ->
OrdersListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "dfareporting#ordersListResponse")
<*> (o .:? "orders" .!= mempty))
instance ToJSON OrdersListResponse where
toJSON OrdersListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _olrNextPageToken,
Just ("kind" .= _olrKind),
("orders" .=) <$> _olrOrders])
data ReportList = ReportList
{ _repEtag :: !(Maybe Text)
, _repNextPageToken :: !(Maybe Text)
, _repKind :: !Text
, _repItems :: !(Maybe [Report])
} deriving (Eq,Show,Data,Typeable,Generic)
reportList
:: ReportList
reportList =
ReportList
{ _repEtag = Nothing
, _repNextPageToken = Nothing
, _repKind = "dfareporting#reportList"
, _repItems = Nothing
}
repEtag :: Lens' ReportList (Maybe Text)
repEtag = lens _repEtag (\ s a -> s{_repEtag = a})
repNextPageToken :: Lens' ReportList (Maybe Text)
repNextPageToken
= lens _repNextPageToken
(\ s a -> s{_repNextPageToken = a})
repKind :: Lens' ReportList Text
repKind = lens _repKind (\ s a -> s{_repKind = a})
repItems :: Lens' ReportList [Report]
repItems
= lens _repItems (\ s a -> s{_repItems = a}) .
_Default
. _Coerce
instance FromJSON ReportList where
parseJSON
= withObject "ReportList"
(\ o ->
ReportList <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "dfareporting#reportList")
<*> (o .:? "items" .!= mempty))
instance ToJSON ReportList where
toJSON ReportList{..}
= object
(catMaybes
[("etag" .=) <$> _repEtag,
("nextPageToken" .=) <$> _repNextPageToken,
Just ("kind" .= _repKind),
("items" .=) <$> _repItems])
data CreativeGroup = CreativeGroup
{ _cgKind :: !Text
, _cgAdvertiserId :: !(Maybe (Textual Int64))
, _cgAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _cgGroupNumber :: !(Maybe (Textual Int32))
, _cgAccountId :: !(Maybe (Textual Int64))
, _cgName :: !(Maybe Text)
, _cgId :: !(Maybe (Textual Int64))
, _cgSubAccountId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
creativeGroup
:: CreativeGroup
creativeGroup =
CreativeGroup
{ _cgKind = "dfareporting#creativeGroup"
, _cgAdvertiserId = Nothing
, _cgAdvertiserIdDimensionValue = Nothing
, _cgGroupNumber = Nothing
, _cgAccountId = Nothing
, _cgName = Nothing
, _cgId = Nothing
, _cgSubAccountId = Nothing
}
cgKind :: Lens' CreativeGroup Text
cgKind = lens _cgKind (\ s a -> s{_cgKind = a})
cgAdvertiserId :: Lens' CreativeGroup (Maybe Int64)
cgAdvertiserId
= lens _cgAdvertiserId
(\ s a -> s{_cgAdvertiserId = a})
. mapping _Coerce
cgAdvertiserIdDimensionValue :: Lens' CreativeGroup (Maybe DimensionValue)
cgAdvertiserIdDimensionValue
= lens _cgAdvertiserIdDimensionValue
(\ s a -> s{_cgAdvertiserIdDimensionValue = a})
cgGroupNumber :: Lens' CreativeGroup (Maybe Int32)
cgGroupNumber
= lens _cgGroupNumber
(\ s a -> s{_cgGroupNumber = a})
. mapping _Coerce
cgAccountId :: Lens' CreativeGroup (Maybe Int64)
cgAccountId
= lens _cgAccountId (\ s a -> s{_cgAccountId = a}) .
mapping _Coerce
cgName :: Lens' CreativeGroup (Maybe Text)
cgName = lens _cgName (\ s a -> s{_cgName = a})
cgId :: Lens' CreativeGroup (Maybe Int64)
cgId
= lens _cgId (\ s a -> s{_cgId = a}) .
mapping _Coerce
cgSubAccountId :: Lens' CreativeGroup (Maybe Int64)
cgSubAccountId
= lens _cgSubAccountId
(\ s a -> s{_cgSubAccountId = a})
. mapping _Coerce
instance FromJSON CreativeGroup where
parseJSON
= withObject "CreativeGroup"
(\ o ->
CreativeGroup <$>
(o .:? "kind" .!= "dfareporting#creativeGroup") <*>
(o .:? "advertiserId")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "groupNumber")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "subaccountId"))
instance ToJSON CreativeGroup where
toJSON CreativeGroup{..}
= object
(catMaybes
[Just ("kind" .= _cgKind),
("advertiserId" .=) <$> _cgAdvertiserId,
("advertiserIdDimensionValue" .=) <$>
_cgAdvertiserIdDimensionValue,
("groupNumber" .=) <$> _cgGroupNumber,
("accountId" .=) <$> _cgAccountId,
("name" .=) <$> _cgName, ("id" .=) <$> _cgId,
("subaccountId" .=) <$> _cgSubAccountId])
data CampaignCreativeAssociation = CampaignCreativeAssociation
{ _ccaKind :: !Text
, _ccaCreativeId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
campaignCreativeAssociation
:: CampaignCreativeAssociation
campaignCreativeAssociation =
CampaignCreativeAssociation
{ _ccaKind = "dfareporting#campaignCreativeAssociation"
, _ccaCreativeId = Nothing
}
ccaKind :: Lens' CampaignCreativeAssociation Text
ccaKind = lens _ccaKind (\ s a -> s{_ccaKind = a})
ccaCreativeId :: Lens' CampaignCreativeAssociation (Maybe Int64)
ccaCreativeId
= lens _ccaCreativeId
(\ s a -> s{_ccaCreativeId = a})
. mapping _Coerce
instance FromJSON CampaignCreativeAssociation where
parseJSON
= withObject "CampaignCreativeAssociation"
(\ o ->
CampaignCreativeAssociation <$>
(o .:? "kind" .!=
"dfareporting#campaignCreativeAssociation")
<*> (o .:? "creativeId"))
instance ToJSON CampaignCreativeAssociation where
toJSON CampaignCreativeAssociation{..}
= object
(catMaybes
[Just ("kind" .= _ccaKind),
("creativeId" .=) <$> _ccaCreativeId])
data LookbackConfiguration = LookbackConfiguration
{ _lcClickDuration :: !(Maybe (Textual Int32))
, _lcPostImpressionActivitiesDuration :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
lookbackConfiguration
:: LookbackConfiguration
lookbackConfiguration =
LookbackConfiguration
{ _lcClickDuration = Nothing
, _lcPostImpressionActivitiesDuration = Nothing
}
lcClickDuration :: Lens' LookbackConfiguration (Maybe Int32)
lcClickDuration
= lens _lcClickDuration
(\ s a -> s{_lcClickDuration = a})
. mapping _Coerce
lcPostImpressionActivitiesDuration :: Lens' LookbackConfiguration (Maybe Int32)
lcPostImpressionActivitiesDuration
= lens _lcPostImpressionActivitiesDuration
(\ s a -> s{_lcPostImpressionActivitiesDuration = a})
. mapping _Coerce
instance FromJSON LookbackConfiguration where
parseJSON
= withObject "LookbackConfiguration"
(\ o ->
LookbackConfiguration <$>
(o .:? "clickDuration") <*>
(o .:? "postImpressionActivitiesDuration"))
instance ToJSON LookbackConfiguration where
toJSON LookbackConfiguration{..}
= object
(catMaybes
[("clickDuration" .=) <$> _lcClickDuration,
("postImpressionActivitiesDuration" .=) <$>
_lcPostImpressionActivitiesDuration])
data FloodlightActivityPublisherDynamicTag = FloodlightActivityPublisherDynamicTag
{ _fapdtClickThrough :: !(Maybe Bool)
, _fapdtSiteIdDimensionValue :: !(Maybe DimensionValue)
, _fapdtDynamicTag :: !(Maybe FloodlightActivityDynamicTag)
, _fapdtDirectorySiteId :: !(Maybe (Textual Int64))
, _fapdtSiteId :: !(Maybe (Textual Int64))
, _fapdtViewThrough :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivityPublisherDynamicTag
:: FloodlightActivityPublisherDynamicTag
floodlightActivityPublisherDynamicTag =
FloodlightActivityPublisherDynamicTag
{ _fapdtClickThrough = Nothing
, _fapdtSiteIdDimensionValue = Nothing
, _fapdtDynamicTag = Nothing
, _fapdtDirectorySiteId = Nothing
, _fapdtSiteId = Nothing
, _fapdtViewThrough = Nothing
}
fapdtClickThrough :: Lens' FloodlightActivityPublisherDynamicTag (Maybe Bool)
fapdtClickThrough
= lens _fapdtClickThrough
(\ s a -> s{_fapdtClickThrough = a})
fapdtSiteIdDimensionValue :: Lens' FloodlightActivityPublisherDynamicTag (Maybe DimensionValue)
fapdtSiteIdDimensionValue
= lens _fapdtSiteIdDimensionValue
(\ s a -> s{_fapdtSiteIdDimensionValue = a})
fapdtDynamicTag :: Lens' FloodlightActivityPublisherDynamicTag (Maybe FloodlightActivityDynamicTag)
fapdtDynamicTag
= lens _fapdtDynamicTag
(\ s a -> s{_fapdtDynamicTag = a})
fapdtDirectorySiteId :: Lens' FloodlightActivityPublisherDynamicTag (Maybe Int64)
fapdtDirectorySiteId
= lens _fapdtDirectorySiteId
(\ s a -> s{_fapdtDirectorySiteId = a})
. mapping _Coerce
fapdtSiteId :: Lens' FloodlightActivityPublisherDynamicTag (Maybe Int64)
fapdtSiteId
= lens _fapdtSiteId (\ s a -> s{_fapdtSiteId = a}) .
mapping _Coerce
fapdtViewThrough :: Lens' FloodlightActivityPublisherDynamicTag (Maybe Bool)
fapdtViewThrough
= lens _fapdtViewThrough
(\ s a -> s{_fapdtViewThrough = a})
instance FromJSON
FloodlightActivityPublisherDynamicTag where
parseJSON
= withObject "FloodlightActivityPublisherDynamicTag"
(\ o ->
FloodlightActivityPublisherDynamicTag <$>
(o .:? "clickThrough") <*>
(o .:? "siteIdDimensionValue")
<*> (o .:? "dynamicTag")
<*> (o .:? "directorySiteId")
<*> (o .:? "siteId")
<*> (o .:? "viewThrough"))
instance ToJSON FloodlightActivityPublisherDynamicTag
where
toJSON FloodlightActivityPublisherDynamicTag{..}
= object
(catMaybes
[("clickThrough" .=) <$> _fapdtClickThrough,
("siteIdDimensionValue" .=) <$>
_fapdtSiteIdDimensionValue,
("dynamicTag" .=) <$> _fapdtDynamicTag,
("directorySiteId" .=) <$> _fapdtDirectorySiteId,
("siteId" .=) <$> _fapdtSiteId,
("viewThrough" .=) <$> _fapdtViewThrough])
data AccountActiveAdSummary = AccountActiveAdSummary
{ _aaasAvailableAds :: !(Maybe (Textual Int64))
, _aaasKind :: !Text
, _aaasAccountId :: !(Maybe (Textual Int64))
, _aaasActiveAds :: !(Maybe (Textual Int64))
, _aaasActiveAdsLimitTier :: !(Maybe AccountActiveAdSummaryActiveAdsLimitTier)
} deriving (Eq,Show,Data,Typeable,Generic)
accountActiveAdSummary
:: AccountActiveAdSummary
accountActiveAdSummary =
AccountActiveAdSummary
{ _aaasAvailableAds = Nothing
, _aaasKind = "dfareporting#accountActiveAdSummary"
, _aaasAccountId = Nothing
, _aaasActiveAds = Nothing
, _aaasActiveAdsLimitTier = Nothing
}
aaasAvailableAds :: Lens' AccountActiveAdSummary (Maybe Int64)
aaasAvailableAds
= lens _aaasAvailableAds
(\ s a -> s{_aaasAvailableAds = a})
. mapping _Coerce
aaasKind :: Lens' AccountActiveAdSummary Text
aaasKind = lens _aaasKind (\ s a -> s{_aaasKind = a})
aaasAccountId :: Lens' AccountActiveAdSummary (Maybe Int64)
aaasAccountId
= lens _aaasAccountId
(\ s a -> s{_aaasAccountId = a})
. mapping _Coerce
aaasActiveAds :: Lens' AccountActiveAdSummary (Maybe Int64)
aaasActiveAds
= lens _aaasActiveAds
(\ s a -> s{_aaasActiveAds = a})
. mapping _Coerce
aaasActiveAdsLimitTier :: Lens' AccountActiveAdSummary (Maybe AccountActiveAdSummaryActiveAdsLimitTier)
aaasActiveAdsLimitTier
= lens _aaasActiveAdsLimitTier
(\ s a -> s{_aaasActiveAdsLimitTier = a})
instance FromJSON AccountActiveAdSummary where
parseJSON
= withObject "AccountActiveAdSummary"
(\ o ->
AccountActiveAdSummary <$>
(o .:? "availableAds") <*>
(o .:? "kind" .!=
"dfareporting#accountActiveAdSummary")
<*> (o .:? "accountId")
<*> (o .:? "activeAds")
<*> (o .:? "activeAdsLimitTier"))
instance ToJSON AccountActiveAdSummary where
toJSON AccountActiveAdSummary{..}
= object
(catMaybes
[("availableAds" .=) <$> _aaasAvailableAds,
Just ("kind" .= _aaasKind),
("accountId" .=) <$> _aaasAccountId,
("activeAds" .=) <$> _aaasActiveAds,
("activeAdsLimitTier" .=) <$>
_aaasActiveAdsLimitTier])
data OffSetPosition = OffSetPosition
{ _ospLeft :: !(Maybe (Textual Int32))
, _ospTop :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
offSetPosition
:: OffSetPosition
offSetPosition =
OffSetPosition
{ _ospLeft = Nothing
, _ospTop = Nothing
}
ospLeft :: Lens' OffSetPosition (Maybe Int32)
ospLeft
= lens _ospLeft (\ s a -> s{_ospLeft = a}) .
mapping _Coerce
ospTop :: Lens' OffSetPosition (Maybe Int32)
ospTop
= lens _ospTop (\ s a -> s{_ospTop = a}) .
mapping _Coerce
instance FromJSON OffSetPosition where
parseJSON
= withObject "OffSetPosition"
(\ o ->
OffSetPosition <$> (o .:? "left") <*> (o .:? "top"))
instance ToJSON OffSetPosition where
toJSON OffSetPosition{..}
= object
(catMaybes
[("left" .=) <$> _ospLeft, ("top" .=) <$> _ospTop])
data Metric = Metric
{ _mKind :: !Text
, _mName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
metric
:: Metric
metric =
Metric
{ _mKind = "dfareporting#metric"
, _mName = Nothing
}
mKind :: Lens' Metric Text
mKind = lens _mKind (\ s a -> s{_mKind = a})
mName :: Lens' Metric (Maybe Text)
mName = lens _mName (\ s a -> s{_mName = a})
instance FromJSON Metric where
parseJSON
= withObject "Metric"
(\ o ->
Metric <$>
(o .:? "kind" .!= "dfareporting#metric") <*>
(o .:? "name"))
instance ToJSON Metric where
toJSON Metric{..}
= object
(catMaybes
[Just ("kind" .= _mKind), ("name" .=) <$> _mName])
data RemarketingListShare = RemarketingListShare
{ _rlsSharedAdvertiserIds :: !(Maybe [Textual Int64])
, _rlsKind :: !Text
, _rlsRemarketingListId :: !(Maybe (Textual Int64))
, _rlsSharedAccountIds :: !(Maybe [Textual Int64])
} deriving (Eq,Show,Data,Typeable,Generic)
remarketingListShare
:: RemarketingListShare
remarketingListShare =
RemarketingListShare
{ _rlsSharedAdvertiserIds = Nothing
, _rlsKind = "dfareporting#remarketingListShare"
, _rlsRemarketingListId = Nothing
, _rlsSharedAccountIds = Nothing
}
rlsSharedAdvertiserIds :: Lens' RemarketingListShare [Int64]
rlsSharedAdvertiserIds
= lens _rlsSharedAdvertiserIds
(\ s a -> s{_rlsSharedAdvertiserIds = a})
. _Default
. _Coerce
rlsKind :: Lens' RemarketingListShare Text
rlsKind = lens _rlsKind (\ s a -> s{_rlsKind = a})
rlsRemarketingListId :: Lens' RemarketingListShare (Maybe Int64)
rlsRemarketingListId
= lens _rlsRemarketingListId
(\ s a -> s{_rlsRemarketingListId = a})
. mapping _Coerce
rlsSharedAccountIds :: Lens' RemarketingListShare [Int64]
rlsSharedAccountIds
= lens _rlsSharedAccountIds
(\ s a -> s{_rlsSharedAccountIds = a})
. _Default
. _Coerce
instance FromJSON RemarketingListShare where
parseJSON
= withObject "RemarketingListShare"
(\ o ->
RemarketingListShare <$>
(o .:? "sharedAdvertiserIds" .!= mempty) <*>
(o .:? "kind" .!=
"dfareporting#remarketingListShare")
<*> (o .:? "remarketingListId")
<*> (o .:? "sharedAccountIds" .!= mempty))
instance ToJSON RemarketingListShare where
toJSON RemarketingListShare{..}
= object
(catMaybes
[("sharedAdvertiserIds" .=) <$>
_rlsSharedAdvertiserIds,
Just ("kind" .= _rlsKind),
("remarketingListId" .=) <$> _rlsRemarketingListId,
("sharedAccountIds" .=) <$> _rlsSharedAccountIds])
data EventTagsListResponse = EventTagsListResponse
{ _etlrKind :: !Text
, _etlrEventTags :: !(Maybe [EventTag])
} deriving (Eq,Show,Data,Typeable,Generic)
eventTagsListResponse
:: EventTagsListResponse
eventTagsListResponse =
EventTagsListResponse
{ _etlrKind = "dfareporting#eventTagsListResponse"
, _etlrEventTags = Nothing
}
etlrKind :: Lens' EventTagsListResponse Text
etlrKind = lens _etlrKind (\ s a -> s{_etlrKind = a})
etlrEventTags :: Lens' EventTagsListResponse [EventTag]
etlrEventTags
= lens _etlrEventTags
(\ s a -> s{_etlrEventTags = a})
. _Default
. _Coerce
instance FromJSON EventTagsListResponse where
parseJSON
= withObject "EventTagsListResponse"
(\ o ->
EventTagsListResponse <$>
(o .:? "kind" .!=
"dfareporting#eventTagsListResponse")
<*> (o .:? "eventTags" .!= mempty))
instance ToJSON EventTagsListResponse where
toJSON EventTagsListResponse{..}
= object
(catMaybes
[Just ("kind" .= _etlrKind),
("eventTags" .=) <$> _etlrEventTags])
data UserRolesListResponse = UserRolesListResponse
{ _urlrNextPageToken :: !(Maybe Text)
, _urlrKind :: !Text
, _urlrUserRoles :: !(Maybe [UserRole])
} deriving (Eq,Show,Data,Typeable,Generic)
userRolesListResponse
:: UserRolesListResponse
userRolesListResponse =
UserRolesListResponse
{ _urlrNextPageToken = Nothing
, _urlrKind = "dfareporting#userRolesListResponse"
, _urlrUserRoles = Nothing
}
urlrNextPageToken :: Lens' UserRolesListResponse (Maybe Text)
urlrNextPageToken
= lens _urlrNextPageToken
(\ s a -> s{_urlrNextPageToken = a})
urlrKind :: Lens' UserRolesListResponse Text
urlrKind = lens _urlrKind (\ s a -> s{_urlrKind = a})
urlrUserRoles :: Lens' UserRolesListResponse [UserRole]
urlrUserRoles
= lens _urlrUserRoles
(\ s a -> s{_urlrUserRoles = a})
. _Default
. _Coerce
instance FromJSON UserRolesListResponse where
parseJSON
= withObject "UserRolesListResponse"
(\ o ->
UserRolesListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#userRolesListResponse")
<*> (o .:? "userRoles" .!= mempty))
instance ToJSON UserRolesListResponse where
toJSON UserRolesListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _urlrNextPageToken,
Just ("kind" .= _urlrKind),
("userRoles" .=) <$> _urlrUserRoles])
data CompatibleFields = CompatibleFields
{ _cfReachReportCompatibleFields :: !(Maybe ReachReportCompatibleFields)
, _cfCrossDimensionReachReportCompatibleFields :: !(Maybe CrossDimensionReachReportCompatibleFields)
, _cfKind :: !Text
, _cfFloodlightReportCompatibleFields :: !(Maybe FloodlightReportCompatibleFields)
, _cfReportCompatibleFields :: !(Maybe ReportCompatibleFields)
, _cfPathToConversionReportCompatibleFields :: !(Maybe PathToConversionReportCompatibleFields)
} deriving (Eq,Show,Data,Typeable,Generic)
compatibleFields
:: CompatibleFields
compatibleFields =
CompatibleFields
{ _cfReachReportCompatibleFields = Nothing
, _cfCrossDimensionReachReportCompatibleFields = Nothing
, _cfKind = "dfareporting#compatibleFields"
, _cfFloodlightReportCompatibleFields = Nothing
, _cfReportCompatibleFields = Nothing
, _cfPathToConversionReportCompatibleFields = Nothing
}
cfReachReportCompatibleFields :: Lens' CompatibleFields (Maybe ReachReportCompatibleFields)
cfReachReportCompatibleFields
= lens _cfReachReportCompatibleFields
(\ s a -> s{_cfReachReportCompatibleFields = a})
cfCrossDimensionReachReportCompatibleFields :: Lens' CompatibleFields (Maybe CrossDimensionReachReportCompatibleFields)
cfCrossDimensionReachReportCompatibleFields
= lens _cfCrossDimensionReachReportCompatibleFields
(\ s a ->
s{_cfCrossDimensionReachReportCompatibleFields = a})
cfKind :: Lens' CompatibleFields Text
cfKind = lens _cfKind (\ s a -> s{_cfKind = a})
cfFloodlightReportCompatibleFields :: Lens' CompatibleFields (Maybe FloodlightReportCompatibleFields)
cfFloodlightReportCompatibleFields
= lens _cfFloodlightReportCompatibleFields
(\ s a -> s{_cfFloodlightReportCompatibleFields = a})
cfReportCompatibleFields :: Lens' CompatibleFields (Maybe ReportCompatibleFields)
cfReportCompatibleFields
= lens _cfReportCompatibleFields
(\ s a -> s{_cfReportCompatibleFields = a})
cfPathToConversionReportCompatibleFields :: Lens' CompatibleFields (Maybe PathToConversionReportCompatibleFields)
cfPathToConversionReportCompatibleFields
= lens _cfPathToConversionReportCompatibleFields
(\ s a ->
s{_cfPathToConversionReportCompatibleFields = a})
instance FromJSON CompatibleFields where
parseJSON
= withObject "CompatibleFields"
(\ o ->
CompatibleFields <$>
(o .:? "reachReportCompatibleFields") <*>
(o .:? "crossDimensionReachReportCompatibleFields")
<*>
(o .:? "kind" .!= "dfareporting#compatibleFields")
<*> (o .:? "floodlightReportCompatibleFields")
<*> (o .:? "reportCompatibleFields")
<*> (o .:? "pathToConversionReportCompatibleFields"))
instance ToJSON CompatibleFields where
toJSON CompatibleFields{..}
= object
(catMaybes
[("reachReportCompatibleFields" .=) <$>
_cfReachReportCompatibleFields,
("crossDimensionReachReportCompatibleFields" .=) <$>
_cfCrossDimensionReachReportCompatibleFields,
Just ("kind" .= _cfKind),
("floodlightReportCompatibleFields" .=) <$>
_cfFloodlightReportCompatibleFields,
("reportCompatibleFields" .=) <$>
_cfReportCompatibleFields,
("pathToConversionReportCompatibleFields" .=) <$>
_cfPathToConversionReportCompatibleFields])
data AudienceSegment = AudienceSegment
{ _asName :: !(Maybe Text)
, _asId :: !(Maybe (Textual Int64))
, _asAllocation :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
audienceSegment
:: AudienceSegment
audienceSegment =
AudienceSegment
{ _asName = Nothing
, _asId = Nothing
, _asAllocation = Nothing
}
asName :: Lens' AudienceSegment (Maybe Text)
asName = lens _asName (\ s a -> s{_asName = a})
asId :: Lens' AudienceSegment (Maybe Int64)
asId
= lens _asId (\ s a -> s{_asId = a}) .
mapping _Coerce
asAllocation :: Lens' AudienceSegment (Maybe Int32)
asAllocation
= lens _asAllocation (\ s a -> s{_asAllocation = a})
. mapping _Coerce
instance FromJSON AudienceSegment where
parseJSON
= withObject "AudienceSegment"
(\ o ->
AudienceSegment <$>
(o .:? "name") <*> (o .:? "id") <*>
(o .:? "allocation"))
instance ToJSON AudienceSegment where
toJSON AudienceSegment{..}
= object
(catMaybes
[("name" .=) <$> _asName, ("id" .=) <$> _asId,
("allocation" .=) <$> _asAllocation])
data DfpSettings = DfpSettings
{ _dsPubPaidPlacementAccepted :: !(Maybe Bool)
, _dsDfpNetworkName :: !(Maybe Text)
, _dsPublisherPortalOnly :: !(Maybe Bool)
, _dsProgrammaticPlacementAccepted :: !(Maybe Bool)
, _dsDfpNetworkCode :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dfpSettings
:: DfpSettings
dfpSettings =
DfpSettings
{ _dsPubPaidPlacementAccepted = Nothing
, _dsDfpNetworkName = Nothing
, _dsPublisherPortalOnly = Nothing
, _dsProgrammaticPlacementAccepted = Nothing
, _dsDfpNetworkCode = Nothing
}
dsPubPaidPlacementAccepted :: Lens' DfpSettings (Maybe Bool)
dsPubPaidPlacementAccepted
= lens _dsPubPaidPlacementAccepted
(\ s a -> s{_dsPubPaidPlacementAccepted = a})
dsDfpNetworkName :: Lens' DfpSettings (Maybe Text)
dsDfpNetworkName
= lens _dsDfpNetworkName
(\ s a -> s{_dsDfpNetworkName = a})
dsPublisherPortalOnly :: Lens' DfpSettings (Maybe Bool)
dsPublisherPortalOnly
= lens _dsPublisherPortalOnly
(\ s a -> s{_dsPublisherPortalOnly = a})
dsProgrammaticPlacementAccepted :: Lens' DfpSettings (Maybe Bool)
dsProgrammaticPlacementAccepted
= lens _dsProgrammaticPlacementAccepted
(\ s a -> s{_dsProgrammaticPlacementAccepted = a})
dsDfpNetworkCode :: Lens' DfpSettings (Maybe Text)
dsDfpNetworkCode
= lens _dsDfpNetworkCode
(\ s a -> s{_dsDfpNetworkCode = a})
instance FromJSON DfpSettings where
parseJSON
= withObject "DfpSettings"
(\ o ->
DfpSettings <$>
(o .:? "pubPaidPlacementAccepted") <*>
(o .:? "dfp_network_name")
<*> (o .:? "publisherPortalOnly")
<*> (o .:? "programmaticPlacementAccepted")
<*> (o .:? "dfp_network_code"))
instance ToJSON DfpSettings where
toJSON DfpSettings{..}
= object
(catMaybes
[("pubPaidPlacementAccepted" .=) <$>
_dsPubPaidPlacementAccepted,
("dfp_network_name" .=) <$> _dsDfpNetworkName,
("publisherPortalOnly" .=) <$>
_dsPublisherPortalOnly,
("programmaticPlacementAccepted" .=) <$>
_dsProgrammaticPlacementAccepted,
("dfp_network_code" .=) <$> _dsDfpNetworkCode])
data PathToConversionReportCompatibleFields = PathToConversionReportCompatibleFields
{ _ptcrcfMetrics :: !(Maybe [Metric])
, _ptcrcfKind :: !Text
, _ptcrcfConversionDimensions :: !(Maybe [Dimension])
, _ptcrcfCustomFloodlightVariables :: !(Maybe [Dimension])
, _ptcrcfPerInteractionDimensions :: !(Maybe [Dimension])
} deriving (Eq,Show,Data,Typeable,Generic)
pathToConversionReportCompatibleFields
:: PathToConversionReportCompatibleFields
pathToConversionReportCompatibleFields =
PathToConversionReportCompatibleFields
{ _ptcrcfMetrics = Nothing
, _ptcrcfKind = "dfareporting#pathToConversionReportCompatibleFields"
, _ptcrcfConversionDimensions = Nothing
, _ptcrcfCustomFloodlightVariables = Nothing
, _ptcrcfPerInteractionDimensions = Nothing
}
ptcrcfMetrics :: Lens' PathToConversionReportCompatibleFields [Metric]
ptcrcfMetrics
= lens _ptcrcfMetrics
(\ s a -> s{_ptcrcfMetrics = a})
. _Default
. _Coerce
ptcrcfKind :: Lens' PathToConversionReportCompatibleFields Text
ptcrcfKind
= lens _ptcrcfKind (\ s a -> s{_ptcrcfKind = a})
ptcrcfConversionDimensions :: Lens' PathToConversionReportCompatibleFields [Dimension]
ptcrcfConversionDimensions
= lens _ptcrcfConversionDimensions
(\ s a -> s{_ptcrcfConversionDimensions = a})
. _Default
. _Coerce
ptcrcfCustomFloodlightVariables :: Lens' PathToConversionReportCompatibleFields [Dimension]
ptcrcfCustomFloodlightVariables
= lens _ptcrcfCustomFloodlightVariables
(\ s a -> s{_ptcrcfCustomFloodlightVariables = a})
. _Default
. _Coerce
ptcrcfPerInteractionDimensions :: Lens' PathToConversionReportCompatibleFields [Dimension]
ptcrcfPerInteractionDimensions
= lens _ptcrcfPerInteractionDimensions
(\ s a -> s{_ptcrcfPerInteractionDimensions = a})
. _Default
. _Coerce
instance FromJSON
PathToConversionReportCompatibleFields where
parseJSON
= withObject "PathToConversionReportCompatibleFields"
(\ o ->
PathToConversionReportCompatibleFields <$>
(o .:? "metrics" .!= mempty) <*>
(o .:? "kind" .!=
"dfareporting#pathToConversionReportCompatibleFields")
<*> (o .:? "conversionDimensions" .!= mempty)
<*> (o .:? "customFloodlightVariables" .!= mempty)
<*> (o .:? "perInteractionDimensions" .!= mempty))
instance ToJSON
PathToConversionReportCompatibleFields where
toJSON PathToConversionReportCompatibleFields{..}
= object
(catMaybes
[("metrics" .=) <$> _ptcrcfMetrics,
Just ("kind" .= _ptcrcfKind),
("conversionDimensions" .=) <$>
_ptcrcfConversionDimensions,
("customFloodlightVariables" .=) <$>
_ptcrcfCustomFloodlightVariables,
("perInteractionDimensions" .=) <$>
_ptcrcfPerInteractionDimensions])
data City = City
{ _ccMetroCode :: !(Maybe Text)
, _ccRegionCode :: !(Maybe Text)
, _ccKind :: !Text
, _ccRegionDartId :: !(Maybe (Textual Int64))
, _ccMetroDmaId :: !(Maybe (Textual Int64))
, _ccName :: !(Maybe Text)
, _ccCountryCode :: !(Maybe Text)
, _ccCountryDartId :: !(Maybe (Textual Int64))
, _ccDartId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
city
:: City
city =
City
{ _ccMetroCode = Nothing
, _ccRegionCode = Nothing
, _ccKind = "dfareporting#city"
, _ccRegionDartId = Nothing
, _ccMetroDmaId = Nothing
, _ccName = Nothing
, _ccCountryCode = Nothing
, _ccCountryDartId = Nothing
, _ccDartId = Nothing
}
ccMetroCode :: Lens' City (Maybe Text)
ccMetroCode
= lens _ccMetroCode (\ s a -> s{_ccMetroCode = a})
ccRegionCode :: Lens' City (Maybe Text)
ccRegionCode
= lens _ccRegionCode (\ s a -> s{_ccRegionCode = a})
ccKind :: Lens' City Text
ccKind = lens _ccKind (\ s a -> s{_ccKind = a})
ccRegionDartId :: Lens' City (Maybe Int64)
ccRegionDartId
= lens _ccRegionDartId
(\ s a -> s{_ccRegionDartId = a})
. mapping _Coerce
ccMetroDmaId :: Lens' City (Maybe Int64)
ccMetroDmaId
= lens _ccMetroDmaId (\ s a -> s{_ccMetroDmaId = a})
. mapping _Coerce
ccName :: Lens' City (Maybe Text)
ccName = lens _ccName (\ s a -> s{_ccName = a})
ccCountryCode :: Lens' City (Maybe Text)
ccCountryCode
= lens _ccCountryCode
(\ s a -> s{_ccCountryCode = a})
ccCountryDartId :: Lens' City (Maybe Int64)
ccCountryDartId
= lens _ccCountryDartId
(\ s a -> s{_ccCountryDartId = a})
. mapping _Coerce
ccDartId :: Lens' City (Maybe Int64)
ccDartId
= lens _ccDartId (\ s a -> s{_ccDartId = a}) .
mapping _Coerce
instance FromJSON City where
parseJSON
= withObject "City"
(\ o ->
City <$>
(o .:? "metroCode") <*> (o .:? "regionCode") <*>
(o .:? "kind" .!= "dfareporting#city")
<*> (o .:? "regionDartId")
<*> (o .:? "metroDmaId")
<*> (o .:? "name")
<*> (o .:? "countryCode")
<*> (o .:? "countryDartId")
<*> (o .:? "dartId"))
instance ToJSON City where
toJSON City{..}
= object
(catMaybes
[("metroCode" .=) <$> _ccMetroCode,
("regionCode" .=) <$> _ccRegionCode,
Just ("kind" .= _ccKind),
("regionDartId" .=) <$> _ccRegionDartId,
("metroDmaId" .=) <$> _ccMetroDmaId,
("name" .=) <$> _ccName,
("countryCode" .=) <$> _ccCountryCode,
("countryDartId" .=) <$> _ccCountryDartId,
("dartId" .=) <$> _ccDartId])
data PlatformType = PlatformType
{ _ptKind :: !Text
, _ptName :: !(Maybe Text)
, _ptId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
platformType
:: PlatformType
platformType =
PlatformType
{ _ptKind = "dfareporting#platformType"
, _ptName = Nothing
, _ptId = Nothing
}
ptKind :: Lens' PlatformType Text
ptKind = lens _ptKind (\ s a -> s{_ptKind = a})
ptName :: Lens' PlatformType (Maybe Text)
ptName = lens _ptName (\ s a -> s{_ptName = a})
ptId :: Lens' PlatformType (Maybe Int64)
ptId
= lens _ptId (\ s a -> s{_ptId = a}) .
mapping _Coerce
instance FromJSON PlatformType where
parseJSON
= withObject "PlatformType"
(\ o ->
PlatformType <$>
(o .:? "kind" .!= "dfareporting#platformType") <*>
(o .:? "name")
<*> (o .:? "id"))
instance ToJSON PlatformType where
toJSON PlatformType{..}
= object
(catMaybes
[Just ("kind" .= _ptKind), ("name" .=) <$> _ptName,
("id" .=) <$> _ptId])
newtype KeyValueTargetingExpression = KeyValueTargetingExpression
{ _kvteExpression :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
keyValueTargetingExpression
:: KeyValueTargetingExpression
keyValueTargetingExpression =
KeyValueTargetingExpression
{ _kvteExpression = Nothing
}
kvteExpression :: Lens' KeyValueTargetingExpression (Maybe Text)
kvteExpression
= lens _kvteExpression
(\ s a -> s{_kvteExpression = a})
instance FromJSON KeyValueTargetingExpression where
parseJSON
= withObject "KeyValueTargetingExpression"
(\ o ->
KeyValueTargetingExpression <$> (o .:? "expression"))
instance ToJSON KeyValueTargetingExpression where
toJSON KeyValueTargetingExpression{..}
= object
(catMaybes [("expression" .=) <$> _kvteExpression])
data CompanionClickThroughOverride = CompanionClickThroughOverride
{ _cctoCreativeId :: !(Maybe (Textual Int64))
, _cctoClickThroughURL :: !(Maybe ClickThroughURL)
} deriving (Eq,Show,Data,Typeable,Generic)
companionClickThroughOverride
:: CompanionClickThroughOverride
companionClickThroughOverride =
CompanionClickThroughOverride
{ _cctoCreativeId = Nothing
, _cctoClickThroughURL = Nothing
}
cctoCreativeId :: Lens' CompanionClickThroughOverride (Maybe Int64)
cctoCreativeId
= lens _cctoCreativeId
(\ s a -> s{_cctoCreativeId = a})
. mapping _Coerce
cctoClickThroughURL :: Lens' CompanionClickThroughOverride (Maybe ClickThroughURL)
cctoClickThroughURL
= lens _cctoClickThroughURL
(\ s a -> s{_cctoClickThroughURL = a})
instance FromJSON CompanionClickThroughOverride where
parseJSON
= withObject "CompanionClickThroughOverride"
(\ o ->
CompanionClickThroughOverride <$>
(o .:? "creativeId") <*> (o .:? "clickThroughUrl"))
instance ToJSON CompanionClickThroughOverride where
toJSON CompanionClickThroughOverride{..}
= object
(catMaybes
[("creativeId" .=) <$> _cctoCreativeId,
("clickThroughUrl" .=) <$> _cctoClickThroughURL])
data AdvertisersListResponse = AdvertisersListResponse
{ _advNextPageToken :: !(Maybe Text)
, _advKind :: !Text
, _advAdvertisers :: !(Maybe [Advertiser])
} deriving (Eq,Show,Data,Typeable,Generic)
advertisersListResponse
:: AdvertisersListResponse
advertisersListResponse =
AdvertisersListResponse
{ _advNextPageToken = Nothing
, _advKind = "dfareporting#advertisersListResponse"
, _advAdvertisers = Nothing
}
advNextPageToken :: Lens' AdvertisersListResponse (Maybe Text)
advNextPageToken
= lens _advNextPageToken
(\ s a -> s{_advNextPageToken = a})
advKind :: Lens' AdvertisersListResponse Text
advKind = lens _advKind (\ s a -> s{_advKind = a})
advAdvertisers :: Lens' AdvertisersListResponse [Advertiser]
advAdvertisers
= lens _advAdvertisers
(\ s a -> s{_advAdvertisers = a})
. _Default
. _Coerce
instance FromJSON AdvertisersListResponse where
parseJSON
= withObject "AdvertisersListResponse"
(\ o ->
AdvertisersListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#advertisersListResponse")
<*> (o .:? "advertisers" .!= mempty))
instance ToJSON AdvertisersListResponse where
toJSON AdvertisersListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _advNextPageToken,
Just ("kind" .= _advKind),
("advertisers" .=) <$> _advAdvertisers])
data CountriesListResponse = CountriesListResponse
{ _couKind :: !Text
, _couCountries :: !(Maybe [Country])
} deriving (Eq,Show,Data,Typeable,Generic)
countriesListResponse
:: CountriesListResponse
countriesListResponse =
CountriesListResponse
{ _couKind = "dfareporting#countriesListResponse"
, _couCountries = Nothing
}
couKind :: Lens' CountriesListResponse Text
couKind = lens _couKind (\ s a -> s{_couKind = a})
couCountries :: Lens' CountriesListResponse [Country]
couCountries
= lens _couCountries (\ s a -> s{_couCountries = a})
. _Default
. _Coerce
instance FromJSON CountriesListResponse where
parseJSON
= withObject "CountriesListResponse"
(\ o ->
CountriesListResponse <$>
(o .:? "kind" .!=
"dfareporting#countriesListResponse")
<*> (o .:? "countries" .!= mempty))
instance ToJSON CountriesListResponse where
toJSON CountriesListResponse{..}
= object
(catMaybes
[Just ("kind" .= _couKind),
("countries" .=) <$> _couCountries])
data AccountPermissionGroupsListResponse = AccountPermissionGroupsListResponse
{ _apglrKind :: !Text
, _apglrAccountPermissionGroups :: !(Maybe [AccountPermissionGroup])
} deriving (Eq,Show,Data,Typeable,Generic)
accountPermissionGroupsListResponse
:: AccountPermissionGroupsListResponse
accountPermissionGroupsListResponse =
AccountPermissionGroupsListResponse
{ _apglrKind = "dfareporting#accountPermissionGroupsListResponse"
, _apglrAccountPermissionGroups = Nothing
}
apglrKind :: Lens' AccountPermissionGroupsListResponse Text
apglrKind
= lens _apglrKind (\ s a -> s{_apglrKind = a})
apglrAccountPermissionGroups :: Lens' AccountPermissionGroupsListResponse [AccountPermissionGroup]
apglrAccountPermissionGroups
= lens _apglrAccountPermissionGroups
(\ s a -> s{_apglrAccountPermissionGroups = a})
. _Default
. _Coerce
instance FromJSON AccountPermissionGroupsListResponse
where
parseJSON
= withObject "AccountPermissionGroupsListResponse"
(\ o ->
AccountPermissionGroupsListResponse <$>
(o .:? "kind" .!=
"dfareporting#accountPermissionGroupsListResponse")
<*> (o .:? "accountPermissionGroups" .!= mempty))
instance ToJSON AccountPermissionGroupsListResponse
where
toJSON AccountPermissionGroupsListResponse{..}
= object
(catMaybes
[Just ("kind" .= _apglrKind),
("accountPermissionGroups" .=) <$>
_apglrAccountPermissionGroups])
data PopupWindowProperties = PopupWindowProperties
{ _pwpOffSet :: !(Maybe OffSetPosition)
, _pwpDimension :: !(Maybe Size)
, _pwpShowStatusBar :: !(Maybe Bool)
, _pwpShowMenuBar :: !(Maybe Bool)
, _pwpPositionType :: !(Maybe PopupWindowPropertiesPositionType)
, _pwpShowAddressBar :: !(Maybe Bool)
, _pwpShowScrollBar :: !(Maybe Bool)
, _pwpShowToolBar :: !(Maybe Bool)
, _pwpTitle :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
popupWindowProperties
:: PopupWindowProperties
popupWindowProperties =
PopupWindowProperties
{ _pwpOffSet = Nothing
, _pwpDimension = Nothing
, _pwpShowStatusBar = Nothing
, _pwpShowMenuBar = Nothing
, _pwpPositionType = Nothing
, _pwpShowAddressBar = Nothing
, _pwpShowScrollBar = Nothing
, _pwpShowToolBar = Nothing
, _pwpTitle = Nothing
}
pwpOffSet :: Lens' PopupWindowProperties (Maybe OffSetPosition)
pwpOffSet
= lens _pwpOffSet (\ s a -> s{_pwpOffSet = a})
pwpDimension :: Lens' PopupWindowProperties (Maybe Size)
pwpDimension
= lens _pwpDimension (\ s a -> s{_pwpDimension = a})
pwpShowStatusBar :: Lens' PopupWindowProperties (Maybe Bool)
pwpShowStatusBar
= lens _pwpShowStatusBar
(\ s a -> s{_pwpShowStatusBar = a})
pwpShowMenuBar :: Lens' PopupWindowProperties (Maybe Bool)
pwpShowMenuBar
= lens _pwpShowMenuBar
(\ s a -> s{_pwpShowMenuBar = a})
pwpPositionType :: Lens' PopupWindowProperties (Maybe PopupWindowPropertiesPositionType)
pwpPositionType
= lens _pwpPositionType
(\ s a -> s{_pwpPositionType = a})
pwpShowAddressBar :: Lens' PopupWindowProperties (Maybe Bool)
pwpShowAddressBar
= lens _pwpShowAddressBar
(\ s a -> s{_pwpShowAddressBar = a})
pwpShowScrollBar :: Lens' PopupWindowProperties (Maybe Bool)
pwpShowScrollBar
= lens _pwpShowScrollBar
(\ s a -> s{_pwpShowScrollBar = a})
pwpShowToolBar :: Lens' PopupWindowProperties (Maybe Bool)
pwpShowToolBar
= lens _pwpShowToolBar
(\ s a -> s{_pwpShowToolBar = a})
pwpTitle :: Lens' PopupWindowProperties (Maybe Text)
pwpTitle = lens _pwpTitle (\ s a -> s{_pwpTitle = a})
instance FromJSON PopupWindowProperties where
parseJSON
= withObject "PopupWindowProperties"
(\ o ->
PopupWindowProperties <$>
(o .:? "offset") <*> (o .:? "dimension") <*>
(o .:? "showStatusBar")
<*> (o .:? "showMenuBar")
<*> (o .:? "positionType")
<*> (o .:? "showAddressBar")
<*> (o .:? "showScrollBar")
<*> (o .:? "showToolBar")
<*> (o .:? "title"))
instance ToJSON PopupWindowProperties where
toJSON PopupWindowProperties{..}
= object
(catMaybes
[("offset" .=) <$> _pwpOffSet,
("dimension" .=) <$> _pwpDimension,
("showStatusBar" .=) <$> _pwpShowStatusBar,
("showMenuBar" .=) <$> _pwpShowMenuBar,
("positionType" .=) <$> _pwpPositionType,
("showAddressBar" .=) <$> _pwpShowAddressBar,
("showScrollBar" .=) <$> _pwpShowScrollBar,
("showToolBar" .=) <$> _pwpShowToolBar,
("title" .=) <$> _pwpTitle])
data EventTagOverride = EventTagOverride
{ _etoEnabled :: !(Maybe Bool)
, _etoId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
eventTagOverride
:: EventTagOverride
eventTagOverride =
EventTagOverride
{ _etoEnabled = Nothing
, _etoId = Nothing
}
etoEnabled :: Lens' EventTagOverride (Maybe Bool)
etoEnabled
= lens _etoEnabled (\ s a -> s{_etoEnabled = a})
etoId :: Lens' EventTagOverride (Maybe Int64)
etoId
= lens _etoId (\ s a -> s{_etoId = a}) .
mapping _Coerce
instance FromJSON EventTagOverride where
parseJSON
= withObject "EventTagOverride"
(\ o ->
EventTagOverride <$>
(o .:? "enabled") <*> (o .:? "id"))
instance ToJSON EventTagOverride where
toJSON EventTagOverride{..}
= object
(catMaybes
[("enabled" .=) <$> _etoEnabled,
("id" .=) <$> _etoId])
data OperatingSystemVersion = OperatingSystemVersion
{ _osvMinorVersion :: !(Maybe Text)
, _osvKind :: !Text
, _osvOperatingSystem :: !(Maybe OperatingSystem)
, _osvMajorVersion :: !(Maybe Text)
, _osvName :: !(Maybe Text)
, _osvId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
operatingSystemVersion
:: OperatingSystemVersion
operatingSystemVersion =
OperatingSystemVersion
{ _osvMinorVersion = Nothing
, _osvKind = "dfareporting#operatingSystemVersion"
, _osvOperatingSystem = Nothing
, _osvMajorVersion = Nothing
, _osvName = Nothing
, _osvId = Nothing
}
osvMinorVersion :: Lens' OperatingSystemVersion (Maybe Text)
osvMinorVersion
= lens _osvMinorVersion
(\ s a -> s{_osvMinorVersion = a})
osvKind :: Lens' OperatingSystemVersion Text
osvKind = lens _osvKind (\ s a -> s{_osvKind = a})
osvOperatingSystem :: Lens' OperatingSystemVersion (Maybe OperatingSystem)
osvOperatingSystem
= lens _osvOperatingSystem
(\ s a -> s{_osvOperatingSystem = a})
osvMajorVersion :: Lens' OperatingSystemVersion (Maybe Text)
osvMajorVersion
= lens _osvMajorVersion
(\ s a -> s{_osvMajorVersion = a})
osvName :: Lens' OperatingSystemVersion (Maybe Text)
osvName = lens _osvName (\ s a -> s{_osvName = a})
osvId :: Lens' OperatingSystemVersion (Maybe Int64)
osvId
= lens _osvId (\ s a -> s{_osvId = a}) .
mapping _Coerce
instance FromJSON OperatingSystemVersion where
parseJSON
= withObject "OperatingSystemVersion"
(\ o ->
OperatingSystemVersion <$>
(o .:? "minorVersion") <*>
(o .:? "kind" .!=
"dfareporting#operatingSystemVersion")
<*> (o .:? "operatingSystem")
<*> (o .:? "majorVersion")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON OperatingSystemVersion where
toJSON OperatingSystemVersion{..}
= object
(catMaybes
[("minorVersion" .=) <$> _osvMinorVersion,
Just ("kind" .= _osvKind),
("operatingSystem" .=) <$> _osvOperatingSystem,
("majorVersion" .=) <$> _osvMajorVersion,
("name" .=) <$> _osvName, ("id" .=) <$> _osvId])
data AccountPermission = AccountPermission
{ _acccKind :: !Text
, _acccAccountProFiles :: !(Maybe [AccountPermissionAccountProFilesItem])
, _acccName :: !(Maybe Text)
, _acccId :: !(Maybe (Textual Int64))
, _acccLevel :: !(Maybe AccountPermissionLevel)
, _acccPermissionGroupId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
accountPermission
:: AccountPermission
accountPermission =
AccountPermission
{ _acccKind = "dfareporting#accountPermission"
, _acccAccountProFiles = Nothing
, _acccName = Nothing
, _acccId = Nothing
, _acccLevel = Nothing
, _acccPermissionGroupId = Nothing
}
acccKind :: Lens' AccountPermission Text
acccKind = lens _acccKind (\ s a -> s{_acccKind = a})
acccAccountProFiles :: Lens' AccountPermission [AccountPermissionAccountProFilesItem]
acccAccountProFiles
= lens _acccAccountProFiles
(\ s a -> s{_acccAccountProFiles = a})
. _Default
. _Coerce
acccName :: Lens' AccountPermission (Maybe Text)
acccName = lens _acccName (\ s a -> s{_acccName = a})
acccId :: Lens' AccountPermission (Maybe Int64)
acccId
= lens _acccId (\ s a -> s{_acccId = a}) .
mapping _Coerce
acccLevel :: Lens' AccountPermission (Maybe AccountPermissionLevel)
acccLevel
= lens _acccLevel (\ s a -> s{_acccLevel = a})
acccPermissionGroupId :: Lens' AccountPermission (Maybe Int64)
acccPermissionGroupId
= lens _acccPermissionGroupId
(\ s a -> s{_acccPermissionGroupId = a})
. mapping _Coerce
instance FromJSON AccountPermission where
parseJSON
= withObject "AccountPermission"
(\ o ->
AccountPermission <$>
(o .:? "kind" .!= "dfareporting#accountPermission")
<*> (o .:? "accountProfiles" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "level")
<*> (o .:? "permissionGroupId"))
instance ToJSON AccountPermission where
toJSON AccountPermission{..}
= object
(catMaybes
[Just ("kind" .= _acccKind),
("accountProfiles" .=) <$> _acccAccountProFiles,
("name" .=) <$> _acccName, ("id" .=) <$> _acccId,
("level" .=) <$> _acccLevel,
("permissionGroupId" .=) <$> _acccPermissionGroupId])
data UserProFile = UserProFile
{ _upfEtag :: !(Maybe Text)
, _upfKind :: !Text
, _upfAccountName :: !(Maybe Text)
, _upfProFileId :: !(Maybe (Textual Int64))
, _upfUserName :: !(Maybe Text)
, _upfAccountId :: !(Maybe (Textual Int64))
, _upfSubAccountName :: !(Maybe Text)
, _upfSubAccountId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
userProFile
:: UserProFile
userProFile =
UserProFile
{ _upfEtag = Nothing
, _upfKind = "dfareporting#userProfile"
, _upfAccountName = Nothing
, _upfProFileId = Nothing
, _upfUserName = Nothing
, _upfAccountId = Nothing
, _upfSubAccountName = Nothing
, _upfSubAccountId = Nothing
}
upfEtag :: Lens' UserProFile (Maybe Text)
upfEtag = lens _upfEtag (\ s a -> s{_upfEtag = a})
upfKind :: Lens' UserProFile Text
upfKind = lens _upfKind (\ s a -> s{_upfKind = a})
upfAccountName :: Lens' UserProFile (Maybe Text)
upfAccountName
= lens _upfAccountName
(\ s a -> s{_upfAccountName = a})
upfProFileId :: Lens' UserProFile (Maybe Int64)
upfProFileId
= lens _upfProFileId (\ s a -> s{_upfProFileId = a})
. mapping _Coerce
upfUserName :: Lens' UserProFile (Maybe Text)
upfUserName
= lens _upfUserName (\ s a -> s{_upfUserName = a})
upfAccountId :: Lens' UserProFile (Maybe Int64)
upfAccountId
= lens _upfAccountId (\ s a -> s{_upfAccountId = a})
. mapping _Coerce
upfSubAccountName :: Lens' UserProFile (Maybe Text)
upfSubAccountName
= lens _upfSubAccountName
(\ s a -> s{_upfSubAccountName = a})
upfSubAccountId :: Lens' UserProFile (Maybe Int64)
upfSubAccountId
= lens _upfSubAccountId
(\ s a -> s{_upfSubAccountId = a})
. mapping _Coerce
instance FromJSON UserProFile where
parseJSON
= withObject "UserProFile"
(\ o ->
UserProFile <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "dfareporting#userProfile")
<*> (o .:? "accountName")
<*> (o .:? "profileId")
<*> (o .:? "userName")
<*> (o .:? "accountId")
<*> (o .:? "subAccountName")
<*> (o .:? "subAccountId"))
instance ToJSON UserProFile where
toJSON UserProFile{..}
= object
(catMaybes
[("etag" .=) <$> _upfEtag, Just ("kind" .= _upfKind),
("accountName" .=) <$> _upfAccountName,
("profileId" .=) <$> _upfProFileId,
("userName" .=) <$> _upfUserName,
("accountId" .=) <$> _upfAccountId,
("subAccountName" .=) <$> _upfSubAccountName,
("subAccountId" .=) <$> _upfSubAccountId])
data OperatingSystemsListResponse = OperatingSystemsListResponse
{ _oslrKind :: !Text
, _oslrOperatingSystems :: !(Maybe [OperatingSystem])
} deriving (Eq,Show,Data,Typeable,Generic)
operatingSystemsListResponse
:: OperatingSystemsListResponse
operatingSystemsListResponse =
OperatingSystemsListResponse
{ _oslrKind = "dfareporting#operatingSystemsListResponse"
, _oslrOperatingSystems = Nothing
}
oslrKind :: Lens' OperatingSystemsListResponse Text
oslrKind = lens _oslrKind (\ s a -> s{_oslrKind = a})
oslrOperatingSystems :: Lens' OperatingSystemsListResponse [OperatingSystem]
oslrOperatingSystems
= lens _oslrOperatingSystems
(\ s a -> s{_oslrOperatingSystems = a})
. _Default
. _Coerce
instance FromJSON OperatingSystemsListResponse where
parseJSON
= withObject "OperatingSystemsListResponse"
(\ o ->
OperatingSystemsListResponse <$>
(o .:? "kind" .!=
"dfareporting#operatingSystemsListResponse")
<*> (o .:? "operatingSystems" .!= mempty))
instance ToJSON OperatingSystemsListResponse where
toJSON OperatingSystemsListResponse{..}
= object
(catMaybes
[Just ("kind" .= _oslrKind),
("operatingSystems" .=) <$> _oslrOperatingSystems])
data ReportDelivery = ReportDelivery
{ _rdEmailOwner :: !(Maybe Bool)
, _rdRecipients :: !(Maybe [Recipient])
, _rdMessage :: !(Maybe Text)
, _rdEmailOwnerDeliveryType :: !(Maybe ReportDeliveryEmailOwnerDeliveryType)
} deriving (Eq,Show,Data,Typeable,Generic)
reportDelivery
:: ReportDelivery
reportDelivery =
ReportDelivery
{ _rdEmailOwner = Nothing
, _rdRecipients = Nothing
, _rdMessage = Nothing
, _rdEmailOwnerDeliveryType = Nothing
}
rdEmailOwner :: Lens' ReportDelivery (Maybe Bool)
rdEmailOwner
= lens _rdEmailOwner (\ s a -> s{_rdEmailOwner = a})
rdRecipients :: Lens' ReportDelivery [Recipient]
rdRecipients
= lens _rdRecipients (\ s a -> s{_rdRecipients = a})
. _Default
. _Coerce
rdMessage :: Lens' ReportDelivery (Maybe Text)
rdMessage
= lens _rdMessage (\ s a -> s{_rdMessage = a})
rdEmailOwnerDeliveryType :: Lens' ReportDelivery (Maybe ReportDeliveryEmailOwnerDeliveryType)
rdEmailOwnerDeliveryType
= lens _rdEmailOwnerDeliveryType
(\ s a -> s{_rdEmailOwnerDeliveryType = a})
instance FromJSON ReportDelivery where
parseJSON
= withObject "ReportDelivery"
(\ o ->
ReportDelivery <$>
(o .:? "emailOwner") <*>
(o .:? "recipients" .!= mempty)
<*> (o .:? "message")
<*> (o .:? "emailOwnerDeliveryType"))
instance ToJSON ReportDelivery where
toJSON ReportDelivery{..}
= object
(catMaybes
[("emailOwner" .=) <$> _rdEmailOwner,
("recipients" .=) <$> _rdRecipients,
("message" .=) <$> _rdMessage,
("emailOwnerDeliveryType" .=) <$>
_rdEmailOwnerDeliveryType])
data TargetableRemarketingList = TargetableRemarketingList
{ _trlListSize :: !(Maybe (Textual Int64))
, _trlLifeSpan :: !(Maybe (Textual Int64))
, _trlKind :: !Text
, _trlAdvertiserId :: !(Maybe (Textual Int64))
, _trlAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _trlActive :: !(Maybe Bool)
, _trlAccountId :: !(Maybe (Textual Int64))
, _trlName :: !(Maybe Text)
, _trlListSource :: !(Maybe TargetableRemarketingListListSource)
, _trlId :: !(Maybe (Textual Int64))
, _trlSubAccountId :: !(Maybe (Textual Int64))
, _trlDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
targetableRemarketingList
:: TargetableRemarketingList
targetableRemarketingList =
TargetableRemarketingList
{ _trlListSize = Nothing
, _trlLifeSpan = Nothing
, _trlKind = "dfareporting#targetableRemarketingList"
, _trlAdvertiserId = Nothing
, _trlAdvertiserIdDimensionValue = Nothing
, _trlActive = Nothing
, _trlAccountId = Nothing
, _trlName = Nothing
, _trlListSource = Nothing
, _trlId = Nothing
, _trlSubAccountId = Nothing
, _trlDescription = Nothing
}
trlListSize :: Lens' TargetableRemarketingList (Maybe Int64)
trlListSize
= lens _trlListSize (\ s a -> s{_trlListSize = a}) .
mapping _Coerce
trlLifeSpan :: Lens' TargetableRemarketingList (Maybe Int64)
trlLifeSpan
= lens _trlLifeSpan (\ s a -> s{_trlLifeSpan = a}) .
mapping _Coerce
trlKind :: Lens' TargetableRemarketingList Text
trlKind = lens _trlKind (\ s a -> s{_trlKind = a})
trlAdvertiserId :: Lens' TargetableRemarketingList (Maybe Int64)
trlAdvertiserId
= lens _trlAdvertiserId
(\ s a -> s{_trlAdvertiserId = a})
. mapping _Coerce
trlAdvertiserIdDimensionValue :: Lens' TargetableRemarketingList (Maybe DimensionValue)
trlAdvertiserIdDimensionValue
= lens _trlAdvertiserIdDimensionValue
(\ s a -> s{_trlAdvertiserIdDimensionValue = a})
trlActive :: Lens' TargetableRemarketingList (Maybe Bool)
trlActive
= lens _trlActive (\ s a -> s{_trlActive = a})
trlAccountId :: Lens' TargetableRemarketingList (Maybe Int64)
trlAccountId
= lens _trlAccountId (\ s a -> s{_trlAccountId = a})
. mapping _Coerce
trlName :: Lens' TargetableRemarketingList (Maybe Text)
trlName = lens _trlName (\ s a -> s{_trlName = a})
trlListSource :: Lens' TargetableRemarketingList (Maybe TargetableRemarketingListListSource)
trlListSource
= lens _trlListSource
(\ s a -> s{_trlListSource = a})
trlId :: Lens' TargetableRemarketingList (Maybe Int64)
trlId
= lens _trlId (\ s a -> s{_trlId = a}) .
mapping _Coerce
trlSubAccountId :: Lens' TargetableRemarketingList (Maybe Int64)
trlSubAccountId
= lens _trlSubAccountId
(\ s a -> s{_trlSubAccountId = a})
. mapping _Coerce
trlDescription :: Lens' TargetableRemarketingList (Maybe Text)
trlDescription
= lens _trlDescription
(\ s a -> s{_trlDescription = a})
instance FromJSON TargetableRemarketingList where
parseJSON
= withObject "TargetableRemarketingList"
(\ o ->
TargetableRemarketingList <$>
(o .:? "listSize") <*> (o .:? "lifeSpan") <*>
(o .:? "kind" .!=
"dfareporting#targetableRemarketingList")
<*> (o .:? "advertiserId")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "active")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "listSource")
<*> (o .:? "id")
<*> (o .:? "subaccountId")
<*> (o .:? "description"))
instance ToJSON TargetableRemarketingList where
toJSON TargetableRemarketingList{..}
= object
(catMaybes
[("listSize" .=) <$> _trlListSize,
("lifeSpan" .=) <$> _trlLifeSpan,
Just ("kind" .= _trlKind),
("advertiserId" .=) <$> _trlAdvertiserId,
("advertiserIdDimensionValue" .=) <$>
_trlAdvertiserIdDimensionValue,
("active" .=) <$> _trlActive,
("accountId" .=) <$> _trlAccountId,
("name" .=) <$> _trlName,
("listSource" .=) <$> _trlListSource,
("id" .=) <$> _trlId,
("subaccountId" .=) <$> _trlSubAccountId,
("description" .=) <$> _trlDescription])
data PostalCodesListResponse = PostalCodesListResponse
{ _pclrKind :: !Text
, _pclrPostalCodes :: !(Maybe [PostalCode])
} deriving (Eq,Show,Data,Typeable,Generic)
postalCodesListResponse
:: PostalCodesListResponse
postalCodesListResponse =
PostalCodesListResponse
{ _pclrKind = "dfareporting#postalCodesListResponse"
, _pclrPostalCodes = Nothing
}
pclrKind :: Lens' PostalCodesListResponse Text
pclrKind = lens _pclrKind (\ s a -> s{_pclrKind = a})
pclrPostalCodes :: Lens' PostalCodesListResponse [PostalCode]
pclrPostalCodes
= lens _pclrPostalCodes
(\ s a -> s{_pclrPostalCodes = a})
. _Default
. _Coerce
instance FromJSON PostalCodesListResponse where
parseJSON
= withObject "PostalCodesListResponse"
(\ o ->
PostalCodesListResponse <$>
(o .:? "kind" .!=
"dfareporting#postalCodesListResponse")
<*> (o .:? "postalCodes" .!= mempty))
instance ToJSON PostalCodesListResponse where
toJSON PostalCodesListResponse{..}
= object
(catMaybes
[Just ("kind" .= _pclrKind),
("postalCodes" .=) <$> _pclrPostalCodes])
data ChangeLog = ChangeLog
{ _chaUserProFileId :: !(Maybe (Textual Int64))
, _chaObjectType :: !(Maybe Text)
, _chaUserProFileName :: !(Maybe Text)
, _chaKind :: !Text
, _chaObjectId :: !(Maybe (Textual Int64))
, _chaAction :: !(Maybe Text)
, _chaTransactionId :: !(Maybe (Textual Int64))
, _chaOldValue :: !(Maybe Text)
, _chaAccountId :: !(Maybe (Textual Int64))
, _chaNewValue :: !(Maybe Text)
, _chaFieldName :: !(Maybe Text)
, _chaId :: !(Maybe (Textual Int64))
, _chaSubAccountId :: !(Maybe (Textual Int64))
, _chaChangeTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
changeLog
:: ChangeLog
changeLog =
ChangeLog
{ _chaUserProFileId = Nothing
, _chaObjectType = Nothing
, _chaUserProFileName = Nothing
, _chaKind = "dfareporting#changeLog"
, _chaObjectId = Nothing
, _chaAction = Nothing
, _chaTransactionId = Nothing
, _chaOldValue = Nothing
, _chaAccountId = Nothing
, _chaNewValue = Nothing
, _chaFieldName = Nothing
, _chaId = Nothing
, _chaSubAccountId = Nothing
, _chaChangeTime = Nothing
}
chaUserProFileId :: Lens' ChangeLog (Maybe Int64)
chaUserProFileId
= lens _chaUserProFileId
(\ s a -> s{_chaUserProFileId = a})
. mapping _Coerce
chaObjectType :: Lens' ChangeLog (Maybe Text)
chaObjectType
= lens _chaObjectType
(\ s a -> s{_chaObjectType = a})
chaUserProFileName :: Lens' ChangeLog (Maybe Text)
chaUserProFileName
= lens _chaUserProFileName
(\ s a -> s{_chaUserProFileName = a})
chaKind :: Lens' ChangeLog Text
chaKind = lens _chaKind (\ s a -> s{_chaKind = a})
chaObjectId :: Lens' ChangeLog (Maybe Int64)
chaObjectId
= lens _chaObjectId (\ s a -> s{_chaObjectId = a}) .
mapping _Coerce
chaAction :: Lens' ChangeLog (Maybe Text)
chaAction
= lens _chaAction (\ s a -> s{_chaAction = a})
chaTransactionId :: Lens' ChangeLog (Maybe Int64)
chaTransactionId
= lens _chaTransactionId
(\ s a -> s{_chaTransactionId = a})
. mapping _Coerce
chaOldValue :: Lens' ChangeLog (Maybe Text)
chaOldValue
= lens _chaOldValue (\ s a -> s{_chaOldValue = a})
chaAccountId :: Lens' ChangeLog (Maybe Int64)
chaAccountId
= lens _chaAccountId (\ s a -> s{_chaAccountId = a})
. mapping _Coerce
chaNewValue :: Lens' ChangeLog (Maybe Text)
chaNewValue
= lens _chaNewValue (\ s a -> s{_chaNewValue = a})
chaFieldName :: Lens' ChangeLog (Maybe Text)
chaFieldName
= lens _chaFieldName (\ s a -> s{_chaFieldName = a})
chaId :: Lens' ChangeLog (Maybe Int64)
chaId
= lens _chaId (\ s a -> s{_chaId = a}) .
mapping _Coerce
chaSubAccountId :: Lens' ChangeLog (Maybe Int64)
chaSubAccountId
= lens _chaSubAccountId
(\ s a -> s{_chaSubAccountId = a})
. mapping _Coerce
chaChangeTime :: Lens' ChangeLog (Maybe UTCTime)
chaChangeTime
= lens _chaChangeTime
(\ s a -> s{_chaChangeTime = a})
. mapping _DateTime
instance FromJSON ChangeLog where
parseJSON
= withObject "ChangeLog"
(\ o ->
ChangeLog <$>
(o .:? "userProfileId") <*> (o .:? "objectType") <*>
(o .:? "userProfileName")
<*> (o .:? "kind" .!= "dfareporting#changeLog")
<*> (o .:? "objectId")
<*> (o .:? "action")
<*> (o .:? "transactionId")
<*> (o .:? "oldValue")
<*> (o .:? "accountId")
<*> (o .:? "newValue")
<*> (o .:? "fieldName")
<*> (o .:? "id")
<*> (o .:? "subaccountId")
<*> (o .:? "changeTime"))
instance ToJSON ChangeLog where
toJSON ChangeLog{..}
= object
(catMaybes
[("userProfileId" .=) <$> _chaUserProFileId,
("objectType" .=) <$> _chaObjectType,
("userProfileName" .=) <$> _chaUserProFileName,
Just ("kind" .= _chaKind),
("objectId" .=) <$> _chaObjectId,
("action" .=) <$> _chaAction,
("transactionId" .=) <$> _chaTransactionId,
("oldValue" .=) <$> _chaOldValue,
("accountId" .=) <$> _chaAccountId,
("newValue" .=) <$> _chaNewValue,
("fieldName" .=) <$> _chaFieldName,
("id" .=) <$> _chaId,
("subaccountId" .=) <$> _chaSubAccountId,
("changeTime" .=) <$> _chaChangeTime])
data PlacementStrategy = PlacementStrategy
{ _psKind :: !Text
, _psAccountId :: !(Maybe (Textual Int64))
, _psName :: !(Maybe Text)
, _psId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
placementStrategy
:: PlacementStrategy
placementStrategy =
PlacementStrategy
{ _psKind = "dfareporting#placementStrategy"
, _psAccountId = Nothing
, _psName = Nothing
, _psId = Nothing
}
psKind :: Lens' PlacementStrategy Text
psKind = lens _psKind (\ s a -> s{_psKind = a})
psAccountId :: Lens' PlacementStrategy (Maybe Int64)
psAccountId
= lens _psAccountId (\ s a -> s{_psAccountId = a}) .
mapping _Coerce
psName :: Lens' PlacementStrategy (Maybe Text)
psName = lens _psName (\ s a -> s{_psName = a})
psId :: Lens' PlacementStrategy (Maybe Int64)
psId
= lens _psId (\ s a -> s{_psId = a}) .
mapping _Coerce
instance FromJSON PlacementStrategy where
parseJSON
= withObject "PlacementStrategy"
(\ o ->
PlacementStrategy <$>
(o .:? "kind" .!= "dfareporting#placementStrategy")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON PlacementStrategy where
toJSON PlacementStrategy{..}
= object
(catMaybes
[Just ("kind" .= _psKind),
("accountId" .=) <$> _psAccountId,
("name" .=) <$> _psName, ("id" .=) <$> _psId])
data FloodlightActivity = FloodlightActivity
{ _faCountingMethod :: !(Maybe FloodlightActivityCountingMethod)
, _faTagString :: !(Maybe Text)
, _faSecure :: !(Maybe Bool)
, _faExpectedURL :: !(Maybe Text)
, _faFloodlightActivityGroupTagString :: !(Maybe Text)
, _faFloodlightConfigurationId :: !(Maybe (Textual Int64))
, _faKind :: !Text
, _faImageTagEnabled :: !(Maybe Bool)
, _faAdvertiserId :: !(Maybe (Textual Int64))
, _faAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _faSSLCompliant :: !(Maybe Bool)
, _faIdDimensionValue :: !(Maybe DimensionValue)
, _faTagFormat :: !(Maybe FloodlightActivityTagFormat)
, _faCacheBustingType :: !(Maybe FloodlightActivityCacheBustingType)
, _faAccountId :: !(Maybe (Textual Int64))
, _faName :: !(Maybe Text)
, _faPublisherTags :: !(Maybe [FloodlightActivityPublisherDynamicTag])
, _faFloodlightActivityGroupId :: !(Maybe (Textual Int64))
, _faHidden :: !(Maybe Bool)
, _faFloodlightActivityGroupType :: !(Maybe FloodlightActivityFloodlightActivityGroupType)
, _faDefaultTags :: !(Maybe [FloodlightActivityDynamicTag])
, _faFloodlightActivityGroupName :: !(Maybe Text)
, _faId :: !(Maybe (Textual Int64))
, _faSSLRequired :: !(Maybe Bool)
, _faUserDefinedVariableTypes :: !(Maybe [FloodlightActivityUserDefinedVariableTypesItem])
, _faSubAccountId :: !(Maybe (Textual Int64))
, _faNotes :: !(Maybe Text)
, _faFloodlightConfigurationIdDimensionValue :: !(Maybe DimensionValue)
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivity
:: FloodlightActivity
floodlightActivity =
FloodlightActivity
{ _faCountingMethod = Nothing
, _faTagString = Nothing
, _faSecure = Nothing
, _faExpectedURL = Nothing
, _faFloodlightActivityGroupTagString = Nothing
, _faFloodlightConfigurationId = Nothing
, _faKind = "dfareporting#floodlightActivity"
, _faImageTagEnabled = Nothing
, _faAdvertiserId = Nothing
, _faAdvertiserIdDimensionValue = Nothing
, _faSSLCompliant = Nothing
, _faIdDimensionValue = Nothing
, _faTagFormat = Nothing
, _faCacheBustingType = Nothing
, _faAccountId = Nothing
, _faName = Nothing
, _faPublisherTags = Nothing
, _faFloodlightActivityGroupId = Nothing
, _faHidden = Nothing
, _faFloodlightActivityGroupType = Nothing
, _faDefaultTags = Nothing
, _faFloodlightActivityGroupName = Nothing
, _faId = Nothing
, _faSSLRequired = Nothing
, _faUserDefinedVariableTypes = Nothing
, _faSubAccountId = Nothing
, _faNotes = Nothing
, _faFloodlightConfigurationIdDimensionValue = Nothing
}
faCountingMethod :: Lens' FloodlightActivity (Maybe FloodlightActivityCountingMethod)
faCountingMethod
= lens _faCountingMethod
(\ s a -> s{_faCountingMethod = a})
faTagString :: Lens' FloodlightActivity (Maybe Text)
faTagString
= lens _faTagString (\ s a -> s{_faTagString = a})
faSecure :: Lens' FloodlightActivity (Maybe Bool)
faSecure = lens _faSecure (\ s a -> s{_faSecure = a})
faExpectedURL :: Lens' FloodlightActivity (Maybe Text)
faExpectedURL
= lens _faExpectedURL
(\ s a -> s{_faExpectedURL = a})
faFloodlightActivityGroupTagString :: Lens' FloodlightActivity (Maybe Text)
faFloodlightActivityGroupTagString
= lens _faFloodlightActivityGroupTagString
(\ s a -> s{_faFloodlightActivityGroupTagString = a})
faFloodlightConfigurationId :: Lens' FloodlightActivity (Maybe Int64)
faFloodlightConfigurationId
= lens _faFloodlightConfigurationId
(\ s a -> s{_faFloodlightConfigurationId = a})
. mapping _Coerce
faKind :: Lens' FloodlightActivity Text
faKind = lens _faKind (\ s a -> s{_faKind = a})
faImageTagEnabled :: Lens' FloodlightActivity (Maybe Bool)
faImageTagEnabled
= lens _faImageTagEnabled
(\ s a -> s{_faImageTagEnabled = a})
faAdvertiserId :: Lens' FloodlightActivity (Maybe Int64)
faAdvertiserId
= lens _faAdvertiserId
(\ s a -> s{_faAdvertiserId = a})
. mapping _Coerce
faAdvertiserIdDimensionValue :: Lens' FloodlightActivity (Maybe DimensionValue)
faAdvertiserIdDimensionValue
= lens _faAdvertiserIdDimensionValue
(\ s a -> s{_faAdvertiserIdDimensionValue = a})
faSSLCompliant :: Lens' FloodlightActivity (Maybe Bool)
faSSLCompliant
= lens _faSSLCompliant
(\ s a -> s{_faSSLCompliant = a})
faIdDimensionValue :: Lens' FloodlightActivity (Maybe DimensionValue)
faIdDimensionValue
= lens _faIdDimensionValue
(\ s a -> s{_faIdDimensionValue = a})
faTagFormat :: Lens' FloodlightActivity (Maybe FloodlightActivityTagFormat)
faTagFormat
= lens _faTagFormat (\ s a -> s{_faTagFormat = a})
faCacheBustingType :: Lens' FloodlightActivity (Maybe FloodlightActivityCacheBustingType)
faCacheBustingType
= lens _faCacheBustingType
(\ s a -> s{_faCacheBustingType = a})
faAccountId :: Lens' FloodlightActivity (Maybe Int64)
faAccountId
= lens _faAccountId (\ s a -> s{_faAccountId = a}) .
mapping _Coerce
faName :: Lens' FloodlightActivity (Maybe Text)
faName = lens _faName (\ s a -> s{_faName = a})
faPublisherTags :: Lens' FloodlightActivity [FloodlightActivityPublisherDynamicTag]
faPublisherTags
= lens _faPublisherTags
(\ s a -> s{_faPublisherTags = a})
. _Default
. _Coerce
faFloodlightActivityGroupId :: Lens' FloodlightActivity (Maybe Int64)
faFloodlightActivityGroupId
= lens _faFloodlightActivityGroupId
(\ s a -> s{_faFloodlightActivityGroupId = a})
. mapping _Coerce
faHidden :: Lens' FloodlightActivity (Maybe Bool)
faHidden = lens _faHidden (\ s a -> s{_faHidden = a})
faFloodlightActivityGroupType :: Lens' FloodlightActivity (Maybe FloodlightActivityFloodlightActivityGroupType)
faFloodlightActivityGroupType
= lens _faFloodlightActivityGroupType
(\ s a -> s{_faFloodlightActivityGroupType = a})
faDefaultTags :: Lens' FloodlightActivity [FloodlightActivityDynamicTag]
faDefaultTags
= lens _faDefaultTags
(\ s a -> s{_faDefaultTags = a})
. _Default
. _Coerce
faFloodlightActivityGroupName :: Lens' FloodlightActivity (Maybe Text)
faFloodlightActivityGroupName
= lens _faFloodlightActivityGroupName
(\ s a -> s{_faFloodlightActivityGroupName = a})
faId :: Lens' FloodlightActivity (Maybe Int64)
faId
= lens _faId (\ s a -> s{_faId = a}) .
mapping _Coerce
faSSLRequired :: Lens' FloodlightActivity (Maybe Bool)
faSSLRequired
= lens _faSSLRequired
(\ s a -> s{_faSSLRequired = a})
faUserDefinedVariableTypes :: Lens' FloodlightActivity [FloodlightActivityUserDefinedVariableTypesItem]
faUserDefinedVariableTypes
= lens _faUserDefinedVariableTypes
(\ s a -> s{_faUserDefinedVariableTypes = a})
. _Default
. _Coerce
faSubAccountId :: Lens' FloodlightActivity (Maybe Int64)
faSubAccountId
= lens _faSubAccountId
(\ s a -> s{_faSubAccountId = a})
. mapping _Coerce
faNotes :: Lens' FloodlightActivity (Maybe Text)
faNotes = lens _faNotes (\ s a -> s{_faNotes = a})
faFloodlightConfigurationIdDimensionValue :: Lens' FloodlightActivity (Maybe DimensionValue)
faFloodlightConfigurationIdDimensionValue
= lens _faFloodlightConfigurationIdDimensionValue
(\ s a ->
s{_faFloodlightConfigurationIdDimensionValue = a})
instance FromJSON FloodlightActivity where
parseJSON
= withObject "FloodlightActivity"
(\ o ->
FloodlightActivity <$>
(o .:? "countingMethod") <*> (o .:? "tagString") <*>
(o .:? "secure")
<*> (o .:? "expectedUrl")
<*> (o .:? "floodlightActivityGroupTagString")
<*> (o .:? "floodlightConfigurationId")
<*>
(o .:? "kind" .!= "dfareporting#floodlightActivity")
<*> (o .:? "imageTagEnabled")
<*> (o .:? "advertiserId")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "sslCompliant")
<*> (o .:? "idDimensionValue")
<*> (o .:? "tagFormat")
<*> (o .:? "cacheBustingType")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "publisherTags" .!= mempty)
<*> (o .:? "floodlightActivityGroupId")
<*> (o .:? "hidden")
<*> (o .:? "floodlightActivityGroupType")
<*> (o .:? "defaultTags" .!= mempty)
<*> (o .:? "floodlightActivityGroupName")
<*> (o .:? "id")
<*> (o .:? "sslRequired")
<*> (o .:? "userDefinedVariableTypes" .!= mempty)
<*> (o .:? "subaccountId")
<*> (o .:? "notes")
<*>
(o .:? "floodlightConfigurationIdDimensionValue"))
instance ToJSON FloodlightActivity where
toJSON FloodlightActivity{..}
= object
(catMaybes
[("countingMethod" .=) <$> _faCountingMethod,
("tagString" .=) <$> _faTagString,
("secure" .=) <$> _faSecure,
("expectedUrl" .=) <$> _faExpectedURL,
("floodlightActivityGroupTagString" .=) <$>
_faFloodlightActivityGroupTagString,
("floodlightConfigurationId" .=) <$>
_faFloodlightConfigurationId,
Just ("kind" .= _faKind),
("imageTagEnabled" .=) <$> _faImageTagEnabled,
("advertiserId" .=) <$> _faAdvertiserId,
("advertiserIdDimensionValue" .=) <$>
_faAdvertiserIdDimensionValue,
("sslCompliant" .=) <$> _faSSLCompliant,
("idDimensionValue" .=) <$> _faIdDimensionValue,
("tagFormat" .=) <$> _faTagFormat,
("cacheBustingType" .=) <$> _faCacheBustingType,
("accountId" .=) <$> _faAccountId,
("name" .=) <$> _faName,
("publisherTags" .=) <$> _faPublisherTags,
("floodlightActivityGroupId" .=) <$>
_faFloodlightActivityGroupId,
("hidden" .=) <$> _faHidden,
("floodlightActivityGroupType" .=) <$>
_faFloodlightActivityGroupType,
("defaultTags" .=) <$> _faDefaultTags,
("floodlightActivityGroupName" .=) <$>
_faFloodlightActivityGroupName,
("id" .=) <$> _faId,
("sslRequired" .=) <$> _faSSLRequired,
("userDefinedVariableTypes" .=) <$>
_faUserDefinedVariableTypes,
("subaccountId" .=) <$> _faSubAccountId,
("notes" .=) <$> _faNotes,
("floodlightConfigurationIdDimensionValue" .=) <$>
_faFloodlightConfigurationIdDimensionValue])
data PlatformTypesListResponse = PlatformTypesListResponse
{ _ptlrKind :: !Text
, _ptlrPlatformTypes :: !(Maybe [PlatformType])
} deriving (Eq,Show,Data,Typeable,Generic)
platformTypesListResponse
:: PlatformTypesListResponse
platformTypesListResponse =
PlatformTypesListResponse
{ _ptlrKind = "dfareporting#platformTypesListResponse"
, _ptlrPlatformTypes = Nothing
}
ptlrKind :: Lens' PlatformTypesListResponse Text
ptlrKind = lens _ptlrKind (\ s a -> s{_ptlrKind = a})
ptlrPlatformTypes :: Lens' PlatformTypesListResponse [PlatformType]
ptlrPlatformTypes
= lens _ptlrPlatformTypes
(\ s a -> s{_ptlrPlatformTypes = a})
. _Default
. _Coerce
instance FromJSON PlatformTypesListResponse where
parseJSON
= withObject "PlatformTypesListResponse"
(\ o ->
PlatformTypesListResponse <$>
(o .:? "kind" .!=
"dfareporting#platformTypesListResponse")
<*> (o .:? "platformTypes" .!= mempty))
instance ToJSON PlatformTypesListResponse where
toJSON PlatformTypesListResponse{..}
= object
(catMaybes
[Just ("kind" .= _ptlrKind),
("platformTypes" .=) <$> _ptlrPlatformTypes])
newtype LastModifiedInfo = LastModifiedInfo
{ _lmiTime :: Maybe (Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
lastModifiedInfo
:: LastModifiedInfo
lastModifiedInfo =
LastModifiedInfo
{ _lmiTime = Nothing
}
lmiTime :: Lens' LastModifiedInfo (Maybe Int64)
lmiTime
= lens _lmiTime (\ s a -> s{_lmiTime = a}) .
mapping _Coerce
instance FromJSON LastModifiedInfo where
parseJSON
= withObject "LastModifiedInfo"
(\ o -> LastModifiedInfo <$> (o .:? "time"))
instance ToJSON LastModifiedInfo where
toJSON LastModifiedInfo{..}
= object (catMaybes [("time" .=) <$> _lmiTime])
data TargetWindow = TargetWindow
{ _twCustomHTML :: !(Maybe Text)
, _twTargetWindowOption :: !(Maybe TargetWindowTargetWindowOption)
} deriving (Eq,Show,Data,Typeable,Generic)
targetWindow
:: TargetWindow
targetWindow =
TargetWindow
{ _twCustomHTML = Nothing
, _twTargetWindowOption = Nothing
}
twCustomHTML :: Lens' TargetWindow (Maybe Text)
twCustomHTML
= lens _twCustomHTML (\ s a -> s{_twCustomHTML = a})
twTargetWindowOption :: Lens' TargetWindow (Maybe TargetWindowTargetWindowOption)
twTargetWindowOption
= lens _twTargetWindowOption
(\ s a -> s{_twTargetWindowOption = a})
instance FromJSON TargetWindow where
parseJSON
= withObject "TargetWindow"
(\ o ->
TargetWindow <$>
(o .:? "customHtml") <*>
(o .:? "targetWindowOption"))
instance ToJSON TargetWindow where
toJSON TargetWindow{..}
= object
(catMaybes
[("customHtml" .=) <$> _twCustomHTML,
("targetWindowOption" .=) <$> _twTargetWindowOption])
data AccountPermissionGroup = AccountPermissionGroup
{ _apgpKind :: !Text
, _apgpName :: !(Maybe Text)
, _apgpId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
accountPermissionGroup
:: AccountPermissionGroup
accountPermissionGroup =
AccountPermissionGroup
{ _apgpKind = "dfareporting#accountPermissionGroup"
, _apgpName = Nothing
, _apgpId = Nothing
}
apgpKind :: Lens' AccountPermissionGroup Text
apgpKind = lens _apgpKind (\ s a -> s{_apgpKind = a})
apgpName :: Lens' AccountPermissionGroup (Maybe Text)
apgpName = lens _apgpName (\ s a -> s{_apgpName = a})
apgpId :: Lens' AccountPermissionGroup (Maybe Int64)
apgpId
= lens _apgpId (\ s a -> s{_apgpId = a}) .
mapping _Coerce
instance FromJSON AccountPermissionGroup where
parseJSON
= withObject "AccountPermissionGroup"
(\ o ->
AccountPermissionGroup <$>
(o .:? "kind" .!=
"dfareporting#accountPermissionGroup")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON AccountPermissionGroup where
toJSON AccountPermissionGroup{..}
= object
(catMaybes
[Just ("kind" .= _apgpKind),
("name" .=) <$> _apgpName, ("id" .=) <$> _apgpId])
data Advertiser = Advertiser
{ _advdOriginalFloodlightConfigurationId :: !(Maybe (Textual Int64))
, _advdStatus :: !(Maybe AdvertiserStatus)
, _advdFloodlightConfigurationId :: !(Maybe (Textual Int64))
, _advdKind :: !Text
, _advdSuspended :: !(Maybe Bool)
, _advdIdDimensionValue :: !(Maybe DimensionValue)
, _advdAccountId :: !(Maybe (Textual Int64))
, _advdDefaultEmail :: !(Maybe Text)
, _advdName :: !(Maybe Text)
, _advdAdvertiserGroupId :: !(Maybe (Textual Int64))
, _advdDefaultClickThroughEventTagId :: !(Maybe (Textual Int64))
, _advdId :: !(Maybe (Textual Int64))
, _advdSubAccountId :: !(Maybe (Textual Int64))
, _advdFloodlightConfigurationIdDimensionValue :: !(Maybe DimensionValue)
, _advdClickThroughURLSuffix :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
advertiser
:: Advertiser
advertiser =
Advertiser
{ _advdOriginalFloodlightConfigurationId = Nothing
, _advdStatus = Nothing
, _advdFloodlightConfigurationId = Nothing
, _advdKind = "dfareporting#advertiser"
, _advdSuspended = Nothing
, _advdIdDimensionValue = Nothing
, _advdAccountId = Nothing
, _advdDefaultEmail = Nothing
, _advdName = Nothing
, _advdAdvertiserGroupId = Nothing
, _advdDefaultClickThroughEventTagId = Nothing
, _advdId = Nothing
, _advdSubAccountId = Nothing
, _advdFloodlightConfigurationIdDimensionValue = Nothing
, _advdClickThroughURLSuffix = Nothing
}
advdOriginalFloodlightConfigurationId :: Lens' Advertiser (Maybe Int64)
advdOriginalFloodlightConfigurationId
= lens _advdOriginalFloodlightConfigurationId
(\ s a ->
s{_advdOriginalFloodlightConfigurationId = a})
. mapping _Coerce
advdStatus :: Lens' Advertiser (Maybe AdvertiserStatus)
advdStatus
= lens _advdStatus (\ s a -> s{_advdStatus = a})
advdFloodlightConfigurationId :: Lens' Advertiser (Maybe Int64)
advdFloodlightConfigurationId
= lens _advdFloodlightConfigurationId
(\ s a -> s{_advdFloodlightConfigurationId = a})
. mapping _Coerce
advdKind :: Lens' Advertiser Text
advdKind = lens _advdKind (\ s a -> s{_advdKind = a})
advdSuspended :: Lens' Advertiser (Maybe Bool)
advdSuspended
= lens _advdSuspended
(\ s a -> s{_advdSuspended = a})
advdIdDimensionValue :: Lens' Advertiser (Maybe DimensionValue)
advdIdDimensionValue
= lens _advdIdDimensionValue
(\ s a -> s{_advdIdDimensionValue = a})
advdAccountId :: Lens' Advertiser (Maybe Int64)
advdAccountId
= lens _advdAccountId
(\ s a -> s{_advdAccountId = a})
. mapping _Coerce
advdDefaultEmail :: Lens' Advertiser (Maybe Text)
advdDefaultEmail
= lens _advdDefaultEmail
(\ s a -> s{_advdDefaultEmail = a})
advdName :: Lens' Advertiser (Maybe Text)
advdName = lens _advdName (\ s a -> s{_advdName = a})
advdAdvertiserGroupId :: Lens' Advertiser (Maybe Int64)
advdAdvertiserGroupId
= lens _advdAdvertiserGroupId
(\ s a -> s{_advdAdvertiserGroupId = a})
. mapping _Coerce
advdDefaultClickThroughEventTagId :: Lens' Advertiser (Maybe Int64)
advdDefaultClickThroughEventTagId
= lens _advdDefaultClickThroughEventTagId
(\ s a -> s{_advdDefaultClickThroughEventTagId = a})
. mapping _Coerce
advdId :: Lens' Advertiser (Maybe Int64)
advdId
= lens _advdId (\ s a -> s{_advdId = a}) .
mapping _Coerce
advdSubAccountId :: Lens' Advertiser (Maybe Int64)
advdSubAccountId
= lens _advdSubAccountId
(\ s a -> s{_advdSubAccountId = a})
. mapping _Coerce
advdFloodlightConfigurationIdDimensionValue :: Lens' Advertiser (Maybe DimensionValue)
advdFloodlightConfigurationIdDimensionValue
= lens _advdFloodlightConfigurationIdDimensionValue
(\ s a ->
s{_advdFloodlightConfigurationIdDimensionValue = a})
advdClickThroughURLSuffix :: Lens' Advertiser (Maybe Text)
advdClickThroughURLSuffix
= lens _advdClickThroughURLSuffix
(\ s a -> s{_advdClickThroughURLSuffix = a})
instance FromJSON Advertiser where
parseJSON
= withObject "Advertiser"
(\ o ->
Advertiser <$>
(o .:? "originalFloodlightConfigurationId") <*>
(o .:? "status")
<*> (o .:? "floodlightConfigurationId")
<*> (o .:? "kind" .!= "dfareporting#advertiser")
<*> (o .:? "suspended")
<*> (o .:? "idDimensionValue")
<*> (o .:? "accountId")
<*> (o .:? "defaultEmail")
<*> (o .:? "name")
<*> (o .:? "advertiserGroupId")
<*> (o .:? "defaultClickThroughEventTagId")
<*> (o .:? "id")
<*> (o .:? "subaccountId")
<*> (o .:? "floodlightConfigurationIdDimensionValue")
<*> (o .:? "clickThroughUrlSuffix"))
instance ToJSON Advertiser where
toJSON Advertiser{..}
= object
(catMaybes
[("originalFloodlightConfigurationId" .=) <$>
_advdOriginalFloodlightConfigurationId,
("status" .=) <$> _advdStatus,
("floodlightConfigurationId" .=) <$>
_advdFloodlightConfigurationId,
Just ("kind" .= _advdKind),
("suspended" .=) <$> _advdSuspended,
("idDimensionValue" .=) <$> _advdIdDimensionValue,
("accountId" .=) <$> _advdAccountId,
("defaultEmail" .=) <$> _advdDefaultEmail,
("name" .=) <$> _advdName,
("advertiserGroupId" .=) <$> _advdAdvertiserGroupId,
("defaultClickThroughEventTagId" .=) <$>
_advdDefaultClickThroughEventTagId,
("id" .=) <$> _advdId,
("subaccountId" .=) <$> _advdSubAccountId,
("floodlightConfigurationIdDimensionValue" .=) <$>
_advdFloodlightConfigurationIdDimensionValue,
("clickThroughUrlSuffix" .=) <$>
_advdClickThroughURLSuffix])
data UserRole = UserRole
{ _urParentUserRoleId :: !(Maybe (Textual Int64))
, _urKind :: !Text
, _urDefaultUserRole :: !(Maybe Bool)
, _urAccountId :: !(Maybe (Textual Int64))
, _urName :: !(Maybe Text)
, _urId :: !(Maybe (Textual Int64))
, _urPermissions :: !(Maybe [UserRolePermission])
, _urSubAccountId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
userRole
:: UserRole
userRole =
UserRole
{ _urParentUserRoleId = Nothing
, _urKind = "dfareporting#userRole"
, _urDefaultUserRole = Nothing
, _urAccountId = Nothing
, _urName = Nothing
, _urId = Nothing
, _urPermissions = Nothing
, _urSubAccountId = Nothing
}
urParentUserRoleId :: Lens' UserRole (Maybe Int64)
urParentUserRoleId
= lens _urParentUserRoleId
(\ s a -> s{_urParentUserRoleId = a})
. mapping _Coerce
urKind :: Lens' UserRole Text
urKind = lens _urKind (\ s a -> s{_urKind = a})
urDefaultUserRole :: Lens' UserRole (Maybe Bool)
urDefaultUserRole
= lens _urDefaultUserRole
(\ s a -> s{_urDefaultUserRole = a})
urAccountId :: Lens' UserRole (Maybe Int64)
urAccountId
= lens _urAccountId (\ s a -> s{_urAccountId = a}) .
mapping _Coerce
urName :: Lens' UserRole (Maybe Text)
urName = lens _urName (\ s a -> s{_urName = a})
urId :: Lens' UserRole (Maybe Int64)
urId
= lens _urId (\ s a -> s{_urId = a}) .
mapping _Coerce
urPermissions :: Lens' UserRole [UserRolePermission]
urPermissions
= lens _urPermissions
(\ s a -> s{_urPermissions = a})
. _Default
. _Coerce
urSubAccountId :: Lens' UserRole (Maybe Int64)
urSubAccountId
= lens _urSubAccountId
(\ s a -> s{_urSubAccountId = a})
. mapping _Coerce
instance FromJSON UserRole where
parseJSON
= withObject "UserRole"
(\ o ->
UserRole <$>
(o .:? "parentUserRoleId") <*>
(o .:? "kind" .!= "dfareporting#userRole")
<*> (o .:? "defaultUserRole")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "permissions" .!= mempty)
<*> (o .:? "subaccountId"))
instance ToJSON UserRole where
toJSON UserRole{..}
= object
(catMaybes
[("parentUserRoleId" .=) <$> _urParentUserRoleId,
Just ("kind" .= _urKind),
("defaultUserRole" .=) <$> _urDefaultUserRole,
("accountId" .=) <$> _urAccountId,
("name" .=) <$> _urName, ("id" .=) <$> _urId,
("permissions" .=) <$> _urPermissions,
("subaccountId" .=) <$> _urSubAccountId])
data DirectorySitesListResponse = DirectorySitesListResponse
{ _dslrNextPageToken :: !(Maybe Text)
, _dslrKind :: !Text
, _dslrDirectorySites :: !(Maybe [DirectorySite])
} deriving (Eq,Show,Data,Typeable,Generic)
directorySitesListResponse
:: DirectorySitesListResponse
directorySitesListResponse =
DirectorySitesListResponse
{ _dslrNextPageToken = Nothing
, _dslrKind = "dfareporting#directorySitesListResponse"
, _dslrDirectorySites = Nothing
}
dslrNextPageToken :: Lens' DirectorySitesListResponse (Maybe Text)
dslrNextPageToken
= lens _dslrNextPageToken
(\ s a -> s{_dslrNextPageToken = a})
dslrKind :: Lens' DirectorySitesListResponse Text
dslrKind = lens _dslrKind (\ s a -> s{_dslrKind = a})
dslrDirectorySites :: Lens' DirectorySitesListResponse [DirectorySite]
dslrDirectorySites
= lens _dslrDirectorySites
(\ s a -> s{_dslrDirectorySites = a})
. _Default
. _Coerce
instance FromJSON DirectorySitesListResponse where
parseJSON
= withObject "DirectorySitesListResponse"
(\ o ->
DirectorySitesListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#directorySitesListResponse")
<*> (o .:? "directorySites" .!= mempty))
instance ToJSON DirectorySitesListResponse where
toJSON DirectorySitesListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _dslrNextPageToken,
Just ("kind" .= _dslrKind),
("directorySites" .=) <$> _dslrDirectorySites])
data PricingSchedulePricingPeriod = PricingSchedulePricingPeriod
{ _psppEndDate :: !(Maybe Date')
, _psppRateOrCostNanos :: !(Maybe (Textual Int64))
, _psppStartDate :: !(Maybe Date')
, _psppUnits :: !(Maybe (Textual Int64))
, _psppPricingComment :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
pricingSchedulePricingPeriod
:: PricingSchedulePricingPeriod
pricingSchedulePricingPeriod =
PricingSchedulePricingPeriod
{ _psppEndDate = Nothing
, _psppRateOrCostNanos = Nothing
, _psppStartDate = Nothing
, _psppUnits = Nothing
, _psppPricingComment = Nothing
}
psppEndDate :: Lens' PricingSchedulePricingPeriod (Maybe Day)
psppEndDate
= lens _psppEndDate (\ s a -> s{_psppEndDate = a}) .
mapping _Date
psppRateOrCostNanos :: Lens' PricingSchedulePricingPeriod (Maybe Int64)
psppRateOrCostNanos
= lens _psppRateOrCostNanos
(\ s a -> s{_psppRateOrCostNanos = a})
. mapping _Coerce
psppStartDate :: Lens' PricingSchedulePricingPeriod (Maybe Day)
psppStartDate
= lens _psppStartDate
(\ s a -> s{_psppStartDate = a})
. mapping _Date
psppUnits :: Lens' PricingSchedulePricingPeriod (Maybe Int64)
psppUnits
= lens _psppUnits (\ s a -> s{_psppUnits = a}) .
mapping _Coerce
psppPricingComment :: Lens' PricingSchedulePricingPeriod (Maybe Text)
psppPricingComment
= lens _psppPricingComment
(\ s a -> s{_psppPricingComment = a})
instance FromJSON PricingSchedulePricingPeriod where
parseJSON
= withObject "PricingSchedulePricingPeriod"
(\ o ->
PricingSchedulePricingPeriod <$>
(o .:? "endDate") <*> (o .:? "rateOrCostNanos") <*>
(o .:? "startDate")
<*> (o .:? "units")
<*> (o .:? "pricingComment"))
instance ToJSON PricingSchedulePricingPeriod where
toJSON PricingSchedulePricingPeriod{..}
= object
(catMaybes
[("endDate" .=) <$> _psppEndDate,
("rateOrCostNanos" .=) <$> _psppRateOrCostNanos,
("startDate" .=) <$> _psppStartDate,
("units" .=) <$> _psppUnits,
("pricingComment" .=) <$> _psppPricingComment])
data DirectorySiteContactsListResponse = DirectorySiteContactsListResponse
{ _dsclrNextPageToken :: !(Maybe Text)
, _dsclrKind :: !Text
, _dsclrDirectorySiteContacts :: !(Maybe [DirectorySiteContact])
} deriving (Eq,Show,Data,Typeable,Generic)
directorySiteContactsListResponse
:: DirectorySiteContactsListResponse
directorySiteContactsListResponse =
DirectorySiteContactsListResponse
{ _dsclrNextPageToken = Nothing
, _dsclrKind = "dfareporting#directorySiteContactsListResponse"
, _dsclrDirectorySiteContacts = Nothing
}
dsclrNextPageToken :: Lens' DirectorySiteContactsListResponse (Maybe Text)
dsclrNextPageToken
= lens _dsclrNextPageToken
(\ s a -> s{_dsclrNextPageToken = a})
dsclrKind :: Lens' DirectorySiteContactsListResponse Text
dsclrKind
= lens _dsclrKind (\ s a -> s{_dsclrKind = a})
dsclrDirectorySiteContacts :: Lens' DirectorySiteContactsListResponse [DirectorySiteContact]
dsclrDirectorySiteContacts
= lens _dsclrDirectorySiteContacts
(\ s a -> s{_dsclrDirectorySiteContacts = a})
. _Default
. _Coerce
instance FromJSON DirectorySiteContactsListResponse
where
parseJSON
= withObject "DirectorySiteContactsListResponse"
(\ o ->
DirectorySiteContactsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#directorySiteContactsListResponse")
<*> (o .:? "directorySiteContacts" .!= mempty))
instance ToJSON DirectorySiteContactsListResponse
where
toJSON DirectorySiteContactsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _dsclrNextPageToken,
Just ("kind" .= _dsclrKind),
("directorySiteContacts" .=) <$>
_dsclrDirectorySiteContacts])
data Region = Region
{ _regRegionCode :: !(Maybe Text)
, _regKind :: !Text
, _regName :: !(Maybe Text)
, _regCountryCode :: !(Maybe Text)
, _regCountryDartId :: !(Maybe (Textual Int64))
, _regDartId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
region
:: Region
region =
Region
{ _regRegionCode = Nothing
, _regKind = "dfareporting#region"
, _regName = Nothing
, _regCountryCode = Nothing
, _regCountryDartId = Nothing
, _regDartId = Nothing
}
regRegionCode :: Lens' Region (Maybe Text)
regRegionCode
= lens _regRegionCode
(\ s a -> s{_regRegionCode = a})
regKind :: Lens' Region Text
regKind = lens _regKind (\ s a -> s{_regKind = a})
regName :: Lens' Region (Maybe Text)
regName = lens _regName (\ s a -> s{_regName = a})
regCountryCode :: Lens' Region (Maybe Text)
regCountryCode
= lens _regCountryCode
(\ s a -> s{_regCountryCode = a})
regCountryDartId :: Lens' Region (Maybe Int64)
regCountryDartId
= lens _regCountryDartId
(\ s a -> s{_regCountryDartId = a})
. mapping _Coerce
regDartId :: Lens' Region (Maybe Int64)
regDartId
= lens _regDartId (\ s a -> s{_regDartId = a}) .
mapping _Coerce
instance FromJSON Region where
parseJSON
= withObject "Region"
(\ o ->
Region <$>
(o .:? "regionCode") <*>
(o .:? "kind" .!= "dfareporting#region")
<*> (o .:? "name")
<*> (o .:? "countryCode")
<*> (o .:? "countryDartId")
<*> (o .:? "dartId"))
instance ToJSON Region where
toJSON Region{..}
= object
(catMaybes
[("regionCode" .=) <$> _regRegionCode,
Just ("kind" .= _regKind), ("name" .=) <$> _regName,
("countryCode" .=) <$> _regCountryCode,
("countryDartId" .=) <$> _regCountryDartId,
("dartId" .=) <$> _regDartId])
data AdvertiserGroupsListResponse = AdvertiserGroupsListResponse
{ _aglrNextPageToken :: !(Maybe Text)
, _aglrKind :: !Text
, _aglrAdvertiserGroups :: !(Maybe [AdvertiserGroup])
} deriving (Eq,Show,Data,Typeable,Generic)
advertiserGroupsListResponse
:: AdvertiserGroupsListResponse
advertiserGroupsListResponse =
AdvertiserGroupsListResponse
{ _aglrNextPageToken = Nothing
, _aglrKind = "dfareporting#advertiserGroupsListResponse"
, _aglrAdvertiserGroups = Nothing
}
aglrNextPageToken :: Lens' AdvertiserGroupsListResponse (Maybe Text)
aglrNextPageToken
= lens _aglrNextPageToken
(\ s a -> s{_aglrNextPageToken = a})
aglrKind :: Lens' AdvertiserGroupsListResponse Text
aglrKind = lens _aglrKind (\ s a -> s{_aglrKind = a})
aglrAdvertiserGroups :: Lens' AdvertiserGroupsListResponse [AdvertiserGroup]
aglrAdvertiserGroups
= lens _aglrAdvertiserGroups
(\ s a -> s{_aglrAdvertiserGroups = a})
. _Default
. _Coerce
instance FromJSON AdvertiserGroupsListResponse where
parseJSON
= withObject "AdvertiserGroupsListResponse"
(\ o ->
AdvertiserGroupsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#advertiserGroupsListResponse")
<*> (o .:? "advertiserGroups" .!= mempty))
instance ToJSON AdvertiserGroupsListResponse where
toJSON AdvertiserGroupsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _aglrNextPageToken,
Just ("kind" .= _aglrKind),
("advertiserGroups" .=) <$> _aglrAdvertiserGroups])
data CreativeAssignment = CreativeAssignment
{ _caCreativeGroupAssignments :: !(Maybe [CreativeGroupAssignment])
, _caStartTime :: !(Maybe DateTime')
, _caWeight :: !(Maybe (Textual Int32))
, _caRichMediaExitOverrides :: !(Maybe [RichMediaExitOverride])
, _caSSLCompliant :: !(Maybe Bool)
, _caCreativeId :: !(Maybe (Textual Int64))
, _caClickThroughURL :: !(Maybe ClickThroughURL)
, _caApplyEventTags :: !(Maybe Bool)
, _caActive :: !(Maybe Bool)
, _caSequence :: !(Maybe (Textual Int32))
, _caEndTime :: !(Maybe DateTime')
, _caCompanionCreativeOverrides :: !(Maybe [CompanionClickThroughOverride])
, _caCreativeIdDimensionValue :: !(Maybe DimensionValue)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeAssignment
:: CreativeAssignment
creativeAssignment =
CreativeAssignment
{ _caCreativeGroupAssignments = Nothing
, _caStartTime = Nothing
, _caWeight = Nothing
, _caRichMediaExitOverrides = Nothing
, _caSSLCompliant = Nothing
, _caCreativeId = Nothing
, _caClickThroughURL = Nothing
, _caApplyEventTags = Nothing
, _caActive = Nothing
, _caSequence = Nothing
, _caEndTime = Nothing
, _caCompanionCreativeOverrides = Nothing
, _caCreativeIdDimensionValue = Nothing
}
caCreativeGroupAssignments :: Lens' CreativeAssignment [CreativeGroupAssignment]
caCreativeGroupAssignments
= lens _caCreativeGroupAssignments
(\ s a -> s{_caCreativeGroupAssignments = a})
. _Default
. _Coerce
caStartTime :: Lens' CreativeAssignment (Maybe UTCTime)
caStartTime
= lens _caStartTime (\ s a -> s{_caStartTime = a}) .
mapping _DateTime
caWeight :: Lens' CreativeAssignment (Maybe Int32)
caWeight
= lens _caWeight (\ s a -> s{_caWeight = a}) .
mapping _Coerce
caRichMediaExitOverrides :: Lens' CreativeAssignment [RichMediaExitOverride]
caRichMediaExitOverrides
= lens _caRichMediaExitOverrides
(\ s a -> s{_caRichMediaExitOverrides = a})
. _Default
. _Coerce
caSSLCompliant :: Lens' CreativeAssignment (Maybe Bool)
caSSLCompliant
= lens _caSSLCompliant
(\ s a -> s{_caSSLCompliant = a})
caCreativeId :: Lens' CreativeAssignment (Maybe Int64)
caCreativeId
= lens _caCreativeId (\ s a -> s{_caCreativeId = a})
. mapping _Coerce
caClickThroughURL :: Lens' CreativeAssignment (Maybe ClickThroughURL)
caClickThroughURL
= lens _caClickThroughURL
(\ s a -> s{_caClickThroughURL = a})
caApplyEventTags :: Lens' CreativeAssignment (Maybe Bool)
caApplyEventTags
= lens _caApplyEventTags
(\ s a -> s{_caApplyEventTags = a})
caActive :: Lens' CreativeAssignment (Maybe Bool)
caActive = lens _caActive (\ s a -> s{_caActive = a})
caSequence :: Lens' CreativeAssignment (Maybe Int32)
caSequence
= lens _caSequence (\ s a -> s{_caSequence = a}) .
mapping _Coerce
caEndTime :: Lens' CreativeAssignment (Maybe UTCTime)
caEndTime
= lens _caEndTime (\ s a -> s{_caEndTime = a}) .
mapping _DateTime
caCompanionCreativeOverrides :: Lens' CreativeAssignment [CompanionClickThroughOverride]
caCompanionCreativeOverrides
= lens _caCompanionCreativeOverrides
(\ s a -> s{_caCompanionCreativeOverrides = a})
. _Default
. _Coerce
caCreativeIdDimensionValue :: Lens' CreativeAssignment (Maybe DimensionValue)
caCreativeIdDimensionValue
= lens _caCreativeIdDimensionValue
(\ s a -> s{_caCreativeIdDimensionValue = a})
instance FromJSON CreativeAssignment where
parseJSON
= withObject "CreativeAssignment"
(\ o ->
CreativeAssignment <$>
(o .:? "creativeGroupAssignments" .!= mempty) <*>
(o .:? "startTime")
<*> (o .:? "weight")
<*> (o .:? "richMediaExitOverrides" .!= mempty)
<*> (o .:? "sslCompliant")
<*> (o .:? "creativeId")
<*> (o .:? "clickThroughUrl")
<*> (o .:? "applyEventTags")
<*> (o .:? "active")
<*> (o .:? "sequence")
<*> (o .:? "endTime")
<*> (o .:? "companionCreativeOverrides" .!= mempty)
<*> (o .:? "creativeIdDimensionValue"))
instance ToJSON CreativeAssignment where
toJSON CreativeAssignment{..}
= object
(catMaybes
[("creativeGroupAssignments" .=) <$>
_caCreativeGroupAssignments,
("startTime" .=) <$> _caStartTime,
("weight" .=) <$> _caWeight,
("richMediaExitOverrides" .=) <$>
_caRichMediaExitOverrides,
("sslCompliant" .=) <$> _caSSLCompliant,
("creativeId" .=) <$> _caCreativeId,
("clickThroughUrl" .=) <$> _caClickThroughURL,
("applyEventTags" .=) <$> _caApplyEventTags,
("active" .=) <$> _caActive,
("sequence" .=) <$> _caSequence,
("endTime" .=) <$> _caEndTime,
("companionCreativeOverrides" .=) <$>
_caCompanionCreativeOverrides,
("creativeIdDimensionValue" .=) <$>
_caCreativeIdDimensionValue])
data DimensionFilter = DimensionFilter
{ _dfKind :: !Text
, _dfValue :: !(Maybe Text)
, _dfDimensionName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dimensionFilter
:: DimensionFilter
dimensionFilter =
DimensionFilter
{ _dfKind = "dfareporting#dimensionFilter"
, _dfValue = Nothing
, _dfDimensionName = Nothing
}
dfKind :: Lens' DimensionFilter Text
dfKind = lens _dfKind (\ s a -> s{_dfKind = a})
dfValue :: Lens' DimensionFilter (Maybe Text)
dfValue = lens _dfValue (\ s a -> s{_dfValue = a})
dfDimensionName :: Lens' DimensionFilter (Maybe Text)
dfDimensionName
= lens _dfDimensionName
(\ s a -> s{_dfDimensionName = a})
instance FromJSON DimensionFilter where
parseJSON
= withObject "DimensionFilter"
(\ o ->
DimensionFilter <$>
(o .:? "kind" .!= "dfareporting#dimensionFilter") <*>
(o .:? "value")
<*> (o .:? "dimensionName"))
instance ToJSON DimensionFilter where
toJSON DimensionFilter{..}
= object
(catMaybes
[Just ("kind" .= _dfKind), ("value" .=) <$> _dfValue,
("dimensionName" .=) <$> _dfDimensionName])
data UserProFileList = UserProFileList
{ _upflEtag :: !(Maybe Text)
, _upflKind :: !Text
, _upflItems :: !(Maybe [UserProFile])
} deriving (Eq,Show,Data,Typeable,Generic)
userProFileList
:: UserProFileList
userProFileList =
UserProFileList
{ _upflEtag = Nothing
, _upflKind = "dfareporting#userProfileList"
, _upflItems = Nothing
}
upflEtag :: Lens' UserProFileList (Maybe Text)
upflEtag = lens _upflEtag (\ s a -> s{_upflEtag = a})
upflKind :: Lens' UserProFileList Text
upflKind = lens _upflKind (\ s a -> s{_upflKind = a})
upflItems :: Lens' UserProFileList [UserProFile]
upflItems
= lens _upflItems (\ s a -> s{_upflItems = a}) .
_Default
. _Coerce
instance FromJSON UserProFileList where
parseJSON
= withObject "UserProFileList"
(\ o ->
UserProFileList <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "dfareporting#userProfileList")
<*> (o .:? "items" .!= mempty))
instance ToJSON UserProFileList where
toJSON UserProFileList{..}
= object
(catMaybes
[("etag" .=) <$> _upflEtag,
Just ("kind" .= _upflKind),
("items" .=) <$> _upflItems])
data FloodlightConfiguration = FloodlightConfiguration
{ _fcTagSettings :: !(Maybe TagSettings)
, _fcExposureToConversionEnabled :: !(Maybe Bool)
, _fcInAppAttributionTrackingEnabled :: !(Maybe Bool)
, _fcThirdPartyAuthenticationTokens :: !(Maybe [ThirdPartyAuthenticationToken])
, _fcKind :: !Text
, _fcAdvertiserId :: !(Maybe (Textual Int64))
, _fcAnalyticsDataSharingEnabled :: !(Maybe Bool)
, _fcAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _fcIdDimensionValue :: !(Maybe DimensionValue)
, _fcLookbackConfiguration :: !(Maybe LookbackConfiguration)
, _fcAccountId :: !(Maybe (Textual Int64))
, _fcId :: !(Maybe (Textual Int64))
, _fcSSLRequired :: !(Maybe Bool)
, _fcNATuralSearchConversionAttributionOption :: !(Maybe FloodlightConfigurationNATuralSearchConversionAttributionOption)
, _fcUserDefinedVariableConfigurations :: !(Maybe [UserDefinedVariableConfiguration])
, _fcSubAccountId :: !(Maybe (Textual Int64))
, _fcFirstDayOfWeek :: !(Maybe FloodlightConfigurationFirstDayOfWeek)
, _fcOmnitureSettings :: !(Maybe OmnitureSettings)
, _fcStandardVariableTypes :: !(Maybe [FloodlightConfigurationStandardVariableTypesItem])
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightConfiguration
:: FloodlightConfiguration
floodlightConfiguration =
FloodlightConfiguration
{ _fcTagSettings = Nothing
, _fcExposureToConversionEnabled = Nothing
, _fcInAppAttributionTrackingEnabled = Nothing
, _fcThirdPartyAuthenticationTokens = Nothing
, _fcKind = "dfareporting#floodlightConfiguration"
, _fcAdvertiserId = Nothing
, _fcAnalyticsDataSharingEnabled = Nothing
, _fcAdvertiserIdDimensionValue = Nothing
, _fcIdDimensionValue = Nothing
, _fcLookbackConfiguration = Nothing
, _fcAccountId = Nothing
, _fcId = Nothing
, _fcSSLRequired = Nothing
, _fcNATuralSearchConversionAttributionOption = Nothing
, _fcUserDefinedVariableConfigurations = Nothing
, _fcSubAccountId = Nothing
, _fcFirstDayOfWeek = Nothing
, _fcOmnitureSettings = Nothing
, _fcStandardVariableTypes = Nothing
}
fcTagSettings :: Lens' FloodlightConfiguration (Maybe TagSettings)
fcTagSettings
= lens _fcTagSettings
(\ s a -> s{_fcTagSettings = a})
fcExposureToConversionEnabled :: Lens' FloodlightConfiguration (Maybe Bool)
fcExposureToConversionEnabled
= lens _fcExposureToConversionEnabled
(\ s a -> s{_fcExposureToConversionEnabled = a})
fcInAppAttributionTrackingEnabled :: Lens' FloodlightConfiguration (Maybe Bool)
fcInAppAttributionTrackingEnabled
= lens _fcInAppAttributionTrackingEnabled
(\ s a -> s{_fcInAppAttributionTrackingEnabled = a})
fcThirdPartyAuthenticationTokens :: Lens' FloodlightConfiguration [ThirdPartyAuthenticationToken]
fcThirdPartyAuthenticationTokens
= lens _fcThirdPartyAuthenticationTokens
(\ s a -> s{_fcThirdPartyAuthenticationTokens = a})
. _Default
. _Coerce
fcKind :: Lens' FloodlightConfiguration Text
fcKind = lens _fcKind (\ s a -> s{_fcKind = a})
fcAdvertiserId :: Lens' FloodlightConfiguration (Maybe Int64)
fcAdvertiserId
= lens _fcAdvertiserId
(\ s a -> s{_fcAdvertiserId = a})
. mapping _Coerce
fcAnalyticsDataSharingEnabled :: Lens' FloodlightConfiguration (Maybe Bool)
fcAnalyticsDataSharingEnabled
= lens _fcAnalyticsDataSharingEnabled
(\ s a -> s{_fcAnalyticsDataSharingEnabled = a})
fcAdvertiserIdDimensionValue :: Lens' FloodlightConfiguration (Maybe DimensionValue)
fcAdvertiserIdDimensionValue
= lens _fcAdvertiserIdDimensionValue
(\ s a -> s{_fcAdvertiserIdDimensionValue = a})
fcIdDimensionValue :: Lens' FloodlightConfiguration (Maybe DimensionValue)
fcIdDimensionValue
= lens _fcIdDimensionValue
(\ s a -> s{_fcIdDimensionValue = a})
fcLookbackConfiguration :: Lens' FloodlightConfiguration (Maybe LookbackConfiguration)
fcLookbackConfiguration
= lens _fcLookbackConfiguration
(\ s a -> s{_fcLookbackConfiguration = a})
fcAccountId :: Lens' FloodlightConfiguration (Maybe Int64)
fcAccountId
= lens _fcAccountId (\ s a -> s{_fcAccountId = a}) .
mapping _Coerce
fcId :: Lens' FloodlightConfiguration (Maybe Int64)
fcId
= lens _fcId (\ s a -> s{_fcId = a}) .
mapping _Coerce
fcSSLRequired :: Lens' FloodlightConfiguration (Maybe Bool)
fcSSLRequired
= lens _fcSSLRequired
(\ s a -> s{_fcSSLRequired = a})
fcNATuralSearchConversionAttributionOption :: Lens' FloodlightConfiguration (Maybe FloodlightConfigurationNATuralSearchConversionAttributionOption)
fcNATuralSearchConversionAttributionOption
= lens _fcNATuralSearchConversionAttributionOption
(\ s a ->
s{_fcNATuralSearchConversionAttributionOption = a})
fcUserDefinedVariableConfigurations :: Lens' FloodlightConfiguration [UserDefinedVariableConfiguration]
fcUserDefinedVariableConfigurations
= lens _fcUserDefinedVariableConfigurations
(\ s a ->
s{_fcUserDefinedVariableConfigurations = a})
. _Default
. _Coerce
fcSubAccountId :: Lens' FloodlightConfiguration (Maybe Int64)
fcSubAccountId
= lens _fcSubAccountId
(\ s a -> s{_fcSubAccountId = a})
. mapping _Coerce
fcFirstDayOfWeek :: Lens' FloodlightConfiguration (Maybe FloodlightConfigurationFirstDayOfWeek)
fcFirstDayOfWeek
= lens _fcFirstDayOfWeek
(\ s a -> s{_fcFirstDayOfWeek = a})
fcOmnitureSettings :: Lens' FloodlightConfiguration (Maybe OmnitureSettings)
fcOmnitureSettings
= lens _fcOmnitureSettings
(\ s a -> s{_fcOmnitureSettings = a})
fcStandardVariableTypes :: Lens' FloodlightConfiguration [FloodlightConfigurationStandardVariableTypesItem]
fcStandardVariableTypes
= lens _fcStandardVariableTypes
(\ s a -> s{_fcStandardVariableTypes = a})
. _Default
. _Coerce
instance FromJSON FloodlightConfiguration where
parseJSON
= withObject "FloodlightConfiguration"
(\ o ->
FloodlightConfiguration <$>
(o .:? "tagSettings") <*>
(o .:? "exposureToConversionEnabled")
<*> (o .:? "inAppAttributionTrackingEnabled")
<*>
(o .:? "thirdPartyAuthenticationTokens" .!= mempty)
<*>
(o .:? "kind" .!=
"dfareporting#floodlightConfiguration")
<*> (o .:? "advertiserId")
<*> (o .:? "analyticsDataSharingEnabled")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "idDimensionValue")
<*> (o .:? "lookbackConfiguration")
<*> (o .:? "accountId")
<*> (o .:? "id")
<*> (o .:? "sslRequired")
<*>
(o .:? "naturalSearchConversionAttributionOption")
<*>
(o .:? "userDefinedVariableConfigurations" .!=
mempty)
<*> (o .:? "subaccountId")
<*> (o .:? "firstDayOfWeek")
<*> (o .:? "omnitureSettings")
<*> (o .:? "standardVariableTypes" .!= mempty))
instance ToJSON FloodlightConfiguration where
toJSON FloodlightConfiguration{..}
= object
(catMaybes
[("tagSettings" .=) <$> _fcTagSettings,
("exposureToConversionEnabled" .=) <$>
_fcExposureToConversionEnabled,
("inAppAttributionTrackingEnabled" .=) <$>
_fcInAppAttributionTrackingEnabled,
("thirdPartyAuthenticationTokens" .=) <$>
_fcThirdPartyAuthenticationTokens,
Just ("kind" .= _fcKind),
("advertiserId" .=) <$> _fcAdvertiserId,
("analyticsDataSharingEnabled" .=) <$>
_fcAnalyticsDataSharingEnabled,
("advertiserIdDimensionValue" .=) <$>
_fcAdvertiserIdDimensionValue,
("idDimensionValue" .=) <$> _fcIdDimensionValue,
("lookbackConfiguration" .=) <$>
_fcLookbackConfiguration,
("accountId" .=) <$> _fcAccountId,
("id" .=) <$> _fcId,
("sslRequired" .=) <$> _fcSSLRequired,
("naturalSearchConversionAttributionOption" .=) <$>
_fcNATuralSearchConversionAttributionOption,
("userDefinedVariableConfigurations" .=) <$>
_fcUserDefinedVariableConfigurations,
("subaccountId" .=) <$> _fcSubAccountId,
("firstDayOfWeek" .=) <$> _fcFirstDayOfWeek,
("omnitureSettings" .=) <$> _fcOmnitureSettings,
("standardVariableTypes" .=) <$>
_fcStandardVariableTypes])
data FloodlightActivityGroupsListResponse = FloodlightActivityGroupsListResponse
{ _faglrNextPageToken :: !(Maybe Text)
, _faglrKind :: !Text
, _faglrFloodlightActivityGroups :: !(Maybe [FloodlightActivityGroup])
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivityGroupsListResponse
:: FloodlightActivityGroupsListResponse
floodlightActivityGroupsListResponse =
FloodlightActivityGroupsListResponse
{ _faglrNextPageToken = Nothing
, _faglrKind = "dfareporting#floodlightActivityGroupsListResponse"
, _faglrFloodlightActivityGroups = Nothing
}
faglrNextPageToken :: Lens' FloodlightActivityGroupsListResponse (Maybe Text)
faglrNextPageToken
= lens _faglrNextPageToken
(\ s a -> s{_faglrNextPageToken = a})
faglrKind :: Lens' FloodlightActivityGroupsListResponse Text
faglrKind
= lens _faglrKind (\ s a -> s{_faglrKind = a})
faglrFloodlightActivityGroups :: Lens' FloodlightActivityGroupsListResponse [FloodlightActivityGroup]
faglrFloodlightActivityGroups
= lens _faglrFloodlightActivityGroups
(\ s a -> s{_faglrFloodlightActivityGroups = a})
. _Default
. _Coerce
instance FromJSON
FloodlightActivityGroupsListResponse where
parseJSON
= withObject "FloodlightActivityGroupsListResponse"
(\ o ->
FloodlightActivityGroupsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#floodlightActivityGroupsListResponse")
<*> (o .:? "floodlightActivityGroups" .!= mempty))
instance ToJSON FloodlightActivityGroupsListResponse
where
toJSON FloodlightActivityGroupsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _faglrNextPageToken,
Just ("kind" .= _faglrKind),
("floodlightActivityGroups" .=) <$>
_faglrFloodlightActivityGroups])
data CreativeFieldValuesListResponse = CreativeFieldValuesListResponse
{ _cfvlrNextPageToken :: !(Maybe Text)
, _cfvlrKind :: !Text
, _cfvlrCreativeFieldValues :: !(Maybe [CreativeFieldValue])
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldValuesListResponse
:: CreativeFieldValuesListResponse
creativeFieldValuesListResponse =
CreativeFieldValuesListResponse
{ _cfvlrNextPageToken = Nothing
, _cfvlrKind = "dfareporting#creativeFieldValuesListResponse"
, _cfvlrCreativeFieldValues = Nothing
}
cfvlrNextPageToken :: Lens' CreativeFieldValuesListResponse (Maybe Text)
cfvlrNextPageToken
= lens _cfvlrNextPageToken
(\ s a -> s{_cfvlrNextPageToken = a})
cfvlrKind :: Lens' CreativeFieldValuesListResponse Text
cfvlrKind
= lens _cfvlrKind (\ s a -> s{_cfvlrKind = a})
cfvlrCreativeFieldValues :: Lens' CreativeFieldValuesListResponse [CreativeFieldValue]
cfvlrCreativeFieldValues
= lens _cfvlrCreativeFieldValues
(\ s a -> s{_cfvlrCreativeFieldValues = a})
. _Default
. _Coerce
instance FromJSON CreativeFieldValuesListResponse
where
parseJSON
= withObject "CreativeFieldValuesListResponse"
(\ o ->
CreativeFieldValuesListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#creativeFieldValuesListResponse")
<*> (o .:? "creativeFieldValues" .!= mempty))
instance ToJSON CreativeFieldValuesListResponse where
toJSON CreativeFieldValuesListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _cfvlrNextPageToken,
Just ("kind" .= _cfvlrKind),
("creativeFieldValues" .=) <$>
_cfvlrCreativeFieldValues])
data RichMediaExitOverride = RichMediaExitOverride
{ _rmeoUseCustomExitURL :: !(Maybe Bool)
, _rmeoExitId :: !(Maybe (Textual Int64))
, _rmeoCustomExitURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
richMediaExitOverride
:: RichMediaExitOverride
richMediaExitOverride =
RichMediaExitOverride
{ _rmeoUseCustomExitURL = Nothing
, _rmeoExitId = Nothing
, _rmeoCustomExitURL = Nothing
}
rmeoUseCustomExitURL :: Lens' RichMediaExitOverride (Maybe Bool)
rmeoUseCustomExitURL
= lens _rmeoUseCustomExitURL
(\ s a -> s{_rmeoUseCustomExitURL = a})
rmeoExitId :: Lens' RichMediaExitOverride (Maybe Int64)
rmeoExitId
= lens _rmeoExitId (\ s a -> s{_rmeoExitId = a}) .
mapping _Coerce
rmeoCustomExitURL :: Lens' RichMediaExitOverride (Maybe Text)
rmeoCustomExitURL
= lens _rmeoCustomExitURL
(\ s a -> s{_rmeoCustomExitURL = a})
instance FromJSON RichMediaExitOverride where
parseJSON
= withObject "RichMediaExitOverride"
(\ o ->
RichMediaExitOverride <$>
(o .:? "useCustomExitUrl") <*> (o .:? "exitId") <*>
(o .:? "customExitUrl"))
instance ToJSON RichMediaExitOverride where
toJSON RichMediaExitOverride{..}
= object
(catMaybes
[("useCustomExitUrl" .=) <$> _rmeoUseCustomExitURL,
("exitId" .=) <$> _rmeoExitId,
("customExitUrl" .=) <$> _rmeoCustomExitURL])
data SortedDimension = SortedDimension
{ _sdKind :: !Text
, _sdSortOrder :: !(Maybe SortedDimensionSortOrder)
, _sdName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sortedDimension
:: SortedDimension
sortedDimension =
SortedDimension
{ _sdKind = "dfareporting#sortedDimension"
, _sdSortOrder = Nothing
, _sdName = Nothing
}
sdKind :: Lens' SortedDimension Text
sdKind = lens _sdKind (\ s a -> s{_sdKind = a})
sdSortOrder :: Lens' SortedDimension (Maybe SortedDimensionSortOrder)
sdSortOrder
= lens _sdSortOrder (\ s a -> s{_sdSortOrder = a})
sdName :: Lens' SortedDimension (Maybe Text)
sdName = lens _sdName (\ s a -> s{_sdName = a})
instance FromJSON SortedDimension where
parseJSON
= withObject "SortedDimension"
(\ o ->
SortedDimension <$>
(o .:? "kind" .!= "dfareporting#sortedDimension") <*>
(o .:? "sortOrder")
<*> (o .:? "name"))
instance ToJSON SortedDimension where
toJSON SortedDimension{..}
= object
(catMaybes
[Just ("kind" .= _sdKind),
("sortOrder" .=) <$> _sdSortOrder,
("name" .=) <$> _sdName])
data CreativeFieldsListResponse = CreativeFieldsListResponse
{ _cflrNextPageToken :: !(Maybe Text)
, _cflrKind :: !Text
, _cflrCreativeFields :: !(Maybe [CreativeField])
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldsListResponse
:: CreativeFieldsListResponse
creativeFieldsListResponse =
CreativeFieldsListResponse
{ _cflrNextPageToken = Nothing
, _cflrKind = "dfareporting#creativeFieldsListResponse"
, _cflrCreativeFields = Nothing
}
cflrNextPageToken :: Lens' CreativeFieldsListResponse (Maybe Text)
cflrNextPageToken
= lens _cflrNextPageToken
(\ s a -> s{_cflrNextPageToken = a})
cflrKind :: Lens' CreativeFieldsListResponse Text
cflrKind = lens _cflrKind (\ s a -> s{_cflrKind = a})
cflrCreativeFields :: Lens' CreativeFieldsListResponse [CreativeField]
cflrCreativeFields
= lens _cflrCreativeFields
(\ s a -> s{_cflrCreativeFields = a})
. _Default
. _Coerce
instance FromJSON CreativeFieldsListResponse where
parseJSON
= withObject "CreativeFieldsListResponse"
(\ o ->
CreativeFieldsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#creativeFieldsListResponse")
<*> (o .:? "creativeFields" .!= mempty))
instance ToJSON CreativeFieldsListResponse where
toJSON CreativeFieldsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _cflrNextPageToken,
Just ("kind" .= _cflrKind),
("creativeFields" .=) <$> _cflrCreativeFields])
data PlacementsGenerateTagsResponse = PlacementsGenerateTagsResponse
{ _pgtrKind :: !Text
, _pgtrPlacementTags :: !(Maybe [PlacementTag])
} deriving (Eq,Show,Data,Typeable,Generic)
placementsGenerateTagsResponse
:: PlacementsGenerateTagsResponse
placementsGenerateTagsResponse =
PlacementsGenerateTagsResponse
{ _pgtrKind = "dfareporting#placementsGenerateTagsResponse"
, _pgtrPlacementTags = Nothing
}
pgtrKind :: Lens' PlacementsGenerateTagsResponse Text
pgtrKind = lens _pgtrKind (\ s a -> s{_pgtrKind = a})
pgtrPlacementTags :: Lens' PlacementsGenerateTagsResponse [PlacementTag]
pgtrPlacementTags
= lens _pgtrPlacementTags
(\ s a -> s{_pgtrPlacementTags = a})
. _Default
. _Coerce
instance FromJSON PlacementsGenerateTagsResponse
where
parseJSON
= withObject "PlacementsGenerateTagsResponse"
(\ o ->
PlacementsGenerateTagsResponse <$>
(o .:? "kind" .!=
"dfareporting#placementsGenerateTagsResponse")
<*> (o .:? "placementTags" .!= mempty))
instance ToJSON PlacementsGenerateTagsResponse where
toJSON PlacementsGenerateTagsResponse{..}
= object
(catMaybes
[Just ("kind" .= _pgtrKind),
("placementTags" .=) <$> _pgtrPlacementTags])
data CreativeAsset = CreativeAsset
{ _caaZIndex :: !(Maybe (Textual Int32))
, _caaPushdown :: !(Maybe Bool)
, _caaVideoDuration :: !(Maybe (Textual Double))
, _caaOriginalBackup :: !(Maybe Bool)
, _caaWindowMode :: !(Maybe CreativeAssetWindowMode)
, _caaFlashVersion :: !(Maybe (Textual Int32))
, _caaPushdownDuration :: !(Maybe (Textual Double))
, _caaSize :: !(Maybe Size)
, _caaVerticallyLocked :: !(Maybe Bool)
, _caaOffSet :: !(Maybe OffSetPosition)
, _caaStreamingServingURL :: !(Maybe Text)
, _caaZipFilesize :: !(Maybe Text)
, _caaTransparency :: !(Maybe Bool)
, _caaHideSelectionBoxes :: !(Maybe Bool)
, _caaSSLCompliant :: !(Maybe Bool)
, _caaFileSize :: !(Maybe (Textual Int64))
, _caaAssetIdentifier :: !(Maybe CreativeAssetId)
, _caaDurationType :: !(Maybe CreativeAssetDurationType)
, _caaProgressiveServingURL :: !(Maybe Text)
, _caaActive :: !(Maybe Bool)
, _caaRole :: !(Maybe CreativeAssetRole)
, _caaMimeType :: !(Maybe Text)
, _caaPositionTopUnit :: !(Maybe CreativeAssetPositionTopUnit)
, _caaPositionLeftUnit :: !(Maybe CreativeAssetPositionLeftUnit)
, _caaAlignment :: !(Maybe CreativeAssetAlignment)
, _caaExpandedDimension :: !(Maybe Size)
, _caaZipFilename :: !(Maybe Text)
, _caaActionScript3 :: !(Maybe Bool)
, _caaDisplayType :: !(Maybe CreativeAssetDisplayType)
, _caaChildAssetType :: !(Maybe CreativeAssetChildAssetType)
, _caaCollapsedSize :: !(Maybe Size)
, _caaId :: !(Maybe (Textual Int64))
, _caaBitRate :: !(Maybe (Textual Int32))
, _caaCustomStartTimeValue :: !(Maybe (Textual Int32))
, _caaStartTimeType :: !(Maybe CreativeAssetStartTimeType)
, _caaDuration :: !(Maybe (Textual Int32))
, _caaArtworkType :: !(Maybe CreativeAssetArtworkType)
, _caaHideFlashObjects :: !(Maybe Bool)
, _caaDetectedFeatures :: !(Maybe [CreativeAssetDetectedFeaturesItem])
, _caaBackupImageExit :: !(Maybe CreativeCustomEvent)
, _caaPosition :: !(Maybe OffSetPosition)
, _caaHorizontallyLocked :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeAsset
:: CreativeAsset
creativeAsset =
CreativeAsset
{ _caaZIndex = Nothing
, _caaPushdown = Nothing
, _caaVideoDuration = Nothing
, _caaOriginalBackup = Nothing
, _caaWindowMode = Nothing
, _caaFlashVersion = Nothing
, _caaPushdownDuration = Nothing
, _caaSize = Nothing
, _caaVerticallyLocked = Nothing
, _caaOffSet = Nothing
, _caaStreamingServingURL = Nothing
, _caaZipFilesize = Nothing
, _caaTransparency = Nothing
, _caaHideSelectionBoxes = Nothing
, _caaSSLCompliant = Nothing
, _caaFileSize = Nothing
, _caaAssetIdentifier = Nothing
, _caaDurationType = Nothing
, _caaProgressiveServingURL = Nothing
, _caaActive = Nothing
, _caaRole = Nothing
, _caaMimeType = Nothing
, _caaPositionTopUnit = Nothing
, _caaPositionLeftUnit = Nothing
, _caaAlignment = Nothing
, _caaExpandedDimension = Nothing
, _caaZipFilename = Nothing
, _caaActionScript3 = Nothing
, _caaDisplayType = Nothing
, _caaChildAssetType = Nothing
, _caaCollapsedSize = Nothing
, _caaId = Nothing
, _caaBitRate = Nothing
, _caaCustomStartTimeValue = Nothing
, _caaStartTimeType = Nothing
, _caaDuration = Nothing
, _caaArtworkType = Nothing
, _caaHideFlashObjects = Nothing
, _caaDetectedFeatures = Nothing
, _caaBackupImageExit = Nothing
, _caaPosition = Nothing
, _caaHorizontallyLocked = Nothing
}
caaZIndex :: Lens' CreativeAsset (Maybe Int32)
caaZIndex
= lens _caaZIndex (\ s a -> s{_caaZIndex = a}) .
mapping _Coerce
caaPushdown :: Lens' CreativeAsset (Maybe Bool)
caaPushdown
= lens _caaPushdown (\ s a -> s{_caaPushdown = a})
caaVideoDuration :: Lens' CreativeAsset (Maybe Double)
caaVideoDuration
= lens _caaVideoDuration
(\ s a -> s{_caaVideoDuration = a})
. mapping _Coerce
caaOriginalBackup :: Lens' CreativeAsset (Maybe Bool)
caaOriginalBackup
= lens _caaOriginalBackup
(\ s a -> s{_caaOriginalBackup = a})
caaWindowMode :: Lens' CreativeAsset (Maybe CreativeAssetWindowMode)
caaWindowMode
= lens _caaWindowMode
(\ s a -> s{_caaWindowMode = a})
caaFlashVersion :: Lens' CreativeAsset (Maybe Int32)
caaFlashVersion
= lens _caaFlashVersion
(\ s a -> s{_caaFlashVersion = a})
. mapping _Coerce
caaPushdownDuration :: Lens' CreativeAsset (Maybe Double)
caaPushdownDuration
= lens _caaPushdownDuration
(\ s a -> s{_caaPushdownDuration = a})
. mapping _Coerce
caaSize :: Lens' CreativeAsset (Maybe Size)
caaSize = lens _caaSize (\ s a -> s{_caaSize = a})
caaVerticallyLocked :: Lens' CreativeAsset (Maybe Bool)
caaVerticallyLocked
= lens _caaVerticallyLocked
(\ s a -> s{_caaVerticallyLocked = a})
caaOffSet :: Lens' CreativeAsset (Maybe OffSetPosition)
caaOffSet
= lens _caaOffSet (\ s a -> s{_caaOffSet = a})
caaStreamingServingURL :: Lens' CreativeAsset (Maybe Text)
caaStreamingServingURL
= lens _caaStreamingServingURL
(\ s a -> s{_caaStreamingServingURL = a})
caaZipFilesize :: Lens' CreativeAsset (Maybe Text)
caaZipFilesize
= lens _caaZipFilesize
(\ s a -> s{_caaZipFilesize = a})
caaTransparency :: Lens' CreativeAsset (Maybe Bool)
caaTransparency
= lens _caaTransparency
(\ s a -> s{_caaTransparency = a})
caaHideSelectionBoxes :: Lens' CreativeAsset (Maybe Bool)
caaHideSelectionBoxes
= lens _caaHideSelectionBoxes
(\ s a -> s{_caaHideSelectionBoxes = a})
caaSSLCompliant :: Lens' CreativeAsset (Maybe Bool)
caaSSLCompliant
= lens _caaSSLCompliant
(\ s a -> s{_caaSSLCompliant = a})
caaFileSize :: Lens' CreativeAsset (Maybe Int64)
caaFileSize
= lens _caaFileSize (\ s a -> s{_caaFileSize = a}) .
mapping _Coerce
caaAssetIdentifier :: Lens' CreativeAsset (Maybe CreativeAssetId)
caaAssetIdentifier
= lens _caaAssetIdentifier
(\ s a -> s{_caaAssetIdentifier = a})
caaDurationType :: Lens' CreativeAsset (Maybe CreativeAssetDurationType)
caaDurationType
= lens _caaDurationType
(\ s a -> s{_caaDurationType = a})
caaProgressiveServingURL :: Lens' CreativeAsset (Maybe Text)
caaProgressiveServingURL
= lens _caaProgressiveServingURL
(\ s a -> s{_caaProgressiveServingURL = a})
caaActive :: Lens' CreativeAsset (Maybe Bool)
caaActive
= lens _caaActive (\ s a -> s{_caaActive = a})
caaRole :: Lens' CreativeAsset (Maybe CreativeAssetRole)
caaRole = lens _caaRole (\ s a -> s{_caaRole = a})
caaMimeType :: Lens' CreativeAsset (Maybe Text)
caaMimeType
= lens _caaMimeType (\ s a -> s{_caaMimeType = a})
caaPositionTopUnit :: Lens' CreativeAsset (Maybe CreativeAssetPositionTopUnit)
caaPositionTopUnit
= lens _caaPositionTopUnit
(\ s a -> s{_caaPositionTopUnit = a})
caaPositionLeftUnit :: Lens' CreativeAsset (Maybe CreativeAssetPositionLeftUnit)
caaPositionLeftUnit
= lens _caaPositionLeftUnit
(\ s a -> s{_caaPositionLeftUnit = a})
caaAlignment :: Lens' CreativeAsset (Maybe CreativeAssetAlignment)
caaAlignment
= lens _caaAlignment (\ s a -> s{_caaAlignment = a})
caaExpandedDimension :: Lens' CreativeAsset (Maybe Size)
caaExpandedDimension
= lens _caaExpandedDimension
(\ s a -> s{_caaExpandedDimension = a})
caaZipFilename :: Lens' CreativeAsset (Maybe Text)
caaZipFilename
= lens _caaZipFilename
(\ s a -> s{_caaZipFilename = a})
caaActionScript3 :: Lens' CreativeAsset (Maybe Bool)
caaActionScript3
= lens _caaActionScript3
(\ s a -> s{_caaActionScript3 = a})
caaDisplayType :: Lens' CreativeAsset (Maybe CreativeAssetDisplayType)
caaDisplayType
= lens _caaDisplayType
(\ s a -> s{_caaDisplayType = a})
caaChildAssetType :: Lens' CreativeAsset (Maybe CreativeAssetChildAssetType)
caaChildAssetType
= lens _caaChildAssetType
(\ s a -> s{_caaChildAssetType = a})
caaCollapsedSize :: Lens' CreativeAsset (Maybe Size)
caaCollapsedSize
= lens _caaCollapsedSize
(\ s a -> s{_caaCollapsedSize = a})
caaId :: Lens' CreativeAsset (Maybe Int64)
caaId
= lens _caaId (\ s a -> s{_caaId = a}) .
mapping _Coerce
caaBitRate :: Lens' CreativeAsset (Maybe Int32)
caaBitRate
= lens _caaBitRate (\ s a -> s{_caaBitRate = a}) .
mapping _Coerce
caaCustomStartTimeValue :: Lens' CreativeAsset (Maybe Int32)
caaCustomStartTimeValue
= lens _caaCustomStartTimeValue
(\ s a -> s{_caaCustomStartTimeValue = a})
. mapping _Coerce
caaStartTimeType :: Lens' CreativeAsset (Maybe CreativeAssetStartTimeType)
caaStartTimeType
= lens _caaStartTimeType
(\ s a -> s{_caaStartTimeType = a})
caaDuration :: Lens' CreativeAsset (Maybe Int32)
caaDuration
= lens _caaDuration (\ s a -> s{_caaDuration = a}) .
mapping _Coerce
caaArtworkType :: Lens' CreativeAsset (Maybe CreativeAssetArtworkType)
caaArtworkType
= lens _caaArtworkType
(\ s a -> s{_caaArtworkType = a})
caaHideFlashObjects :: Lens' CreativeAsset (Maybe Bool)
caaHideFlashObjects
= lens _caaHideFlashObjects
(\ s a -> s{_caaHideFlashObjects = a})
caaDetectedFeatures :: Lens' CreativeAsset [CreativeAssetDetectedFeaturesItem]
caaDetectedFeatures
= lens _caaDetectedFeatures
(\ s a -> s{_caaDetectedFeatures = a})
. _Default
. _Coerce
caaBackupImageExit :: Lens' CreativeAsset (Maybe CreativeCustomEvent)
caaBackupImageExit
= lens _caaBackupImageExit
(\ s a -> s{_caaBackupImageExit = a})
caaPosition :: Lens' CreativeAsset (Maybe OffSetPosition)
caaPosition
= lens _caaPosition (\ s a -> s{_caaPosition = a})
caaHorizontallyLocked :: Lens' CreativeAsset (Maybe Bool)
caaHorizontallyLocked
= lens _caaHorizontallyLocked
(\ s a -> s{_caaHorizontallyLocked = a})
instance FromJSON CreativeAsset where
parseJSON
= withObject "CreativeAsset"
(\ o ->
CreativeAsset <$>
(o .:? "zIndex") <*> (o .:? "pushdown") <*>
(o .:? "videoDuration")
<*> (o .:? "originalBackup")
<*> (o .:? "windowMode")
<*> (o .:? "flashVersion")
<*> (o .:? "pushdownDuration")
<*> (o .:? "size")
<*> (o .:? "verticallyLocked")
<*> (o .:? "offset")
<*> (o .:? "streamingServingUrl")
<*> (o .:? "zipFilesize")
<*> (o .:? "transparency")
<*> (o .:? "hideSelectionBoxes")
<*> (o .:? "sslCompliant")
<*> (o .:? "fileSize")
<*> (o .:? "assetIdentifier")
<*> (o .:? "durationType")
<*> (o .:? "progressiveServingUrl")
<*> (o .:? "active")
<*> (o .:? "role")
<*> (o .:? "mimeType")
<*> (o .:? "positionTopUnit")
<*> (o .:? "positionLeftUnit")
<*> (o .:? "alignment")
<*> (o .:? "expandedDimension")
<*> (o .:? "zipFilename")
<*> (o .:? "actionScript3")
<*> (o .:? "displayType")
<*> (o .:? "childAssetType")
<*> (o .:? "collapsedSize")
<*> (o .:? "id")
<*> (o .:? "bitRate")
<*> (o .:? "customStartTimeValue")
<*> (o .:? "startTimeType")
<*> (o .:? "duration")
<*> (o .:? "artworkType")
<*> (o .:? "hideFlashObjects")
<*> (o .:? "detectedFeatures" .!= mempty)
<*> (o .:? "backupImageExit")
<*> (o .:? "position")
<*> (o .:? "horizontallyLocked"))
instance ToJSON CreativeAsset where
toJSON CreativeAsset{..}
= object
(catMaybes
[("zIndex" .=) <$> _caaZIndex,
("pushdown" .=) <$> _caaPushdown,
("videoDuration" .=) <$> _caaVideoDuration,
("originalBackup" .=) <$> _caaOriginalBackup,
("windowMode" .=) <$> _caaWindowMode,
("flashVersion" .=) <$> _caaFlashVersion,
("pushdownDuration" .=) <$> _caaPushdownDuration,
("size" .=) <$> _caaSize,
("verticallyLocked" .=) <$> _caaVerticallyLocked,
("offset" .=) <$> _caaOffSet,
("streamingServingUrl" .=) <$>
_caaStreamingServingURL,
("zipFilesize" .=) <$> _caaZipFilesize,
("transparency" .=) <$> _caaTransparency,
("hideSelectionBoxes" .=) <$> _caaHideSelectionBoxes,
("sslCompliant" .=) <$> _caaSSLCompliant,
("fileSize" .=) <$> _caaFileSize,
("assetIdentifier" .=) <$> _caaAssetIdentifier,
("durationType" .=) <$> _caaDurationType,
("progressiveServingUrl" .=) <$>
_caaProgressiveServingURL,
("active" .=) <$> _caaActive,
("role" .=) <$> _caaRole,
("mimeType" .=) <$> _caaMimeType,
("positionTopUnit" .=) <$> _caaPositionTopUnit,
("positionLeftUnit" .=) <$> _caaPositionLeftUnit,
("alignment" .=) <$> _caaAlignment,
("expandedDimension" .=) <$> _caaExpandedDimension,
("zipFilename" .=) <$> _caaZipFilename,
("actionScript3" .=) <$> _caaActionScript3,
("displayType" .=) <$> _caaDisplayType,
("childAssetType" .=) <$> _caaChildAssetType,
("collapsedSize" .=) <$> _caaCollapsedSize,
("id" .=) <$> _caaId, ("bitRate" .=) <$> _caaBitRate,
("customStartTimeValue" .=) <$>
_caaCustomStartTimeValue,
("startTimeType" .=) <$> _caaStartTimeType,
("duration" .=) <$> _caaDuration,
("artworkType" .=) <$> _caaArtworkType,
("hideFlashObjects" .=) <$> _caaHideFlashObjects,
("detectedFeatures" .=) <$> _caaDetectedFeatures,
("backupImageExit" .=) <$> _caaBackupImageExit,
("position" .=) <$> _caaPosition,
("horizontallyLocked" .=) <$>
_caaHorizontallyLocked])
data PlacementsListResponse = PlacementsListResponse
{ _plaNextPageToken :: !(Maybe Text)
, _plaKind :: !Text
, _plaPlacements :: !(Maybe [Placement])
} deriving (Eq,Show,Data,Typeable,Generic)
placementsListResponse
:: PlacementsListResponse
placementsListResponse =
PlacementsListResponse
{ _plaNextPageToken = Nothing
, _plaKind = "dfareporting#placementsListResponse"
, _plaPlacements = Nothing
}
plaNextPageToken :: Lens' PlacementsListResponse (Maybe Text)
plaNextPageToken
= lens _plaNextPageToken
(\ s a -> s{_plaNextPageToken = a})
plaKind :: Lens' PlacementsListResponse Text
plaKind = lens _plaKind (\ s a -> s{_plaKind = a})
plaPlacements :: Lens' PlacementsListResponse [Placement]
plaPlacements
= lens _plaPlacements
(\ s a -> s{_plaPlacements = a})
. _Default
. _Coerce
instance FromJSON PlacementsListResponse where
parseJSON
= withObject "PlacementsListResponse"
(\ o ->
PlacementsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#placementsListResponse")
<*> (o .:? "placements" .!= mempty))
instance ToJSON PlacementsListResponse where
toJSON PlacementsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _plaNextPageToken,
Just ("kind" .= _plaKind),
("placements" .=) <$> _plaPlacements])
data ReportSchedule = ReportSchedule
{ _rsEvery :: !(Maybe (Textual Int32))
, _rsActive :: !(Maybe Bool)
, _rsRepeats :: !(Maybe Text)
, _rsStartDate :: !(Maybe Date')
, _rsExpirationDate :: !(Maybe Date')
, _rsRunsOnDayOfMonth :: !(Maybe ReportScheduleRunsOnDayOfMonth)
, _rsRepeatsOnWeekDays :: !(Maybe [ReportScheduleRepeatsOnWeekDaysItem])
} deriving (Eq,Show,Data,Typeable,Generic)
reportSchedule
:: ReportSchedule
reportSchedule =
ReportSchedule
{ _rsEvery = Nothing
, _rsActive = Nothing
, _rsRepeats = Nothing
, _rsStartDate = Nothing
, _rsExpirationDate = Nothing
, _rsRunsOnDayOfMonth = Nothing
, _rsRepeatsOnWeekDays = Nothing
}
rsEvery :: Lens' ReportSchedule (Maybe Int32)
rsEvery
= lens _rsEvery (\ s a -> s{_rsEvery = a}) .
mapping _Coerce
rsActive :: Lens' ReportSchedule (Maybe Bool)
rsActive = lens _rsActive (\ s a -> s{_rsActive = a})
rsRepeats :: Lens' ReportSchedule (Maybe Text)
rsRepeats
= lens _rsRepeats (\ s a -> s{_rsRepeats = a})
rsStartDate :: Lens' ReportSchedule (Maybe Day)
rsStartDate
= lens _rsStartDate (\ s a -> s{_rsStartDate = a}) .
mapping _Date
rsExpirationDate :: Lens' ReportSchedule (Maybe Day)
rsExpirationDate
= lens _rsExpirationDate
(\ s a -> s{_rsExpirationDate = a})
. mapping _Date
rsRunsOnDayOfMonth :: Lens' ReportSchedule (Maybe ReportScheduleRunsOnDayOfMonth)
rsRunsOnDayOfMonth
= lens _rsRunsOnDayOfMonth
(\ s a -> s{_rsRunsOnDayOfMonth = a})
rsRepeatsOnWeekDays :: Lens' ReportSchedule [ReportScheduleRepeatsOnWeekDaysItem]
rsRepeatsOnWeekDays
= lens _rsRepeatsOnWeekDays
(\ s a -> s{_rsRepeatsOnWeekDays = a})
. _Default
. _Coerce
instance FromJSON ReportSchedule where
parseJSON
= withObject "ReportSchedule"
(\ o ->
ReportSchedule <$>
(o .:? "every") <*> (o .:? "active") <*>
(o .:? "repeats")
<*> (o .:? "startDate")
<*> (o .:? "expirationDate")
<*> (o .:? "runsOnDayOfMonth")
<*> (o .:? "repeatsOnWeekDays" .!= mempty))
instance ToJSON ReportSchedule where
toJSON ReportSchedule{..}
= object
(catMaybes
[("every" .=) <$> _rsEvery,
("active" .=) <$> _rsActive,
("repeats" .=) <$> _rsRepeats,
("startDate" .=) <$> _rsStartDate,
("expirationDate" .=) <$> _rsExpirationDate,
("runsOnDayOfMonth" .=) <$> _rsRunsOnDayOfMonth,
("repeatsOnWeekDays" .=) <$> _rsRepeatsOnWeekDays])
data ReportPathToConversionCriteria = ReportPathToConversionCriteria
{ _rptccReportProperties :: !(Maybe ReportPathToConversionCriteriaReportProperties)
, _rptccMetricNames :: !(Maybe [Text])
, _rptccCustomRichMediaEvents :: !(Maybe [DimensionValue])
, _rptccDateRange :: !(Maybe DateRange)
, _rptccConversionDimensions :: !(Maybe [SortedDimension])
, _rptccCustomFloodlightVariables :: !(Maybe [SortedDimension])
, _rptccFloodlightConfigId :: !(Maybe DimensionValue)
, _rptccActivityFilters :: !(Maybe [DimensionValue])
, _rptccPerInteractionDimensions :: !(Maybe [SortedDimension])
} deriving (Eq,Show,Data,Typeable,Generic)
reportPathToConversionCriteria
:: ReportPathToConversionCriteria
reportPathToConversionCriteria =
ReportPathToConversionCriteria
{ _rptccReportProperties = Nothing
, _rptccMetricNames = Nothing
, _rptccCustomRichMediaEvents = Nothing
, _rptccDateRange = Nothing
, _rptccConversionDimensions = Nothing
, _rptccCustomFloodlightVariables = Nothing
, _rptccFloodlightConfigId = Nothing
, _rptccActivityFilters = Nothing
, _rptccPerInteractionDimensions = Nothing
}
rptccReportProperties :: Lens' ReportPathToConversionCriteria (Maybe ReportPathToConversionCriteriaReportProperties)
rptccReportProperties
= lens _rptccReportProperties
(\ s a -> s{_rptccReportProperties = a})
rptccMetricNames :: Lens' ReportPathToConversionCriteria [Text]
rptccMetricNames
= lens _rptccMetricNames
(\ s a -> s{_rptccMetricNames = a})
. _Default
. _Coerce
rptccCustomRichMediaEvents :: Lens' ReportPathToConversionCriteria [DimensionValue]
rptccCustomRichMediaEvents
= lens _rptccCustomRichMediaEvents
(\ s a -> s{_rptccCustomRichMediaEvents = a})
. _Default
. _Coerce
rptccDateRange :: Lens' ReportPathToConversionCriteria (Maybe DateRange)
rptccDateRange
= lens _rptccDateRange
(\ s a -> s{_rptccDateRange = a})
rptccConversionDimensions :: Lens' ReportPathToConversionCriteria [SortedDimension]
rptccConversionDimensions
= lens _rptccConversionDimensions
(\ s a -> s{_rptccConversionDimensions = a})
. _Default
. _Coerce
rptccCustomFloodlightVariables :: Lens' ReportPathToConversionCriteria [SortedDimension]
rptccCustomFloodlightVariables
= lens _rptccCustomFloodlightVariables
(\ s a -> s{_rptccCustomFloodlightVariables = a})
. _Default
. _Coerce
rptccFloodlightConfigId :: Lens' ReportPathToConversionCriteria (Maybe DimensionValue)
rptccFloodlightConfigId
= lens _rptccFloodlightConfigId
(\ s a -> s{_rptccFloodlightConfigId = a})
rptccActivityFilters :: Lens' ReportPathToConversionCriteria [DimensionValue]
rptccActivityFilters
= lens _rptccActivityFilters
(\ s a -> s{_rptccActivityFilters = a})
. _Default
. _Coerce
rptccPerInteractionDimensions :: Lens' ReportPathToConversionCriteria [SortedDimension]
rptccPerInteractionDimensions
= lens _rptccPerInteractionDimensions
(\ s a -> s{_rptccPerInteractionDimensions = a})
. _Default
. _Coerce
instance FromJSON ReportPathToConversionCriteria
where
parseJSON
= withObject "ReportPathToConversionCriteria"
(\ o ->
ReportPathToConversionCriteria <$>
(o .:? "reportProperties") <*>
(o .:? "metricNames" .!= mempty)
<*> (o .:? "customRichMediaEvents" .!= mempty)
<*> (o .:? "dateRange")
<*> (o .:? "conversionDimensions" .!= mempty)
<*> (o .:? "customFloodlightVariables" .!= mempty)
<*> (o .:? "floodlightConfigId")
<*> (o .:? "activityFilters" .!= mempty)
<*> (o .:? "perInteractionDimensions" .!= mempty))
instance ToJSON ReportPathToConversionCriteria where
toJSON ReportPathToConversionCriteria{..}
= object
(catMaybes
[("reportProperties" .=) <$> _rptccReportProperties,
("metricNames" .=) <$> _rptccMetricNames,
("customRichMediaEvents" .=) <$>
_rptccCustomRichMediaEvents,
("dateRange" .=) <$> _rptccDateRange,
("conversionDimensions" .=) <$>
_rptccConversionDimensions,
("customFloodlightVariables" .=) <$>
_rptccCustomFloodlightVariables,
("floodlightConfigId" .=) <$>
_rptccFloodlightConfigId,
("activityFilters" .=) <$> _rptccActivityFilters,
("perInteractionDimensions" .=) <$>
_rptccPerInteractionDimensions])
data MetrosListResponse = MetrosListResponse
{ _mlrKind :: !Text
, _mlrMetros :: !(Maybe [Metro])
} deriving (Eq,Show,Data,Typeable,Generic)
metrosListResponse
:: MetrosListResponse
metrosListResponse =
MetrosListResponse
{ _mlrKind = "dfareporting#metrosListResponse"
, _mlrMetros = Nothing
}
mlrKind :: Lens' MetrosListResponse Text
mlrKind = lens _mlrKind (\ s a -> s{_mlrKind = a})
mlrMetros :: Lens' MetrosListResponse [Metro]
mlrMetros
= lens _mlrMetros (\ s a -> s{_mlrMetros = a}) .
_Default
. _Coerce
instance FromJSON MetrosListResponse where
parseJSON
= withObject "MetrosListResponse"
(\ o ->
MetrosListResponse <$>
(o .:? "kind" .!= "dfareporting#metrosListResponse")
<*> (o .:? "metros" .!= mempty))
instance ToJSON MetrosListResponse where
toJSON MetrosListResponse{..}
= object
(catMaybes
[Just ("kind" .= _mlrKind),
("metros" .=) <$> _mlrMetros])
data OrderDocumentsListResponse = OrderDocumentsListResponse
{ _odlrNextPageToken :: !(Maybe Text)
, _odlrKind :: !Text
, _odlrOrderDocuments :: !(Maybe [OrderDocument])
} deriving (Eq,Show,Data,Typeable,Generic)
orderDocumentsListResponse
:: OrderDocumentsListResponse
orderDocumentsListResponse =
OrderDocumentsListResponse
{ _odlrNextPageToken = Nothing
, _odlrKind = "dfareporting#orderDocumentsListResponse"
, _odlrOrderDocuments = Nothing
}
odlrNextPageToken :: Lens' OrderDocumentsListResponse (Maybe Text)
odlrNextPageToken
= lens _odlrNextPageToken
(\ s a -> s{_odlrNextPageToken = a})
odlrKind :: Lens' OrderDocumentsListResponse Text
odlrKind = lens _odlrKind (\ s a -> s{_odlrKind = a})
odlrOrderDocuments :: Lens' OrderDocumentsListResponse [OrderDocument]
odlrOrderDocuments
= lens _odlrOrderDocuments
(\ s a -> s{_odlrOrderDocuments = a})
. _Default
. _Coerce
instance FromJSON OrderDocumentsListResponse where
parseJSON
= withObject "OrderDocumentsListResponse"
(\ o ->
OrderDocumentsListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"dfareporting#orderDocumentsListResponse")
<*> (o .:? "orderDocuments" .!= mempty))
instance ToJSON OrderDocumentsListResponse where
toJSON OrderDocumentsListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _odlrNextPageToken,
Just ("kind" .= _odlrKind),
("orderDocuments" .=) <$> _odlrOrderDocuments])
data Recipient = Recipient
{ _recEmail :: !(Maybe Text)
, _recKind :: !Text
, _recDeliveryType :: !(Maybe RecipientDeliveryType)
} deriving (Eq,Show,Data,Typeable,Generic)
recipient
:: Recipient
recipient =
Recipient
{ _recEmail = Nothing
, _recKind = "dfareporting#recipient"
, _recDeliveryType = Nothing
}
recEmail :: Lens' Recipient (Maybe Text)
recEmail = lens _recEmail (\ s a -> s{_recEmail = a})
recKind :: Lens' Recipient Text
recKind = lens _recKind (\ s a -> s{_recKind = a})
recDeliveryType :: Lens' Recipient (Maybe RecipientDeliveryType)
recDeliveryType
= lens _recDeliveryType
(\ s a -> s{_recDeliveryType = a})
instance FromJSON Recipient where
parseJSON
= withObject "Recipient"
(\ o ->
Recipient <$>
(o .:? "email") <*>
(o .:? "kind" .!= "dfareporting#recipient")
<*> (o .:? "deliveryType"))
instance ToJSON Recipient where
toJSON Recipient{..}
= object
(catMaybes
[("email" .=) <$> _recEmail,
Just ("kind" .= _recKind),
("deliveryType" .=) <$> _recDeliveryType])
data Site = Site
{ _ssKind :: !Text
, _ssKeyName :: !(Maybe Text)
, _ssSiteContacts :: !(Maybe [SiteContact])
, _ssSiteSettings :: !(Maybe SiteSettings)
, _ssIdDimensionValue :: !(Maybe DimensionValue)
, _ssDirectorySiteIdDimensionValue :: !(Maybe DimensionValue)
, _ssAccountId :: !(Maybe (Textual Int64))
, _ssName :: !(Maybe Text)
, _ssDirectorySiteId :: !(Maybe (Textual Int64))
, _ssId :: !(Maybe (Textual Int64))
, _ssSubAccountId :: !(Maybe (Textual Int64))
, _ssApproved :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
site
:: Site
site =
Site
{ _ssKind = "dfareporting#site"
, _ssKeyName = Nothing
, _ssSiteContacts = Nothing
, _ssSiteSettings = Nothing
, _ssIdDimensionValue = Nothing
, _ssDirectorySiteIdDimensionValue = Nothing
, _ssAccountId = Nothing
, _ssName = Nothing
, _ssDirectorySiteId = Nothing
, _ssId = Nothing
, _ssSubAccountId = Nothing
, _ssApproved = Nothing
}
ssKind :: Lens' Site Text
ssKind = lens _ssKind (\ s a -> s{_ssKind = a})
ssKeyName :: Lens' Site (Maybe Text)
ssKeyName
= lens _ssKeyName (\ s a -> s{_ssKeyName = a})
ssSiteContacts :: Lens' Site [SiteContact]
ssSiteContacts
= lens _ssSiteContacts
(\ s a -> s{_ssSiteContacts = a})
. _Default
. _Coerce
ssSiteSettings :: Lens' Site (Maybe SiteSettings)
ssSiteSettings
= lens _ssSiteSettings
(\ s a -> s{_ssSiteSettings = a})
ssIdDimensionValue :: Lens' Site (Maybe DimensionValue)
ssIdDimensionValue
= lens _ssIdDimensionValue
(\ s a -> s{_ssIdDimensionValue = a})
ssDirectorySiteIdDimensionValue :: Lens' Site (Maybe DimensionValue)
ssDirectorySiteIdDimensionValue
= lens _ssDirectorySiteIdDimensionValue
(\ s a -> s{_ssDirectorySiteIdDimensionValue = a})
ssAccountId :: Lens' Site (Maybe Int64)
ssAccountId
= lens _ssAccountId (\ s a -> s{_ssAccountId = a}) .
mapping _Coerce
ssName :: Lens' Site (Maybe Text)
ssName = lens _ssName (\ s a -> s{_ssName = a})
ssDirectorySiteId :: Lens' Site (Maybe Int64)
ssDirectorySiteId
= lens _ssDirectorySiteId
(\ s a -> s{_ssDirectorySiteId = a})
. mapping _Coerce
ssId :: Lens' Site (Maybe Int64)
ssId
= lens _ssId (\ s a -> s{_ssId = a}) .
mapping _Coerce
ssSubAccountId :: Lens' Site (Maybe Int64)
ssSubAccountId
= lens _ssSubAccountId
(\ s a -> s{_ssSubAccountId = a})
. mapping _Coerce
ssApproved :: Lens' Site (Maybe Bool)
ssApproved
= lens _ssApproved (\ s a -> s{_ssApproved = a})
instance FromJSON Site where
parseJSON
= withObject "Site"
(\ o ->
Site <$>
(o .:? "kind" .!= "dfareporting#site") <*>
(o .:? "keyName")
<*> (o .:? "siteContacts" .!= mempty)
<*> (o .:? "siteSettings")
<*> (o .:? "idDimensionValue")
<*> (o .:? "directorySiteIdDimensionValue")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "directorySiteId")
<*> (o .:? "id")
<*> (o .:? "subaccountId")
<*> (o .:? "approved"))
instance ToJSON Site where
toJSON Site{..}
= object
(catMaybes
[Just ("kind" .= _ssKind),
("keyName" .=) <$> _ssKeyName,
("siteContacts" .=) <$> _ssSiteContacts,
("siteSettings" .=) <$> _ssSiteSettings,
("idDimensionValue" .=) <$> _ssIdDimensionValue,
("directorySiteIdDimensionValue" .=) <$>
_ssDirectorySiteIdDimensionValue,
("accountId" .=) <$> _ssAccountId,
("name" .=) <$> _ssName,
("directorySiteId" .=) <$> _ssDirectorySiteId,
("id" .=) <$> _ssId,
("subaccountId" .=) <$> _ssSubAccountId,
("approved" .=) <$> _ssApproved])
data UserDefinedVariableConfiguration = UserDefinedVariableConfiguration
{ _udvcReportName :: !(Maybe Text)
, _udvcDataType :: !(Maybe UserDefinedVariableConfigurationDataType)
, _udvcVariableType :: !(Maybe UserDefinedVariableConfigurationVariableType)
} deriving (Eq,Show,Data,Typeable,Generic)
userDefinedVariableConfiguration
:: UserDefinedVariableConfiguration
userDefinedVariableConfiguration =
UserDefinedVariableConfiguration
{ _udvcReportName = Nothing
, _udvcDataType = Nothing
, _udvcVariableType = Nothing
}
udvcReportName :: Lens' UserDefinedVariableConfiguration (Maybe Text)
udvcReportName
= lens _udvcReportName
(\ s a -> s{_udvcReportName = a})
udvcDataType :: Lens' UserDefinedVariableConfiguration (Maybe UserDefinedVariableConfigurationDataType)
udvcDataType
= lens _udvcDataType (\ s a -> s{_udvcDataType = a})
udvcVariableType :: Lens' UserDefinedVariableConfiguration (Maybe UserDefinedVariableConfigurationVariableType)
udvcVariableType
= lens _udvcVariableType
(\ s a -> s{_udvcVariableType = a})
instance FromJSON UserDefinedVariableConfiguration
where
parseJSON
= withObject "UserDefinedVariableConfiguration"
(\ o ->
UserDefinedVariableConfiguration <$>
(o .:? "reportName") <*> (o .:? "dataType") <*>
(o .:? "variableType"))
instance ToJSON UserDefinedVariableConfiguration
where
toJSON UserDefinedVariableConfiguration{..}
= object
(catMaybes
[("reportName" .=) <$> _udvcReportName,
("dataType" .=) <$> _udvcDataType,
("variableType" .=) <$> _udvcVariableType])
data ReportCrossDimensionReachCriteria = ReportCrossDimensionReachCriteria
{ _rcdrcPivoted :: !(Maybe Bool)
, _rcdrcBreakdown :: !(Maybe [SortedDimension])
, _rcdrcDimension :: !(Maybe ReportCrossDimensionReachCriteriaDimension)
, _rcdrcMetricNames :: !(Maybe [Text])
, _rcdrcDimensionFilters :: !(Maybe [DimensionValue])
, _rcdrcDateRange :: !(Maybe DateRange)
, _rcdrcOverlapMetricNames :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
reportCrossDimensionReachCriteria
:: ReportCrossDimensionReachCriteria
reportCrossDimensionReachCriteria =
ReportCrossDimensionReachCriteria
{ _rcdrcPivoted = Nothing
, _rcdrcBreakdown = Nothing
, _rcdrcDimension = Nothing
, _rcdrcMetricNames = Nothing
, _rcdrcDimensionFilters = Nothing
, _rcdrcDateRange = Nothing
, _rcdrcOverlapMetricNames = Nothing
}
rcdrcPivoted :: Lens' ReportCrossDimensionReachCriteria (Maybe Bool)
rcdrcPivoted
= lens _rcdrcPivoted (\ s a -> s{_rcdrcPivoted = a})
rcdrcBreakdown :: Lens' ReportCrossDimensionReachCriteria [SortedDimension]
rcdrcBreakdown
= lens _rcdrcBreakdown
(\ s a -> s{_rcdrcBreakdown = a})
. _Default
. _Coerce
rcdrcDimension :: Lens' ReportCrossDimensionReachCriteria (Maybe ReportCrossDimensionReachCriteriaDimension)
rcdrcDimension
= lens _rcdrcDimension
(\ s a -> s{_rcdrcDimension = a})
rcdrcMetricNames :: Lens' ReportCrossDimensionReachCriteria [Text]
rcdrcMetricNames
= lens _rcdrcMetricNames
(\ s a -> s{_rcdrcMetricNames = a})
. _Default
. _Coerce
rcdrcDimensionFilters :: Lens' ReportCrossDimensionReachCriteria [DimensionValue]
rcdrcDimensionFilters
= lens _rcdrcDimensionFilters
(\ s a -> s{_rcdrcDimensionFilters = a})
. _Default
. _Coerce
rcdrcDateRange :: Lens' ReportCrossDimensionReachCriteria (Maybe DateRange)
rcdrcDateRange
= lens _rcdrcDateRange
(\ s a -> s{_rcdrcDateRange = a})
rcdrcOverlapMetricNames :: Lens' ReportCrossDimensionReachCriteria [Text]
rcdrcOverlapMetricNames
= lens _rcdrcOverlapMetricNames
(\ s a -> s{_rcdrcOverlapMetricNames = a})
. _Default
. _Coerce
instance FromJSON ReportCrossDimensionReachCriteria
where
parseJSON
= withObject "ReportCrossDimensionReachCriteria"
(\ o ->
ReportCrossDimensionReachCriteria <$>
(o .:? "pivoted") <*> (o .:? "breakdown" .!= mempty)
<*> (o .:? "dimension")
<*> (o .:? "metricNames" .!= mempty)
<*> (o .:? "dimensionFilters" .!= mempty)
<*> (o .:? "dateRange")
<*> (o .:? "overlapMetricNames" .!= mempty))
instance ToJSON ReportCrossDimensionReachCriteria
where
toJSON ReportCrossDimensionReachCriteria{..}
= object
(catMaybes
[("pivoted" .=) <$> _rcdrcPivoted,
("breakdown" .=) <$> _rcdrcBreakdown,
("dimension" .=) <$> _rcdrcDimension,
("metricNames" .=) <$> _rcdrcMetricNames,
("dimensionFilters" .=) <$> _rcdrcDimensionFilters,
("dateRange" .=) <$> _rcdrcDateRange,
("overlapMetricNames" .=) <$>
_rcdrcOverlapMetricNames])
data FileURLs = FileURLs
{ _fuBrowserURL :: !(Maybe Text)
, _fuAPIURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
fileURLs
:: FileURLs
fileURLs =
FileURLs
{ _fuBrowserURL = Nothing
, _fuAPIURL = Nothing
}
fuBrowserURL :: Lens' FileURLs (Maybe Text)
fuBrowserURL
= lens _fuBrowserURL (\ s a -> s{_fuBrowserURL = a})
fuAPIURL :: Lens' FileURLs (Maybe Text)
fuAPIURL = lens _fuAPIURL (\ s a -> s{_fuAPIURL = a})
instance FromJSON FileURLs where
parseJSON
= withObject "FileURLs"
(\ o ->
FileURLs <$>
(o .:? "browserUrl") <*> (o .:? "apiUrl"))
instance ToJSON FileURLs where
toJSON FileURLs{..}
= object
(catMaybes
[("browserUrl" .=) <$> _fuBrowserURL,
("apiUrl" .=) <$> _fuAPIURL])
data CampaignCreativeAssociationsListResponse = CampaignCreativeAssociationsListResponse
{ _ccalrCampaignCreativeAssociations :: !(Maybe [CampaignCreativeAssociation])
, _ccalrNextPageToken :: !(Maybe Text)
, _ccalrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
campaignCreativeAssociationsListResponse
:: CampaignCreativeAssociationsListResponse
campaignCreativeAssociationsListResponse =
CampaignCreativeAssociationsListResponse
{ _ccalrCampaignCreativeAssociations = Nothing
, _ccalrNextPageToken = Nothing
, _ccalrKind = "dfareporting#campaignCreativeAssociationsListResponse"
}
ccalrCampaignCreativeAssociations :: Lens' CampaignCreativeAssociationsListResponse [CampaignCreativeAssociation]
ccalrCampaignCreativeAssociations
= lens _ccalrCampaignCreativeAssociations
(\ s a -> s{_ccalrCampaignCreativeAssociations = a})
. _Default
. _Coerce
ccalrNextPageToken :: Lens' CampaignCreativeAssociationsListResponse (Maybe Text)
ccalrNextPageToken
= lens _ccalrNextPageToken
(\ s a -> s{_ccalrNextPageToken = a})
ccalrKind :: Lens' CampaignCreativeAssociationsListResponse Text
ccalrKind
= lens _ccalrKind (\ s a -> s{_ccalrKind = a})
instance FromJSON
CampaignCreativeAssociationsListResponse where
parseJSON
= withObject
"CampaignCreativeAssociationsListResponse"
(\ o ->
CampaignCreativeAssociationsListResponse <$>
(o .:? "campaignCreativeAssociations" .!= mempty) <*>
(o .:? "nextPageToken")
<*>
(o .:? "kind" .!=
"dfareporting#campaignCreativeAssociationsListResponse"))
instance ToJSON
CampaignCreativeAssociationsListResponse where
toJSON CampaignCreativeAssociationsListResponse{..}
= object
(catMaybes
[("campaignCreativeAssociations" .=) <$>
_ccalrCampaignCreativeAssociations,
("nextPageToken" .=) <$> _ccalrNextPageToken,
Just ("kind" .= _ccalrKind)])
data Order = Order
{ _oSellerOrderId :: !(Maybe Text)
, _oSellerOrganizationName :: !(Maybe Text)
, _oKind :: !Text
, _oAdvertiserId :: !(Maybe (Textual Int64))
, _oPlanningTermId :: !(Maybe (Textual Int64))
, _oAccountId :: !(Maybe (Textual Int64))
, _oName :: !(Maybe Text)
, _oSiteNames :: !(Maybe [Text])
, _oLastModifiedInfo :: !(Maybe LastModifiedInfo)
, _oBuyerOrganizationName :: !(Maybe Text)
, _oId :: !(Maybe (Textual Int64))
, _oBuyerInvoiceId :: !(Maybe Text)
, _oComments :: !(Maybe Text)
, _oProjectId :: !(Maybe (Textual Int64))
, _oSubAccountId :: !(Maybe (Textual Int64))
, _oNotes :: !(Maybe Text)
, _oContacts :: !(Maybe [OrderContact])
, _oSiteId :: !(Maybe [Textual Int64])
, _oTermsAndConditions :: !(Maybe Text)
, _oApproverUserProFileIds :: !(Maybe [Textual Int64])
} deriving (Eq,Show,Data,Typeable,Generic)
order
:: Order
order =
Order
{ _oSellerOrderId = Nothing
, _oSellerOrganizationName = Nothing
, _oKind = "dfareporting#order"
, _oAdvertiserId = Nothing
, _oPlanningTermId = Nothing
, _oAccountId = Nothing
, _oName = Nothing
, _oSiteNames = Nothing
, _oLastModifiedInfo = Nothing
, _oBuyerOrganizationName = Nothing
, _oId = Nothing
, _oBuyerInvoiceId = Nothing
, _oComments = Nothing
, _oProjectId = Nothing
, _oSubAccountId = Nothing
, _oNotes = Nothing
, _oContacts = Nothing
, _oSiteId = Nothing
, _oTermsAndConditions = Nothing
, _oApproverUserProFileIds = Nothing
}
oSellerOrderId :: Lens' Order (Maybe Text)
oSellerOrderId
= lens _oSellerOrderId
(\ s a -> s{_oSellerOrderId = a})
oSellerOrganizationName :: Lens' Order (Maybe Text)
oSellerOrganizationName
= lens _oSellerOrganizationName
(\ s a -> s{_oSellerOrganizationName = a})
oKind :: Lens' Order Text
oKind = lens _oKind (\ s a -> s{_oKind = a})
oAdvertiserId :: Lens' Order (Maybe Int64)
oAdvertiserId
= lens _oAdvertiserId
(\ s a -> s{_oAdvertiserId = a})
. mapping _Coerce
oPlanningTermId :: Lens' Order (Maybe Int64)
oPlanningTermId
= lens _oPlanningTermId
(\ s a -> s{_oPlanningTermId = a})
. mapping _Coerce
oAccountId :: Lens' Order (Maybe Int64)
oAccountId
= lens _oAccountId (\ s a -> s{_oAccountId = a}) .
mapping _Coerce
oName :: Lens' Order (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oSiteNames :: Lens' Order [Text]
oSiteNames
= lens _oSiteNames (\ s a -> s{_oSiteNames = a}) .
_Default
. _Coerce
oLastModifiedInfo :: Lens' Order (Maybe LastModifiedInfo)
oLastModifiedInfo
= lens _oLastModifiedInfo
(\ s a -> s{_oLastModifiedInfo = a})
oBuyerOrganizationName :: Lens' Order (Maybe Text)
oBuyerOrganizationName
= lens _oBuyerOrganizationName
(\ s a -> s{_oBuyerOrganizationName = a})
oId :: Lens' Order (Maybe Int64)
oId
= lens _oId (\ s a -> s{_oId = a}) . mapping _Coerce
oBuyerInvoiceId :: Lens' Order (Maybe Text)
oBuyerInvoiceId
= lens _oBuyerInvoiceId
(\ s a -> s{_oBuyerInvoiceId = a})
oComments :: Lens' Order (Maybe Text)
oComments
= lens _oComments (\ s a -> s{_oComments = a})
oProjectId :: Lens' Order (Maybe Int64)
oProjectId
= lens _oProjectId (\ s a -> s{_oProjectId = a}) .
mapping _Coerce
oSubAccountId :: Lens' Order (Maybe Int64)
oSubAccountId
= lens _oSubAccountId
(\ s a -> s{_oSubAccountId = a})
. mapping _Coerce
oNotes :: Lens' Order (Maybe Text)
oNotes = lens _oNotes (\ s a -> s{_oNotes = a})
oContacts :: Lens' Order [OrderContact]
oContacts
= lens _oContacts (\ s a -> s{_oContacts = a}) .
_Default
. _Coerce
oSiteId :: Lens' Order [Int64]
oSiteId
= lens _oSiteId (\ s a -> s{_oSiteId = a}) . _Default
. _Coerce
oTermsAndConditions :: Lens' Order (Maybe Text)
oTermsAndConditions
= lens _oTermsAndConditions
(\ s a -> s{_oTermsAndConditions = a})
oApproverUserProFileIds :: Lens' Order [Int64]
oApproverUserProFileIds
= lens _oApproverUserProFileIds
(\ s a -> s{_oApproverUserProFileIds = a})
. _Default
. _Coerce
instance FromJSON Order where
parseJSON
= withObject "Order"
(\ o ->
Order <$>
(o .:? "sellerOrderId") <*>
(o .:? "sellerOrganizationName")
<*> (o .:? "kind" .!= "dfareporting#order")
<*> (o .:? "advertiserId")
<*> (o .:? "planningTermId")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "siteNames" .!= mempty)
<*> (o .:? "lastModifiedInfo")
<*> (o .:? "buyerOrganizationName")
<*> (o .:? "id")
<*> (o .:? "buyerInvoiceId")
<*> (o .:? "comments")
<*> (o .:? "projectId")
<*> (o .:? "subaccountId")
<*> (o .:? "notes")
<*> (o .:? "contacts" .!= mempty)
<*> (o .:? "siteId" .!= mempty)
<*> (o .:? "termsAndConditions")
<*> (o .:? "approverUserProfileIds" .!= mempty))
instance ToJSON Order where
toJSON Order{..}
= object
(catMaybes
[("sellerOrderId" .=) <$> _oSellerOrderId,
("sellerOrganizationName" .=) <$>
_oSellerOrganizationName,
Just ("kind" .= _oKind),
("advertiserId" .=) <$> _oAdvertiserId,
("planningTermId" .=) <$> _oPlanningTermId,
("accountId" .=) <$> _oAccountId,
("name" .=) <$> _oName,
("siteNames" .=) <$> _oSiteNames,
("lastModifiedInfo" .=) <$> _oLastModifiedInfo,
("buyerOrganizationName" .=) <$>
_oBuyerOrganizationName,
("id" .=) <$> _oId,
("buyerInvoiceId" .=) <$> _oBuyerInvoiceId,
("comments" .=) <$> _oComments,
("projectId" .=) <$> _oProjectId,
("subaccountId" .=) <$> _oSubAccountId,
("notes" .=) <$> _oNotes,
("contacts" .=) <$> _oContacts,
("siteId" .=) <$> _oSiteId,
("termsAndConditions" .=) <$> _oTermsAndConditions,
("approverUserProfileIds" .=) <$>
_oApproverUserProFileIds])
data CreativeAssetId = CreativeAssetId
{ _caiName :: !(Maybe Text)
, _caiType :: !(Maybe CreativeAssetIdType)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeAssetId
:: CreativeAssetId
creativeAssetId =
CreativeAssetId
{ _caiName = Nothing
, _caiType = Nothing
}
caiName :: Lens' CreativeAssetId (Maybe Text)
caiName = lens _caiName (\ s a -> s{_caiName = a})
caiType :: Lens' CreativeAssetId (Maybe CreativeAssetIdType)
caiType = lens _caiType (\ s a -> s{_caiType = a})
instance FromJSON CreativeAssetId where
parseJSON
= withObject "CreativeAssetId"
(\ o ->
CreativeAssetId <$>
(o .:? "name") <*> (o .:? "type"))
instance ToJSON CreativeAssetId where
toJSON CreativeAssetId{..}
= object
(catMaybes
[("name" .=) <$> _caiName, ("type" .=) <$> _caiType])
data FrequencyCap = FrequencyCap
{ _fcImpressions :: !(Maybe (Textual Int64))
, _fcDuration :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
frequencyCap
:: FrequencyCap
frequencyCap =
FrequencyCap
{ _fcImpressions = Nothing
, _fcDuration = Nothing
}
fcImpressions :: Lens' FrequencyCap (Maybe Int64)
fcImpressions
= lens _fcImpressions
(\ s a -> s{_fcImpressions = a})
. mapping _Coerce
fcDuration :: Lens' FrequencyCap (Maybe Int64)
fcDuration
= lens _fcDuration (\ s a -> s{_fcDuration = a}) .
mapping _Coerce
instance FromJSON FrequencyCap where
parseJSON
= withObject "FrequencyCap"
(\ o ->
FrequencyCap <$>
(o .:? "impressions") <*> (o .:? "duration"))
instance ToJSON FrequencyCap where
toJSON FrequencyCap{..}
= object
(catMaybes
[("impressions" .=) <$> _fcImpressions,
("duration" .=) <$> _fcDuration])
data File = File
{ _filStatus :: !(Maybe FileStatus)
, _filEtag :: !(Maybe Text)
, _filKind :: !Text
, _filURLs :: !(Maybe FileURLs)
, _filReportId :: !(Maybe (Textual Int64))
, _filDateRange :: !(Maybe DateRange)
, _filFormat :: !(Maybe FileFormat)
, _filLastModifiedTime :: !(Maybe (Textual Int64))
, _filId :: !(Maybe (Textual Int64))
, _filFileName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
file
:: File
file =
File
{ _filStatus = Nothing
, _filEtag = Nothing
, _filKind = "dfareporting#file"
, _filURLs = Nothing
, _filReportId = Nothing
, _filDateRange = Nothing
, _filFormat = Nothing
, _filLastModifiedTime = Nothing
, _filId = Nothing
, _filFileName = Nothing
}
filStatus :: Lens' File (Maybe FileStatus)
filStatus
= lens _filStatus (\ s a -> s{_filStatus = a})
filEtag :: Lens' File (Maybe Text)
filEtag = lens _filEtag (\ s a -> s{_filEtag = a})
filKind :: Lens' File Text
filKind = lens _filKind (\ s a -> s{_filKind = a})
filURLs :: Lens' File (Maybe FileURLs)
filURLs = lens _filURLs (\ s a -> s{_filURLs = a})
filReportId :: Lens' File (Maybe Int64)
filReportId
= lens _filReportId (\ s a -> s{_filReportId = a}) .
mapping _Coerce
filDateRange :: Lens' File (Maybe DateRange)
filDateRange
= lens _filDateRange (\ s a -> s{_filDateRange = a})
filFormat :: Lens' File (Maybe FileFormat)
filFormat
= lens _filFormat (\ s a -> s{_filFormat = a})
filLastModifiedTime :: Lens' File (Maybe Int64)
filLastModifiedTime
= lens _filLastModifiedTime
(\ s a -> s{_filLastModifiedTime = a})
. mapping _Coerce
filId :: Lens' File (Maybe Int64)
filId
= lens _filId (\ s a -> s{_filId = a}) .
mapping _Coerce
filFileName :: Lens' File (Maybe Text)
filFileName
= lens _filFileName (\ s a -> s{_filFileName = a})
instance FromJSON File where
parseJSON
= withObject "File"
(\ o ->
File <$>
(o .:? "status") <*> (o .:? "etag") <*>
(o .:? "kind" .!= "dfareporting#file")
<*> (o .:? "urls")
<*> (o .:? "reportId")
<*> (o .:? "dateRange")
<*> (o .:? "format")
<*> (o .:? "lastModifiedTime")
<*> (o .:? "id")
<*> (o .:? "fileName"))
instance ToJSON File where
toJSON File{..}
= object
(catMaybes
[("status" .=) <$> _filStatus,
("etag" .=) <$> _filEtag, Just ("kind" .= _filKind),
("urls" .=) <$> _filURLs,
("reportId" .=) <$> _filReportId,
("dateRange" .=) <$> _filDateRange,
("format" .=) <$> _filFormat,
("lastModifiedTime" .=) <$> _filLastModifiedTime,
("id" .=) <$> _filId,
("fileName" .=) <$> _filFileName])
data CreativeSettings = CreativeSettings
{ _csIFrameHeader :: !(Maybe Text)
, _csIFrameFooter :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeSettings
:: CreativeSettings
creativeSettings =
CreativeSettings
{ _csIFrameHeader = Nothing
, _csIFrameFooter = Nothing
}
csIFrameHeader :: Lens' CreativeSettings (Maybe Text)
csIFrameHeader
= lens _csIFrameHeader
(\ s a -> s{_csIFrameHeader = a})
csIFrameFooter :: Lens' CreativeSettings (Maybe Text)
csIFrameFooter
= lens _csIFrameFooter
(\ s a -> s{_csIFrameFooter = a})
instance FromJSON CreativeSettings where
parseJSON
= withObject "CreativeSettings"
(\ o ->
CreativeSettings <$>
(o .:? "iFrameHeader") <*> (o .:? "iFrameFooter"))
instance ToJSON CreativeSettings where
toJSON CreativeSettings{..}
= object
(catMaybes
[("iFrameHeader" .=) <$> _csIFrameHeader,
("iFrameFooter" .=) <$> _csIFrameFooter])
data CreativeGroupsListResponse = CreativeGroupsListResponse
{ _cglrCreativeGroups :: !(Maybe [CreativeGroup])
, _cglrNextPageToken :: !(Maybe Text)
, _cglrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
creativeGroupsListResponse
:: CreativeGroupsListResponse
creativeGroupsListResponse =
CreativeGroupsListResponse
{ _cglrCreativeGroups = Nothing
, _cglrNextPageToken = Nothing
, _cglrKind = "dfareporting#creativeGroupsListResponse"
}
cglrCreativeGroups :: Lens' CreativeGroupsListResponse [CreativeGroup]
cglrCreativeGroups
= lens _cglrCreativeGroups
(\ s a -> s{_cglrCreativeGroups = a})
. _Default
. _Coerce
cglrNextPageToken :: Lens' CreativeGroupsListResponse (Maybe Text)
cglrNextPageToken
= lens _cglrNextPageToken
(\ s a -> s{_cglrNextPageToken = a})
cglrKind :: Lens' CreativeGroupsListResponse Text
cglrKind = lens _cglrKind (\ s a -> s{_cglrKind = a})
instance FromJSON CreativeGroupsListResponse where
parseJSON
= withObject "CreativeGroupsListResponse"
(\ o ->
CreativeGroupsListResponse <$>
(o .:? "creativeGroups" .!= mempty) <*>
(o .:? "nextPageToken")
<*>
(o .:? "kind" .!=
"dfareporting#creativeGroupsListResponse"))
instance ToJSON CreativeGroupsListResponse where
toJSON CreativeGroupsListResponse{..}
= object
(catMaybes
[("creativeGroups" .=) <$> _cglrCreativeGroups,
("nextPageToken" .=) <$> _cglrNextPageToken,
Just ("kind" .= _cglrKind)])
data MobileCarriersListResponse = MobileCarriersListResponse
{ _mclrMobileCarriers :: !(Maybe [MobileCarrier])
, _mclrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
mobileCarriersListResponse
:: MobileCarriersListResponse
mobileCarriersListResponse =
MobileCarriersListResponse
{ _mclrMobileCarriers = Nothing
, _mclrKind = "dfareporting#mobileCarriersListResponse"
}
mclrMobileCarriers :: Lens' MobileCarriersListResponse [MobileCarrier]
mclrMobileCarriers
= lens _mclrMobileCarriers
(\ s a -> s{_mclrMobileCarriers = a})
. _Default
. _Coerce
mclrKind :: Lens' MobileCarriersListResponse Text
mclrKind = lens _mclrKind (\ s a -> s{_mclrKind = a})
instance FromJSON MobileCarriersListResponse where
parseJSON
= withObject "MobileCarriersListResponse"
(\ o ->
MobileCarriersListResponse <$>
(o .:? "mobileCarriers" .!= mempty) <*>
(o .:? "kind" .!=
"dfareporting#mobileCarriersListResponse"))
instance ToJSON MobileCarriersListResponse where
toJSON MobileCarriersListResponse{..}
= object
(catMaybes
[("mobileCarriers" .=) <$> _mclrMobileCarriers,
Just ("kind" .= _mclrKind)])
data LandingPagesListResponse = LandingPagesListResponse
{ _lplrLandingPages :: !(Maybe [LandingPage])
, _lplrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
landingPagesListResponse
:: LandingPagesListResponse
landingPagesListResponse =
LandingPagesListResponse
{ _lplrLandingPages = Nothing
, _lplrKind = "dfareporting#landingPagesListResponse"
}
lplrLandingPages :: Lens' LandingPagesListResponse [LandingPage]
lplrLandingPages
= lens _lplrLandingPages
(\ s a -> s{_lplrLandingPages = a})
. _Default
. _Coerce
lplrKind :: Lens' LandingPagesListResponse Text
lplrKind = lens _lplrKind (\ s a -> s{_lplrKind = a})
instance FromJSON LandingPagesListResponse where
parseJSON
= withObject "LandingPagesListResponse"
(\ o ->
LandingPagesListResponse <$>
(o .:? "landingPages" .!= mempty) <*>
(o .:? "kind" .!=
"dfareporting#landingPagesListResponse"))
instance ToJSON LandingPagesListResponse where
toJSON LandingPagesListResponse{..}
= object
(catMaybes
[("landingPages" .=) <$> _lplrLandingPages,
Just ("kind" .= _lplrKind)])
data CreativeAssetMetadata = CreativeAssetMetadata
{ _camaKind :: !Text
, _camaAssetIdentifier :: !(Maybe CreativeAssetId)
, _camaClickTags :: !(Maybe [ClickTag])
, _camaWarnedValidationRules :: !(Maybe [CreativeAssetMetadataWarnedValidationRulesItem])
, _camaDetectedFeatures :: !(Maybe [CreativeAssetMetadataDetectedFeaturesItem])
} deriving (Eq,Show,Data,Typeable,Generic)
creativeAssetMetadata
:: CreativeAssetMetadata
creativeAssetMetadata =
CreativeAssetMetadata
{ _camaKind = "dfareporting#creativeAssetMetadata"
, _camaAssetIdentifier = Nothing
, _camaClickTags = Nothing
, _camaWarnedValidationRules = Nothing
, _camaDetectedFeatures = Nothing
}
camaKind :: Lens' CreativeAssetMetadata Text
camaKind = lens _camaKind (\ s a -> s{_camaKind = a})
camaAssetIdentifier :: Lens' CreativeAssetMetadata (Maybe CreativeAssetId)
camaAssetIdentifier
= lens _camaAssetIdentifier
(\ s a -> s{_camaAssetIdentifier = a})
camaClickTags :: Lens' CreativeAssetMetadata [ClickTag]
camaClickTags
= lens _camaClickTags
(\ s a -> s{_camaClickTags = a})
. _Default
. _Coerce
camaWarnedValidationRules :: Lens' CreativeAssetMetadata [CreativeAssetMetadataWarnedValidationRulesItem]
camaWarnedValidationRules
= lens _camaWarnedValidationRules
(\ s a -> s{_camaWarnedValidationRules = a})
. _Default
. _Coerce
camaDetectedFeatures :: Lens' CreativeAssetMetadata [CreativeAssetMetadataDetectedFeaturesItem]
camaDetectedFeatures
= lens _camaDetectedFeatures
(\ s a -> s{_camaDetectedFeatures = a})
. _Default
. _Coerce
instance FromJSON CreativeAssetMetadata where
parseJSON
= withObject "CreativeAssetMetadata"
(\ o ->
CreativeAssetMetadata <$>
(o .:? "kind" .!=
"dfareporting#creativeAssetMetadata")
<*> (o .:? "assetIdentifier")
<*> (o .:? "clickTags" .!= mempty)
<*> (o .:? "warnedValidationRules" .!= mempty)
<*> (o .:? "detectedFeatures" .!= mempty))
instance ToJSON CreativeAssetMetadata where
toJSON CreativeAssetMetadata{..}
= object
(catMaybes
[Just ("kind" .= _camaKind),
("assetIdentifier" .=) <$> _camaAssetIdentifier,
("clickTags" .=) <$> _camaClickTags,
("warnedValidationRules" .=) <$>
_camaWarnedValidationRules,
("detectedFeatures" .=) <$> _camaDetectedFeatures])
data OmnitureSettings = OmnitureSettings
{ _osOmnitureCostDataEnabled :: !(Maybe Bool)
, _osOmnitureIntegrationEnabled :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
omnitureSettings
:: OmnitureSettings
omnitureSettings =
OmnitureSettings
{ _osOmnitureCostDataEnabled = Nothing
, _osOmnitureIntegrationEnabled = Nothing
}
osOmnitureCostDataEnabled :: Lens' OmnitureSettings (Maybe Bool)
osOmnitureCostDataEnabled
= lens _osOmnitureCostDataEnabled
(\ s a -> s{_osOmnitureCostDataEnabled = a})
osOmnitureIntegrationEnabled :: Lens' OmnitureSettings (Maybe Bool)
osOmnitureIntegrationEnabled
= lens _osOmnitureIntegrationEnabled
(\ s a -> s{_osOmnitureIntegrationEnabled = a})
instance FromJSON OmnitureSettings where
parseJSON
= withObject "OmnitureSettings"
(\ o ->
OmnitureSettings <$>
(o .:? "omnitureCostDataEnabled") <*>
(o .:? "omnitureIntegrationEnabled"))
instance ToJSON OmnitureSettings where
toJSON OmnitureSettings{..}
= object
(catMaybes
[("omnitureCostDataEnabled" .=) <$>
_osOmnitureCostDataEnabled,
("omnitureIntegrationEnabled" .=) <$>
_osOmnitureIntegrationEnabled])
data ConnectionType = ConnectionType
{ _cttKind :: !Text
, _cttName :: !(Maybe Text)
, _cttId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
connectionType
:: ConnectionType
connectionType =
ConnectionType
{ _cttKind = "dfareporting#connectionType"
, _cttName = Nothing
, _cttId = Nothing
}
cttKind :: Lens' ConnectionType Text
cttKind = lens _cttKind (\ s a -> s{_cttKind = a})
cttName :: Lens' ConnectionType (Maybe Text)
cttName = lens _cttName (\ s a -> s{_cttName = a})
cttId :: Lens' ConnectionType (Maybe Int64)
cttId
= lens _cttId (\ s a -> s{_cttId = a}) .
mapping _Coerce
instance FromJSON ConnectionType where
parseJSON
= withObject "ConnectionType"
(\ o ->
ConnectionType <$>
(o .:? "kind" .!= "dfareporting#connectionType") <*>
(o .:? "name")
<*> (o .:? "id"))
instance ToJSON ConnectionType where
toJSON ConnectionType{..}
= object
(catMaybes
[Just ("kind" .= _cttKind), ("name" .=) <$> _cttName,
("id" .=) <$> _cttId])
data PlacementGroup = PlacementGroup
{ _plalPlacementStrategyId :: !(Maybe (Textual Int64))
, _plalSiteIdDimensionValue :: !(Maybe DimensionValue)
, _plalPricingSchedule :: !(Maybe PricingSchedule)
, _plalKind :: !Text
, _plalCampaignIdDimensionValue :: !(Maybe DimensionValue)
, _plalAdvertiserId :: !(Maybe (Textual Int64))
, _plalAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _plalCampaignId :: !(Maybe (Textual Int64))
, _plalIdDimensionValue :: !(Maybe DimensionValue)
, _plalPlacementGroupType :: !(Maybe PlacementGroupPlacementGroupType)
, _plalContentCategoryId :: !(Maybe (Textual Int64))
, _plalDirectorySiteIdDimensionValue :: !(Maybe DimensionValue)
, _plalAccountId :: !(Maybe (Textual Int64))
, _plalName :: !(Maybe Text)
, _plalDirectorySiteId :: !(Maybe (Textual Int64))
, _plalCreateInfo :: !(Maybe LastModifiedInfo)
, _plalChildPlacementIds :: !(Maybe [Textual Int64])
, _plalLastModifiedInfo :: !(Maybe LastModifiedInfo)
, _plalId :: !(Maybe (Textual Int64))
, _plalPrimaryPlacementId :: !(Maybe (Textual Int64))
, _plalSubAccountId :: !(Maybe (Textual Int64))
, _plalExternalId :: !(Maybe Text)
, _plalComment :: !(Maybe Text)
, _plalPrimaryPlacementIdDimensionValue :: !(Maybe DimensionValue)
, _plalSiteId :: !(Maybe (Textual Int64))
, _plalArchived :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
placementGroup
:: PlacementGroup
placementGroup =
PlacementGroup
{ _plalPlacementStrategyId = Nothing
, _plalSiteIdDimensionValue = Nothing
, _plalPricingSchedule = Nothing
, _plalKind = "dfareporting#placementGroup"
, _plalCampaignIdDimensionValue = Nothing
, _plalAdvertiserId = Nothing
, _plalAdvertiserIdDimensionValue = Nothing
, _plalCampaignId = Nothing
, _plalIdDimensionValue = Nothing
, _plalPlacementGroupType = Nothing
, _plalContentCategoryId = Nothing
, _plalDirectorySiteIdDimensionValue = Nothing
, _plalAccountId = Nothing
, _plalName = Nothing
, _plalDirectorySiteId = Nothing
, _plalCreateInfo = Nothing
, _plalChildPlacementIds = Nothing
, _plalLastModifiedInfo = Nothing
, _plalId = Nothing
, _plalPrimaryPlacementId = Nothing
, _plalSubAccountId = Nothing
, _plalExternalId = Nothing
, _plalComment = Nothing
, _plalPrimaryPlacementIdDimensionValue = Nothing
, _plalSiteId = Nothing
, _plalArchived = Nothing
}
plalPlacementStrategyId :: Lens' PlacementGroup (Maybe Int64)
plalPlacementStrategyId
= lens _plalPlacementStrategyId
(\ s a -> s{_plalPlacementStrategyId = a})
. mapping _Coerce
plalSiteIdDimensionValue :: Lens' PlacementGroup (Maybe DimensionValue)
plalSiteIdDimensionValue
= lens _plalSiteIdDimensionValue
(\ s a -> s{_plalSiteIdDimensionValue = a})
plalPricingSchedule :: Lens' PlacementGroup (Maybe PricingSchedule)
plalPricingSchedule
= lens _plalPricingSchedule
(\ s a -> s{_plalPricingSchedule = a})
plalKind :: Lens' PlacementGroup Text
plalKind = lens _plalKind (\ s a -> s{_plalKind = a})
plalCampaignIdDimensionValue :: Lens' PlacementGroup (Maybe DimensionValue)
plalCampaignIdDimensionValue
= lens _plalCampaignIdDimensionValue
(\ s a -> s{_plalCampaignIdDimensionValue = a})
plalAdvertiserId :: Lens' PlacementGroup (Maybe Int64)
plalAdvertiserId
= lens _plalAdvertiserId
(\ s a -> s{_plalAdvertiserId = a})
. mapping _Coerce
plalAdvertiserIdDimensionValue :: Lens' PlacementGroup (Maybe DimensionValue)
plalAdvertiserIdDimensionValue
= lens _plalAdvertiserIdDimensionValue
(\ s a -> s{_plalAdvertiserIdDimensionValue = a})
plalCampaignId :: Lens' PlacementGroup (Maybe Int64)
plalCampaignId
= lens _plalCampaignId
(\ s a -> s{_plalCampaignId = a})
. mapping _Coerce
plalIdDimensionValue :: Lens' PlacementGroup (Maybe DimensionValue)
plalIdDimensionValue
= lens _plalIdDimensionValue
(\ s a -> s{_plalIdDimensionValue = a})
plalPlacementGroupType :: Lens' PlacementGroup (Maybe PlacementGroupPlacementGroupType)
plalPlacementGroupType
= lens _plalPlacementGroupType
(\ s a -> s{_plalPlacementGroupType = a})
plalContentCategoryId :: Lens' PlacementGroup (Maybe Int64)
plalContentCategoryId
= lens _plalContentCategoryId
(\ s a -> s{_plalContentCategoryId = a})
. mapping _Coerce
plalDirectorySiteIdDimensionValue :: Lens' PlacementGroup (Maybe DimensionValue)
plalDirectorySiteIdDimensionValue
= lens _plalDirectorySiteIdDimensionValue
(\ s a -> s{_plalDirectorySiteIdDimensionValue = a})
plalAccountId :: Lens' PlacementGroup (Maybe Int64)
plalAccountId
= lens _plalAccountId
(\ s a -> s{_plalAccountId = a})
. mapping _Coerce
plalName :: Lens' PlacementGroup (Maybe Text)
plalName = lens _plalName (\ s a -> s{_plalName = a})
plalDirectorySiteId :: Lens' PlacementGroup (Maybe Int64)
plalDirectorySiteId
= lens _plalDirectorySiteId
(\ s a -> s{_plalDirectorySiteId = a})
. mapping _Coerce
plalCreateInfo :: Lens' PlacementGroup (Maybe LastModifiedInfo)
plalCreateInfo
= lens _plalCreateInfo
(\ s a -> s{_plalCreateInfo = a})
plalChildPlacementIds :: Lens' PlacementGroup [Int64]
plalChildPlacementIds
= lens _plalChildPlacementIds
(\ s a -> s{_plalChildPlacementIds = a})
. _Default
. _Coerce
plalLastModifiedInfo :: Lens' PlacementGroup (Maybe LastModifiedInfo)
plalLastModifiedInfo
= lens _plalLastModifiedInfo
(\ s a -> s{_plalLastModifiedInfo = a})
plalId :: Lens' PlacementGroup (Maybe Int64)
plalId
= lens _plalId (\ s a -> s{_plalId = a}) .
mapping _Coerce
plalPrimaryPlacementId :: Lens' PlacementGroup (Maybe Int64)
plalPrimaryPlacementId
= lens _plalPrimaryPlacementId
(\ s a -> s{_plalPrimaryPlacementId = a})
. mapping _Coerce
plalSubAccountId :: Lens' PlacementGroup (Maybe Int64)
plalSubAccountId
= lens _plalSubAccountId
(\ s a -> s{_plalSubAccountId = a})
. mapping _Coerce
plalExternalId :: Lens' PlacementGroup (Maybe Text)
plalExternalId
= lens _plalExternalId
(\ s a -> s{_plalExternalId = a})
plalComment :: Lens' PlacementGroup (Maybe Text)
plalComment
= lens _plalComment (\ s a -> s{_plalComment = a})
plalPrimaryPlacementIdDimensionValue :: Lens' PlacementGroup (Maybe DimensionValue)
plalPrimaryPlacementIdDimensionValue
= lens _plalPrimaryPlacementIdDimensionValue
(\ s a ->
s{_plalPrimaryPlacementIdDimensionValue = a})
plalSiteId :: Lens' PlacementGroup (Maybe Int64)
plalSiteId
= lens _plalSiteId (\ s a -> s{_plalSiteId = a}) .
mapping _Coerce
plalArchived :: Lens' PlacementGroup (Maybe Bool)
plalArchived
= lens _plalArchived (\ s a -> s{_plalArchived = a})
instance FromJSON PlacementGroup where
parseJSON
= withObject "PlacementGroup"
(\ o ->
PlacementGroup <$>
(o .:? "placementStrategyId") <*>
(o .:? "siteIdDimensionValue")
<*> (o .:? "pricingSchedule")
<*> (o .:? "kind" .!= "dfareporting#placementGroup")
<*> (o .:? "campaignIdDimensionValue")
<*> (o .:? "advertiserId")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "campaignId")
<*> (o .:? "idDimensionValue")
<*> (o .:? "placementGroupType")
<*> (o .:? "contentCategoryId")
<*> (o .:? "directorySiteIdDimensionValue")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "directorySiteId")
<*> (o .:? "createInfo")
<*> (o .:? "childPlacementIds" .!= mempty)
<*> (o .:? "lastModifiedInfo")
<*> (o .:? "id")
<*> (o .:? "primaryPlacementId")
<*> (o .:? "subaccountId")
<*> (o .:? "externalId")
<*> (o .:? "comment")
<*> (o .:? "primaryPlacementIdDimensionValue")
<*> (o .:? "siteId")
<*> (o .:? "archived"))
instance ToJSON PlacementGroup where
toJSON PlacementGroup{..}
= object
(catMaybes
[("placementStrategyId" .=) <$>
_plalPlacementStrategyId,
("siteIdDimensionValue" .=) <$>
_plalSiteIdDimensionValue,
("pricingSchedule" .=) <$> _plalPricingSchedule,
Just ("kind" .= _plalKind),
("campaignIdDimensionValue" .=) <$>
_plalCampaignIdDimensionValue,
("advertiserId" .=) <$> _plalAdvertiserId,
("advertiserIdDimensionValue" .=) <$>
_plalAdvertiserIdDimensionValue,
("campaignId" .=) <$> _plalCampaignId,
("idDimensionValue" .=) <$> _plalIdDimensionValue,
("placementGroupType" .=) <$>
_plalPlacementGroupType,
("contentCategoryId" .=) <$> _plalContentCategoryId,
("directorySiteIdDimensionValue" .=) <$>
_plalDirectorySiteIdDimensionValue,
("accountId" .=) <$> _plalAccountId,
("name" .=) <$> _plalName,
("directorySiteId" .=) <$> _plalDirectorySiteId,
("createInfo" .=) <$> _plalCreateInfo,
("childPlacementIds" .=) <$> _plalChildPlacementIds,
("lastModifiedInfo" .=) <$> _plalLastModifiedInfo,
("id" .=) <$> _plalId,
("primaryPlacementId" .=) <$>
_plalPrimaryPlacementId,
("subaccountId" .=) <$> _plalSubAccountId,
("externalId" .=) <$> _plalExternalId,
("comment" .=) <$> _plalComment,
("primaryPlacementIdDimensionValue" .=) <$>
_plalPrimaryPlacementIdDimensionValue,
("siteId" .=) <$> _plalSiteId,
("archived" .=) <$> _plalArchived])
data EventTag = EventTag
{ _etStatus :: !(Maybe EventTagStatus)
, _etExcludeFromAdxRequests :: !(Maybe Bool)
, _etEnabledByDefault :: !(Maybe Bool)
, _etKind :: !Text
, _etCampaignIdDimensionValue :: !(Maybe DimensionValue)
, _etAdvertiserId :: !(Maybe (Textual Int64))
, _etURL :: !(Maybe Text)
, _etAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _etSSLCompliant :: !(Maybe Bool)
, _etCampaignId :: !(Maybe (Textual Int64))
, _etAccountId :: !(Maybe (Textual Int64))
, _etName :: !(Maybe Text)
, _etURLEscapeLevels :: !(Maybe (Textual Int32))
, _etSiteIds :: !(Maybe [Textual Int64])
, _etId :: !(Maybe (Textual Int64))
, _etSubAccountId :: !(Maybe (Textual Int64))
, _etType :: !(Maybe EventTagType)
, _etSiteFilterType :: !(Maybe EventTagSiteFilterType)
} deriving (Eq,Show,Data,Typeable,Generic)
eventTag
:: EventTag
eventTag =
EventTag
{ _etStatus = Nothing
, _etExcludeFromAdxRequests = Nothing
, _etEnabledByDefault = Nothing
, _etKind = "dfareporting#eventTag"
, _etCampaignIdDimensionValue = Nothing
, _etAdvertiserId = Nothing
, _etURL = Nothing
, _etAdvertiserIdDimensionValue = Nothing
, _etSSLCompliant = Nothing
, _etCampaignId = Nothing
, _etAccountId = Nothing
, _etName = Nothing
, _etURLEscapeLevels = Nothing
, _etSiteIds = Nothing
, _etId = Nothing
, _etSubAccountId = Nothing
, _etType = Nothing
, _etSiteFilterType = Nothing
}
etStatus :: Lens' EventTag (Maybe EventTagStatus)
etStatus = lens _etStatus (\ s a -> s{_etStatus = a})
etExcludeFromAdxRequests :: Lens' EventTag (Maybe Bool)
etExcludeFromAdxRequests
= lens _etExcludeFromAdxRequests
(\ s a -> s{_etExcludeFromAdxRequests = a})
etEnabledByDefault :: Lens' EventTag (Maybe Bool)
etEnabledByDefault
= lens _etEnabledByDefault
(\ s a -> s{_etEnabledByDefault = a})
etKind :: Lens' EventTag Text
etKind = lens _etKind (\ s a -> s{_etKind = a})
etCampaignIdDimensionValue :: Lens' EventTag (Maybe DimensionValue)
etCampaignIdDimensionValue
= lens _etCampaignIdDimensionValue
(\ s a -> s{_etCampaignIdDimensionValue = a})
etAdvertiserId :: Lens' EventTag (Maybe Int64)
etAdvertiserId
= lens _etAdvertiserId
(\ s a -> s{_etAdvertiserId = a})
. mapping _Coerce
etURL :: Lens' EventTag (Maybe Text)
etURL = lens _etURL (\ s a -> s{_etURL = a})
etAdvertiserIdDimensionValue :: Lens' EventTag (Maybe DimensionValue)
etAdvertiserIdDimensionValue
= lens _etAdvertiserIdDimensionValue
(\ s a -> s{_etAdvertiserIdDimensionValue = a})
etSSLCompliant :: Lens' EventTag (Maybe Bool)
etSSLCompliant
= lens _etSSLCompliant
(\ s a -> s{_etSSLCompliant = a})
etCampaignId :: Lens' EventTag (Maybe Int64)
etCampaignId
= lens _etCampaignId (\ s a -> s{_etCampaignId = a})
. mapping _Coerce
etAccountId :: Lens' EventTag (Maybe Int64)
etAccountId
= lens _etAccountId (\ s a -> s{_etAccountId = a}) .
mapping _Coerce
etName :: Lens' EventTag (Maybe Text)
etName = lens _etName (\ s a -> s{_etName = a})
etURLEscapeLevels :: Lens' EventTag (Maybe Int32)
etURLEscapeLevels
= lens _etURLEscapeLevels
(\ s a -> s{_etURLEscapeLevels = a})
. mapping _Coerce
etSiteIds :: Lens' EventTag [Int64]
etSiteIds
= lens _etSiteIds (\ s a -> s{_etSiteIds = a}) .
_Default
. _Coerce
etId :: Lens' EventTag (Maybe Int64)
etId
= lens _etId (\ s a -> s{_etId = a}) .
mapping _Coerce
etSubAccountId :: Lens' EventTag (Maybe Int64)
etSubAccountId
= lens _etSubAccountId
(\ s a -> s{_etSubAccountId = a})
. mapping _Coerce
etType :: Lens' EventTag (Maybe EventTagType)
etType = lens _etType (\ s a -> s{_etType = a})
etSiteFilterType :: Lens' EventTag (Maybe EventTagSiteFilterType)
etSiteFilterType
= lens _etSiteFilterType
(\ s a -> s{_etSiteFilterType = a})
instance FromJSON EventTag where
parseJSON
= withObject "EventTag"
(\ o ->
EventTag <$>
(o .:? "status") <*> (o .:? "excludeFromAdxRequests")
<*> (o .:? "enabledByDefault")
<*> (o .:? "kind" .!= "dfareporting#eventTag")
<*> (o .:? "campaignIdDimensionValue")
<*> (o .:? "advertiserId")
<*> (o .:? "url")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "sslCompliant")
<*> (o .:? "campaignId")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "urlEscapeLevels")
<*> (o .:? "siteIds" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "subaccountId")
<*> (o .:? "type")
<*> (o .:? "siteFilterType"))
instance ToJSON EventTag where
toJSON EventTag{..}
= object
(catMaybes
[("status" .=) <$> _etStatus,
("excludeFromAdxRequests" .=) <$>
_etExcludeFromAdxRequests,
("enabledByDefault" .=) <$> _etEnabledByDefault,
Just ("kind" .= _etKind),
("campaignIdDimensionValue" .=) <$>
_etCampaignIdDimensionValue,
("advertiserId" .=) <$> _etAdvertiserId,
("url" .=) <$> _etURL,
("advertiserIdDimensionValue" .=) <$>
_etAdvertiserIdDimensionValue,
("sslCompliant" .=) <$> _etSSLCompliant,
("campaignId" .=) <$> _etCampaignId,
("accountId" .=) <$> _etAccountId,
("name" .=) <$> _etName,
("urlEscapeLevels" .=) <$> _etURLEscapeLevels,
("siteIds" .=) <$> _etSiteIds, ("id" .=) <$> _etId,
("subaccountId" .=) <$> _etSubAccountId,
("type" .=) <$> _etType,
("siteFilterType" .=) <$> _etSiteFilterType])
data UserRolePermission = UserRolePermission
{ _useKind :: !Text
, _useAvailability :: !(Maybe UserRolePermissionAvailability)
, _useName :: !(Maybe Text)
, _useId :: !(Maybe (Textual Int64))
, _usePermissionGroupId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
userRolePermission
:: UserRolePermission
userRolePermission =
UserRolePermission
{ _useKind = "dfareporting#userRolePermission"
, _useAvailability = Nothing
, _useName = Nothing
, _useId = Nothing
, _usePermissionGroupId = Nothing
}
useKind :: Lens' UserRolePermission Text
useKind = lens _useKind (\ s a -> s{_useKind = a})
useAvailability :: Lens' UserRolePermission (Maybe UserRolePermissionAvailability)
useAvailability
= lens _useAvailability
(\ s a -> s{_useAvailability = a})
useName :: Lens' UserRolePermission (Maybe Text)
useName = lens _useName (\ s a -> s{_useName = a})
useId :: Lens' UserRolePermission (Maybe Int64)
useId
= lens _useId (\ s a -> s{_useId = a}) .
mapping _Coerce
usePermissionGroupId :: Lens' UserRolePermission (Maybe Int64)
usePermissionGroupId
= lens _usePermissionGroupId
(\ s a -> s{_usePermissionGroupId = a})
. mapping _Coerce
instance FromJSON UserRolePermission where
parseJSON
= withObject "UserRolePermission"
(\ o ->
UserRolePermission <$>
(o .:? "kind" .!= "dfareporting#userRolePermission")
<*> (o .:? "availability")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "permissionGroupId"))
instance ToJSON UserRolePermission where
toJSON UserRolePermission{..}
= object
(catMaybes
[Just ("kind" .= _useKind),
("availability" .=) <$> _useAvailability,
("name" .=) <$> _useName, ("id" .=) <$> _useId,
("permissionGroupId" .=) <$> _usePermissionGroupId])
data OrderContact = OrderContact
{ _ocSignatureUserProFileId :: !(Maybe (Textual Int64))
, _ocContactName :: !(Maybe Text)
, _ocContactTitle :: !(Maybe Text)
, _ocContactType :: !(Maybe OrderContactContactType)
, _ocContactInfo :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderContact
:: OrderContact
orderContact =
OrderContact
{ _ocSignatureUserProFileId = Nothing
, _ocContactName = Nothing
, _ocContactTitle = Nothing
, _ocContactType = Nothing
, _ocContactInfo = Nothing
}
ocSignatureUserProFileId :: Lens' OrderContact (Maybe Int64)
ocSignatureUserProFileId
= lens _ocSignatureUserProFileId
(\ s a -> s{_ocSignatureUserProFileId = a})
. mapping _Coerce
ocContactName :: Lens' OrderContact (Maybe Text)
ocContactName
= lens _ocContactName
(\ s a -> s{_ocContactName = a})
ocContactTitle :: Lens' OrderContact (Maybe Text)
ocContactTitle
= lens _ocContactTitle
(\ s a -> s{_ocContactTitle = a})
ocContactType :: Lens' OrderContact (Maybe OrderContactContactType)
ocContactType
= lens _ocContactType
(\ s a -> s{_ocContactType = a})
ocContactInfo :: Lens' OrderContact (Maybe Text)
ocContactInfo
= lens _ocContactInfo
(\ s a -> s{_ocContactInfo = a})
instance FromJSON OrderContact where
parseJSON
= withObject "OrderContact"
(\ o ->
OrderContact <$>
(o .:? "signatureUserProfileId") <*>
(o .:? "contactName")
<*> (o .:? "contactTitle")
<*> (o .:? "contactType")
<*> (o .:? "contactInfo"))
instance ToJSON OrderContact where
toJSON OrderContact{..}
= object
(catMaybes
[("signatureUserProfileId" .=) <$>
_ocSignatureUserProFileId,
("contactName" .=) <$> _ocContactName,
("contactTitle" .=) <$> _ocContactTitle,
("contactType" .=) <$> _ocContactType,
("contactInfo" .=) <$> _ocContactInfo])
data FloodlightActivitiesGenerateTagResponse = FloodlightActivitiesGenerateTagResponse
{ _fagtrFloodlightActivityTag :: !(Maybe Text)
, _fagtrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivitiesGenerateTagResponse
:: FloodlightActivitiesGenerateTagResponse
floodlightActivitiesGenerateTagResponse =
FloodlightActivitiesGenerateTagResponse
{ _fagtrFloodlightActivityTag = Nothing
, _fagtrKind = "dfareporting#floodlightActivitiesGenerateTagResponse"
}
fagtrFloodlightActivityTag :: Lens' FloodlightActivitiesGenerateTagResponse (Maybe Text)
fagtrFloodlightActivityTag
= lens _fagtrFloodlightActivityTag
(\ s a -> s{_fagtrFloodlightActivityTag = a})
fagtrKind :: Lens' FloodlightActivitiesGenerateTagResponse Text
fagtrKind
= lens _fagtrKind (\ s a -> s{_fagtrKind = a})
instance FromJSON
FloodlightActivitiesGenerateTagResponse where
parseJSON
= withObject
"FloodlightActivitiesGenerateTagResponse"
(\ o ->
FloodlightActivitiesGenerateTagResponse <$>
(o .:? "floodlightActivityTag") <*>
(o .:? "kind" .!=
"dfareporting#floodlightActivitiesGenerateTagResponse"))
instance ToJSON
FloodlightActivitiesGenerateTagResponse where
toJSON FloodlightActivitiesGenerateTagResponse{..}
= object
(catMaybes
[("floodlightActivityTag" .=) <$>
_fagtrFloodlightActivityTag,
Just ("kind" .= _fagtrKind)])
data DirectorySiteContactAssignment = DirectorySiteContactAssignment
{ _dscaVisibility :: !(Maybe DirectorySiteContactAssignmentVisibility)
, _dscaContactId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
directorySiteContactAssignment
:: DirectorySiteContactAssignment
directorySiteContactAssignment =
DirectorySiteContactAssignment
{ _dscaVisibility = Nothing
, _dscaContactId = Nothing
}
dscaVisibility :: Lens' DirectorySiteContactAssignment (Maybe DirectorySiteContactAssignmentVisibility)
dscaVisibility
= lens _dscaVisibility
(\ s a -> s{_dscaVisibility = a})
dscaContactId :: Lens' DirectorySiteContactAssignment (Maybe Int64)
dscaContactId
= lens _dscaContactId
(\ s a -> s{_dscaContactId = a})
. mapping _Coerce
instance FromJSON DirectorySiteContactAssignment
where
parseJSON
= withObject "DirectorySiteContactAssignment"
(\ o ->
DirectorySiteContactAssignment <$>
(o .:? "visibility") <*> (o .:? "contactId"))
instance ToJSON DirectorySiteContactAssignment where
toJSON DirectorySiteContactAssignment{..}
= object
(catMaybes
[("visibility" .=) <$> _dscaVisibility,
("contactId" .=) <$> _dscaContactId])
data AdSlot = AdSlot
{ _assHeight :: !(Maybe (Textual Int64))
, _assPaymentSourceType :: !(Maybe AdSlotPaymentSourceType)
, _assLinkedPlacementId :: !(Maybe (Textual Int64))
, _assWidth :: !(Maybe (Textual Int64))
, _assPrimary :: !(Maybe Bool)
, _assName :: !(Maybe Text)
, _assComment :: !(Maybe Text)
, _assCompatibility :: !(Maybe AdSlotCompatibility)
} deriving (Eq,Show,Data,Typeable,Generic)
adSlot
:: AdSlot
adSlot =
AdSlot
{ _assHeight = Nothing
, _assPaymentSourceType = Nothing
, _assLinkedPlacementId = Nothing
, _assWidth = Nothing
, _assPrimary = Nothing
, _assName = Nothing
, _assComment = Nothing
, _assCompatibility = Nothing
}
assHeight :: Lens' AdSlot (Maybe Int64)
assHeight
= lens _assHeight (\ s a -> s{_assHeight = a}) .
mapping _Coerce
assPaymentSourceType :: Lens' AdSlot (Maybe AdSlotPaymentSourceType)
assPaymentSourceType
= lens _assPaymentSourceType
(\ s a -> s{_assPaymentSourceType = a})
assLinkedPlacementId :: Lens' AdSlot (Maybe Int64)
assLinkedPlacementId
= lens _assLinkedPlacementId
(\ s a -> s{_assLinkedPlacementId = a})
. mapping _Coerce
assWidth :: Lens' AdSlot (Maybe Int64)
assWidth
= lens _assWidth (\ s a -> s{_assWidth = a}) .
mapping _Coerce
assPrimary :: Lens' AdSlot (Maybe Bool)
assPrimary
= lens _assPrimary (\ s a -> s{_assPrimary = a})
assName :: Lens' AdSlot (Maybe Text)
assName = lens _assName (\ s a -> s{_assName = a})
assComment :: Lens' AdSlot (Maybe Text)
assComment
= lens _assComment (\ s a -> s{_assComment = a})
assCompatibility :: Lens' AdSlot (Maybe AdSlotCompatibility)
assCompatibility
= lens _assCompatibility
(\ s a -> s{_assCompatibility = a})
instance FromJSON AdSlot where
parseJSON
= withObject "AdSlot"
(\ o ->
AdSlot <$>
(o .:? "height") <*> (o .:? "paymentSourceType") <*>
(o .:? "linkedPlacementId")
<*> (o .:? "width")
<*> (o .:? "primary")
<*> (o .:? "name")
<*> (o .:? "comment")
<*> (o .:? "compatibility"))
instance ToJSON AdSlot where
toJSON AdSlot{..}
= object
(catMaybes
[("height" .=) <$> _assHeight,
("paymentSourceType" .=) <$> _assPaymentSourceType,
("linkedPlacementId" .=) <$> _assLinkedPlacementId,
("width" .=) <$> _assWidth,
("primary" .=) <$> _assPrimary,
("name" .=) <$> _assName,
("comment" .=) <$> _assComment,
("compatibility" .=) <$> _assCompatibility])
data ThirdPartyTrackingURL = ThirdPartyTrackingURL
{ _tptuURL :: !(Maybe Text)
, _tptuThirdPartyURLType :: !(Maybe ThirdPartyTrackingURLThirdPartyURLType)
} deriving (Eq,Show,Data,Typeable,Generic)
thirdPartyTrackingURL
:: ThirdPartyTrackingURL
thirdPartyTrackingURL =
ThirdPartyTrackingURL
{ _tptuURL = Nothing
, _tptuThirdPartyURLType = Nothing
}
tptuURL :: Lens' ThirdPartyTrackingURL (Maybe Text)
tptuURL = lens _tptuURL (\ s a -> s{_tptuURL = a})
tptuThirdPartyURLType :: Lens' ThirdPartyTrackingURL (Maybe ThirdPartyTrackingURLThirdPartyURLType)
tptuThirdPartyURLType
= lens _tptuThirdPartyURLType
(\ s a -> s{_tptuThirdPartyURLType = a})
instance FromJSON ThirdPartyTrackingURL where
parseJSON
= withObject "ThirdPartyTrackingURL"
(\ o ->
ThirdPartyTrackingURL <$>
(o .:? "url") <*> (o .:? "thirdPartyUrlType"))
instance ToJSON ThirdPartyTrackingURL where
toJSON ThirdPartyTrackingURL{..}
= object
(catMaybes
[("url" .=) <$> _tptuURL,
("thirdPartyUrlType" .=) <$> _tptuThirdPartyURLType])
data OrderDocument = OrderDocument
{ _odSigned :: !(Maybe Bool)
, _odKind :: !Text
, _odAdvertiserId :: !(Maybe (Textual Int64))
, _odLastSentTime :: !(Maybe DateTime')
, _odAmendedOrderDocumentId :: !(Maybe (Textual Int64))
, _odLastSentRecipients :: !(Maybe [Text])
, _odEffectiveDate :: !(Maybe Date')
, _odApprovedByUserProFileIds :: !(Maybe [Textual Int64])
, _odAccountId :: !(Maybe (Textual Int64))
, _odId :: !(Maybe (Textual Int64))
, _odProjectId :: !(Maybe (Textual Int64))
, _odTitle :: !(Maybe Text)
, _odSubAccountId :: !(Maybe (Textual Int64))
, _odType :: !(Maybe OrderDocumentType)
, _odOrderId :: !(Maybe (Textual Int64))
, _odCancelled :: !(Maybe Bool)
, _odCreatedInfo :: !(Maybe LastModifiedInfo)
} deriving (Eq,Show,Data,Typeable,Generic)
orderDocument
:: OrderDocument
orderDocument =
OrderDocument
{ _odSigned = Nothing
, _odKind = "dfareporting#orderDocument"
, _odAdvertiserId = Nothing
, _odLastSentTime = Nothing
, _odAmendedOrderDocumentId = Nothing
, _odLastSentRecipients = Nothing
, _odEffectiveDate = Nothing
, _odApprovedByUserProFileIds = Nothing
, _odAccountId = Nothing
, _odId = Nothing
, _odProjectId = Nothing
, _odTitle = Nothing
, _odSubAccountId = Nothing
, _odType = Nothing
, _odOrderId = Nothing
, _odCancelled = Nothing
, _odCreatedInfo = Nothing
}
odSigned :: Lens' OrderDocument (Maybe Bool)
odSigned = lens _odSigned (\ s a -> s{_odSigned = a})
odKind :: Lens' OrderDocument Text
odKind = lens _odKind (\ s a -> s{_odKind = a})
odAdvertiserId :: Lens' OrderDocument (Maybe Int64)
odAdvertiserId
= lens _odAdvertiserId
(\ s a -> s{_odAdvertiserId = a})
. mapping _Coerce
odLastSentTime :: Lens' OrderDocument (Maybe UTCTime)
odLastSentTime
= lens _odLastSentTime
(\ s a -> s{_odLastSentTime = a})
. mapping _DateTime
odAmendedOrderDocumentId :: Lens' OrderDocument (Maybe Int64)
odAmendedOrderDocumentId
= lens _odAmendedOrderDocumentId
(\ s a -> s{_odAmendedOrderDocumentId = a})
. mapping _Coerce
odLastSentRecipients :: Lens' OrderDocument [Text]
odLastSentRecipients
= lens _odLastSentRecipients
(\ s a -> s{_odLastSentRecipients = a})
. _Default
. _Coerce
odEffectiveDate :: Lens' OrderDocument (Maybe Day)
odEffectiveDate
= lens _odEffectiveDate
(\ s a -> s{_odEffectiveDate = a})
. mapping _Date
odApprovedByUserProFileIds :: Lens' OrderDocument [Int64]
odApprovedByUserProFileIds
= lens _odApprovedByUserProFileIds
(\ s a -> s{_odApprovedByUserProFileIds = a})
. _Default
. _Coerce
odAccountId :: Lens' OrderDocument (Maybe Int64)
odAccountId
= lens _odAccountId (\ s a -> s{_odAccountId = a}) .
mapping _Coerce
odId :: Lens' OrderDocument (Maybe Int64)
odId
= lens _odId (\ s a -> s{_odId = a}) .
mapping _Coerce
odProjectId :: Lens' OrderDocument (Maybe Int64)
odProjectId
= lens _odProjectId (\ s a -> s{_odProjectId = a}) .
mapping _Coerce
odTitle :: Lens' OrderDocument (Maybe Text)
odTitle = lens _odTitle (\ s a -> s{_odTitle = a})
odSubAccountId :: Lens' OrderDocument (Maybe Int64)
odSubAccountId
= lens _odSubAccountId
(\ s a -> s{_odSubAccountId = a})
. mapping _Coerce
odType :: Lens' OrderDocument (Maybe OrderDocumentType)
odType = lens _odType (\ s a -> s{_odType = a})
odOrderId :: Lens' OrderDocument (Maybe Int64)
odOrderId
= lens _odOrderId (\ s a -> s{_odOrderId = a}) .
mapping _Coerce
odCancelled :: Lens' OrderDocument (Maybe Bool)
odCancelled
= lens _odCancelled (\ s a -> s{_odCancelled = a})
odCreatedInfo :: Lens' OrderDocument (Maybe LastModifiedInfo)
odCreatedInfo
= lens _odCreatedInfo
(\ s a -> s{_odCreatedInfo = a})
instance FromJSON OrderDocument where
parseJSON
= withObject "OrderDocument"
(\ o ->
OrderDocument <$>
(o .:? "signed") <*>
(o .:? "kind" .!= "dfareporting#orderDocument")
<*> (o .:? "advertiserId")
<*> (o .:? "lastSentTime")
<*> (o .:? "amendedOrderDocumentId")
<*> (o .:? "lastSentRecipients" .!= mempty)
<*> (o .:? "effectiveDate")
<*> (o .:? "approvedByUserProfileIds" .!= mempty)
<*> (o .:? "accountId")
<*> (o .:? "id")
<*> (o .:? "projectId")
<*> (o .:? "title")
<*> (o .:? "subaccountId")
<*> (o .:? "type")
<*> (o .:? "orderId")
<*> (o .:? "cancelled")
<*> (o .:? "createdInfo"))
instance ToJSON OrderDocument where
toJSON OrderDocument{..}
= object
(catMaybes
[("signed" .=) <$> _odSigned,
Just ("kind" .= _odKind),
("advertiserId" .=) <$> _odAdvertiserId,
("lastSentTime" .=) <$> _odLastSentTime,
("amendedOrderDocumentId" .=) <$>
_odAmendedOrderDocumentId,
("lastSentRecipients" .=) <$> _odLastSentRecipients,
("effectiveDate" .=) <$> _odEffectiveDate,
("approvedByUserProfileIds" .=) <$>
_odApprovedByUserProFileIds,
("accountId" .=) <$> _odAccountId,
("id" .=) <$> _odId,
("projectId" .=) <$> _odProjectId,
("title" .=) <$> _odTitle,
("subaccountId" .=) <$> _odSubAccountId,
("type" .=) <$> _odType,
("orderId" .=) <$> _odOrderId,
("cancelled" .=) <$> _odCancelled,
("createdInfo" .=) <$> _odCreatedInfo])
data Metro = Metro
{ _metMetroCode :: !(Maybe Text)
, _metKind :: !Text
, _metName :: !(Maybe Text)
, _metCountryCode :: !(Maybe Text)
, _metDmaId :: !(Maybe (Textual Int64))
, _metCountryDartId :: !(Maybe (Textual Int64))
, _metDartId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
metro
:: Metro
metro =
Metro
{ _metMetroCode = Nothing
, _metKind = "dfareporting#metro"
, _metName = Nothing
, _metCountryCode = Nothing
, _metDmaId = Nothing
, _metCountryDartId = Nothing
, _metDartId = Nothing
}
metMetroCode :: Lens' Metro (Maybe Text)
metMetroCode
= lens _metMetroCode (\ s a -> s{_metMetroCode = a})
metKind :: Lens' Metro Text
metKind = lens _metKind (\ s a -> s{_metKind = a})
metName :: Lens' Metro (Maybe Text)
metName = lens _metName (\ s a -> s{_metName = a})
metCountryCode :: Lens' Metro (Maybe Text)
metCountryCode
= lens _metCountryCode
(\ s a -> s{_metCountryCode = a})
metDmaId :: Lens' Metro (Maybe Int64)
metDmaId
= lens _metDmaId (\ s a -> s{_metDmaId = a}) .
mapping _Coerce
metCountryDartId :: Lens' Metro (Maybe Int64)
metCountryDartId
= lens _metCountryDartId
(\ s a -> s{_metCountryDartId = a})
. mapping _Coerce
metDartId :: Lens' Metro (Maybe Int64)
metDartId
= lens _metDartId (\ s a -> s{_metDartId = a}) .
mapping _Coerce
instance FromJSON Metro where
parseJSON
= withObject "Metro"
(\ o ->
Metro <$>
(o .:? "metroCode") <*>
(o .:? "kind" .!= "dfareporting#metro")
<*> (o .:? "name")
<*> (o .:? "countryCode")
<*> (o .:? "dmaId")
<*> (o .:? "countryDartId")
<*> (o .:? "dartId"))
instance ToJSON Metro where
toJSON Metro{..}
= object
(catMaybes
[("metroCode" .=) <$> _metMetroCode,
Just ("kind" .= _metKind), ("name" .=) <$> _metName,
("countryCode" .=) <$> _metCountryCode,
("dmaId" .=) <$> _metDmaId,
("countryDartId" .=) <$> _metCountryDartId,
("dartId" .=) <$> _metDartId])
data Placement = Placement
{ _p1Status :: !(Maybe PlacementStatus)
, _p1PlacementStrategyId :: !(Maybe (Textual Int64))
, _p1TagFormats :: !(Maybe [PlacementTagFormatsItem])
, _p1SiteIdDimensionValue :: !(Maybe DimensionValue)
, _p1PricingSchedule :: !(Maybe PricingSchedule)
, _p1Size :: !(Maybe Size)
, _p1Kind :: !Text
, _p1KeyName :: !(Maybe Text)
, _p1CampaignIdDimensionValue :: !(Maybe DimensionValue)
, _p1AdvertiserId :: !(Maybe (Textual Int64))
, _p1AdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _p1CampaignId :: !(Maybe (Textual Int64))
, _p1IdDimensionValue :: !(Maybe DimensionValue)
, _p1Primary :: !(Maybe Bool)
, _p1LookbackConfiguration :: !(Maybe LookbackConfiguration)
, _p1TagSetting :: !(Maybe TagSetting)
, _p1ContentCategoryId :: !(Maybe (Textual Int64))
, _p1DirectorySiteIdDimensionValue :: !(Maybe DimensionValue)
, _p1AccountId :: !(Maybe (Textual Int64))
, _p1PaymentSource :: !(Maybe PlacementPaymentSource)
, _p1Name :: !(Maybe Text)
, _p1DirectorySiteId :: !(Maybe (Textual Int64))
, _p1CreateInfo :: !(Maybe LastModifiedInfo)
, _p1LastModifiedInfo :: !(Maybe LastModifiedInfo)
, _p1Id :: !(Maybe (Textual Int64))
, _p1SSLRequired :: !(Maybe Bool)
, _p1SubAccountId :: !(Maybe (Textual Int64))
, _p1PlacementGroupIdDimensionValue :: !(Maybe DimensionValue)
, _p1ExternalId :: !(Maybe Text)
, _p1PlacementGroupId :: !(Maybe (Textual Int64))
, _p1Comment :: !(Maybe Text)
, _p1SiteId :: !(Maybe (Textual Int64))
, _p1Compatibility :: !(Maybe PlacementCompatibility)
, _p1Archived :: !(Maybe Bool)
, _p1PaymentApproved :: !(Maybe Bool)
, _p1PublisherUpdateInfo :: !(Maybe LastModifiedInfo)
} deriving (Eq,Show,Data,Typeable,Generic)
placement
:: Placement
placement =
Placement
{ _p1Status = Nothing
, _p1PlacementStrategyId = Nothing
, _p1TagFormats = Nothing
, _p1SiteIdDimensionValue = Nothing
, _p1PricingSchedule = Nothing
, _p1Size = Nothing
, _p1Kind = "dfareporting#placement"
, _p1KeyName = Nothing
, _p1CampaignIdDimensionValue = Nothing
, _p1AdvertiserId = Nothing
, _p1AdvertiserIdDimensionValue = Nothing
, _p1CampaignId = Nothing
, _p1IdDimensionValue = Nothing
, _p1Primary = Nothing
, _p1LookbackConfiguration = Nothing
, _p1TagSetting = Nothing
, _p1ContentCategoryId = Nothing
, _p1DirectorySiteIdDimensionValue = Nothing
, _p1AccountId = Nothing
, _p1PaymentSource = Nothing
, _p1Name = Nothing
, _p1DirectorySiteId = Nothing
, _p1CreateInfo = Nothing
, _p1LastModifiedInfo = Nothing
, _p1Id = Nothing
, _p1SSLRequired = Nothing
, _p1SubAccountId = Nothing
, _p1PlacementGroupIdDimensionValue = Nothing
, _p1ExternalId = Nothing
, _p1PlacementGroupId = Nothing
, _p1Comment = Nothing
, _p1SiteId = Nothing
, _p1Compatibility = Nothing
, _p1Archived = Nothing
, _p1PaymentApproved = Nothing
, _p1PublisherUpdateInfo = Nothing
}
p1Status :: Lens' Placement (Maybe PlacementStatus)
p1Status = lens _p1Status (\ s a -> s{_p1Status = a})
p1PlacementStrategyId :: Lens' Placement (Maybe Int64)
p1PlacementStrategyId
= lens _p1PlacementStrategyId
(\ s a -> s{_p1PlacementStrategyId = a})
. mapping _Coerce
p1TagFormats :: Lens' Placement [PlacementTagFormatsItem]
p1TagFormats
= lens _p1TagFormats (\ s a -> s{_p1TagFormats = a})
. _Default
. _Coerce
p1SiteIdDimensionValue :: Lens' Placement (Maybe DimensionValue)
p1SiteIdDimensionValue
= lens _p1SiteIdDimensionValue
(\ s a -> s{_p1SiteIdDimensionValue = a})
p1PricingSchedule :: Lens' Placement (Maybe PricingSchedule)
p1PricingSchedule
= lens _p1PricingSchedule
(\ s a -> s{_p1PricingSchedule = a})
p1Size :: Lens' Placement (Maybe Size)
p1Size = lens _p1Size (\ s a -> s{_p1Size = a})
p1Kind :: Lens' Placement Text
p1Kind = lens _p1Kind (\ s a -> s{_p1Kind = a})
p1KeyName :: Lens' Placement (Maybe Text)
p1KeyName
= lens _p1KeyName (\ s a -> s{_p1KeyName = a})
p1CampaignIdDimensionValue :: Lens' Placement (Maybe DimensionValue)
p1CampaignIdDimensionValue
= lens _p1CampaignIdDimensionValue
(\ s a -> s{_p1CampaignIdDimensionValue = a})
p1AdvertiserId :: Lens' Placement (Maybe Int64)
p1AdvertiserId
= lens _p1AdvertiserId
(\ s a -> s{_p1AdvertiserId = a})
. mapping _Coerce
p1AdvertiserIdDimensionValue :: Lens' Placement (Maybe DimensionValue)
p1AdvertiserIdDimensionValue
= lens _p1AdvertiserIdDimensionValue
(\ s a -> s{_p1AdvertiserIdDimensionValue = a})
p1CampaignId :: Lens' Placement (Maybe Int64)
p1CampaignId
= lens _p1CampaignId (\ s a -> s{_p1CampaignId = a})
. mapping _Coerce
p1IdDimensionValue :: Lens' Placement (Maybe DimensionValue)
p1IdDimensionValue
= lens _p1IdDimensionValue
(\ s a -> s{_p1IdDimensionValue = a})
p1Primary :: Lens' Placement (Maybe Bool)
p1Primary
= lens _p1Primary (\ s a -> s{_p1Primary = a})
p1LookbackConfiguration :: Lens' Placement (Maybe LookbackConfiguration)
p1LookbackConfiguration
= lens _p1LookbackConfiguration
(\ s a -> s{_p1LookbackConfiguration = a})
p1TagSetting :: Lens' Placement (Maybe TagSetting)
p1TagSetting
= lens _p1TagSetting (\ s a -> s{_p1TagSetting = a})
p1ContentCategoryId :: Lens' Placement (Maybe Int64)
p1ContentCategoryId
= lens _p1ContentCategoryId
(\ s a -> s{_p1ContentCategoryId = a})
. mapping _Coerce
p1DirectorySiteIdDimensionValue :: Lens' Placement (Maybe DimensionValue)
p1DirectorySiteIdDimensionValue
= lens _p1DirectorySiteIdDimensionValue
(\ s a -> s{_p1DirectorySiteIdDimensionValue = a})
p1AccountId :: Lens' Placement (Maybe Int64)
p1AccountId
= lens _p1AccountId (\ s a -> s{_p1AccountId = a}) .
mapping _Coerce
p1PaymentSource :: Lens' Placement (Maybe PlacementPaymentSource)
p1PaymentSource
= lens _p1PaymentSource
(\ s a -> s{_p1PaymentSource = a})
p1Name :: Lens' Placement (Maybe Text)
p1Name = lens _p1Name (\ s a -> s{_p1Name = a})
p1DirectorySiteId :: Lens' Placement (Maybe Int64)
p1DirectorySiteId
= lens _p1DirectorySiteId
(\ s a -> s{_p1DirectorySiteId = a})
. mapping _Coerce
p1CreateInfo :: Lens' Placement (Maybe LastModifiedInfo)
p1CreateInfo
= lens _p1CreateInfo (\ s a -> s{_p1CreateInfo = a})
p1LastModifiedInfo :: Lens' Placement (Maybe LastModifiedInfo)
p1LastModifiedInfo
= lens _p1LastModifiedInfo
(\ s a -> s{_p1LastModifiedInfo = a})
p1Id :: Lens' Placement (Maybe Int64)
p1Id
= lens _p1Id (\ s a -> s{_p1Id = a}) .
mapping _Coerce
p1SSLRequired :: Lens' Placement (Maybe Bool)
p1SSLRequired
= lens _p1SSLRequired
(\ s a -> s{_p1SSLRequired = a})
p1SubAccountId :: Lens' Placement (Maybe Int64)
p1SubAccountId
= lens _p1SubAccountId
(\ s a -> s{_p1SubAccountId = a})
. mapping _Coerce
p1PlacementGroupIdDimensionValue :: Lens' Placement (Maybe DimensionValue)
p1PlacementGroupIdDimensionValue
= lens _p1PlacementGroupIdDimensionValue
(\ s a -> s{_p1PlacementGroupIdDimensionValue = a})
p1ExternalId :: Lens' Placement (Maybe Text)
p1ExternalId
= lens _p1ExternalId (\ s a -> s{_p1ExternalId = a})
p1PlacementGroupId :: Lens' Placement (Maybe Int64)
p1PlacementGroupId
= lens _p1PlacementGroupId
(\ s a -> s{_p1PlacementGroupId = a})
. mapping _Coerce
p1Comment :: Lens' Placement (Maybe Text)
p1Comment
= lens _p1Comment (\ s a -> s{_p1Comment = a})
p1SiteId :: Lens' Placement (Maybe Int64)
p1SiteId
= lens _p1SiteId (\ s a -> s{_p1SiteId = a}) .
mapping _Coerce
p1Compatibility :: Lens' Placement (Maybe PlacementCompatibility)
p1Compatibility
= lens _p1Compatibility
(\ s a -> s{_p1Compatibility = a})
p1Archived :: Lens' Placement (Maybe Bool)
p1Archived
= lens _p1Archived (\ s a -> s{_p1Archived = a})
p1PaymentApproved :: Lens' Placement (Maybe Bool)
p1PaymentApproved
= lens _p1PaymentApproved
(\ s a -> s{_p1PaymentApproved = a})
p1PublisherUpdateInfo :: Lens' Placement (Maybe LastModifiedInfo)
p1PublisherUpdateInfo
= lens _p1PublisherUpdateInfo
(\ s a -> s{_p1PublisherUpdateInfo = a})
instance FromJSON Placement where
parseJSON
= withObject "Placement"
(\ o ->
Placement <$>
(o .:? "status") <*> (o .:? "placementStrategyId")
<*> (o .:? "tagFormats" .!= mempty)
<*> (o .:? "siteIdDimensionValue")
<*> (o .:? "pricingSchedule")
<*> (o .:? "size")
<*> (o .:? "kind" .!= "dfareporting#placement")
<*> (o .:? "keyName")
<*> (o .:? "campaignIdDimensionValue")
<*> (o .:? "advertiserId")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "campaignId")
<*> (o .:? "idDimensionValue")
<*> (o .:? "primary")
<*> (o .:? "lookbackConfiguration")
<*> (o .:? "tagSetting")
<*> (o .:? "contentCategoryId")
<*> (o .:? "directorySiteIdDimensionValue")
<*> (o .:? "accountId")
<*> (o .:? "paymentSource")
<*> (o .:? "name")
<*> (o .:? "directorySiteId")
<*> (o .:? "createInfo")
<*> (o .:? "lastModifiedInfo")
<*> (o .:? "id")
<*> (o .:? "sslRequired")
<*> (o .:? "subaccountId")
<*> (o .:? "placementGroupIdDimensionValue")
<*> (o .:? "externalId")
<*> (o .:? "placementGroupId")
<*> (o .:? "comment")
<*> (o .:? "siteId")
<*> (o .:? "compatibility")
<*> (o .:? "archived")
<*> (o .:? "paymentApproved")
<*> (o .:? "publisherUpdateInfo"))
instance ToJSON Placement where
toJSON Placement{..}
= object
(catMaybes
[("status" .=) <$> _p1Status,
("placementStrategyId" .=) <$>
_p1PlacementStrategyId,
("tagFormats" .=) <$> _p1TagFormats,
("siteIdDimensionValue" .=) <$>
_p1SiteIdDimensionValue,
("pricingSchedule" .=) <$> _p1PricingSchedule,
("size" .=) <$> _p1Size, Just ("kind" .= _p1Kind),
("keyName" .=) <$> _p1KeyName,
("campaignIdDimensionValue" .=) <$>
_p1CampaignIdDimensionValue,
("advertiserId" .=) <$> _p1AdvertiserId,
("advertiserIdDimensionValue" .=) <$>
_p1AdvertiserIdDimensionValue,
("campaignId" .=) <$> _p1CampaignId,
("idDimensionValue" .=) <$> _p1IdDimensionValue,
("primary" .=) <$> _p1Primary,
("lookbackConfiguration" .=) <$>
_p1LookbackConfiguration,
("tagSetting" .=) <$> _p1TagSetting,
("contentCategoryId" .=) <$> _p1ContentCategoryId,
("directorySiteIdDimensionValue" .=) <$>
_p1DirectorySiteIdDimensionValue,
("accountId" .=) <$> _p1AccountId,
("paymentSource" .=) <$> _p1PaymentSource,
("name" .=) <$> _p1Name,
("directorySiteId" .=) <$> _p1DirectorySiteId,
("createInfo" .=) <$> _p1CreateInfo,
("lastModifiedInfo" .=) <$> _p1LastModifiedInfo,
("id" .=) <$> _p1Id,
("sslRequired" .=) <$> _p1SSLRequired,
("subaccountId" .=) <$> _p1SubAccountId,
("placementGroupIdDimensionValue" .=) <$>
_p1PlacementGroupIdDimensionValue,
("externalId" .=) <$> _p1ExternalId,
("placementGroupId" .=) <$> _p1PlacementGroupId,
("comment" .=) <$> _p1Comment,
("siteId" .=) <$> _p1SiteId,
("compatibility" .=) <$> _p1Compatibility,
("archived" .=) <$> _p1Archived,
("paymentApproved" .=) <$> _p1PaymentApproved,
("publisherUpdateInfo" .=) <$>
_p1PublisherUpdateInfo])
data SitesListResponse = SitesListResponse
{ _sitNextPageToken :: !(Maybe Text)
, _sitKind :: !Text
, _sitSites :: !(Maybe [Site])
} deriving (Eq,Show,Data,Typeable,Generic)
sitesListResponse
:: SitesListResponse
sitesListResponse =
SitesListResponse
{ _sitNextPageToken = Nothing
, _sitKind = "dfareporting#sitesListResponse"
, _sitSites = Nothing
}
sitNextPageToken :: Lens' SitesListResponse (Maybe Text)
sitNextPageToken
= lens _sitNextPageToken
(\ s a -> s{_sitNextPageToken = a})
sitKind :: Lens' SitesListResponse Text
sitKind = lens _sitKind (\ s a -> s{_sitKind = a})
sitSites :: Lens' SitesListResponse [Site]
sitSites
= lens _sitSites (\ s a -> s{_sitSites = a}) .
_Default
. _Coerce
instance FromJSON SitesListResponse where
parseJSON
= withObject "SitesListResponse"
(\ o ->
SitesListResponse <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "dfareporting#sitesListResponse")
<*> (o .:? "sites" .!= mempty))
instance ToJSON SitesListResponse where
toJSON SitesListResponse{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _sitNextPageToken,
Just ("kind" .= _sitKind),
("sites" .=) <$> _sitSites])
data CreativeField = CreativeField
{ _cffKind :: !Text
, _cffAdvertiserId :: !(Maybe (Textual Int64))
, _cffAdvertiserIdDimensionValue :: !(Maybe DimensionValue)
, _cffAccountId :: !(Maybe (Textual Int64))
, _cffName :: !(Maybe Text)
, _cffId :: !(Maybe (Textual Int64))
, _cffSubAccountId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
creativeField
:: CreativeField
creativeField =
CreativeField
{ _cffKind = "dfareporting#creativeField"
, _cffAdvertiserId = Nothing
, _cffAdvertiserIdDimensionValue = Nothing
, _cffAccountId = Nothing
, _cffName = Nothing
, _cffId = Nothing
, _cffSubAccountId = Nothing
}
cffKind :: Lens' CreativeField Text
cffKind = lens _cffKind (\ s a -> s{_cffKind = a})
cffAdvertiserId :: Lens' CreativeField (Maybe Int64)
cffAdvertiserId
= lens _cffAdvertiserId
(\ s a -> s{_cffAdvertiserId = a})
. mapping _Coerce
cffAdvertiserIdDimensionValue :: Lens' CreativeField (Maybe DimensionValue)
cffAdvertiserIdDimensionValue
= lens _cffAdvertiserIdDimensionValue
(\ s a -> s{_cffAdvertiserIdDimensionValue = a})
cffAccountId :: Lens' CreativeField (Maybe Int64)
cffAccountId
= lens _cffAccountId (\ s a -> s{_cffAccountId = a})
. mapping _Coerce
cffName :: Lens' CreativeField (Maybe Text)
cffName = lens _cffName (\ s a -> s{_cffName = a})
cffId :: Lens' CreativeField (Maybe Int64)
cffId
= lens _cffId (\ s a -> s{_cffId = a}) .
mapping _Coerce
cffSubAccountId :: Lens' CreativeField (Maybe Int64)
cffSubAccountId
= lens _cffSubAccountId
(\ s a -> s{_cffSubAccountId = a})
. mapping _Coerce
instance FromJSON CreativeField where
parseJSON
= withObject "CreativeField"
(\ o ->
CreativeField <$>
(o .:? "kind" .!= "dfareporting#creativeField") <*>
(o .:? "advertiserId")
<*> (o .:? "advertiserIdDimensionValue")
<*> (o .:? "accountId")
<*> (o .:? "name")
<*> (o .:? "id")
<*> (o .:? "subaccountId"))
instance ToJSON CreativeField where
toJSON CreativeField{..}
= object
(catMaybes
[Just ("kind" .= _cffKind),
("advertiserId" .=) <$> _cffAdvertiserId,
("advertiserIdDimensionValue" .=) <$>
_cffAdvertiserIdDimensionValue,
("accountId" .=) <$> _cffAccountId,
("name" .=) <$> _cffName, ("id" .=) <$> _cffId,
("subaccountId" .=) <$> _cffSubAccountId])
data DefaultClickThroughEventTagProperties = DefaultClickThroughEventTagProperties
{ _dctetpOverrideInheritedEventTag :: !(Maybe Bool)
, _dctetpDefaultClickThroughEventTagId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
defaultClickThroughEventTagProperties
:: DefaultClickThroughEventTagProperties
defaultClickThroughEventTagProperties =
DefaultClickThroughEventTagProperties
{ _dctetpOverrideInheritedEventTag = Nothing
, _dctetpDefaultClickThroughEventTagId = Nothing
}
dctetpOverrideInheritedEventTag :: Lens' DefaultClickThroughEventTagProperties (Maybe Bool)
dctetpOverrideInheritedEventTag
= lens _dctetpOverrideInheritedEventTag
(\ s a -> s{_dctetpOverrideInheritedEventTag = a})
dctetpDefaultClickThroughEventTagId :: Lens' DefaultClickThroughEventTagProperties (Maybe Int64)
dctetpDefaultClickThroughEventTagId
= lens _dctetpDefaultClickThroughEventTagId
(\ s a ->
s{_dctetpDefaultClickThroughEventTagId = a})
. mapping _Coerce
instance FromJSON
DefaultClickThroughEventTagProperties where
parseJSON
= withObject "DefaultClickThroughEventTagProperties"
(\ o ->
DefaultClickThroughEventTagProperties <$>
(o .:? "overrideInheritedEventTag") <*>
(o .:? "defaultClickThroughEventTagId"))
instance ToJSON DefaultClickThroughEventTagProperties
where
toJSON DefaultClickThroughEventTagProperties{..}
= object
(catMaybes
[("overrideInheritedEventTag" .=) <$>
_dctetpOverrideInheritedEventTag,
("defaultClickThroughEventTagId" .=) <$>
_dctetpDefaultClickThroughEventTagId])
newtype ListTargetingExpression = ListTargetingExpression
{ _lteExpression :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
listTargetingExpression
:: ListTargetingExpression
listTargetingExpression =
ListTargetingExpression
{ _lteExpression = Nothing
}
lteExpression :: Lens' ListTargetingExpression (Maybe Text)
lteExpression
= lens _lteExpression
(\ s a -> s{_lteExpression = a})
instance FromJSON ListTargetingExpression where
parseJSON
= withObject "ListTargetingExpression"
(\ o ->
ListTargetingExpression <$> (o .:? "expression"))
instance ToJSON ListTargetingExpression where
toJSON ListTargetingExpression{..}
= object
(catMaybes [("expression" .=) <$> _lteExpression])