{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.AdSenseHost.Types.Product where
import Network.Google.AdSenseHost.Types.Sum
import Network.Google.Prelude
data AdClients = AdClients'
{ _acEtag :: !(Maybe Text)
, _acNextPageToken :: !(Maybe Text)
, _acKind :: !Text
, _acItems :: !(Maybe [AdClient])
} deriving (Eq,Show,Data,Typeable,Generic)
adClients
:: AdClients
adClients =
AdClients'
{ _acEtag = Nothing
, _acNextPageToken = Nothing
, _acKind = "adsensehost#adClients"
, _acItems = Nothing
}
acEtag :: Lens' AdClients (Maybe Text)
acEtag = lens _acEtag (\ s a -> s{_acEtag = a})
acNextPageToken :: Lens' AdClients (Maybe Text)
acNextPageToken
= lens _acNextPageToken
(\ s a -> s{_acNextPageToken = a})
acKind :: Lens' AdClients Text
acKind = lens _acKind (\ s a -> s{_acKind = a})
acItems :: Lens' AdClients [AdClient]
acItems
= lens _acItems (\ s a -> s{_acItems = a}) . _Default
. _Coerce
instance FromJSON AdClients where
parseJSON
= withObject "AdClients"
(\ o ->
AdClients' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "adsensehost#adClients")
<*> (o .:? "items" .!= mempty))
instance ToJSON AdClients where
toJSON AdClients'{..}
= object
(catMaybes
[("etag" .=) <$> _acEtag,
("nextPageToken" .=) <$> _acNextPageToken,
Just ("kind" .= _acKind), ("items" .=) <$> _acItems])
data AssociationSession = AssociationSession'
{ _asStatus :: !(Maybe Text)
, _asKind :: !Text
, _asWebsiteLocale :: !(Maybe Text)
, _asUserLocale :: !(Maybe Text)
, _asAccountId :: !(Maybe Text)
, _asProductCodes :: !(Maybe [Text])
, _asId :: !(Maybe Text)
, _asWebsiteURL :: !(Maybe Text)
, _asRedirectURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
associationSession
:: AssociationSession
associationSession =
AssociationSession'
{ _asStatus = Nothing
, _asKind = "adsensehost#associationSession"
, _asWebsiteLocale = Nothing
, _asUserLocale = Nothing
, _asAccountId = Nothing
, _asProductCodes = Nothing
, _asId = Nothing
, _asWebsiteURL = Nothing
, _asRedirectURL = Nothing
}
asStatus :: Lens' AssociationSession (Maybe Text)
asStatus = lens _asStatus (\ s a -> s{_asStatus = a})
asKind :: Lens' AssociationSession Text
asKind = lens _asKind (\ s a -> s{_asKind = a})
asWebsiteLocale :: Lens' AssociationSession (Maybe Text)
asWebsiteLocale
= lens _asWebsiteLocale
(\ s a -> s{_asWebsiteLocale = a})
asUserLocale :: Lens' AssociationSession (Maybe Text)
asUserLocale
= lens _asUserLocale (\ s a -> s{_asUserLocale = a})
asAccountId :: Lens' AssociationSession (Maybe Text)
asAccountId
= lens _asAccountId (\ s a -> s{_asAccountId = a})
asProductCodes :: Lens' AssociationSession [Text]
asProductCodes
= lens _asProductCodes
(\ s a -> s{_asProductCodes = a})
. _Default
. _Coerce
asId :: Lens' AssociationSession (Maybe Text)
asId = lens _asId (\ s a -> s{_asId = a})
asWebsiteURL :: Lens' AssociationSession (Maybe Text)
asWebsiteURL
= lens _asWebsiteURL (\ s a -> s{_asWebsiteURL = a})
asRedirectURL :: Lens' AssociationSession (Maybe Text)
asRedirectURL
= lens _asRedirectURL
(\ s a -> s{_asRedirectURL = a})
instance FromJSON AssociationSession where
parseJSON
= withObject "AssociationSession"
(\ o ->
AssociationSession' <$>
(o .:? "status") <*>
(o .:? "kind" .!= "adsensehost#associationSession")
<*> (o .:? "websiteLocale")
<*> (o .:? "userLocale")
<*> (o .:? "accountId")
<*> (o .:? "productCodes" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "websiteUrl")
<*> (o .:? "redirectUrl"))
instance ToJSON AssociationSession where
toJSON AssociationSession'{..}
= object
(catMaybes
[("status" .=) <$> _asStatus,
Just ("kind" .= _asKind),
("websiteLocale" .=) <$> _asWebsiteLocale,
("userLocale" .=) <$> _asUserLocale,
("accountId" .=) <$> _asAccountId,
("productCodes" .=) <$> _asProductCodes,
("id" .=) <$> _asId,
("websiteUrl" .=) <$> _asWebsiteURL,
("redirectUrl" .=) <$> _asRedirectURL])
data Accounts = Accounts'
{ _aEtag :: !(Maybe Text)
, _aKind :: !Text
, _aItems :: !(Maybe [Account])
} deriving (Eq,Show,Data,Typeable,Generic)
accounts
:: Accounts
accounts =
Accounts'
{ _aEtag = Nothing
, _aKind = "adsensehost#accounts"
, _aItems = Nothing
}
aEtag :: Lens' Accounts (Maybe Text)
aEtag = lens _aEtag (\ s a -> s{_aEtag = a})
aKind :: Lens' Accounts Text
aKind = lens _aKind (\ s a -> s{_aKind = a})
aItems :: Lens' Accounts [Account]
aItems
= lens _aItems (\ s a -> s{_aItems = a}) . _Default .
_Coerce
instance FromJSON Accounts where
parseJSON
= withObject "Accounts"
(\ o ->
Accounts' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "adsensehost#accounts")
<*> (o .:? "items" .!= mempty))
instance ToJSON Accounts where
toJSON Accounts'{..}
= object
(catMaybes
[("etag" .=) <$> _aEtag, Just ("kind" .= _aKind),
("items" .=) <$> _aItems])
data AdUnits = AdUnits'
{ _auEtag :: !(Maybe Text)
, _auNextPageToken :: !(Maybe Text)
, _auKind :: !Text
, _auItems :: !(Maybe [AdUnit])
} deriving (Eq,Show,Data,Typeable,Generic)
adUnits
:: AdUnits
adUnits =
AdUnits'
{ _auEtag = Nothing
, _auNextPageToken = Nothing
, _auKind = "adsensehost#adUnits"
, _auItems = Nothing
}
auEtag :: Lens' AdUnits (Maybe Text)
auEtag = lens _auEtag (\ s a -> s{_auEtag = a})
auNextPageToken :: Lens' AdUnits (Maybe Text)
auNextPageToken
= lens _auNextPageToken
(\ s a -> s{_auNextPageToken = a})
auKind :: Lens' AdUnits Text
auKind = lens _auKind (\ s a -> s{_auKind = a})
auItems :: Lens' AdUnits [AdUnit]
auItems
= lens _auItems (\ s a -> s{_auItems = a}) . _Default
. _Coerce
instance FromJSON AdUnits where
parseJSON
= withObject "AdUnits"
(\ o ->
AdUnits' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "adsensehost#adUnits")
<*> (o .:? "items" .!= mempty))
instance ToJSON AdUnits where
toJSON AdUnits'{..}
= object
(catMaybes
[("etag" .=) <$> _auEtag,
("nextPageToken" .=) <$> _auNextPageToken,
Just ("kind" .= _auKind), ("items" .=) <$> _auItems])
data URLChannels = URLChannels'
{ _ucEtag :: !(Maybe Text)
, _ucNextPageToken :: !(Maybe Text)
, _ucKind :: !Text
, _ucItems :: !(Maybe [URLChannel])
} deriving (Eq,Show,Data,Typeable,Generic)
urlChannels
:: URLChannels
urlChannels =
URLChannels'
{ _ucEtag = Nothing
, _ucNextPageToken = Nothing
, _ucKind = "adsensehost#urlChannels"
, _ucItems = Nothing
}
ucEtag :: Lens' URLChannels (Maybe Text)
ucEtag = lens _ucEtag (\ s a -> s{_ucEtag = a})
ucNextPageToken :: Lens' URLChannels (Maybe Text)
ucNextPageToken
= lens _ucNextPageToken
(\ s a -> s{_ucNextPageToken = a})
ucKind :: Lens' URLChannels Text
ucKind = lens _ucKind (\ s a -> s{_ucKind = a})
ucItems :: Lens' URLChannels [URLChannel]
ucItems
= lens _ucItems (\ s a -> s{_ucItems = a}) . _Default
. _Coerce
instance FromJSON URLChannels where
parseJSON
= withObject "URLChannels"
(\ o ->
URLChannels' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "adsensehost#urlChannels")
<*> (o .:? "items" .!= mempty))
instance ToJSON URLChannels where
toJSON URLChannels'{..}
= object
(catMaybes
[("etag" .=) <$> _ucEtag,
("nextPageToken" .=) <$> _ucNextPageToken,
Just ("kind" .= _ucKind), ("items" .=) <$> _ucItems])
data CustomChannels = CustomChannels'
{ _ccEtag :: !(Maybe Text)
, _ccNextPageToken :: !(Maybe Text)
, _ccKind :: !Text
, _ccItems :: !(Maybe [CustomChannel])
} deriving (Eq,Show,Data,Typeable,Generic)
customChannels
:: CustomChannels
customChannels =
CustomChannels'
{ _ccEtag = Nothing
, _ccNextPageToken = Nothing
, _ccKind = "adsensehost#customChannels"
, _ccItems = Nothing
}
ccEtag :: Lens' CustomChannels (Maybe Text)
ccEtag = lens _ccEtag (\ s a -> s{_ccEtag = a})
ccNextPageToken :: Lens' CustomChannels (Maybe Text)
ccNextPageToken
= lens _ccNextPageToken
(\ s a -> s{_ccNextPageToken = a})
ccKind :: Lens' CustomChannels Text
ccKind = lens _ccKind (\ s a -> s{_ccKind = a})
ccItems :: Lens' CustomChannels [CustomChannel]
ccItems
= lens _ccItems (\ s a -> s{_ccItems = a}) . _Default
. _Coerce
instance FromJSON CustomChannels where
parseJSON
= withObject "CustomChannels"
(\ o ->
CustomChannels' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "adsensehost#customChannels")
<*> (o .:? "items" .!= mempty))
instance ToJSON CustomChannels where
toJSON CustomChannels'{..}
= object
(catMaybes
[("etag" .=) <$> _ccEtag,
("nextPageToken" .=) <$> _ccNextPageToken,
Just ("kind" .= _ccKind), ("items" .=) <$> _ccItems])
data AdUnit = AdUnit'
{ _auuStatus :: !(Maybe Text)
, _auuMobileContentAdsSettings :: !(Maybe AdUnitMobileContentAdsSettings)
, _auuKind :: !Text
, _auuCustomStyle :: !(Maybe AdStyle)
, _auuName :: !(Maybe Text)
, _auuContentAdsSettings :: !(Maybe AdUnitContentAdsSettings)
, _auuCode :: !(Maybe Text)
, _auuId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
adUnit
:: AdUnit
adUnit =
AdUnit'
{ _auuStatus = Nothing
, _auuMobileContentAdsSettings = Nothing
, _auuKind = "adsensehost#adUnit"
, _auuCustomStyle = Nothing
, _auuName = Nothing
, _auuContentAdsSettings = Nothing
, _auuCode = Nothing
, _auuId = Nothing
}
auuStatus :: Lens' AdUnit (Maybe Text)
auuStatus
= lens _auuStatus (\ s a -> s{_auuStatus = a})
auuMobileContentAdsSettings :: Lens' AdUnit (Maybe AdUnitMobileContentAdsSettings)
auuMobileContentAdsSettings
= lens _auuMobileContentAdsSettings
(\ s a -> s{_auuMobileContentAdsSettings = a})
auuKind :: Lens' AdUnit Text
auuKind = lens _auuKind (\ s a -> s{_auuKind = a})
auuCustomStyle :: Lens' AdUnit (Maybe AdStyle)
auuCustomStyle
= lens _auuCustomStyle
(\ s a -> s{_auuCustomStyle = a})
auuName :: Lens' AdUnit (Maybe Text)
auuName = lens _auuName (\ s a -> s{_auuName = a})
auuContentAdsSettings :: Lens' AdUnit (Maybe AdUnitContentAdsSettings)
auuContentAdsSettings
= lens _auuContentAdsSettings
(\ s a -> s{_auuContentAdsSettings = a})
auuCode :: Lens' AdUnit (Maybe Text)
auuCode = lens _auuCode (\ s a -> s{_auuCode = a})
auuId :: Lens' AdUnit (Maybe Text)
auuId = lens _auuId (\ s a -> s{_auuId = a})
instance FromJSON AdUnit where
parseJSON
= withObject "AdUnit"
(\ o ->
AdUnit' <$>
(o .:? "status") <*>
(o .:? "mobileContentAdsSettings")
<*> (o .:? "kind" .!= "adsensehost#adUnit")
<*> (o .:? "customStyle")
<*> (o .:? "name")
<*> (o .:? "contentAdsSettings")
<*> (o .:? "code")
<*> (o .:? "id"))
instance ToJSON AdUnit where
toJSON AdUnit'{..}
= object
(catMaybes
[("status" .=) <$> _auuStatus,
("mobileContentAdsSettings" .=) <$>
_auuMobileContentAdsSettings,
Just ("kind" .= _auuKind),
("customStyle" .=) <$> _auuCustomStyle,
("name" .=) <$> _auuName,
("contentAdsSettings" .=) <$> _auuContentAdsSettings,
("code" .=) <$> _auuCode, ("id" .=) <$> _auuId])
data Report = Report'
{ _rKind :: !Text
, _rAverages :: !(Maybe [Text])
, _rWarnings :: !(Maybe [Text])
, _rRows :: !(Maybe [[Text]])
, _rTotals :: !(Maybe [Text])
, _rHeaders :: !(Maybe [ReportHeadersItem])
, _rTotalMatchedRows :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
report
:: Report
report =
Report'
{ _rKind = "adsensehost#report"
, _rAverages = Nothing
, _rWarnings = Nothing
, _rRows = Nothing
, _rTotals = Nothing
, _rHeaders = Nothing
, _rTotalMatchedRows = Nothing
}
rKind :: Lens' Report Text
rKind = lens _rKind (\ s a -> s{_rKind = a})
rAverages :: Lens' Report [Text]
rAverages
= lens _rAverages (\ s a -> s{_rAverages = a}) .
_Default
. _Coerce
rWarnings :: Lens' Report [Text]
rWarnings
= lens _rWarnings (\ s a -> s{_rWarnings = a}) .
_Default
. _Coerce
rRows :: Lens' Report [[Text]]
rRows
= lens _rRows (\ s a -> s{_rRows = a}) . _Default .
_Coerce
rTotals :: Lens' Report [Text]
rTotals
= lens _rTotals (\ s a -> s{_rTotals = a}) . _Default
. _Coerce
rHeaders :: Lens' Report [ReportHeadersItem]
rHeaders
= lens _rHeaders (\ s a -> s{_rHeaders = a}) .
_Default
. _Coerce
rTotalMatchedRows :: Lens' Report (Maybe Int64)
rTotalMatchedRows
= lens _rTotalMatchedRows
(\ s a -> s{_rTotalMatchedRows = a})
. mapping _Coerce
instance FromJSON Report where
parseJSON
= withObject "Report"
(\ o ->
Report' <$>
(o .:? "kind" .!= "adsensehost#report") <*>
(o .:? "averages" .!= mempty)
<*> (o .:? "warnings" .!= mempty)
<*> (o .:? "rows" .!= mempty)
<*> (o .:? "totals" .!= mempty)
<*> (o .:? "headers" .!= mempty)
<*> (o .:? "totalMatchedRows"))
instance ToJSON Report where
toJSON Report'{..}
= object
(catMaybes
[Just ("kind" .= _rKind),
("averages" .=) <$> _rAverages,
("warnings" .=) <$> _rWarnings,
("rows" .=) <$> _rRows, ("totals" .=) <$> _rTotals,
("headers" .=) <$> _rHeaders,
("totalMatchedRows" .=) <$> _rTotalMatchedRows])
data AdStyleFont = AdStyleFont'
{ _asfSize :: !(Maybe Text)
, _asfFamily :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
adStyleFont
:: AdStyleFont
adStyleFont =
AdStyleFont'
{ _asfSize = Nothing
, _asfFamily = Nothing
}
asfSize :: Lens' AdStyleFont (Maybe Text)
asfSize = lens _asfSize (\ s a -> s{_asfSize = a})
asfFamily :: Lens' AdStyleFont (Maybe Text)
asfFamily
= lens _asfFamily (\ s a -> s{_asfFamily = a})
instance FromJSON AdStyleFont where
parseJSON
= withObject "AdStyleFont"
(\ o ->
AdStyleFont' <$> (o .:? "size") <*> (o .:? "family"))
instance ToJSON AdStyleFont where
toJSON AdStyleFont'{..}
= object
(catMaybes
[("size" .=) <$> _asfSize,
("family" .=) <$> _asfFamily])
data Account = Account'
{ _accStatus :: !(Maybe Text)
, _accKind :: !Text
, _accName :: !(Maybe Text)
, _accId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
account
:: Account
account =
Account'
{ _accStatus = Nothing
, _accKind = "adsensehost#account"
, _accName = Nothing
, _accId = Nothing
}
accStatus :: Lens' Account (Maybe Text)
accStatus
= lens _accStatus (\ s a -> s{_accStatus = a})
accKind :: Lens' Account Text
accKind = lens _accKind (\ s a -> s{_accKind = a})
accName :: Lens' Account (Maybe Text)
accName = lens _accName (\ s a -> s{_accName = a})
accId :: Lens' Account (Maybe Text)
accId = lens _accId (\ s a -> s{_accId = a})
instance FromJSON Account where
parseJSON
= withObject "Account"
(\ o ->
Account' <$>
(o .:? "status") <*>
(o .:? "kind" .!= "adsensehost#account")
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON Account where
toJSON Account'{..}
= object
(catMaybes
[("status" .=) <$> _accStatus,
Just ("kind" .= _accKind), ("name" .=) <$> _accName,
("id" .=) <$> _accId])
data AdUnitMobileContentAdsSettings = AdUnitMobileContentAdsSettings'
{ _aumcasSize :: !(Maybe Text)
, _aumcasScriptingLanguage :: !(Maybe Text)
, _aumcasMarkupLanguage :: !(Maybe Text)
, _aumcasType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
adUnitMobileContentAdsSettings
:: AdUnitMobileContentAdsSettings
adUnitMobileContentAdsSettings =
AdUnitMobileContentAdsSettings'
{ _aumcasSize = Nothing
, _aumcasScriptingLanguage = Nothing
, _aumcasMarkupLanguage = Nothing
, _aumcasType = Nothing
}
aumcasSize :: Lens' AdUnitMobileContentAdsSettings (Maybe Text)
aumcasSize
= lens _aumcasSize (\ s a -> s{_aumcasSize = a})
aumcasScriptingLanguage :: Lens' AdUnitMobileContentAdsSettings (Maybe Text)
aumcasScriptingLanguage
= lens _aumcasScriptingLanguage
(\ s a -> s{_aumcasScriptingLanguage = a})
aumcasMarkupLanguage :: Lens' AdUnitMobileContentAdsSettings (Maybe Text)
aumcasMarkupLanguage
= lens _aumcasMarkupLanguage
(\ s a -> s{_aumcasMarkupLanguage = a})
aumcasType :: Lens' AdUnitMobileContentAdsSettings (Maybe Text)
aumcasType
= lens _aumcasType (\ s a -> s{_aumcasType = a})
instance FromJSON AdUnitMobileContentAdsSettings
where
parseJSON
= withObject "AdUnitMobileContentAdsSettings"
(\ o ->
AdUnitMobileContentAdsSettings' <$>
(o .:? "size") <*> (o .:? "scriptingLanguage") <*>
(o .:? "markupLanguage")
<*> (o .:? "type"))
instance ToJSON AdUnitMobileContentAdsSettings where
toJSON AdUnitMobileContentAdsSettings'{..}
= object
(catMaybes
[("size" .=) <$> _aumcasSize,
("scriptingLanguage" .=) <$>
_aumcasScriptingLanguage,
("markupLanguage" .=) <$> _aumcasMarkupLanguage,
("type" .=) <$> _aumcasType])
data AdStyleColors = AdStyleColors'
{ _ascText :: !(Maybe Text)
, _ascURL :: !(Maybe Text)
, _ascBOrder :: !(Maybe Text)
, _ascTitle :: !(Maybe Text)
, _ascBackgRound :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
adStyleColors
:: AdStyleColors
adStyleColors =
AdStyleColors'
{ _ascText = Nothing
, _ascURL = Nothing
, _ascBOrder = Nothing
, _ascTitle = Nothing
, _ascBackgRound = Nothing
}
ascText :: Lens' AdStyleColors (Maybe Text)
ascText = lens _ascText (\ s a -> s{_ascText = a})
ascURL :: Lens' AdStyleColors (Maybe Text)
ascURL = lens _ascURL (\ s a -> s{_ascURL = a})
ascBOrder :: Lens' AdStyleColors (Maybe Text)
ascBOrder
= lens _ascBOrder (\ s a -> s{_ascBOrder = a})
ascTitle :: Lens' AdStyleColors (Maybe Text)
ascTitle = lens _ascTitle (\ s a -> s{_ascTitle = a})
ascBackgRound :: Lens' AdStyleColors (Maybe Text)
ascBackgRound
= lens _ascBackgRound
(\ s a -> s{_ascBackgRound = a})
instance FromJSON AdStyleColors where
parseJSON
= withObject "AdStyleColors"
(\ o ->
AdStyleColors' <$>
(o .:? "text") <*> (o .:? "url") <*> (o .:? "border")
<*> (o .:? "title")
<*> (o .:? "background"))
instance ToJSON AdStyleColors where
toJSON AdStyleColors'{..}
= object
(catMaybes
[("text" .=) <$> _ascText, ("url" .=) <$> _ascURL,
("border" .=) <$> _ascBOrder,
("title" .=) <$> _ascTitle,
("background" .=) <$> _ascBackgRound])
data AdUnitContentAdsSettingsBackupOption = AdUnitContentAdsSettingsBackupOption'
{ _aucasboColor :: !(Maybe Text)
, _aucasboURL :: !(Maybe Text)
, _aucasboType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
adUnitContentAdsSettingsBackupOption
:: AdUnitContentAdsSettingsBackupOption
adUnitContentAdsSettingsBackupOption =
AdUnitContentAdsSettingsBackupOption'
{ _aucasboColor = Nothing
, _aucasboURL = Nothing
, _aucasboType = Nothing
}
aucasboColor :: Lens' AdUnitContentAdsSettingsBackupOption (Maybe Text)
aucasboColor
= lens _aucasboColor (\ s a -> s{_aucasboColor = a})
aucasboURL :: Lens' AdUnitContentAdsSettingsBackupOption (Maybe Text)
aucasboURL
= lens _aucasboURL (\ s a -> s{_aucasboURL = a})
aucasboType :: Lens' AdUnitContentAdsSettingsBackupOption (Maybe Text)
aucasboType
= lens _aucasboType (\ s a -> s{_aucasboType = a})
instance FromJSON
AdUnitContentAdsSettingsBackupOption where
parseJSON
= withObject "AdUnitContentAdsSettingsBackupOption"
(\ o ->
AdUnitContentAdsSettingsBackupOption' <$>
(o .:? "color") <*> (o .:? "url") <*> (o .:? "type"))
instance ToJSON AdUnitContentAdsSettingsBackupOption
where
toJSON AdUnitContentAdsSettingsBackupOption'{..}
= object
(catMaybes
[("color" .=) <$> _aucasboColor,
("url" .=) <$> _aucasboURL,
("type" .=) <$> _aucasboType])
data AdClient = AdClient'
{ _adKind :: !Text
, _adArcOptIn :: !(Maybe Bool)
, _adSupportsReporting :: !(Maybe Bool)
, _adId :: !(Maybe Text)
, _adProductCode :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
adClient
:: AdClient
adClient =
AdClient'
{ _adKind = "adsensehost#adClient"
, _adArcOptIn = Nothing
, _adSupportsReporting = Nothing
, _adId = Nothing
, _adProductCode = Nothing
}
adKind :: Lens' AdClient Text
adKind = lens _adKind (\ s a -> s{_adKind = a})
adArcOptIn :: Lens' AdClient (Maybe Bool)
adArcOptIn
= lens _adArcOptIn (\ s a -> s{_adArcOptIn = a})
adSupportsReporting :: Lens' AdClient (Maybe Bool)
adSupportsReporting
= lens _adSupportsReporting
(\ s a -> s{_adSupportsReporting = a})
adId :: Lens' AdClient (Maybe Text)
adId = lens _adId (\ s a -> s{_adId = a})
adProductCode :: Lens' AdClient (Maybe Text)
adProductCode
= lens _adProductCode
(\ s a -> s{_adProductCode = a})
instance FromJSON AdClient where
parseJSON
= withObject "AdClient"
(\ o ->
AdClient' <$>
(o .:? "kind" .!= "adsensehost#adClient") <*>
(o .:? "arcOptIn")
<*> (o .:? "supportsReporting")
<*> (o .:? "id")
<*> (o .:? "productCode"))
instance ToJSON AdClient where
toJSON AdClient'{..}
= object
(catMaybes
[Just ("kind" .= _adKind),
("arcOptIn" .=) <$> _adArcOptIn,
("supportsReporting" .=) <$> _adSupportsReporting,
("id" .=) <$> _adId,
("productCode" .=) <$> _adProductCode])
data ReportHeadersItem = ReportHeadersItem'
{ _rhiName :: !(Maybe Text)
, _rhiCurrency :: !(Maybe Text)
, _rhiType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
reportHeadersItem
:: ReportHeadersItem
reportHeadersItem =
ReportHeadersItem'
{ _rhiName = Nothing
, _rhiCurrency = Nothing
, _rhiType = Nothing
}
rhiName :: Lens' ReportHeadersItem (Maybe Text)
rhiName = lens _rhiName (\ s a -> s{_rhiName = a})
rhiCurrency :: Lens' ReportHeadersItem (Maybe Text)
rhiCurrency
= lens _rhiCurrency (\ s a -> s{_rhiCurrency = a})
rhiType :: Lens' ReportHeadersItem (Maybe Text)
rhiType = lens _rhiType (\ s a -> s{_rhiType = a})
instance FromJSON ReportHeadersItem where
parseJSON
= withObject "ReportHeadersItem"
(\ o ->
ReportHeadersItem' <$>
(o .:? "name") <*> (o .:? "currency") <*>
(o .:? "type"))
instance ToJSON ReportHeadersItem where
toJSON ReportHeadersItem'{..}
= object
(catMaybes
[("name" .=) <$> _rhiName,
("currency" .=) <$> _rhiCurrency,
("type" .=) <$> _rhiType])
data AdStyle = AdStyle'
{ _assCorners :: !(Maybe Text)
, _assKind :: !Text
, _assFont :: !(Maybe AdStyleFont)
, _assColors :: !(Maybe AdStyleColors)
} deriving (Eq,Show,Data,Typeable,Generic)
adStyle
:: AdStyle
adStyle =
AdStyle'
{ _assCorners = Nothing
, _assKind = "adsensehost#adStyle"
, _assFont = Nothing
, _assColors = Nothing
}
assCorners :: Lens' AdStyle (Maybe Text)
assCorners
= lens _assCorners (\ s a -> s{_assCorners = a})
assKind :: Lens' AdStyle Text
assKind = lens _assKind (\ s a -> s{_assKind = a})
assFont :: Lens' AdStyle (Maybe AdStyleFont)
assFont = lens _assFont (\ s a -> s{_assFont = a})
assColors :: Lens' AdStyle (Maybe AdStyleColors)
assColors
= lens _assColors (\ s a -> s{_assColors = a})
instance FromJSON AdStyle where
parseJSON
= withObject "AdStyle"
(\ o ->
AdStyle' <$>
(o .:? "corners") <*>
(o .:? "kind" .!= "adsensehost#adStyle")
<*> (o .:? "font")
<*> (o .:? "colors"))
instance ToJSON AdStyle where
toJSON AdStyle'{..}
= object
(catMaybes
[("corners" .=) <$> _assCorners,
Just ("kind" .= _assKind), ("font" .=) <$> _assFont,
("colors" .=) <$> _assColors])
data CustomChannel = CustomChannel'
{ _cKind :: !Text
, _cName :: !(Maybe Text)
, _cCode :: !(Maybe Text)
, _cId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customChannel
:: CustomChannel
customChannel =
CustomChannel'
{ _cKind = "adsensehost#customChannel"
, _cName = Nothing
, _cCode = Nothing
, _cId = Nothing
}
cKind :: Lens' CustomChannel Text
cKind = lens _cKind (\ s a -> s{_cKind = a})
cName :: Lens' CustomChannel (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cCode :: Lens' CustomChannel (Maybe Text)
cCode = lens _cCode (\ s a -> s{_cCode = a})
cId :: Lens' CustomChannel (Maybe Text)
cId = lens _cId (\ s a -> s{_cId = a})
instance FromJSON CustomChannel where
parseJSON
= withObject "CustomChannel"
(\ o ->
CustomChannel' <$>
(o .:? "kind" .!= "adsensehost#customChannel") <*>
(o .:? "name")
<*> (o .:? "code")
<*> (o .:? "id"))
instance ToJSON CustomChannel where
toJSON CustomChannel'{..}
= object
(catMaybes
[Just ("kind" .= _cKind), ("name" .=) <$> _cName,
("code" .=) <$> _cCode, ("id" .=) <$> _cId])
data URLChannel = URLChannel'
{ _urlcKind :: !Text
, _urlcId :: !(Maybe Text)
, _urlcURLPattern :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
urlChannel
:: URLChannel
urlChannel =
URLChannel'
{ _urlcKind = "adsensehost#urlChannel"
, _urlcId = Nothing
, _urlcURLPattern = Nothing
}
urlcKind :: Lens' URLChannel Text
urlcKind = lens _urlcKind (\ s a -> s{_urlcKind = a})
urlcId :: Lens' URLChannel (Maybe Text)
urlcId = lens _urlcId (\ s a -> s{_urlcId = a})
urlcURLPattern :: Lens' URLChannel (Maybe Text)
urlcURLPattern
= lens _urlcURLPattern
(\ s a -> s{_urlcURLPattern = a})
instance FromJSON URLChannel where
parseJSON
= withObject "URLChannel"
(\ o ->
URLChannel' <$>
(o .:? "kind" .!= "adsensehost#urlChannel") <*>
(o .:? "id")
<*> (o .:? "urlPattern"))
instance ToJSON URLChannel where
toJSON URLChannel'{..}
= object
(catMaybes
[Just ("kind" .= _urlcKind), ("id" .=) <$> _urlcId,
("urlPattern" .=) <$> _urlcURLPattern])
data AdCode = AdCode'
{ _aaKind :: !Text
, _aaAdCode :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
adCode
:: AdCode
adCode =
AdCode'
{ _aaKind = "adsensehost#adCode"
, _aaAdCode = Nothing
}
aaKind :: Lens' AdCode Text
aaKind = lens _aaKind (\ s a -> s{_aaKind = a})
aaAdCode :: Lens' AdCode (Maybe Text)
aaAdCode = lens _aaAdCode (\ s a -> s{_aaAdCode = a})
instance FromJSON AdCode where
parseJSON
= withObject "AdCode"
(\ o ->
AdCode' <$>
(o .:? "kind" .!= "adsensehost#adCode") <*>
(o .:? "adCode"))
instance ToJSON AdCode where
toJSON AdCode'{..}
= object
(catMaybes
[Just ("kind" .= _aaKind),
("adCode" .=) <$> _aaAdCode])
data AdUnitContentAdsSettings = AdUnitContentAdsSettings'
{ _aucasBackupOption :: !(Maybe AdUnitContentAdsSettingsBackupOption)
, _aucasSize :: !(Maybe Text)
, _aucasType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
adUnitContentAdsSettings
:: AdUnitContentAdsSettings
adUnitContentAdsSettings =
AdUnitContentAdsSettings'
{ _aucasBackupOption = Nothing
, _aucasSize = Nothing
, _aucasType = Nothing
}
aucasBackupOption :: Lens' AdUnitContentAdsSettings (Maybe AdUnitContentAdsSettingsBackupOption)
aucasBackupOption
= lens _aucasBackupOption
(\ s a -> s{_aucasBackupOption = a})
aucasSize :: Lens' AdUnitContentAdsSettings (Maybe Text)
aucasSize
= lens _aucasSize (\ s a -> s{_aucasSize = a})
aucasType :: Lens' AdUnitContentAdsSettings (Maybe Text)
aucasType
= lens _aucasType (\ s a -> s{_aucasType = a})
instance FromJSON AdUnitContentAdsSettings where
parseJSON
= withObject "AdUnitContentAdsSettings"
(\ o ->
AdUnitContentAdsSettings' <$>
(o .:? "backupOption") <*> (o .:? "size") <*>
(o .:? "type"))
instance ToJSON AdUnitContentAdsSettings where
toJSON AdUnitContentAdsSettings'{..}
= object
(catMaybes
[("backupOption" .=) <$> _aucasBackupOption,
("size" .=) <$> _aucasSize,
("type" .=) <$> _aucasType])