@@ -1,7791 +0,0 @@
1−{-# LANGUAGE DeriveDataTypeable #-}
2−{-# LANGUAGE DeriveGeneric #-}
3−{-# LANGUAGE OverloadedStrings #-}
4−{-# LANGUAGE RecordWildCards #-}
5−
6−{-# OPTIONS_GHC -fno-warn-unused-imports #-}
7−
8−-- |
9−-- Module : Network.Google.AdExchangeBuyer.Types.Product
10−-- Copyright : (c) 2015 Brendan Hay
11−-- License : Mozilla Public License, v. 2.0.
12−-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
13−-- Stability : auto-generated
14−-- Portability : non-portable (GHC extensions)
15−--
16−module Network.Google.AdExchangeBuyer.Types.Product where
17−
18−import Network.Google.AdExchangeBuyer.Types.Sum
19−import Network.Google.Prelude
20−
21−--
22−-- /See:/ 'getOrderDealsResponse' smart constructor.
23−newtype GetOrderDealsResponse = GetOrderDealsResponse
24− { _godrDeals :: Maybe [Maybe MarketplaceDeal]
25− } deriving (Eq,Read,Show,Data,Typeable,Generic)
26−
27−-- | Creates a value of 'GetOrderDealsResponse' with the minimum fields required to make a request.
28−--
29−-- Use one of the following lenses to modify other fields as desired:
30−--
31−-- * 'godrDeals'
32−getOrderDealsResponse
33− :: GetOrderDealsResponse
34−getOrderDealsResponse =
35− GetOrderDealsResponse
36− { _godrDeals = Nothing
37− }
38−
39−-- | List of deals for the order
40−godrDeals :: Lens' GetOrderDealsResponse [Maybe MarketplaceDeal]
41−godrDeals
42− = lens _godrDeals (\ s a -> s{_godrDeals = a}) .
43− _Default
44− . _Coerce
45−
46−instance FromJSON GetOrderDealsResponse where
47− parseJSON
48− = withObject "GetOrderDealsResponse"
49− (\ o ->
50− GetOrderDealsResponse <$> (o .:? "deals" .!= mempty))
51−
52−instance ToJSON GetOrderDealsResponse where
53− toJSON GetOrderDealsResponse{..}
54− = object (catMaybes [("deals" .=) <$> _godrDeals])
55−
56−--
57−-- /See:/ 'targetingValueCreativeSize' smart constructor.
58−data TargetingValueCreativeSize = TargetingValueCreativeSize
59− { _tvcsSize :: !(Maybe (Maybe TargetingValueSize))
60− , _tvcsCompanionSizes :: !(Maybe [Maybe TargetingValueSize])
61− , _tvcsCreativeSizeType :: !(Maybe Text)
62− } deriving (Eq,Read,Show,Data,Typeable,Generic)
63−
64−-- | Creates a value of 'TargetingValueCreativeSize' with the minimum fields required to make a request.
65−--
66−-- Use one of the following lenses to modify other fields as desired:
67−--
68−-- * 'tvcsSize'
69−--
70−-- * 'tvcsCompanionSizes'
71−--
72−-- * 'tvcsCreativeSizeType'
73−targetingValueCreativeSize
74− :: TargetingValueCreativeSize
75−targetingValueCreativeSize =
76− TargetingValueCreativeSize
77− { _tvcsSize = Nothing
78− , _tvcsCompanionSizes = Nothing
79− , _tvcsCreativeSizeType = Nothing
80− }
81−
82−-- | For regular creative size type, specifies the size of the creative.
83−tvcsSize :: Lens' TargetingValueCreativeSize (Maybe (Maybe TargetingValueSize))
84−tvcsSize = lens _tvcsSize (\ s a -> s{_tvcsSize = a})
85−
86−-- | For video size type, the list of companion sizes.
87−tvcsCompanionSizes :: Lens' TargetingValueCreativeSize [Maybe TargetingValueSize]
88−tvcsCompanionSizes
89− = lens _tvcsCompanionSizes
90− (\ s a -> s{_tvcsCompanionSizes = a})
91− . _Default
92− . _Coerce
93−
94−-- | The Creative size type.
95−tvcsCreativeSizeType :: Lens' TargetingValueCreativeSize (Maybe Text)
96−tvcsCreativeSizeType
97− = lens _tvcsCreativeSizeType
98− (\ s a -> s{_tvcsCreativeSizeType = a})
99−
100−instance FromJSON TargetingValueCreativeSize where
101− parseJSON
102− = withObject "TargetingValueCreativeSize"
103− (\ o ->
104− TargetingValueCreativeSize <$>
105− (o .:? "size") <*>
106− (o .:? "companionSizes" .!= mempty)
107− <*> (o .:? "creativeSizeType"))
108−
109−instance ToJSON TargetingValueCreativeSize where
110− toJSON TargetingValueCreativeSize{..}
111− = object
112− (catMaybes
113− [("size" .=) <$> _tvcsSize,
114− ("companionSizes" .=) <$> _tvcsCompanionSizes,
115− ("creativeSizeType" .=) <$> _tvcsCreativeSizeType])
116−
117−--
118−-- /See:/ 'negotiationDto' smart constructor.
119−data NegotiationDto = NegotiationDto
120− { _ndNegotiationState :: !(Maybe Text)
121− , _ndExternalDealId :: !(Maybe Int64)
122− , _ndStatus :: !(Maybe Text)
123− , _ndDealType :: !(Maybe Text)
124− , _ndNegotiationRounds :: !(Maybe [Maybe NegotiationRoundDto])
125− , _ndKind :: !Text
126− , _ndBilledBuyer :: !(Maybe (Maybe DealPartyDto))
127− , _ndBuyerEmailContacts :: !(Maybe [Text])
128− , _ndStats :: !(Maybe (Maybe StatsDto))
129− , _ndSeller :: !(Maybe (Maybe DealPartyDto))
130− , _ndLabelNames :: !(Maybe [Text])
131− , _ndOfferId :: !(Maybe Int64)
132− , _ndNegotiationId :: !(Maybe Int64)
133− , _ndSellerEmailContacts :: !(Maybe [Text])
134− , _ndBuyer :: !(Maybe (Maybe DealPartyDto))
135− } deriving (Eq,Read,Show,Data,Typeable,Generic)
136−
137−-- | Creates a value of 'NegotiationDto' with the minimum fields required to make a request.
138−--
139−-- Use one of the following lenses to modify other fields as desired:
140−--
141−-- * 'ndNegotiationState'
142−--
143−-- * 'ndExternalDealId'
144−--
145−-- * 'ndStatus'
146−--
147−-- * 'ndDealType'
148−--
149−-- * 'ndNegotiationRounds'
150−--
151−-- * 'ndKind'
152−--
153−-- * 'ndBilledBuyer'
154−--
155−-- * 'ndBuyerEmailContacts'
156−--
157−-- * 'ndStats'
158−--
159−-- * 'ndSeller'
160−--
161−-- * 'ndLabelNames'
162−--
163−-- * 'ndOfferId'
164−--
165−-- * 'ndNegotiationId'
166−--
167−-- * 'ndSellerEmailContacts'
168−--
169−-- * 'ndBuyer'
170−negotiationDto
171− :: NegotiationDto
172−negotiationDto =
173− NegotiationDto
174− { _ndNegotiationState = Nothing
175− , _ndExternalDealId = Nothing
176− , _ndStatus = Nothing
177− , _ndDealType = Nothing
178− , _ndNegotiationRounds = Nothing
179− , _ndKind = "adexchangebuyer#negotiation"
180− , _ndBilledBuyer = Nothing
181− , _ndBuyerEmailContacts = Nothing
182− , _ndStats = Nothing
183− , _ndSeller = Nothing
184− , _ndLabelNames = Nothing
185− , _ndOfferId = Nothing
186− , _ndNegotiationId = Nothing
187− , _ndSellerEmailContacts = Nothing
188− , _ndBuyer = Nothing
189− }
190−
191−-- | The state of this negotiation.
192−ndNegotiationState :: Lens' NegotiationDto (Maybe Text)
193−ndNegotiationState
194− = lens _ndNegotiationState
195− (\ s a -> s{_ndNegotiationState = a})
196−
197−-- | For finalized negotiations, the ID of the finalized deal.
198−ndExternalDealId :: Lens' NegotiationDto (Maybe Int64)
199−ndExternalDealId
200− = lens _ndExternalDealId
201− (\ s a -> s{_ndExternalDealId = a})
202−
203−-- | The status of this negotiation.
204−ndStatus :: Lens' NegotiationDto (Maybe Text)
205−ndStatus = lens _ndStatus (\ s a -> s{_ndStatus = a})
206−
207−-- | The type of this deal.
208−ndDealType :: Lens' NegotiationDto (Maybe Text)
209−ndDealType
210− = lens _ndDealType (\ s a -> s{_ndDealType = a})
211−
212−-- | The series of negotiation rounds for this negotiation.
213−ndNegotiationRounds :: Lens' NegotiationDto [Maybe NegotiationRoundDto]
214−ndNegotiationRounds
215− = lens _ndNegotiationRounds
216− (\ s a -> s{_ndNegotiationRounds = a})
217− . _Default
218− . _Coerce
219−
220−ndKind :: Lens' NegotiationDto Text
221−ndKind = lens _ndKind (\ s a -> s{_ndKind = a})
222−
223−-- | The billed buyer; Specified by a buyer buying through an intermediary.
224−ndBilledBuyer :: Lens' NegotiationDto (Maybe (Maybe DealPartyDto))
225−ndBilledBuyer
226− = lens _ndBilledBuyer
227− (\ s a -> s{_ndBilledBuyer = a})
228−
229−-- | The buyer party\'s contact email.
230−ndBuyerEmailContacts :: Lens' NegotiationDto [Text]
231−ndBuyerEmailContacts
232− = lens _ndBuyerEmailContacts
233− (\ s a -> s{_ndBuyerEmailContacts = a})
234− . _Default
235− . _Coerce
236−
237−-- | The stats for this negotiation.
238−ndStats :: Lens' NegotiationDto (Maybe (Maybe StatsDto))
239−ndStats = lens _ndStats (\ s a -> s{_ndStats = a})
240−
241−-- | Details of the seller party in this negotiation.
242−ndSeller :: Lens' NegotiationDto (Maybe (Maybe DealPartyDto))
243−ndSeller = lens _ndSeller (\ s a -> s{_ndSeller = a})
244−
245−-- | A list of label names applicable to this negotiation.
246−ndLabelNames :: Lens' NegotiationDto [Text]
247−ndLabelNames
248− = lens _ndLabelNames (\ s a -> s{_ndLabelNames = a})
249− . _Default
250− . _Coerce
251−
252−-- | The ID of this negotiation\'s original offer.
253−ndOfferId :: Lens' NegotiationDto (Maybe Int64)
254−ndOfferId
255− = lens _ndOfferId (\ s a -> s{_ndOfferId = a})
256−
257−-- | The unique ID of this negotiation.
258−ndNegotiationId :: Lens' NegotiationDto (Maybe Int64)
259−ndNegotiationId
260− = lens _ndNegotiationId
261− (\ s a -> s{_ndNegotiationId = a})
262−
263−-- | The seller party\'s contact email.
264−ndSellerEmailContacts :: Lens' NegotiationDto [Text]
265−ndSellerEmailContacts
266− = lens _ndSellerEmailContacts
267− (\ s a -> s{_ndSellerEmailContacts = a})
268− . _Default
269− . _Coerce
270−
271−-- | Details of the buyer party in this negotiation.
272−ndBuyer :: Lens' NegotiationDto (Maybe (Maybe DealPartyDto))
273−ndBuyer = lens _ndBuyer (\ s a -> s{_ndBuyer = a})
274−
275−instance FromJSON NegotiationDto where
276− parseJSON
277− = withObject "NegotiationDto"
278− (\ o ->
279− NegotiationDto <$>
280− (o .:? "negotiationState") <*>
281− (o .:? "externalDealId")
282− <*> (o .:? "status")
283− <*> (o .:? "dealType")
284− <*> (o .:? "negotiationRounds" .!= mempty)
285− <*> (o .:? "kind" .!= "adexchangebuyer#negotiation")
286− <*> (o .:? "billedBuyer")
287− <*> (o .:? "buyerEmailContacts" .!= mempty)
288− <*> (o .:? "stats")
289− <*> (o .:? "seller")
290− <*> (o .:? "labelNames" .!= mempty)
291− <*> (o .:? "offerId")
292− <*> (o .:? "negotiationId")
293− <*> (o .:? "sellerEmailContacts" .!= mempty)
294− <*> (o .:? "buyer"))
295−
296−instance ToJSON NegotiationDto where
297− toJSON NegotiationDto{..}
298− = object
299− (catMaybes
300− [("negotiationState" .=) <$> _ndNegotiationState,
301− ("externalDealId" .=) <$> _ndExternalDealId,
302− ("status" .=) <$> _ndStatus,
303− ("dealType" .=) <$> _ndDealType,
304− ("negotiationRounds" .=) <$> _ndNegotiationRounds,
305− Just ("kind" .= _ndKind),
306− ("billedBuyer" .=) <$> _ndBilledBuyer,
307− ("buyerEmailContacts" .=) <$> _ndBuyerEmailContacts,
308− ("stats" .=) <$> _ndStats,
309− ("seller" .=) <$> _ndSeller,
310− ("labelNames" .=) <$> _ndLabelNames,
311− ("offerId" .=) <$> _ndOfferId,
312− ("negotiationId" .=) <$> _ndNegotiationId,
313− ("sellerEmailContacts" .=) <$>
314− _ndSellerEmailContacts,
315− ("buyer" .=) <$> _ndBuyer])
316−
317−-- | The configuration data for an Ad Exchange performance report list.
318−-- https:\/\/sites.google.com\/a\/google.com\/adx-integration\/Home\/engineering\/binary-releases\/rtb-api-release
319−-- https:\/\/cs.corp.google.com\/#piper\/\/\/depot\/google3\/contentads\/adx\/tools\/rtb_api\/adxrtb.py
320−--
321−-- /See:/ 'performanceReportList' smart constructor.
322−data PerformanceReportList = PerformanceReportList
323− { _prlKind :: !Text
324− , _prlPerformanceReport :: !(Maybe [Maybe PerformanceReport])
325− } deriving (Eq,Read,Show,Data,Typeable,Generic)
326−
327−-- | Creates a value of 'PerformanceReportList' with the minimum fields required to make a request.
328−--
329−-- Use one of the following lenses to modify other fields as desired:
330−--
331−-- * 'prlKind'
332−--
333−-- * 'prlPerformanceReport'
334−performanceReportList
335− :: PerformanceReportList
336−performanceReportList =
337− PerformanceReportList
338− { _prlKind = "adexchangebuyer#performanceReportList"
339− , _prlPerformanceReport = Nothing
340− }
341−
342−-- | Resource type.
343−prlKind :: Lens' PerformanceReportList Text
344−prlKind = lens _prlKind (\ s a -> s{_prlKind = a})
345−
346−-- | A list of performance reports relevant for the account.
347−prlPerformanceReport :: Lens' PerformanceReportList [Maybe PerformanceReport]
348−prlPerformanceReport
349− = lens _prlPerformanceReport
350− (\ s a -> s{_prlPerformanceReport = a})
351− . _Default
352− . _Coerce
353−
354−instance FromJSON PerformanceReportList where
355− parseJSON
356− = withObject "PerformanceReportList"
357− (\ o ->
358− PerformanceReportList <$>
359− (o .:? "kind" .!=
360− "adexchangebuyer#performanceReportList")
361− <*> (o .:? "performanceReport" .!= mempty))
362−
363−instance ToJSON PerformanceReportList where
364− toJSON PerformanceReportList{..}
365− = object
366− (catMaybes
367− [Just ("kind" .= _prlKind),
368− ("performanceReport" .=) <$> _prlPerformanceReport])
369−
370−--
371−-- /See:/ 'pretargetingConfig' smart constructor.
372−data PretargetingConfig = PretargetingConfig
373− { _pcPlatforms :: !(Maybe [Text])
374− , _pcMobileCarriers :: !(Maybe [Int64])
375− , _pcVendorTypes :: !(Maybe [Int64])
376− , _pcExcludedGeoCriteriaIds :: !(Maybe [Int64])
377− , _pcSupportedCreativeAttributes :: !(Maybe [Int64])
378− , _pcUserLists :: !(Maybe [Int64])
379− , _pcKind :: !Text
380− , _pcExcludedPlacements :: !(Maybe [PretargetingConfigItemExcludedPlacements])
381− , _pcMobileDevices :: !(Maybe [Int64])
382− , _pcLanguages :: !(Maybe [Text])
383− , _pcVerticals :: !(Maybe [Int64])
384− , _pcConfigId :: !(Maybe Int64)
385− , _pcPlacements :: !(Maybe [PretargetingConfigItemPlacements])
386− , _pcExcludedUserLists :: !(Maybe [Int64])
387− , _pcConfigName :: !(Maybe Text)
388− , _pcGeoCriteriaIds :: !(Maybe [Int64])
389− , _pcDimensions :: !(Maybe [PretargetingConfigItemDimensions])
390− , _pcExcludedVerticals :: !(Maybe [Int64])
391− , _pcCreativeType :: !(Maybe [Text])
392− , _pcIsActive :: !(Maybe Bool)
393− , _pcExcludedContentLabels :: !(Maybe [Int64])
394− , _pcBillingId :: !(Maybe Int64)
395− , _pcMobileOperatingSystemVersions :: !(Maybe [Int64])
396− } deriving (Eq,Read,Show,Data,Typeable,Generic)
397−
398−-- | Creates a value of 'PretargetingConfig' with the minimum fields required to make a request.
399−--
400−-- Use one of the following lenses to modify other fields as desired:
401−--
402−-- * 'pcPlatforms'
403−--
404−-- * 'pcMobileCarriers'
405−--
406−-- * 'pcVendorTypes'
407−--
408−-- * 'pcExcludedGeoCriteriaIds'
409−--
410−-- * 'pcSupportedCreativeAttributes'
411−--
412−-- * 'pcUserLists'
413−--
414−-- * 'pcKind'
415−--
416−-- * 'pcExcludedPlacements'
417−--
418−-- * 'pcMobileDevices'
419−--
420−-- * 'pcLanguages'
421−--
422−-- * 'pcVerticals'
423−--
424−-- * 'pcConfigId'
425−--
426−-- * 'pcPlacements'
427−--
428−-- * 'pcExcludedUserLists'
429−--
430−-- * 'pcConfigName'
431−--
432−-- * 'pcGeoCriteriaIds'
433−--
434−-- * 'pcDimensions'
435−--
436−-- * 'pcExcludedVerticals'
437−--
438−-- * 'pcCreativeType'
439−--
440−-- * 'pcIsActive'
441−--
442−-- * 'pcExcludedContentLabels'
443−--
444−-- * 'pcBillingId'
445−--
446−-- * 'pcMobileOperatingSystemVersions'
447−pretargetingConfig
448− :: PretargetingConfig
449−pretargetingConfig =
450− PretargetingConfig
451− { _pcPlatforms = Nothing
452− , _pcMobileCarriers = Nothing
453− , _pcVendorTypes = Nothing
454− , _pcExcludedGeoCriteriaIds = Nothing
455− , _pcSupportedCreativeAttributes = Nothing
456− , _pcUserLists = Nothing
457− , _pcKind = "adexchangebuyer#pretargetingConfig"
458− , _pcExcludedPlacements = Nothing
459− , _pcMobileDevices = Nothing
460− , _pcLanguages = Nothing
461− , _pcVerticals = Nothing
462− , _pcConfigId = Nothing
463− , _pcPlacements = Nothing
464− , _pcExcludedUserLists = Nothing
465− , _pcConfigName = Nothing
466− , _pcGeoCriteriaIds = Nothing
467− , _pcDimensions = Nothing
468− , _pcExcludedVerticals = Nothing
469− , _pcCreativeType = Nothing
470− , _pcIsActive = Nothing
471− , _pcExcludedContentLabels = Nothing
472− , _pcBillingId = Nothing
473− , _pcMobileOperatingSystemVersions = Nothing
474− }
475−
476−-- | Requests matching any of these platforms will match. Possible values are
477−-- PRETARGETING_PLATFORM_MOBILE, PRETARGETING_PLATFORM_DESKTOP, and
478−-- PRETARGETING_PLATFORM_TABLET.
479−pcPlatforms :: Lens' PretargetingConfig [Text]
480−pcPlatforms
481− = lens _pcPlatforms (\ s a -> s{_pcPlatforms = a}) .
482− _Default
483− . _Coerce
484−
485−-- | Requests containing any of these mobile carrier ids will match. Values
486−-- are from mobile-carriers.csv in the downloadable files section.
487−pcMobileCarriers :: Lens' PretargetingConfig [Int64]
488−pcMobileCarriers
489− = lens _pcMobileCarriers
490− (\ s a -> s{_pcMobileCarriers = a})
491− . _Default
492− . _Coerce
493−
494−-- | Requests that allow any of these vendor ids will match. Values are from
495−-- vendors.txt in the downloadable files section.
496−pcVendorTypes :: Lens' PretargetingConfig [Int64]
497−pcVendorTypes
498− = lens _pcVendorTypes
499− (\ s a -> s{_pcVendorTypes = a})
500− . _Default
501− . _Coerce
502−
503−-- | Requests containing any of these geo criteria ids will not match.
504−pcExcludedGeoCriteriaIds :: Lens' PretargetingConfig [Int64]
505−pcExcludedGeoCriteriaIds
506− = lens _pcExcludedGeoCriteriaIds
507− (\ s a -> s{_pcExcludedGeoCriteriaIds = a})
508− . _Default
509− . _Coerce
510−
511−-- | Creative attributes should be declared here if all creatives
512−-- corresponding to this pretargeting configuration have that creative
513−-- attribute. Values are from pretargetable-creative-attributes.txt in the
514−-- downloadable files section.
515−pcSupportedCreativeAttributes :: Lens' PretargetingConfig [Int64]
516−pcSupportedCreativeAttributes
517− = lens _pcSupportedCreativeAttributes
518− (\ s a -> s{_pcSupportedCreativeAttributes = a})
519− . _Default
520− . _Coerce
521−
522−-- | Requests containing any of these user list ids will match.
523−pcUserLists :: Lens' PretargetingConfig [Int64]
524−pcUserLists
525− = lens _pcUserLists (\ s a -> s{_pcUserLists = a}) .
526− _Default
527− . _Coerce
528−
529−-- | The kind of the resource, i.e. \"adexchangebuyer#pretargetingConfig\".
530−pcKind :: Lens' PretargetingConfig Text
531−pcKind = lens _pcKind (\ s a -> s{_pcKind = a})
532−
533−-- | Requests containing any of these placements will not match.
534−pcExcludedPlacements :: Lens' PretargetingConfig [PretargetingConfigItemExcludedPlacements]
535−pcExcludedPlacements
536− = lens _pcExcludedPlacements
537− (\ s a -> s{_pcExcludedPlacements = a})
538− . _Default
539− . _Coerce
540−
541−-- | Requests containing any of these mobile device ids will match. Values
542−-- are from mobile-devices.csv in the downloadable files section.
543−pcMobileDevices :: Lens' PretargetingConfig [Int64]
544−pcMobileDevices
545− = lens _pcMobileDevices
546− (\ s a -> s{_pcMobileDevices = a})
547− . _Default
548− . _Coerce
549−
550−-- | Request containing any of these language codes will match.
551−pcLanguages :: Lens' PretargetingConfig [Text]
552−pcLanguages
553− = lens _pcLanguages (\ s a -> s{_pcLanguages = a}) .
554− _Default
555− . _Coerce
556−
557−-- | Requests containing any of these vertical ids will match.
558−pcVerticals :: Lens' PretargetingConfig [Int64]
559−pcVerticals
560− = lens _pcVerticals (\ s a -> s{_pcVerticals = a}) .
561− _Default
562− . _Coerce
563−
564−-- | The config id; generated automatically. Leave this field blank for
565−-- insert requests.
566−pcConfigId :: Lens' PretargetingConfig (Maybe Int64)
567−pcConfigId
568− = lens _pcConfigId (\ s a -> s{_pcConfigId = a})
569−
570−-- | Requests containing any of these placements will match.
571−pcPlacements :: Lens' PretargetingConfig [PretargetingConfigItemPlacements]
572−pcPlacements
573− = lens _pcPlacements (\ s a -> s{_pcPlacements = a})
574− . _Default
575− . _Coerce
576−
577−-- | Requests containing any of these users list ids will not match.
578−pcExcludedUserLists :: Lens' PretargetingConfig [Int64]
579−pcExcludedUserLists
580− = lens _pcExcludedUserLists
581− (\ s a -> s{_pcExcludedUserLists = a})
582− . _Default
583− . _Coerce
584−
585−-- | The name of the config. Must be unique. Required for all requests.
586−pcConfigName :: Lens' PretargetingConfig (Maybe Text)
587−pcConfigName
588− = lens _pcConfigName (\ s a -> s{_pcConfigName = a})
589−
590−-- | Requests containing any of these geo criteria ids will match.
591−pcGeoCriteriaIds :: Lens' PretargetingConfig [Int64]
592−pcGeoCriteriaIds
593− = lens _pcGeoCriteriaIds
594− (\ s a -> s{_pcGeoCriteriaIds = a})
595− . _Default
596− . _Coerce
597−
598−-- | Requests which allow one of these (width, height) pairs will match. All
599−-- pairs must be supported ad dimensions.
600−pcDimensions :: Lens' PretargetingConfig [PretargetingConfigItemDimensions]
601−pcDimensions
602− = lens _pcDimensions (\ s a -> s{_pcDimensions = a})
603− . _Default
604− . _Coerce
605−
606−-- | Requests containing any of these vertical ids will not match. Values are
607−-- from the publisher-verticals.txt file in the downloadable files section.
608−pcExcludedVerticals :: Lens' PretargetingConfig [Int64]
609−pcExcludedVerticals
610− = lens _pcExcludedVerticals
611− (\ s a -> s{_pcExcludedVerticals = a})
612− . _Default
613− . _Coerce
614−
615−-- | List must contain exactly one of PRETARGETING_CREATIVE_TYPE_HTML or
616−-- PRETARGETING_CREATIVE_TYPE_VIDEO.
617−pcCreativeType :: Lens' PretargetingConfig [Text]
618−pcCreativeType
619− = lens _pcCreativeType
620− (\ s a -> s{_pcCreativeType = a})
621− . _Default
622− . _Coerce
623−
624−-- | Whether this config is active. Required for all requests.
625−pcIsActive :: Lens' PretargetingConfig (Maybe Bool)
626−pcIsActive
627− = lens _pcIsActive (\ s a -> s{_pcIsActive = a})
628−
629−-- | Requests with any of these content labels will not match. Values are
630−-- from content-labels.txt in the downloadable files section.
631−pcExcludedContentLabels :: Lens' PretargetingConfig [Int64]
632−pcExcludedContentLabels
633− = lens _pcExcludedContentLabels
634− (\ s a -> s{_pcExcludedContentLabels = a})
635− . _Default
636− . _Coerce
637−
638−-- | The id for billing purposes, provided for reference. Leave this field
639−-- blank for insert requests; the id will be generated automatically.
640−pcBillingId :: Lens' PretargetingConfig (Maybe Int64)
641−pcBillingId
642− = lens _pcBillingId (\ s a -> s{_pcBillingId = a})
643−
644−-- | Requests containing any of these mobile operating system version ids
645−-- will match. Values are from mobile-os.csv in the downloadable files
646−-- section.
647−pcMobileOperatingSystemVersions :: Lens' PretargetingConfig [Int64]
648−pcMobileOperatingSystemVersions
649− = lens _pcMobileOperatingSystemVersions
650− (\ s a -> s{_pcMobileOperatingSystemVersions = a})
651− . _Default
652− . _Coerce
653−
654−instance FromJSON PretargetingConfig where
655− parseJSON
656− = withObject "PretargetingConfig"
657− (\ o ->
658− PretargetingConfig <$>
659− (o .:? "platforms" .!= mempty) <*>
660− (o .:? "mobileCarriers" .!= mempty)
661− <*> (o .:? "vendorTypes" .!= mempty)
662− <*> (o .:? "excludedGeoCriteriaIds" .!= mempty)
663− <*> (o .:? "supportedCreativeAttributes" .!= mempty)
664− <*> (o .:? "userLists" .!= mempty)
665− <*>
666− (o .:? "kind" .!=
667− "adexchangebuyer#pretargetingConfig")
668− <*> (o .:? "excludedPlacements" .!= mempty)
669− <*> (o .:? "mobileDevices" .!= mempty)
670− <*> (o .:? "languages" .!= mempty)
671− <*> (o .:? "verticals" .!= mempty)
672− <*> (o .:? "configId")
673− <*> (o .:? "placements" .!= mempty)
674− <*> (o .:? "excludedUserLists" .!= mempty)
675− <*> (o .:? "configName")
676− <*> (o .:? "geoCriteriaIds" .!= mempty)
677− <*> (o .:? "dimensions" .!= mempty)
678− <*> (o .:? "excludedVerticals" .!= mempty)
679− <*> (o .:? "creativeType" .!= mempty)
680− <*> (o .:? "isActive")
681− <*> (o .:? "excludedContentLabels" .!= mempty)
682− <*> (o .:? "billingId")
683− <*>
684− (o .:? "mobileOperatingSystemVersions" .!= mempty))
685−
686−instance ToJSON PretargetingConfig where
687− toJSON PretargetingConfig{..}
688− = object
689− (catMaybes
690− [("platforms" .=) <$> _pcPlatforms,
691− ("mobileCarriers" .=) <$> _pcMobileCarriers,
692− ("vendorTypes" .=) <$> _pcVendorTypes,
693− ("excludedGeoCriteriaIds" .=) <$>
694− _pcExcludedGeoCriteriaIds,
695− ("supportedCreativeAttributes" .=) <$>
696− _pcSupportedCreativeAttributes,
697− ("userLists" .=) <$> _pcUserLists,
698− Just ("kind" .= _pcKind),
699− ("excludedPlacements" .=) <$> _pcExcludedPlacements,
700− ("mobileDevices" .=) <$> _pcMobileDevices,
701− ("languages" .=) <$> _pcLanguages,
702− ("verticals" .=) <$> _pcVerticals,
703− ("configId" .=) <$> _pcConfigId,
704− ("placements" .=) <$> _pcPlacements,
705− ("excludedUserLists" .=) <$> _pcExcludedUserLists,
706− ("configName" .=) <$> _pcConfigName,
707− ("geoCriteriaIds" .=) <$> _pcGeoCriteriaIds,
708− ("dimensions" .=) <$> _pcDimensions,
709− ("excludedVerticals" .=) <$> _pcExcludedVerticals,
710− ("creativeType" .=) <$> _pcCreativeType,
711− ("isActive" .=) <$> _pcIsActive,
712− ("excludedContentLabels" .=) <$>
713− _pcExcludedContentLabels,
714− ("billingId" .=) <$> _pcBillingId,
715− ("mobileOperatingSystemVersions" .=) <$>
716− _pcMobileOperatingSystemVersions])
717−
718−--
719−-- /See:/ 'contactInformation' smart constructor.
720−data ContactInformation = ContactInformation
721− { _ciEmail :: !(Maybe Text)
722− , _ciName :: !(Maybe Text)
723− } deriving (Eq,Read,Show,Data,Typeable,Generic)
724−
725−-- | Creates a value of 'ContactInformation' with the minimum fields required to make a request.
726−--
727−-- Use one of the following lenses to modify other fields as desired:
728−--
729−-- * 'ciEmail'
730−--
731−-- * 'ciName'
732−contactInformation
733− :: ContactInformation
734−contactInformation =
735− ContactInformation
736− { _ciEmail = Nothing
737− , _ciName = Nothing
738− }
739−
740−-- | Email address of the contact.
741−ciEmail :: Lens' ContactInformation (Maybe Text)
742−ciEmail = lens _ciEmail (\ s a -> s{_ciEmail = a})
743−
744−-- | The name of the contact.
745−ciName :: Lens' ContactInformation (Maybe Text)
746−ciName = lens _ciName (\ s a -> s{_ciName = a})
747−
748−instance FromJSON ContactInformation where
749− parseJSON
750− = withObject "ContactInformation"
751− (\ o ->
752− ContactInformation <$>
753− (o .:? "email") <*> (o .:? "name"))
754−
755−instance ToJSON ContactInformation where
756− toJSON ContactInformation{..}
757− = object
758− (catMaybes
759− [("email" .=) <$> _ciEmail, ("name" .=) <$> _ciName])
760−
761−-- | The filtering reasons for the creative. Read-only. This field should not
762−-- be set in requests.
763−--
764−-- /See:/ 'creativeFilteringReasons' smart constructor.
765−data CreativeFilteringReasons = CreativeFilteringReasons
766− { _cfrReasons :: !(Maybe [CreativeItemReasonsFilteringReasons])
767− , _cfrDate :: !(Maybe Text)
768− } deriving (Eq,Read,Show,Data,Typeable,Generic)
769−
770−-- | Creates a value of 'CreativeFilteringReasons' with the minimum fields required to make a request.
771−--
772−-- Use one of the following lenses to modify other fields as desired:
773−--
774−-- * 'cfrReasons'
775−--
776−-- * 'cfrDate'
777−creativeFilteringReasons
778− :: CreativeFilteringReasons
779−creativeFilteringReasons =
780− CreativeFilteringReasons
781− { _cfrReasons = Nothing
782− , _cfrDate = Nothing
783− }
784−
785−-- | The filtering reasons.
786−cfrReasons :: Lens' CreativeFilteringReasons [CreativeItemReasonsFilteringReasons]
787−cfrReasons
788− = lens _cfrReasons (\ s a -> s{_cfrReasons = a}) .
789− _Default
790− . _Coerce
791−
792−-- | The date in ISO 8601 format for the data. The data is collected from
793−-- 00:00:00 to 23:59:59 in PST.
794−cfrDate :: Lens' CreativeFilteringReasons (Maybe Text)
795−cfrDate = lens _cfrDate (\ s a -> s{_cfrDate = a})
796−
797−instance FromJSON CreativeFilteringReasons where
798− parseJSON
799− = withObject "CreativeFilteringReasons"
800− (\ o ->
801− CreativeFilteringReasons <$>
802− (o .:? "reasons" .!= mempty) <*> (o .:? "date"))
803−
804−instance ToJSON CreativeFilteringReasons where
805− toJSON CreativeFilteringReasons{..}
806− = object
807− (catMaybes
808− [("reasons" .=) <$> _cfrReasons,
809− ("date" .=) <$> _cfrDate])
810−
811−-- | An offer is segment of inventory that a seller wishes to sell. It is
812−-- associated with certain terms and targeting information which helps
813−-- buyer know more about the inventory. Each field in an order can have one
814−-- of the following setting: (readonly) - It is an error to try and set
815−-- this field. (buyer-readonly) - Only the seller can set this field.
816−-- (seller-readonly) - Only the buyer can set this field. (updatable) - The
817−-- field is updatable at all times by either buyer or the seller.
818−--
819−-- /See:/ 'marketplaceOffer' smart constructor.
820−data MarketplaceOffer = MarketplaceOffer
821− { _moState :: !(Maybe Text)
822− , _moWebPropertyCode :: !(Maybe Text)
823− , _moCreationTimeMs :: !(Maybe Int64)
824− , _moTerms :: !(Maybe (Maybe DealTerms))
825− , _moLastUpdateTimeMs :: !(Maybe Int64)
826− , _moKind :: !Text
827− , _moRevisionNumber :: !(Maybe Int64)
828− , _moHasCreatorSignedOff :: !(Maybe Bool)
829− , _moFlightStartTimeMs :: !(Maybe Int64)
830− , _moSharedTargetings :: !(Maybe [Maybe SharedTargeting])
831− , _moSeller :: !(Maybe (Maybe Seller))
832− , _moSyndicationProduct :: !(Maybe Text)
833− , _moFlightEndTimeMs :: !(Maybe Int64)
834− , _moName :: !(Maybe Text)
835− , _moCreatorContacts :: !(Maybe [Maybe ContactInformation])
836− , _moOfferId :: !(Maybe Text)
837− , _moLabels :: !(Maybe [Maybe MarketplaceLabel])
838− } deriving (Eq,Read,Show,Data,Typeable,Generic)
839−
840−-- | Creates a value of 'MarketplaceOffer' with the minimum fields required to make a request.
841−--
842−-- Use one of the following lenses to modify other fields as desired:
843−--
844−-- * 'moState'
845−--
846−-- * 'moWebPropertyCode'
847−--
848−-- * 'moCreationTimeMs'
849−--
850−-- * 'moTerms'
851−--
852−-- * 'moLastUpdateTimeMs'
853−--
854−-- * 'moKind'
855−--
856−-- * 'moRevisionNumber'
857−--
858−-- * 'moHasCreatorSignedOff'
859−--
860−-- * 'moFlightStartTimeMs'
861−--
862−-- * 'moSharedTargetings'
863−--
864−-- * 'moSeller'
865−--
866−-- * 'moSyndicationProduct'
867−--
868−-- * 'moFlightEndTimeMs'
869−--
870−-- * 'moName'
871−--
872−-- * 'moCreatorContacts'
873−--
874−-- * 'moOfferId'
875−--
876−-- * 'moLabels'
877−marketplaceOffer
878− :: MarketplaceOffer
879−marketplaceOffer =
880− MarketplaceOffer
881− { _moState = Nothing
882− , _moWebPropertyCode = Nothing
883− , _moCreationTimeMs = Nothing
884− , _moTerms = Nothing
885− , _moLastUpdateTimeMs = Nothing
886− , _moKind = "adexchangebuyer#marketplaceOffer"
887− , _moRevisionNumber = Nothing
888− , _moHasCreatorSignedOff = Nothing
889− , _moFlightStartTimeMs = Nothing
890− , _moSharedTargetings = Nothing
891− , _moSeller = Nothing
892− , _moSyndicationProduct = Nothing
893− , _moFlightEndTimeMs = Nothing
894− , _moName = Nothing
895− , _moCreatorContacts = Nothing
896− , _moOfferId = Nothing
897− , _moLabels = Nothing
898− }
899−
900−-- | The state of the offer. (buyer-readonly)
901−moState :: Lens' MarketplaceOffer (Maybe Text)
902−moState = lens _moState (\ s a -> s{_moState = a})
903−
904−moWebPropertyCode :: Lens' MarketplaceOffer (Maybe Text)
905−moWebPropertyCode
906− = lens _moWebPropertyCode
907− (\ s a -> s{_moWebPropertyCode = a})
908−
909−-- | Creation time in ms. since epoch (readonly)
910−moCreationTimeMs :: Lens' MarketplaceOffer (Maybe Int64)
911−moCreationTimeMs
912− = lens _moCreationTimeMs
913− (\ s a -> s{_moCreationTimeMs = a})
914−
915−-- | The negotiable terms of the deal (buyer-readonly)
916−moTerms :: Lens' MarketplaceOffer (Maybe (Maybe DealTerms))
917−moTerms = lens _moTerms (\ s a -> s{_moTerms = a})
918−
919−-- | Time of last update in ms. since epoch (readonly)
920−moLastUpdateTimeMs :: Lens' MarketplaceOffer (Maybe Int64)
921−moLastUpdateTimeMs
922− = lens _moLastUpdateTimeMs
923− (\ s a -> s{_moLastUpdateTimeMs = a})
924−
925−-- | Identifies what kind of resource this is. Value: the fixed string
926−-- \"adexchangebuyer#marketplaceOffer\".
927−moKind :: Lens' MarketplaceOffer Text
928−moKind = lens _moKind (\ s a -> s{_moKind = a})
929−
930−-- | The revision number of the offer. (readonly)
931−moRevisionNumber :: Lens' MarketplaceOffer (Maybe Int64)
932−moRevisionNumber
933− = lens _moRevisionNumber
934− (\ s a -> s{_moRevisionNumber = a})
935−
936−-- | If the creator has already signed off on the offer, then the buyer can
937−-- finalize the deal by accepting the offer as is. When copying to an
938−-- order, if any of the terms are changed, then auto_finalize is
939−-- automatically set to false.
940−moHasCreatorSignedOff :: Lens' MarketplaceOffer (Maybe Bool)
941−moHasCreatorSignedOff
942− = lens _moHasCreatorSignedOff
943− (\ s a -> s{_moHasCreatorSignedOff = a})
944−
945−-- | Inventory availability dates. (times are in ms since epoch) The
946−-- granularity is generally in the order of seconds. (buyer-readonly)
947−moFlightStartTimeMs :: Lens' MarketplaceOffer (Maybe Int64)
948−moFlightStartTimeMs
949− = lens _moFlightStartTimeMs
950− (\ s a -> s{_moFlightStartTimeMs = a})
951−
952−-- | Targeting that is shared between the buyer and the seller. Each
953−-- targeting criteria has a specified key and for each key there is a list
954−-- of inclusion value or exclusion values. (buyer-readonly)
955−moSharedTargetings :: Lens' MarketplaceOffer [Maybe SharedTargeting]
956−moSharedTargetings
957− = lens _moSharedTargetings
958− (\ s a -> s{_moSharedTargetings = a})
959− . _Default
960− . _Coerce
961−
962−-- | Information about the seller that created this offer (readonly, except
963−-- on create)
964−moSeller :: Lens' MarketplaceOffer (Maybe (Maybe Seller))
965−moSeller = lens _moSeller (\ s a -> s{_moSeller = a})
966−
967−-- | The syndication product associated with the deal. (readonly, except on
968−-- create)
969−moSyndicationProduct :: Lens' MarketplaceOffer (Maybe Text)
970−moSyndicationProduct
971− = lens _moSyndicationProduct
972− (\ s a -> s{_moSyndicationProduct = a})
973−
974−-- | The proposed end time for the deal (ms since epoch) (buyer-readonly)
975−moFlightEndTimeMs :: Lens' MarketplaceOffer (Maybe Int64)
976−moFlightEndTimeMs
977− = lens _moFlightEndTimeMs
978− (\ s a -> s{_moFlightEndTimeMs = a})
979−
980−-- | The name for this offer as set by the seller. (buyer-readonly)
981−moName :: Lens' MarketplaceOffer (Maybe Text)
982−moName = lens _moName (\ s a -> s{_moName = a})
983−
984−-- | Optional contact information for the creator of this offer.
985−-- (buyer-readonly)
986−moCreatorContacts :: Lens' MarketplaceOffer [Maybe ContactInformation]
987−moCreatorContacts
988− = lens _moCreatorContacts
989− (\ s a -> s{_moCreatorContacts = a})
990− . _Default
991− . _Coerce
992−
993−-- | The unique id for the offer (readonly)
994−moOfferId :: Lens' MarketplaceOffer (Maybe Text)
995−moOfferId
996− = lens _moOfferId (\ s a -> s{_moOfferId = a})
997−
998−-- | Optional List of labels for the offer (optional, buyer-readonly).
999−moLabels :: Lens' MarketplaceOffer [Maybe MarketplaceLabel]
1000−moLabels
1001− = lens _moLabels (\ s a -> s{_moLabels = a}) .
1002− _Default
1003− . _Coerce
1004−
1005−instance FromJSON MarketplaceOffer where
1006− parseJSON
1007− = withObject "MarketplaceOffer"
1008− (\ o ->
1009− MarketplaceOffer <$>
1010− (o .:? "state") <*> (o .:? "webPropertyCode") <*>
1011− (o .:? "creationTimeMs")
1012− <*> (o .:? "terms")
1013− <*> (o .:? "lastUpdateTimeMs")
1014− <*>
1015− (o .:? "kind" .!= "adexchangebuyer#marketplaceOffer")
1016− <*> (o .:? "revisionNumber")
1017− <*> (o .:? "hasCreatorSignedOff")
1018− <*> (o .:? "flightStartTimeMs")
1019− <*> (o .:? "sharedTargetings" .!= mempty)
1020− <*> (o .:? "seller")
1021− <*> (o .:? "syndicationProduct")
1022− <*> (o .:? "flightEndTimeMs")
1023− <*> (o .:? "name")
1024− <*> (o .:? "creatorContacts" .!= mempty)
1025− <*> (o .:? "offerId")
1026− <*> (o .:? "labels" .!= mempty))
1027−
1028−instance ToJSON MarketplaceOffer where
1029− toJSON MarketplaceOffer{..}
1030− = object
1031− (catMaybes
1032− [("state" .=) <$> _moState,
1033− ("webPropertyCode" .=) <$> _moWebPropertyCode,
1034− ("creationTimeMs" .=) <$> _moCreationTimeMs,
1035− ("terms" .=) <$> _moTerms,
1036− ("lastUpdateTimeMs" .=) <$> _moLastUpdateTimeMs,
1037− Just ("kind" .= _moKind),
1038− ("revisionNumber" .=) <$> _moRevisionNumber,
1039− ("hasCreatorSignedOff" .=) <$>
1040− _moHasCreatorSignedOff,
1041− ("flightStartTimeMs" .=) <$> _moFlightStartTimeMs,
1042− ("sharedTargetings" .=) <$> _moSharedTargetings,
1043− ("seller" .=) <$> _moSeller,
1044− ("syndicationProduct" .=) <$> _moSyndicationProduct,
1045− ("flightEndTimeMs" .=) <$> _moFlightEndTimeMs,
1046− ("name" .=) <$> _moName,
1047− ("creatorContacts" .=) <$> _moCreatorContacts,
1048− ("offerId" .=) <$> _moOfferId,
1049− ("labels" .=) <$> _moLabels])
1050−
1051−-- | A smaller image, for the advertiser logo.
1052−--
1053−-- /See:/ 'creativeLogoNativeAd' smart constructor.
1054−data CreativeLogoNativeAd = CreativeLogoNativeAd
1055− { _clnaHeight :: !(Maybe Int32)
1056− , _clnaUrl :: !(Maybe Text)
1057− , _clnaWidth :: !(Maybe Int32)
1058− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1059−
1060−-- | Creates a value of 'CreativeLogoNativeAd' with the minimum fields required to make a request.
1061−--
1062−-- Use one of the following lenses to modify other fields as desired:
1063−--
1064−-- * 'clnaHeight'
1065−--
1066−-- * 'clnaUrl'
1067−--
1068−-- * 'clnaWidth'
1069−creativeLogoNativeAd
1070− :: CreativeLogoNativeAd
1071−creativeLogoNativeAd =
1072− CreativeLogoNativeAd
1073− { _clnaHeight = Nothing
1074− , _clnaUrl = Nothing
1075− , _clnaWidth = Nothing
1076− }
1077−
1078−clnaHeight :: Lens' CreativeLogoNativeAd (Maybe Int32)
1079−clnaHeight
1080− = lens _clnaHeight (\ s a -> s{_clnaHeight = a})
1081−
1082−clnaUrl :: Lens' CreativeLogoNativeAd (Maybe Text)
1083−clnaUrl = lens _clnaUrl (\ s a -> s{_clnaUrl = a})
1084−
1085−clnaWidth :: Lens' CreativeLogoNativeAd (Maybe Int32)
1086−clnaWidth
1087− = lens _clnaWidth (\ s a -> s{_clnaWidth = a})
1088−
1089−instance FromJSON CreativeLogoNativeAd where
1090− parseJSON
1091− = withObject "CreativeLogoNativeAd"
1092− (\ o ->
1093− CreativeLogoNativeAd <$>
1094− (o .:? "height") <*> (o .:? "url") <*>
1095− (o .:? "width"))
1096−
1097−instance ToJSON CreativeLogoNativeAd where
1098− toJSON CreativeLogoNativeAd{..}
1099− = object
1100− (catMaybes
1101− [("height" .=) <$> _clnaHeight,
1102− ("url" .=) <$> _clnaUrl,
1103− ("width" .=) <$> _clnaWidth])
1104−
1105−--
1106−-- /See:/ 'audienceSegment' smart constructor.
1107−data AudienceSegment = AudienceSegment
1108− { _asNumCookies :: !(Maybe Int64)
1109− , _asName :: !(Maybe Text)
1110− , _asId :: !(Maybe Int64)
1111− , _asDescription :: !(Maybe Text)
1112− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1113−
1114−-- | Creates a value of 'AudienceSegment' with the minimum fields required to make a request.
1115−--
1116−-- Use one of the following lenses to modify other fields as desired:
1117−--
1118−-- * 'asNumCookies'
1119−--
1120−-- * 'asName'
1121−--
1122−-- * 'asId'
1123−--
1124−-- * 'asDescription'
1125−audienceSegment
1126− :: AudienceSegment
1127−audienceSegment =
1128− AudienceSegment
1129− { _asNumCookies = Nothing
1130− , _asName = Nothing
1131− , _asId = Nothing
1132− , _asDescription = Nothing
1133− }
1134−
1135−asNumCookies :: Lens' AudienceSegment (Maybe Int64)
1136−asNumCookies
1137− = lens _asNumCookies (\ s a -> s{_asNumCookies = a})
1138−
1139−asName :: Lens' AudienceSegment (Maybe Text)
1140−asName = lens _asName (\ s a -> s{_asName = a})
1141−
1142−asId :: Lens' AudienceSegment (Maybe Int64)
1143−asId = lens _asId (\ s a -> s{_asId = a})
1144−
1145−asDescription :: Lens' AudienceSegment (Maybe Text)
1146−asDescription
1147− = lens _asDescription
1148− (\ s a -> s{_asDescription = a})
1149−
1150−instance FromJSON AudienceSegment where
1151− parseJSON
1152− = withObject "AudienceSegment"
1153− (\ o ->
1154− AudienceSegment <$>
1155− (o .:? "numCookies") <*> (o .:? "name") <*>
1156− (o .:? "id")
1157− <*> (o .:? "description"))
1158−
1159−instance ToJSON AudienceSegment where
1160− toJSON AudienceSegment{..}
1161− = object
1162− (catMaybes
1163− [("numCookies" .=) <$> _asNumCookies,
1164− ("name" .=) <$> _asName, ("id" .=) <$> _asId,
1165− ("description" .=) <$> _asDescription])
1166−
1167−-- | A billing info feed lists Billing Info the Ad Exchange buyer account has
1168−-- access to. Each entry in the feed corresponds to a single billing info.
1169−--
1170−-- /See:/ 'billingInfoList' smart constructor.
1171−data BillingInfoList = BillingInfoList
1172− { _bilKind :: !Text
1173− , _bilItems :: !(Maybe [Maybe BillingInfo])
1174− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1175−
1176−-- | Creates a value of 'BillingInfoList' with the minimum fields required to make a request.
1177−--
1178−-- Use one of the following lenses to modify other fields as desired:
1179−--
1180−-- * 'bilKind'
1181−--
1182−-- * 'bilItems'
1183−billingInfoList
1184− :: BillingInfoList
1185−billingInfoList =
1186− BillingInfoList
1187− { _bilKind = "adexchangebuyer#billingInfoList"
1188− , _bilItems = Nothing
1189− }
1190−
1191−-- | Resource type.
1192−bilKind :: Lens' BillingInfoList Text
1193−bilKind = lens _bilKind (\ s a -> s{_bilKind = a})
1194−
1195−-- | A list of billing info relevant for your account.
1196−bilItems :: Lens' BillingInfoList [Maybe BillingInfo]
1197−bilItems
1198− = lens _bilItems (\ s a -> s{_bilItems = a}) .
1199− _Default
1200− . _Coerce
1201−
1202−instance FromJSON BillingInfoList where
1203− parseJSON
1204− = withObject "BillingInfoList"
1205− (\ o ->
1206− BillingInfoList <$>
1207− (o .:? "kind" .!= "adexchangebuyer#billingInfoList")
1208− <*> (o .:? "items" .!= mempty))
1209−
1210−instance ToJSON BillingInfoList where
1211− toJSON BillingInfoList{..}
1212− = object
1213− (catMaybes
1214− [Just ("kind" .= _bilKind),
1215− ("items" .=) <$> _bilItems])
1216−
1217−--
1218−-- /See:/ 'offerDto' smart constructor.
1219−data OfferDto = OfferDto
1220− { _odCreator :: !(Maybe (Maybe DealPartyDto))
1221− , _odStatus :: !(Maybe Text)
1222− , _odOfferState :: !(Maybe Text)
1223− , _odPointOfContact :: !(Maybe Text)
1224− , _odTerms :: !(Maybe (Maybe TermsDto))
1225− , _odKind :: !Text
1226− , _odBilledBuyer :: !(Maybe (Maybe DealPartyDto))
1227− , _odOpenToDealParties :: !(Maybe [Maybe DealPartyDto])
1228− , _odEmailContacts :: !(Maybe [Text])
1229− , _odLabelNames :: !(Maybe [Text])
1230− , _odOfferId :: !(Maybe Int64)
1231− , _odClosedToDealParties :: !(Maybe [Maybe DealPartyDto])
1232− , _odAnonymous :: !(Maybe Bool)
1233− , _odIsOpen :: !(Maybe Bool)
1234− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1235−
1236−-- | Creates a value of 'OfferDto' with the minimum fields required to make a request.
1237−--
1238−-- Use one of the following lenses to modify other fields as desired:
1239−--
1240−-- * 'odCreator'
1241−--
1242−-- * 'odStatus'
1243−--
1244−-- * 'odOfferState'
1245−--
1246−-- * 'odPointOfContact'
1247−--
1248−-- * 'odTerms'
1249−--
1250−-- * 'odKind'
1251−--
1252−-- * 'odBilledBuyer'
1253−--
1254−-- * 'odOpenToDealParties'
1255−--
1256−-- * 'odEmailContacts'
1257−--
1258−-- * 'odLabelNames'
1259−--
1260−-- * 'odOfferId'
1261−--
1262−-- * 'odClosedToDealParties'
1263−--
1264−-- * 'odAnonymous'
1265−--
1266−-- * 'odIsOpen'
1267−offerDto
1268− :: OfferDto
1269−offerDto =
1270− OfferDto
1271− { _odCreator = Nothing
1272− , _odStatus = Nothing
1273− , _odOfferState = Nothing
1274− , _odPointOfContact = Nothing
1275− , _odTerms = Nothing
1276− , _odKind = "adexchangebuyer#offer"
1277− , _odBilledBuyer = Nothing
1278− , _odOpenToDealParties = Nothing
1279− , _odEmailContacts = Nothing
1280− , _odLabelNames = Nothing
1281− , _odOfferId = Nothing
1282− , _odClosedToDealParties = Nothing
1283− , _odAnonymous = Nothing
1284− , _odIsOpen = Nothing
1285− }
1286−
1287−-- | The creator of this offer.
1288−odCreator :: Lens' OfferDto (Maybe (Maybe DealPartyDto))
1289−odCreator
1290− = lens _odCreator (\ s a -> s{_odCreator = a})
1291−
1292−-- | The status of this offer.
1293−odStatus :: Lens' OfferDto (Maybe Text)
1294−odStatus = lens _odStatus (\ s a -> s{_odStatus = a})
1295−
1296−-- | The state of this offer.
1297−odOfferState :: Lens' OfferDto (Maybe Text)
1298−odOfferState
1299− = lens _odOfferState (\ s a -> s{_odOfferState = a})
1300−
1301−-- | The point of contact for this offer.
1302−odPointOfContact :: Lens' OfferDto (Maybe Text)
1303−odPointOfContact
1304− = lens _odPointOfContact
1305− (\ s a -> s{_odPointOfContact = a})
1306−
1307−-- | The terms of this offer.
1308−odTerms :: Lens' OfferDto (Maybe (Maybe TermsDto))
1309−odTerms = lens _odTerms (\ s a -> s{_odTerms = a})
1310−
1311−odKind :: Lens' OfferDto Text
1312−odKind = lens _odKind (\ s a -> s{_odKind = a})
1313−
1314−-- | The billed buyer; For buyer initiated offers, buying through an
1315−-- intermediary.
1316−odBilledBuyer :: Lens' OfferDto (Maybe (Maybe DealPartyDto))
1317−odBilledBuyer
1318− = lens _odBilledBuyer
1319− (\ s a -> s{_odBilledBuyer = a})
1320−
1321−-- | The list of buyer or seller parties this offer is open to.
1322−odOpenToDealParties :: Lens' OfferDto [Maybe DealPartyDto]
1323−odOpenToDealParties
1324− = lens _odOpenToDealParties
1325− (\ s a -> s{_odOpenToDealParties = a})
1326− . _Default
1327− . _Coerce
1328−
1329−-- | The list of email contacts for this offer.
1330−odEmailContacts :: Lens' OfferDto [Text]
1331−odEmailContacts
1332− = lens _odEmailContacts
1333− (\ s a -> s{_odEmailContacts = a})
1334− . _Default
1335− . _Coerce
1336−
1337−-- | The list of label names applicable to this offer.
1338−odLabelNames :: Lens' OfferDto [Text]
1339−odLabelNames
1340− = lens _odLabelNames (\ s a -> s{_odLabelNames = a})
1341− . _Default
1342− . _Coerce
1343−
1344−-- | The unique ID of this offer.
1345−odOfferId :: Lens' OfferDto (Maybe Int64)
1346−odOfferId
1347− = lens _odOfferId (\ s a -> s{_odOfferId = a})
1348−
1349−-- | The list of buyer or seller parties this offer is closed to.
1350−odClosedToDealParties :: Lens' OfferDto [Maybe DealPartyDto]
1351−odClosedToDealParties
1352− = lens _odClosedToDealParties
1353− (\ s a -> s{_odClosedToDealParties = a})
1354− . _Default
1355− . _Coerce
1356−
1357−-- | Whether this offer is anonymous.
1358−odAnonymous :: Lens' OfferDto (Maybe Bool)
1359−odAnonymous
1360− = lens _odAnonymous (\ s a -> s{_odAnonymous = a})
1361−
1362−-- | Whether this offer is open.
1363−odIsOpen :: Lens' OfferDto (Maybe Bool)
1364−odIsOpen = lens _odIsOpen (\ s a -> s{_odIsOpen = a})
1365−
1366−instance FromJSON OfferDto where
1367− parseJSON
1368− = withObject "OfferDto"
1369− (\ o ->
1370− OfferDto <$>
1371− (o .:? "creator") <*> (o .:? "status") <*>
1372− (o .:? "offerState")
1373− <*> (o .:? "pointOfContact")
1374− <*> (o .:? "terms")
1375− <*> (o .:? "kind" .!= "adexchangebuyer#offer")
1376− <*> (o .:? "billedBuyer")
1377− <*> (o .:? "openToDealParties" .!= mempty)
1378− <*> (o .:? "emailContacts" .!= mempty)
1379− <*> (o .:? "labelNames" .!= mempty)
1380− <*> (o .:? "offerId")
1381− <*> (o .:? "closedToDealParties" .!= mempty)
1382− <*> (o .:? "anonymous")
1383− <*> (o .:? "isOpen"))
1384−
1385−instance ToJSON OfferDto where
1386− toJSON OfferDto{..}
1387− = object
1388− (catMaybes
1389− [("creator" .=) <$> _odCreator,
1390− ("status" .=) <$> _odStatus,
1391− ("offerState" .=) <$> _odOfferState,
1392− ("pointOfContact" .=) <$> _odPointOfContact,
1393− ("terms" .=) <$> _odTerms, Just ("kind" .= _odKind),
1394− ("billedBuyer" .=) <$> _odBilledBuyer,
1395− ("openToDealParties" .=) <$> _odOpenToDealParties,
1396− ("emailContacts" .=) <$> _odEmailContacts,
1397− ("labelNames" .=) <$> _odLabelNames,
1398− ("offerId" .=) <$> _odOfferId,
1399− ("closedToDealParties" .=) <$>
1400− _odClosedToDealParties,
1401− ("anonymous" .=) <$> _odAnonymous,
1402− ("isOpen" .=) <$> _odIsOpen])
1403−
1404−--
1405−-- /See:/ 'moneyDto' smart constructor.
1406−data MoneyDto = MoneyDto
1407− { _mdCurrencyCode :: !(Maybe Text)
1408− , _mdMicros :: !(Maybe Int64)
1409− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1410−
1411−-- | Creates a value of 'MoneyDto' with the minimum fields required to make a request.
1412−--
1413−-- Use one of the following lenses to modify other fields as desired:
1414−--
1415−-- * 'mdCurrencyCode'
1416−--
1417−-- * 'mdMicros'
1418−moneyDto
1419− :: MoneyDto
1420−moneyDto =
1421− MoneyDto
1422− { _mdCurrencyCode = Nothing
1423− , _mdMicros = Nothing
1424− }
1425−
1426−mdCurrencyCode :: Lens' MoneyDto (Maybe Text)
1427−mdCurrencyCode
1428− = lens _mdCurrencyCode
1429− (\ s a -> s{_mdCurrencyCode = a})
1430−
1431−mdMicros :: Lens' MoneyDto (Maybe Int64)
1432−mdMicros = lens _mdMicros (\ s a -> s{_mdMicros = a})
1433−
1434−instance FromJSON MoneyDto where
1435− parseJSON
1436− = withObject "MoneyDto"
1437− (\ o ->
1438− MoneyDto <$>
1439− (o .:? "currencyCode") <*> (o .:? "micros"))
1440−
1441−instance ToJSON MoneyDto where
1442− toJSON MoneyDto{..}
1443− = object
1444− (catMaybes
1445− [("currencyCode" .=) <$> _mdCurrencyCode,
1446− ("micros" .=) <$> _mdMicros])
1447−
1448−--
1449−-- /See:/ 'targetingValueSize' smart constructor.
1450−data TargetingValueSize = TargetingValueSize
1451− { _tvsHeight :: !(Maybe Int32)
1452− , _tvsWidth :: !(Maybe Int32)
1453− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1454−
1455−-- | Creates a value of 'TargetingValueSize' with the minimum fields required to make a request.
1456−--
1457−-- Use one of the following lenses to modify other fields as desired:
1458−--
1459−-- * 'tvsHeight'
1460−--
1461−-- * 'tvsWidth'
1462−targetingValueSize
1463− :: TargetingValueSize
1464−targetingValueSize =
1465− TargetingValueSize
1466− { _tvsHeight = Nothing
1467− , _tvsWidth = Nothing
1468− }
1469−
1470−-- | The height of the creative.
1471−tvsHeight :: Lens' TargetingValueSize (Maybe Int32)
1472−tvsHeight
1473− = lens _tvsHeight (\ s a -> s{_tvsHeight = a})
1474−
1475−-- | The width of the creative.
1476−tvsWidth :: Lens' TargetingValueSize (Maybe Int32)
1477−tvsWidth = lens _tvsWidth (\ s a -> s{_tvsWidth = a})
1478−
1479−instance FromJSON TargetingValueSize where
1480− parseJSON
1481− = withObject "TargetingValueSize"
1482− (\ o ->
1483− TargetingValueSize <$>
1484− (o .:? "height") <*> (o .:? "width"))
1485−
1486−instance ToJSON TargetingValueSize where
1487− toJSON TargetingValueSize{..}
1488− = object
1489− (catMaybes
1490− [("height" .=) <$> _tvsHeight,
1491− ("width" .=) <$> _tvsWidth])
1492−
1493−--
1494−-- /See:/ 'addOrderNotesResponse' smart constructor.
1495−newtype AddOrderNotesResponse = AddOrderNotesResponse
1496− { _aonrNotes :: Maybe [Maybe MarketplaceNote]
1497− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1498−
1499−-- | Creates a value of 'AddOrderNotesResponse' with the minimum fields required to make a request.
1500−--
1501−-- Use one of the following lenses to modify other fields as desired:
1502−--
1503−-- * 'aonrNotes'
1504−addOrderNotesResponse
1505− :: AddOrderNotesResponse
1506−addOrderNotesResponse =
1507− AddOrderNotesResponse
1508− { _aonrNotes = Nothing
1509− }
1510−
1511−aonrNotes :: Lens' AddOrderNotesResponse [Maybe MarketplaceNote]
1512−aonrNotes
1513− = lens _aonrNotes (\ s a -> s{_aonrNotes = a}) .
1514− _Default
1515− . _Coerce
1516−
1517−instance FromJSON AddOrderNotesResponse where
1518− parseJSON
1519− = withObject "AddOrderNotesResponse"
1520− (\ o ->
1521− AddOrderNotesResponse <$> (o .:? "notes" .!= mempty))
1522−
1523−instance ToJSON AddOrderNotesResponse where
1524− toJSON AddOrderNotesResponse{..}
1525− = object (catMaybes [("notes" .=) <$> _aonrNotes])
1526−
1527−--
1528−-- /See:/ 'getNegotiationsRequest' smart constructor.
1529−data GetNegotiationsRequest = GetNegotiationsRequest
1530− { _gnrSinceTimestampMillis :: !(Maybe Int64)
1531− , _gnrFinalized :: !(Maybe Bool)
1532− , _gnrIncludePrivateAuctions :: !(Maybe Bool)
1533− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1534−
1535−-- | Creates a value of 'GetNegotiationsRequest' with the minimum fields required to make a request.
1536−--
1537−-- Use one of the following lenses to modify other fields as desired:
1538−--
1539−-- * 'gnrSinceTimestampMillis'
1540−--
1541−-- * 'gnrFinalized'
1542−--
1543−-- * 'gnrIncludePrivateAuctions'
1544−getNegotiationsRequest
1545− :: GetNegotiationsRequest
1546−getNegotiationsRequest =
1547− GetNegotiationsRequest
1548− { _gnrSinceTimestampMillis = Nothing
1549− , _gnrFinalized = Nothing
1550− , _gnrIncludePrivateAuctions = Nothing
1551− }
1552−
1553−gnrSinceTimestampMillis :: Lens' GetNegotiationsRequest (Maybe Int64)
1554−gnrSinceTimestampMillis
1555− = lens _gnrSinceTimestampMillis
1556− (\ s a -> s{_gnrSinceTimestampMillis = a})
1557−
1558−gnrFinalized :: Lens' GetNegotiationsRequest (Maybe Bool)
1559−gnrFinalized
1560− = lens _gnrFinalized (\ s a -> s{_gnrFinalized = a})
1561−
1562−gnrIncludePrivateAuctions :: Lens' GetNegotiationsRequest (Maybe Bool)
1563−gnrIncludePrivateAuctions
1564− = lens _gnrIncludePrivateAuctions
1565− (\ s a -> s{_gnrIncludePrivateAuctions = a})
1566−
1567−instance FromJSON GetNegotiationsRequest where
1568− parseJSON
1569− = withObject "GetNegotiationsRequest"
1570− (\ o ->
1571− GetNegotiationsRequest <$>
1572− (o .:? "sinceTimestampMillis") <*>
1573− (o .:? "finalized")
1574− <*> (o .:? "includePrivateAuctions"))
1575−
1576−instance ToJSON GetNegotiationsRequest where
1577− toJSON GetNegotiationsRequest{..}
1578− = object
1579− (catMaybes
1580− [("sinceTimestampMillis" .=) <$>
1581− _gnrSinceTimestampMillis,
1582− ("finalized" .=) <$> _gnrFinalized,
1583− ("includePrivateAuctions" .=) <$>
1584− _gnrIncludePrivateAuctions])
1585−
1586−--
1587−-- /See:/ 'createOrdersResponse' smart constructor.
1588−newtype CreateOrdersResponse = CreateOrdersResponse
1589− { _corOrders :: Maybe [Maybe MarketplaceOrder]
1590− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1591−
1592−-- | Creates a value of 'CreateOrdersResponse' with the minimum fields required to make a request.
1593−--
1594−-- Use one of the following lenses to modify other fields as desired:
1595−--
1596−-- * 'corOrders'
1597−createOrdersResponse
1598− :: CreateOrdersResponse
1599−createOrdersResponse =
1600− CreateOrdersResponse
1601− { _corOrders = Nothing
1602− }
1603−
1604−-- | The list of orders successfully created.
1605−corOrders :: Lens' CreateOrdersResponse [Maybe MarketplaceOrder]
1606−corOrders
1607− = lens _corOrders (\ s a -> s{_corOrders = a}) .
1608− _Default
1609− . _Coerce
1610−
1611−instance FromJSON CreateOrdersResponse where
1612− parseJSON
1613− = withObject "CreateOrdersResponse"
1614− (\ o ->
1615− CreateOrdersResponse <$> (o .:? "orders" .!= mempty))
1616−
1617−instance ToJSON CreateOrdersResponse where
1618− toJSON CreateOrdersResponse{..}
1619− = object (catMaybes [("orders" .=) <$> _corOrders])
1620−
1621−--
1622−-- /See:/ 'termsDto' smart constructor.
1623−data TermsDto = TermsDto
1624− { _tdFinalizeAutomatically :: !(Maybe Bool)
1625− , _tdBuyerBillingType :: !(Maybe Text)
1626− , _tdTargetingAllAdSlots :: !(Maybe Bool)
1627− , _tdUrls :: !(Maybe [Text])
1628− , _tdEndDate :: !(Maybe (Maybe DateTime))
1629− , _tdCpm :: !(Maybe (Maybe MoneyDto))
1630− , _tdEstimatedSpend :: !(Maybe (Maybe MoneyDto))
1631− , _tdAdvertisers :: !(Maybe [Maybe AdvertiserDto])
1632− , _tdEstimatedImpressionsPerDay :: !(Maybe Int64)
1633− , _tdMonetizerType :: !(Maybe Text)
1634− , _tdAudienceSegmentDescription :: !(Maybe Text)
1635− , _tdCreativeReviewPolicy :: !(Maybe Text)
1636− , _tdMinimumTrueLooks :: !(Maybe Int64)
1637− , _tdStartDate :: !(Maybe (Maybe DateTime))
1638− , _tdCreativeBlockingLevel :: !(Maybe Text)
1639− , _tdSemiTransparent :: !(Maybe Bool)
1640− , _tdAudienceSegment :: !(Maybe (Maybe AudienceSegment))
1641− , _tdDealPremium :: !(Maybe (Maybe MoneyDto))
1642− , _tdIsReservation :: !(Maybe Bool)
1643− , _tdAdSlots :: !(Maybe [Maybe AdSlotDto])
1644− , _tdTermsAttributes :: !(Maybe [Text])
1645− , _tdInventorySegmentTargeting :: !(Maybe (Maybe InventorySegmentTargeting))
1646− , _tdDescriptiveName :: !(Maybe Text)
1647− , _tdMinimumSpendMicros :: !(Maybe Int64)
1648− , _tdTargetByDealId :: !(Maybe Bool)
1649− , _tdBillingTerms :: !(Maybe Text)
1650− , _tdDescription :: !(Maybe Text)
1651− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1652−
1653−-- | Creates a value of 'TermsDto' with the minimum fields required to make a request.
1654−--
1655−-- Use one of the following lenses to modify other fields as desired:
1656−--
1657−-- * 'tdFinalizeAutomatically'
1658−--
1659−-- * 'tdBuyerBillingType'
1660−--
1661−-- * 'tdTargetingAllAdSlots'
1662−--
1663−-- * 'tdUrls'
1664−--
1665−-- * 'tdEndDate'
1666−--
1667−-- * 'tdCpm'
1668−--
1669−-- * 'tdEstimatedSpend'
1670−--
1671−-- * 'tdAdvertisers'
1672−--
1673−-- * 'tdEstimatedImpressionsPerDay'
1674−--
1675−-- * 'tdMonetizerType'
1676−--
1677−-- * 'tdAudienceSegmentDescription'
1678−--
1679−-- * 'tdCreativeReviewPolicy'
1680−--
1681−-- * 'tdMinimumTrueLooks'
1682−--
1683−-- * 'tdStartDate'
1684−--
1685−-- * 'tdCreativeBlockingLevel'
1686−--
1687−-- * 'tdSemiTransparent'
1688−--
1689−-- * 'tdAudienceSegment'
1690−--
1691−-- * 'tdDealPremium'
1692−--
1693−-- * 'tdIsReservation'
1694−--
1695−-- * 'tdAdSlots'
1696−--
1697−-- * 'tdTermsAttributes'
1698−--
1699−-- * 'tdInventorySegmentTargeting'
1700−--
1701−-- * 'tdDescriptiveName'
1702−--
1703−-- * 'tdMinimumSpendMicros'
1704−--
1705−-- * 'tdTargetByDealId'
1706−--
1707−-- * 'tdBillingTerms'
1708−--
1709−-- * 'tdDescription'
1710−termsDto
1711− :: TermsDto
1712−termsDto =
1713− TermsDto
1714− { _tdFinalizeAutomatically = Nothing
1715− , _tdBuyerBillingType = Nothing
1716− , _tdTargetingAllAdSlots = Nothing
1717− , _tdUrls = Nothing
1718− , _tdEndDate = Nothing
1719− , _tdCpm = Nothing
1720− , _tdEstimatedSpend = Nothing
1721− , _tdAdvertisers = Nothing
1722− , _tdEstimatedImpressionsPerDay = Nothing
1723− , _tdMonetizerType = Nothing
1724− , _tdAudienceSegmentDescription = Nothing
1725− , _tdCreativeReviewPolicy = Nothing
1726− , _tdMinimumTrueLooks = Nothing
1727− , _tdStartDate = Nothing
1728− , _tdCreativeBlockingLevel = Nothing
1729− , _tdSemiTransparent = Nothing
1730− , _tdAudienceSegment = Nothing
1731− , _tdDealPremium = Nothing
1732− , _tdIsReservation = Nothing
1733− , _tdAdSlots = Nothing
1734− , _tdTermsAttributes = Nothing
1735− , _tdInventorySegmentTargeting = Nothing
1736− , _tdDescriptiveName = Nothing
1737− , _tdMinimumSpendMicros = Nothing
1738− , _tdTargetByDealId = Nothing
1739− , _tdBillingTerms = Nothing
1740− , _tdDescription = Nothing
1741− }
1742−
1743−-- | If true, the offer will finalize automatically when accepted.
1744−tdFinalizeAutomatically :: Lens' TermsDto (Maybe Bool)
1745−tdFinalizeAutomatically
1746− = lens _tdFinalizeAutomatically
1747− (\ s a -> s{_tdFinalizeAutomatically = a})
1748−
1749−-- | The buyer billing type.
1750−tdBuyerBillingType :: Lens' TermsDto (Maybe Text)
1751−tdBuyerBillingType
1752− = lens _tdBuyerBillingType
1753− (\ s a -> s{_tdBuyerBillingType = a})
1754−
1755−-- | If true, the offer targets all ad slots.
1756−tdTargetingAllAdSlots :: Lens' TermsDto (Maybe Bool)
1757−tdTargetingAllAdSlots
1758− = lens _tdTargetingAllAdSlots
1759− (\ s a -> s{_tdTargetingAllAdSlots = a})
1760−
1761−-- | The urls applicable to the offer.
1762−tdUrls :: Lens' TermsDto [Text]
1763−tdUrls
1764− = lens _tdUrls (\ s a -> s{_tdUrls = a}) . _Default .
1765− _Coerce
1766−
1767−-- | The end date for the offer.
1768−tdEndDate :: Lens' TermsDto (Maybe (Maybe DateTime))
1769−tdEndDate
1770− = lens _tdEndDate (\ s a -> s{_tdEndDate = a})
1771−
1772−-- | The cpm terms.
1773−tdCpm :: Lens' TermsDto (Maybe (Maybe MoneyDto))
1774−tdCpm = lens _tdCpm (\ s a -> s{_tdCpm = a})
1775−
1776−-- | The estimated spend for the offer.
1777−tdEstimatedSpend :: Lens' TermsDto (Maybe (Maybe MoneyDto))
1778−tdEstimatedSpend
1779− = lens _tdEstimatedSpend
1780− (\ s a -> s{_tdEstimatedSpend = a})
1781−
1782−-- | A list of advertisers for this offer.
1783−tdAdvertisers :: Lens' TermsDto [Maybe AdvertiserDto]
1784−tdAdvertisers
1785− = lens _tdAdvertisers
1786− (\ s a -> s{_tdAdvertisers = a})
1787− . _Default
1788− . _Coerce
1789−
1790−-- | The estimated daily impressions for the offer.
1791−tdEstimatedImpressionsPerDay :: Lens' TermsDto (Maybe Int64)
1792−tdEstimatedImpressionsPerDay
1793− = lens _tdEstimatedImpressionsPerDay
1794− (\ s a -> s{_tdEstimatedImpressionsPerDay = a})
1795−
1796−-- | The monetizer type.
1797−tdMonetizerType :: Lens' TermsDto (Maybe Text)
1798−tdMonetizerType
1799− = lens _tdMonetizerType
1800− (\ s a -> s{_tdMonetizerType = a})
1801−
1802−-- | A description of the audience segment for the offer.
1803−tdAudienceSegmentDescription :: Lens' TermsDto (Maybe Text)
1804−tdAudienceSegmentDescription
1805− = lens _tdAudienceSegmentDescription
1806− (\ s a -> s{_tdAudienceSegmentDescription = a})
1807−
1808−-- | Whether to use publisher review policy or AdX review policy.
1809−tdCreativeReviewPolicy :: Lens' TermsDto (Maybe Text)
1810−tdCreativeReviewPolicy
1811− = lens _tdCreativeReviewPolicy
1812− (\ s a -> s{_tdCreativeReviewPolicy = a})
1813−
1814−-- | The minimum true looks for the offer.
1815−tdMinimumTrueLooks :: Lens' TermsDto (Maybe Int64)
1816−tdMinimumTrueLooks
1817− = lens _tdMinimumTrueLooks
1818− (\ s a -> s{_tdMinimumTrueLooks = a})
1819−
1820−-- | The start date for the offer.
1821−tdStartDate :: Lens' TermsDto (Maybe (Maybe DateTime))
1822−tdStartDate
1823− = lens _tdStartDate (\ s a -> s{_tdStartDate = a})
1824−
1825−-- | Whether to use or ignore publisher blocking rules.
1826−tdCreativeBlockingLevel :: Lens' TermsDto (Maybe Text)
1827−tdCreativeBlockingLevel
1828− = lens _tdCreativeBlockingLevel
1829− (\ s a -> s{_tdCreativeBlockingLevel = a})
1830−
1831−-- | Whether this offer is semi-transparent.
1832−tdSemiTransparent :: Lens' TermsDto (Maybe Bool)
1833−tdSemiTransparent
1834− = lens _tdSemiTransparent
1835− (\ s a -> s{_tdSemiTransparent = a})
1836−
1837−-- | The audience segment for the offer.
1838−tdAudienceSegment :: Lens' TermsDto (Maybe (Maybe AudienceSegment))
1839−tdAudienceSegment
1840− = lens _tdAudienceSegment
1841− (\ s a -> s{_tdAudienceSegment = a})
1842−
1843−-- | The premium terms.
1844−tdDealPremium :: Lens' TermsDto (Maybe (Maybe MoneyDto))
1845−tdDealPremium
1846− = lens _tdDealPremium
1847− (\ s a -> s{_tdDealPremium = a})
1848−
1849−-- | Whether the offer is a reservation.
1850−tdIsReservation :: Lens' TermsDto (Maybe Bool)
1851−tdIsReservation
1852− = lens _tdIsReservation
1853− (\ s a -> s{_tdIsReservation = a})
1854−
1855−-- | The particular ad slots targeted by the offer.
1856−tdAdSlots :: Lens' TermsDto [Maybe AdSlotDto]
1857−tdAdSlots
1858− = lens _tdAdSlots (\ s a -> s{_tdAdSlots = a}) .
1859− _Default
1860− . _Coerce
1861−
1862−-- | A list of terms attributes.
1863−tdTermsAttributes :: Lens' TermsDto [Text]
1864−tdTermsAttributes
1865− = lens _tdTermsAttributes
1866− (\ s a -> s{_tdTermsAttributes = a})
1867− . _Default
1868− . _Coerce
1869−
1870−-- | The inventory segment targeting for the offer.
1871−tdInventorySegmentTargeting :: Lens' TermsDto (Maybe (Maybe InventorySegmentTargeting))
1872−tdInventorySegmentTargeting
1873− = lens _tdInventorySegmentTargeting
1874− (\ s a -> s{_tdInventorySegmentTargeting = a})
1875−
1876−-- | A descriptive name for these terms.
1877−tdDescriptiveName :: Lens' TermsDto (Maybe Text)
1878−tdDescriptiveName
1879− = lens _tdDescriptiveName
1880− (\ s a -> s{_tdDescriptiveName = a})
1881−
1882−-- | The minimum spend for the offer.
1883−tdMinimumSpendMicros :: Lens' TermsDto (Maybe Int64)
1884−tdMinimumSpendMicros
1885− = lens _tdMinimumSpendMicros
1886− (\ s a -> s{_tdMinimumSpendMicros = a})
1887−
1888−-- | Whether to target by deal id.
1889−tdTargetByDealId :: Lens' TermsDto (Maybe Bool)
1890−tdTargetByDealId
1891− = lens _tdTargetByDealId
1892− (\ s a -> s{_tdTargetByDealId = a})
1893−
1894−-- | The billing terms.
1895−tdBillingTerms :: Lens' TermsDto (Maybe Text)
1896−tdBillingTerms
1897− = lens _tdBillingTerms
1898− (\ s a -> s{_tdBillingTerms = a})
1899−
1900−-- | A description for these terms.
1901−tdDescription :: Lens' TermsDto (Maybe Text)
1902−tdDescription
1903− = lens _tdDescription
1904− (\ s a -> s{_tdDescription = a})
1905−
1906−instance FromJSON TermsDto where
1907− parseJSON
1908− = withObject "TermsDto"
1909− (\ o ->
1910− TermsDto <$>
1911− (o .:? "finalizeAutomatically") <*>
1912− (o .:? "buyerBillingType")
1913− <*> (o .:? "targetingAllAdSlots")
1914− <*> (o .:? "urls" .!= mempty)
1915− <*> (o .:? "endDate")
1916− <*> (o .:? "cpm")
1917− <*> (o .:? "estimatedSpend")
1918− <*> (o .:? "advertisers" .!= mempty)
1919− <*> (o .:? "estimatedImpressionsPerDay")
1920− <*> (o .:? "monetizerType")
1921− <*> (o .:? "audienceSegmentDescription")
1922− <*> (o .:? "creativeReviewPolicy")
1923− <*> (o .:? "minimumTrueLooks")
1924− <*> (o .:? "startDate")
1925− <*> (o .:? "creativeBlockingLevel")
1926− <*> (o .:? "semiTransparent")
1927− <*> (o .:? "audienceSegment")
1928− <*> (o .:? "dealPremium")
1929− <*> (o .:? "isReservation")
1930− <*> (o .:? "adSlots" .!= mempty)
1931− <*> (o .:? "termsAttributes" .!= mempty)
1932− <*> (o .:? "inventorySegmentTargeting")
1933− <*> (o .:? "descriptiveName")
1934− <*> (o .:? "minimumSpendMicros")
1935− <*> (o .:? "targetByDealId")
1936− <*> (o .:? "billingTerms")
1937− <*> (o .:? "description"))
1938−
1939−instance ToJSON TermsDto where
1940− toJSON TermsDto{..}
1941− = object
1942− (catMaybes
1943− [("finalizeAutomatically" .=) <$>
1944− _tdFinalizeAutomatically,
1945− ("buyerBillingType" .=) <$> _tdBuyerBillingType,
1946− ("targetingAllAdSlots" .=) <$>
1947− _tdTargetingAllAdSlots,
1948− ("urls" .=) <$> _tdUrls,
1949− ("endDate" .=) <$> _tdEndDate, ("cpm" .=) <$> _tdCpm,
1950− ("estimatedSpend" .=) <$> _tdEstimatedSpend,
1951− ("advertisers" .=) <$> _tdAdvertisers,
1952− ("estimatedImpressionsPerDay" .=) <$>
1953− _tdEstimatedImpressionsPerDay,
1954− ("monetizerType" .=) <$> _tdMonetizerType,
1955− ("audienceSegmentDescription" .=) <$>
1956− _tdAudienceSegmentDescription,
1957− ("creativeReviewPolicy" .=) <$>
1958− _tdCreativeReviewPolicy,
1959− ("minimumTrueLooks" .=) <$> _tdMinimumTrueLooks,
1960− ("startDate" .=) <$> _tdStartDate,
1961− ("creativeBlockingLevel" .=) <$>
1962− _tdCreativeBlockingLevel,
1963− ("semiTransparent" .=) <$> _tdSemiTransparent,
1964− ("audienceSegment" .=) <$> _tdAudienceSegment,
1965− ("dealPremium" .=) <$> _tdDealPremium,
1966− ("isReservation" .=) <$> _tdIsReservation,
1967− ("adSlots" .=) <$> _tdAdSlots,
1968− ("termsAttributes" .=) <$> _tdTermsAttributes,
1969− ("inventorySegmentTargeting" .=) <$>
1970− _tdInventorySegmentTargeting,
1971− ("descriptiveName" .=) <$> _tdDescriptiveName,
1972− ("minimumSpendMicros" .=) <$> _tdMinimumSpendMicros,
1973− ("targetByDealId" .=) <$> _tdTargetByDealId,
1974− ("billingTerms" .=) <$> _tdBillingTerms,
1975− ("description" .=) <$> _tdDescription])
1976−
1977−--
1978−-- /See:/ 'pretargetingConfigItemExcludedPlacements' smart constructor.
1979−data PretargetingConfigItemExcludedPlacements = PretargetingConfigItemExcludedPlacements
1980− { _pciepToken :: !(Maybe Text)
1981− , _pciepType :: !(Maybe Text)
1982− } deriving (Eq,Read,Show,Data,Typeable,Generic)
1983−
1984−-- | Creates a value of 'PretargetingConfigItemExcludedPlacements' with the minimum fields required to make a request.
1985−--
1986−-- Use one of the following lenses to modify other fields as desired:
1987−--
1988−-- * 'pciepToken'
1989−--
1990−-- * 'pciepType'
1991−pretargetingConfigItemExcludedPlacements
1992− :: PretargetingConfigItemExcludedPlacements
1993−pretargetingConfigItemExcludedPlacements =
1994− PretargetingConfigItemExcludedPlacements
1995− { _pciepToken = Nothing
1996− , _pciepType = Nothing
1997− }
1998−
1999−-- | The value of the placement. Interpretation depends on the placement
2000−-- type, e.g. URL for a site placement, channel name for a channel
2001−-- placement, app id for a mobile app placement.
2002−pciepToken :: Lens' PretargetingConfigItemExcludedPlacements (Maybe Text)
2003−pciepToken
2004− = lens _pciepToken (\ s a -> s{_pciepToken = a})
2005−
2006−-- | The type of the placement.
2007−pciepType :: Lens' PretargetingConfigItemExcludedPlacements (Maybe Text)
2008−pciepType
2009− = lens _pciepType (\ s a -> s{_pciepType = a})
2010−
2011−instance FromJSON
2012− PretargetingConfigItemExcludedPlacements where
2013− parseJSON
2014− = withObject
2015− "PretargetingConfigItemExcludedPlacements"
2016− (\ o ->
2017− PretargetingConfigItemExcludedPlacements <$>
2018− (o .:? "token") <*> (o .:? "type"))
2019−
2020−instance ToJSON
2021− PretargetingConfigItemExcludedPlacements where
2022− toJSON PretargetingConfigItemExcludedPlacements{..}
2023− = object
2024− (catMaybes
2025− [("token" .=) <$> _pciepToken,
2026− ("type" .=) <$> _pciepType])
2027−
2028−-- | The creatives feed lists the active creatives for the Ad Exchange buyer
2029−-- accounts that the user has access to. Each entry in the feed corresponds
2030−-- to a single creative.
2031−--
2032−-- /See:/ 'creativesList' smart constructor.
2033−data CreativesList = CreativesList
2034− { _clNextPageToken :: !(Maybe Text)
2035− , _clKind :: !Text
2036− , _clItems :: !(Maybe [Maybe Creative])
2037− } deriving (Eq,Read,Show,Data,Typeable,Generic)
2038−
2039−-- | Creates a value of 'CreativesList' with the minimum fields required to make a request.
2040−--
2041−-- Use one of the following lenses to modify other fields as desired:
2042−--
2043−-- * 'clNextPageToken'
2044−--
2045−-- * 'clKind'
2046−--
2047−-- * 'clItems'
2048−creativesList
2049− :: CreativesList
2050−creativesList =
2051− CreativesList
2052− { _clNextPageToken = Nothing
2053− , _clKind = "adexchangebuyer#creativesList"
2054− , _clItems = Nothing
2055− }
2056−
2057−-- | Continuation token used to page through creatives. To retrieve the next
2058−-- page of results, set the next request\'s \"pageToken\" value to this.
2059−clNextPageToken :: Lens' CreativesList (Maybe Text)
2060−clNextPageToken
2061− = lens _clNextPageToken
2062− (\ s a -> s{_clNextPageToken = a})
2063−
2064−-- | Resource type.
2065−clKind :: Lens' CreativesList Text
2066−clKind = lens _clKind (\ s a -> s{_clKind = a})
2067−
2068−-- | A list of creatives.
2069−clItems :: Lens' CreativesList [Maybe Creative]
2070−clItems
2071− = lens _clItems (\ s a -> s{_clItems = a}) . _Default
2072− . _Coerce
2073−
2074−instance FromJSON CreativesList where
2075− parseJSON
2076− = withObject "CreativesList"
2077− (\ o ->
2078− CreativesList <$>
2079− (o .:? "nextPageToken") <*>
2080− (o .:? "kind" .!= "adexchangebuyer#creativesList")
2081− <*> (o .:? "items" .!= mempty))
2082−
2083−instance ToJSON CreativesList where
2084− toJSON CreativesList{..}
2085− = object
2086− (catMaybes
2087− [("nextPageToken" .=) <$> _clNextPageToken,
2088− Just ("kind" .= _clKind), ("items" .=) <$> _clItems])
2089−
2090−-- | The configuration data for an Ad Exchange billing info.
2091−--
2092−-- /See:/ 'billingInfo' smart constructor.
2093−data BillingInfo = BillingInfo
2094− { _biKind :: !Text
2095− , _biAccountName :: !(Maybe Text)
2096− , _biAccountId :: !(Maybe Int32)
2097− , _biBillingId :: !(Maybe [Text])
2098− } deriving (Eq,Read,Show,Data,Typeable,Generic)
2099−
2100−-- | Creates a value of 'BillingInfo' with the minimum fields required to make a request.
2101−--
2102−-- Use one of the following lenses to modify other fields as desired:
2103−--
2104−-- * 'biKind'
2105−--
2106−-- * 'biAccountName'
2107−--
2108−-- * 'biAccountId'
2109−--
2110−-- * 'biBillingId'
2111−billingInfo
2112− :: BillingInfo
2113−billingInfo =
2114− BillingInfo
2115− { _biKind = "adexchangebuyer#billingInfo"
2116− , _biAccountName = Nothing
2117− , _biAccountId = Nothing
2118− , _biBillingId = Nothing
2119− }
2120−
2121−-- | Resource type.
2122−biKind :: Lens' BillingInfo Text
2123−biKind = lens _biKind (\ s a -> s{_biKind = a})
2124−
2125−-- | Account name.
2126−biAccountName :: Lens' BillingInfo (Maybe Text)
2127−biAccountName
2128− = lens _biAccountName
2129− (\ s a -> s{_biAccountName = a})
2130−
2131−-- | Account id.
2132−biAccountId :: Lens' BillingInfo (Maybe Int32)
2133−biAccountId
2134− = lens _biAccountId (\ s a -> s{_biAccountId = a})
2135−
2136−-- | A list of adgroup IDs associated with this particular account. These IDs
2137−-- may show up as part of a realtime bidding BidRequest, which indicates a
2138−-- bid request for this account.
2139−biBillingId :: Lens' BillingInfo [Text]
2140−biBillingId
2141− = lens _biBillingId (\ s a -> s{_biBillingId = a}) .
2142− _Default
2143− . _Coerce
2144−
2145−instance FromJSON BillingInfo where
2146− parseJSON
2147− = withObject "BillingInfo"
2148− (\ o ->
2149− BillingInfo <$>
2150− (o .:? "kind" .!= "adexchangebuyer#billingInfo") <*>
2151− (o .:? "accountName")
2152− <*> (o .:? "accountId")
2153− <*> (o .:? "billingId" .!= mempty))
2154−
2155−instance ToJSON BillingInfo where
2156− toJSON BillingInfo{..}
2157− = object
2158− (catMaybes
2159− [Just ("kind" .= _biKind),
2160− ("accountName" .=) <$> _biAccountName,
2161− ("accountId" .=) <$> _biAccountId,
2162− ("billingId" .=) <$> _biBillingId])
2163−
2164−--
2165−-- /See:/ 'creativeItemReasonsFilteringReasons' smart constructor.
2166−data CreativeItemReasonsFilteringReasons = CreativeItemReasonsFilteringReasons
2167− { _cirfrFilteringStatus :: !(Maybe Int32)
2168− , _cirfrFilteringCount :: !(Maybe Int64)
2169− } deriving (Eq,Read,Show,Data,Typeable,Generic)
2170−
2171−-- | Creates a value of 'CreativeItemReasonsFilteringReasons' with the minimum fields required to make a request.
2172−--
2173−-- Use one of the following lenses to modify other fields as desired:
2174−--
2175−-- * 'cirfrFilteringStatus'
2176−--
2177−-- * 'cirfrFilteringCount'
2178−creativeItemReasonsFilteringReasons
2179− :: CreativeItemReasonsFilteringReasons
2180−creativeItemReasonsFilteringReasons =
2181− CreativeItemReasonsFilteringReasons
2182− { _cirfrFilteringStatus = Nothing
2183− , _cirfrFilteringCount = Nothing
2184− }
2185−
2186−-- | The filtering status code. Please refer to the creative-status-codes.txt
2187−-- file for different statuses.
2188−cirfrFilteringStatus :: Lens' CreativeItemReasonsFilteringReasons (Maybe Int32)
2189−cirfrFilteringStatus
2190− = lens _cirfrFilteringStatus
2191− (\ s a -> s{_cirfrFilteringStatus = a})
2192−
2193−-- | The number of times the creative was filtered for the status. The count
2194−-- is aggregated across all publishers on the exchange.
2195−cirfrFilteringCount :: Lens' CreativeItemReasonsFilteringReasons (Maybe Int64)
2196−cirfrFilteringCount
2197− = lens _cirfrFilteringCount
2198− (\ s a -> s{_cirfrFilteringCount = a})
2199−
2200−instance FromJSON CreativeItemReasonsFilteringReasons
2201− where
2202− parseJSON
2203− = withObject "CreativeItemReasonsFilteringReasons"
2204− (\ o ->
2205− CreativeItemReasonsFilteringReasons <$>
2206− (o .:? "filteringStatus") <*>
2207− (o .:? "filteringCount"))
2208−
2209−instance ToJSON CreativeItemReasonsFilteringReasons
2210− where
2211− toJSON CreativeItemReasonsFilteringReasons{..}
2212− = object
2213− (catMaybes
2214− [("filteringStatus" .=) <$> _cirfrFilteringStatus,
2215− ("filteringCount" .=) <$> _cirfrFilteringCount])
2216−
2217−--
2218−-- /See:/ 'price' smart constructor.
2219−data Price = Price
2220− { _pCurrencyCode :: !(Maybe Text)
2221− , _pAmountMicros :: !(Maybe Double)
2222− } deriving (Eq,Read,Show,Data,Typeable,Generic)
2223−
2224−-- | Creates a value of 'Price' with the minimum fields required to make a request.
2225−--
2226−-- Use one of the following lenses to modify other fields as desired:
2227−--
2228−-- * 'pCurrencyCode'
2229−--
2230−-- * 'pAmountMicros'
2231−price
2232− :: Price
2233−price =
2234− Price
2235− { _pCurrencyCode = Nothing
2236− , _pAmountMicros = Nothing
2237− }
2238−
2239−-- | The currency code for the price.
2240−pCurrencyCode :: Lens' Price (Maybe Text)
2241−pCurrencyCode
2242− = lens _pCurrencyCode
2243− (\ s a -> s{_pCurrencyCode = a})
2244−
2245−-- | The CPM value in micros.
2246−pAmountMicros :: Lens' Price (Maybe Double)
2247−pAmountMicros
2248− = lens _pAmountMicros
2249− (\ s a -> s{_pAmountMicros = a})
2250−
2251−instance FromJSON Price where
2252− parseJSON
2253− = withObject "Price"
2254− (\ o ->
2255− Price <$>
2256− (o .:? "currencyCode") <*> (o .:? "amountMicros"))
2257−
2258−instance ToJSON Price where
2259− toJSON Price{..}
2260− = object
2261− (catMaybes
2262− [("currencyCode" .=) <$> _pCurrencyCode,
2263− ("amountMicros" .=) <$> _pAmountMicros])
2264−
2265−--
2266−-- /See:/ 'editAllOrderDealsRequest' smart constructor.
2267−data EditAllOrderDealsRequest = EditAllOrderDealsRequest
2268− { _eaodrUpdateAction :: !(Maybe Text)
2269− , _eaodrDeals :: !(Maybe [Maybe MarketplaceDeal])
2270− , _eaodrOrder :: !(Maybe (Maybe MarketplaceOrder))
2271− , _eaodrOrderRevisionNumber :: !(Maybe Int64)
2272− } deriving (Eq,Read,Show,Data,Typeable,Generic)
2273−
2274−-- | Creates a value of 'EditAllOrderDealsRequest' with the minimum fields required to make a request.
2275−--
2276−-- Use one of the following lenses to modify other fields as desired:
2277−--
2278−-- * 'eaodrUpdateAction'
2279−--
2280−-- * 'eaodrDeals'
2281−--
2282−-- * 'eaodrOrder'
2283−--
2284−-- * 'eaodrOrderRevisionNumber'
2285−editAllOrderDealsRequest
2286− :: EditAllOrderDealsRequest
2287−editAllOrderDealsRequest =
2288− EditAllOrderDealsRequest
2289− { _eaodrUpdateAction = Nothing
2290− , _eaodrDeals = Nothing
2291− , _eaodrOrder = Nothing
2292− , _eaodrOrderRevisionNumber = Nothing
2293− }
2294−
2295−-- | Indicates an optional action to take on the order
2296−eaodrUpdateAction :: Lens' EditAllOrderDealsRequest (Maybe Text)
2297−eaodrUpdateAction
2298− = lens _eaodrUpdateAction
2299− (\ s a -> s{_eaodrUpdateAction = a})
2300−
2301−-- | List of deals to edit. Service may perform 3 different operations based
2302−-- on comparison of deals in this list vs deals already persisted in
2303−-- database: 1. Add new deal to order If a deal in this list does not exist
2304−-- in the order, the service will create a new deal and add it to the
2305−-- order. Validation will follow AddOrderDealsRequest. 2. Update existing
2306−-- deal in the order If a deal in this list already exist in the order, the
2307−-- service will update that existing deal to this new deal in the request.
2308−-- Validation will follow UpdateOrderDealsRequest. 3. Delete deals from the
2309−-- order (just need the id) If a existing deal in the order is not present
2310−-- in this list, the service will delete that deal from the order.
2311−-- Validation will follow DeleteOrderDealsRequest.
2312−eaodrDeals :: Lens' EditAllOrderDealsRequest [Maybe MarketplaceDeal]
2313−eaodrDeals
2314− = lens _eaodrDeals (\ s a -> s{_eaodrDeals = a}) .
2315− _Default
2316− . _Coerce
2317−
2318−-- | If specified, also updates the order in the batch transaction. This is
2319−-- useful when the order and the deals need to be updated in one
2320−-- transaction.
2321−eaodrOrder :: Lens' EditAllOrderDealsRequest (Maybe (Maybe MarketplaceOrder))
2322−eaodrOrder
2323− = lens _eaodrOrder (\ s a -> s{_eaodrOrder = a})
2324−
2325−-- | The last known revision number for the order.
2326−eaodrOrderRevisionNumber :: Lens' EditAllOrderDealsRequest (Maybe Int64)
2327−eaodrOrderRevisionNumber
2328− = lens _eaodrOrderRevisionNumber
2329− (\ s a -> s{_eaodrOrderRevisionNumber = a})
2330−
2331−instance FromJSON EditAllOrderDealsRequest where
2332− parseJSON
2333− = withObject "EditAllOrderDealsRequest"
2334− (\ o ->
2335− EditAllOrderDealsRequest <$>
2336− (o .:? "updateAction") <*> (o .:? "deals" .!= mempty)
2337− <*> (o .:? "order")
2338− <*> (o .:? "orderRevisionNumber"))
2339−
2340−instance ToJSON EditAllOrderDealsRequest where
2341− toJSON EditAllOrderDealsRequest{..}
2342− = object
2343− (catMaybes
2344− [("updateAction" .=) <$> _eaodrUpdateAction,
2345− ("deals" .=) <$> _eaodrDeals,
2346− ("order" .=) <$> _eaodrOrder,
2347− ("orderRevisionNumber" .=) <$>
2348− _eaodrOrderRevisionNumber])
2349−
2350−--
2351−-- /See:/ 'inventorySegmentTargeting' smart constructor.
2352−data InventorySegmentTargeting = InventorySegmentTargeting
2353− { _istNegativeVideoDurationSegments :: !(Maybe [Int64])
2354− , _istNegativeIcmBrands :: !(Maybe [Int64])
2355− , _istNegativeKeyValues :: !(Maybe [Maybe RuleKeyValuePair])
2356− , _istPositiveAudienceSegments :: !(Maybe [Int64])
2357− , _istPositiveXfpPlacements :: !(Maybe [Int64])
2358− , _istNegativeXfpAdSlots :: !(Maybe [Int64])
2359− , _istPositiveOperatingSystemVersions :: !(Maybe [Int64])
2360− , _istPositiveSizes :: !(Maybe [Int64])
2361− , _istPositiveDeviceCategories :: !(Maybe [Int64])
2362− , _istPositiveLocations :: !(Maybe [Int64])
2363− , _istNegativeAdSizes :: !(Maybe [Maybe AdSize])
2364− , _istPositiveOperatingSystems :: !(Maybe [Int64])
2365− , _istPositiveSiteUrls :: !(Maybe [Text])
2366− , _istNegativeInventorySlots :: !(Maybe [Text])
2367− , _istNegativeVideoAdPositionSegments :: !(Maybe [Text])
2368− , _istPositiveAdTypeSegments :: !(Maybe [Text])
2369− , _istPositiveIcmInterests :: !(Maybe [Int64])
2370− , _istPositiveMobileApps :: !(Maybe [Text])
2371− , _istPositiveKeyValues :: !(Maybe [Maybe RuleKeyValuePair])
2372− , _istPositiveIcmBrands :: !(Maybe [Int64])
2373− , _istPositiveVideoDurationSegments :: !(Maybe [Int64])
2374− , _istNegativeAudienceSegments :: !(Maybe [Int64])
2375− , _istNegativeXfpPlacements :: !(Maybe [Int64])
2376− , _istPositiveXfpAdSlots :: !(Maybe [Int64])
2377− , _istNegativeOperatingSystemVersions :: !(Maybe [Int64])
2378− , _istNegativeSizes :: !(Maybe [Int64])
2379− , _istNegativeLocations :: !(Maybe [Int64])
2380− , _istNegativeDeviceCategories :: !(Maybe [Int64])
2381− , _istNegativeOperatingSystems :: !(Maybe [Int64])
2382− , _istPositiveAdSizes :: !(Maybe [Maybe AdSize])
2383− , _istNegativeSiteUrls :: !(Maybe [Text])
2384− , _istNegativeAdTypeSegments :: !(Maybe [Text])
2385− , _istPositiveVideoAdPositionSegments :: !(Maybe [Text])
2386− , _istPositiveInventorySlots :: !(Maybe [Text])
2387− , _istNegativeMobileApps :: !(Maybe [Text])
2388− , _istNegativeIcmInterests :: !(Maybe [Int64])
2389− } deriving (Eq,Read,Show,Data,Typeable,Generic)
2390−
2391−-- | Creates a value of 'InventorySegmentTargeting' with the minimum fields required to make a request.
2392−--
2393−-- Use one of the following lenses to modify other fields as desired:
2394−--
2395−-- * 'istNegativeVideoDurationSegments'
2396−--
2397−-- * 'istNegativeIcmBrands'
2398−--
2399−-- * 'istNegativeKeyValues'
2400−--
2401−-- * 'istPositiveAudienceSegments'
2402−--
2403−-- * 'istPositiveXfpPlacements'
2404−--
2405−-- * 'istNegativeXfpAdSlots'
2406−--
2407−-- * 'istPositiveOperatingSystemVersions'
2408−--
2409−-- * 'istPositiveSizes'
2410−--
2411−-- * 'istPositiveDeviceCategories'
2412−--
2413−-- * 'istPositiveLocations'
2414−--
2415−-- * 'istNegativeAdSizes'
2416−--
2417−-- * 'istPositiveOperatingSystems'
2418−--
2419−-- * 'istPositiveSiteUrls'
2420−--
2421−-- * 'istNegativeInventorySlots'
2422−--
2423−-- * 'istNegativeVideoAdPositionSegments'
2424−--
2425−-- * 'istPositiveAdTypeSegments'
2426−--
2427−-- * 'istPositiveIcmInterests'
2428−--
2429−-- * 'istPositiveMobileApps'
2430−--
2431−-- * 'istPositiveKeyValues'
2432−--
2433−-- * 'istPositiveIcmBrands'
2434−--
2435−-- * 'istPositiveVideoDurationSegments'
2436−--
2437−-- * 'istNegativeAudienceSegments'
2438−--
2439−-- * 'istNegativeXfpPlacements'
2440−--
2441−-- * 'istPositiveXfpAdSlots'
2442−--
2443−-- * 'istNegativeOperatingSystemVersions'
2444−--
2445−-- * 'istNegativeSizes'
2446−--
2447−-- * 'istNegativeLocations'
2448−--
2449−-- * 'istNegativeDeviceCategories'
2450−--
2451−-- * 'istNegativeOperatingSystems'
2452−--
2453−-- * 'istPositiveAdSizes'
2454−--
2455−-- * 'istNegativeSiteUrls'
2456−--
2457−-- * 'istNegativeAdTypeSegments'
2458−--
2459−-- * 'istPositiveVideoAdPositionSegments'
2460−--
2461−-- * 'istPositiveInventorySlots'
2462−--
2463−-- * 'istNegativeMobileApps'
2464−--
2465−-- * 'istNegativeIcmInterests'
2466−inventorySegmentTargeting
2467− :: InventorySegmentTargeting
2468−inventorySegmentTargeting =
2469− InventorySegmentTargeting
2470− { _istNegativeVideoDurationSegments = Nothing
2471− , _istNegativeIcmBrands = Nothing
2472− , _istNegativeKeyValues = Nothing
2473− , _istPositiveAudienceSegments = Nothing
2474− , _istPositiveXfpPlacements = Nothing
2475− , _istNegativeXfpAdSlots = Nothing
2476− , _istPositiveOperatingSystemVersions = Nothing
2477− , _istPositiveSizes = Nothing
2478− , _istPositiveDeviceCategories = Nothing
2479− , _istPositiveLocations = Nothing
2480− , _istNegativeAdSizes = Nothing
2481− , _istPositiveOperatingSystems = Nothing
2482− , _istPositiveSiteUrls = Nothing
2483− , _istNegativeInventorySlots = Nothing
2484− , _istNegativeVideoAdPositionSegments = Nothing
2485− , _istPositiveAdTypeSegments = Nothing
2486− , _istPositiveIcmInterests = Nothing
2487− , _istPositiveMobileApps = Nothing
2488− , _istPositiveKeyValues = Nothing
2489− , _istPositiveIcmBrands = Nothing
2490− , _istPositiveVideoDurationSegments = Nothing
2491− , _istNegativeAudienceSegments = Nothing
2492− , _istNegativeXfpPlacements = Nothing
2493− , _istPositiveXfpAdSlots = Nothing
2494− , _istNegativeOperatingSystemVersions = Nothing
2495− , _istNegativeSizes = Nothing
2496− , _istNegativeLocations = Nothing
2497− , _istNegativeDeviceCategories = Nothing
2498− , _istNegativeOperatingSystems = Nothing
2499− , _istPositiveAdSizes = Nothing
2500− , _istNegativeSiteUrls = Nothing
2501− , _istNegativeAdTypeSegments = Nothing
2502− , _istPositiveVideoAdPositionSegments = Nothing
2503− , _istPositiveInventorySlots = Nothing
2504− , _istNegativeMobileApps = Nothing
2505− , _istNegativeIcmInterests = Nothing
2506− }
2507−
2508−istNegativeVideoDurationSegments :: Lens' InventorySegmentTargeting [Int64]
2509−istNegativeVideoDurationSegments
2510− = lens _istNegativeVideoDurationSegments
2511− (\ s a -> s{_istNegativeVideoDurationSegments = a})
2512− . _Default
2513− . _Coerce
2514−
2515−istNegativeIcmBrands :: Lens' InventorySegmentTargeting [Int64]
2516−istNegativeIcmBrands
2517− = lens _istNegativeIcmBrands
2518− (\ s a -> s{_istNegativeIcmBrands = a})
2519− . _Default
2520− . _Coerce
2521−
2522−istNegativeKeyValues :: Lens' InventorySegmentTargeting [Maybe RuleKeyValuePair]
2523−istNegativeKeyValues
2524− = lens _istNegativeKeyValues
2525− (\ s a -> s{_istNegativeKeyValues = a})
2526− . _Default
2527− . _Coerce
2528−
2529−istPositiveAudienceSegments :: Lens' InventorySegmentTargeting [Int64]
2530−istPositiveAudienceSegments
2531− = lens _istPositiveAudienceSegments
2532− (\ s a -> s{_istPositiveAudienceSegments = a})
2533− . _Default
2534− . _Coerce
2535−
2536−istPositiveXfpPlacements :: Lens' InventorySegmentTargeting [Int64]
2537−istPositiveXfpPlacements
2538− = lens _istPositiveXfpPlacements
2539− (\ s a -> s{_istPositiveXfpPlacements = a})
2540− . _Default
2541− . _Coerce
2542−
2543−istNegativeXfpAdSlots :: Lens' InventorySegmentTargeting [Int64]
2544−istNegativeXfpAdSlots
2545− = lens _istNegativeXfpAdSlots
2546− (\ s a -> s{_istNegativeXfpAdSlots = a})
2547− . _Default
2548− . _Coerce
2549−
2550−istPositiveOperatingSystemVersions :: Lens' InventorySegmentTargeting [Int64]
2551−istPositiveOperatingSystemVersions
2552− = lens _istPositiveOperatingSystemVersions
2553− (\ s a -> s{_istPositiveOperatingSystemVersions = a})
2554− . _Default
2555− . _Coerce
2556−
2557−istPositiveSizes :: Lens' InventorySegmentTargeting [Int64]
2558−istPositiveSizes
2559− = lens _istPositiveSizes
2560− (\ s a -> s{_istPositiveSizes = a})
2561− . _Default
2562− . _Coerce
2563−
2564−istPositiveDeviceCategories :: Lens' InventorySegmentTargeting [Int64]
2565−istPositiveDeviceCategories
2566− = lens _istPositiveDeviceCategories
2567− (\ s a -> s{_istPositiveDeviceCategories = a})
2568− . _Default
2569− . _Coerce
2570−
2571−istPositiveLocations :: Lens' InventorySegmentTargeting [Int64]
2572−istPositiveLocations
2573− = lens _istPositiveLocations
2574− (\ s a -> s{_istPositiveLocations = a})
2575− . _Default
2576− . _Coerce
2577−
2578−istNegativeAdSizes :: Lens' InventorySegmentTargeting [Maybe AdSize]
2579−istNegativeAdSizes
2580− = lens _istNegativeAdSizes
2581− (\ s a -> s{_istNegativeAdSizes = a})
2582− . _Default
2583− . _Coerce
2584−
2585−istPositiveOperatingSystems :: Lens' InventorySegmentTargeting [Int64]
2586−istPositiveOperatingSystems
2587− = lens _istPositiveOperatingSystems
2588− (\ s a -> s{_istPositiveOperatingSystems = a})
2589− . _Default
2590− . _Coerce
2591−
2592−istPositiveSiteUrls :: Lens' InventorySegmentTargeting [Text]
2593−istPositiveSiteUrls
2594− = lens _istPositiveSiteUrls
2595− (\ s a -> s{_istPositiveSiteUrls = a})
2596− . _Default
2597− . _Coerce
2598−
2599−istNegativeInventorySlots :: Lens' InventorySegmentTargeting [Text]
2600−istNegativeInventorySlots
2601− = lens _istNegativeInventorySlots
2602− (\ s a -> s{_istNegativeInventorySlots = a})
2603− . _Default
2604− . _Coerce
2605−
2606−istNegativeVideoAdPositionSegments :: Lens' InventorySegmentTargeting [Text]
2607−istNegativeVideoAdPositionSegments
2608− = lens _istNegativeVideoAdPositionSegments
2609− (\ s a -> s{_istNegativeVideoAdPositionSegments = a})
2610− . _Default
2611− . _Coerce
2612−
2613−istPositiveAdTypeSegments :: Lens' InventorySegmentTargeting [Text]
2614−istPositiveAdTypeSegments
2615− = lens _istPositiveAdTypeSegments
2616− (\ s a -> s{_istPositiveAdTypeSegments = a})
2617− . _Default
2618− . _Coerce
2619−
2620−istPositiveIcmInterests :: Lens' InventorySegmentTargeting [Int64]
2621−istPositiveIcmInterests
2622− = lens _istPositiveIcmInterests
2623− (\ s a -> s{_istPositiveIcmInterests = a})
2624− . _Default
2625− . _Coerce
2626−
2627−istPositiveMobileApps :: Lens' InventorySegmentTargeting [Text]
2628−istPositiveMobileApps
2629− = lens _istPositiveMobileApps
2630− (\ s a -> s{_istPositiveMobileApps = a})
2631− . _Default
2632− . _Coerce
2633−
2634−istPositiveKeyValues :: Lens' InventorySegmentTargeting [Maybe RuleKeyValuePair]
2635−istPositiveKeyValues
2636− = lens _istPositiveKeyValues
2637− (\ s a -> s{_istPositiveKeyValues = a})
2638− . _Default
2639− . _Coerce
2640−
2641−istPositiveIcmBrands :: Lens' InventorySegmentTargeting [Int64]
2642−istPositiveIcmBrands
2643− = lens _istPositiveIcmBrands
2644− (\ s a -> s{_istPositiveIcmBrands = a})
2645− . _Default
2646− . _Coerce
2647−
2648−istPositiveVideoDurationSegments :: Lens' InventorySegmentTargeting [Int64]
2649−istPositiveVideoDurationSegments
2650− = lens _istPositiveVideoDurationSegments
2651− (\ s a -> s{_istPositiveVideoDurationSegments = a})
2652− . _Default
2653− . _Coerce
2654−
2655−istNegativeAudienceSegments :: Lens' InventorySegmentTargeting [Int64]
2656−istNegativeAudienceSegments
2657− = lens _istNegativeAudienceSegments
2658− (\ s a -> s{_istNegativeAudienceSegments = a})
2659− . _Default
2660− . _Coerce
2661−
2662−istNegativeXfpPlacements :: Lens' InventorySegmentTargeting [Int64]
2663−istNegativeXfpPlacements
2664− = lens _istNegativeXfpPlacements
2665− (\ s a -> s{_istNegativeXfpPlacements = a})
2666− . _Default
2667− . _Coerce
2668−
2669−istPositiveXfpAdSlots :: Lens' InventorySegmentTargeting [Int64]
2670−istPositiveXfpAdSlots
2671− = lens _istPositiveXfpAdSlots
2672− (\ s a -> s{_istPositiveXfpAdSlots = a})
2673− . _Default
2674− . _Coerce
2675−
2676−istNegativeOperatingSystemVersions :: Lens' InventorySegmentTargeting [Int64]
2677−istNegativeOperatingSystemVersions
2678− = lens _istNegativeOperatingSystemVersions
2679− (\ s a -> s{_istNegativeOperatingSystemVersions = a})
2680− . _Default
2681− . _Coerce
2682−
2683−istNegativeSizes :: Lens' InventorySegmentTargeting [Int64]
2684−istNegativeSizes
2685− = lens _istNegativeSizes
2686− (\ s a -> s{_istNegativeSizes = a})
2687− . _Default
2688− . _Coerce
2689−
2690−istNegativeLocations :: Lens' InventorySegmentTargeting [Int64]
2691−istNegativeLocations
2692− = lens _istNegativeLocations
2693− (\ s a -> s{_istNegativeLocations = a})
2694− . _Default
2695− . _Coerce
2696−
2697−istNegativeDeviceCategories :: Lens' InventorySegmentTargeting [Int64]
2698−istNegativeDeviceCategories
2699− = lens _istNegativeDeviceCategories
2700− (\ s a -> s{_istNegativeDeviceCategories = a})
2701− . _Default
2702− . _Coerce
2703−
2704−istNegativeOperatingSystems :: Lens' InventorySegmentTargeting [Int64]
2705−istNegativeOperatingSystems
2706− = lens _istNegativeOperatingSystems
2707− (\ s a -> s{_istNegativeOperatingSystems = a})
2708− . _Default
2709− . _Coerce
2710−
2711−istPositiveAdSizes :: Lens' InventorySegmentTargeting [Maybe AdSize]
2712−istPositiveAdSizes
2713− = lens _istPositiveAdSizes
2714− (\ s a -> s{_istPositiveAdSizes = a})
2715− . _Default
2716− . _Coerce
2717−
2718−istNegativeSiteUrls :: Lens' InventorySegmentTargeting [Text]
2719−istNegativeSiteUrls
2720− = lens _istNegativeSiteUrls
2721− (\ s a -> s{_istNegativeSiteUrls = a})
2722− . _Default
2723− . _Coerce
2724−
2725−istNegativeAdTypeSegments :: Lens' InventorySegmentTargeting [Text]
2726−istNegativeAdTypeSegments
2727− = lens _istNegativeAdTypeSegments
2728− (\ s a -> s{_istNegativeAdTypeSegments = a})
2729− . _Default
2730− . _Coerce
2731−
2732−istPositiveVideoAdPositionSegments :: Lens' InventorySegmentTargeting [Text]
2733−istPositiveVideoAdPositionSegments
2734− = lens _istPositiveVideoAdPositionSegments
2735− (\ s a -> s{_istPositiveVideoAdPositionSegments = a})
2736− . _Default
2737− . _Coerce
2738−
2739−istPositiveInventorySlots :: Lens' InventorySegmentTargeting [Text]
2740−istPositiveInventorySlots
2741− = lens _istPositiveInventorySlots
2742− (\ s a -> s{_istPositiveInventorySlots = a})
2743− . _Default
2744− . _Coerce
2745−
2746−istNegativeMobileApps :: Lens' InventorySegmentTargeting [Text]
2747−istNegativeMobileApps
2748− = lens _istNegativeMobileApps
2749− (\ s a -> s{_istNegativeMobileApps = a})
2750− . _Default
2751− . _Coerce
2752−
2753−istNegativeIcmInterests :: Lens' InventorySegmentTargeting [Int64]
2754−istNegativeIcmInterests
2755− = lens _istNegativeIcmInterests
2756− (\ s a -> s{_istNegativeIcmInterests = a})
2757− . _Default
2758− . _Coerce
2759−
2760−instance FromJSON InventorySegmentTargeting where
2761− parseJSON
2762− = withObject "InventorySegmentTargeting"
2763− (\ o ->
2764− InventorySegmentTargeting <$>
2765− (o .:? "negativeVideoDurationSegments" .!= mempty)
2766− <*> (o .:? "negativeIcmBrands" .!= mempty)
2767− <*> (o .:? "negativeKeyValues" .!= mempty)
2768− <*> (o .:? "positiveAudienceSegments" .!= mempty)
2769− <*> (o .:? "positiveXfpPlacements" .!= mempty)
2770− <*> (o .:? "negativeXfpAdSlots" .!= mempty)
2771− <*>
2772− (o .:? "positiveOperatingSystemVersions" .!= mempty)
2773− <*> (o .:? "positiveSizes" .!= mempty)
2774− <*> (o .:? "positiveDeviceCategories" .!= mempty)
2775− <*> (o .:? "positiveLocations" .!= mempty)
2776− <*> (o .:? "negativeAdSizes" .!= mempty)
2777− <*> (o .:? "positiveOperatingSystems" .!= mempty)
2778− <*> (o .:? "positiveSiteUrls" .!= mempty)
2779− <*> (o .:? "negativeInventorySlots" .!= mempty)
2780− <*>
2781− (o .:? "negativeVideoAdPositionSegments" .!= mempty)
2782− <*> (o .:? "positiveAdTypeSegments" .!= mempty)
2783− <*> (o .:? "positiveIcmInterests" .!= mempty)
2784− <*> (o .:? "positiveMobileApps" .!= mempty)
2785− <*> (o .:? "positiveKeyValues" .!= mempty)
2786− <*> (o .:? "positiveIcmBrands" .!= mempty)
2787− <*>
2788− (o .:? "positiveVideoDurationSegments" .!= mempty)
2789− <*> (o .:? "negativeAudienceSegments" .!= mempty)
2790− <*> (o .:? "negativeXfpPlacements" .!= mempty)
2791− <*> (o .:? "positiveXfpAdSlots" .!= mempty)
2792− <*>
2793− (o .:? "negativeOperatingSystemVersions" .!= mempty)
2794− <*> (o .:? "negativeSizes" .!= mempty)
2795− <*> (o .:? "negativeLocations" .!= mempty)
2796− <*> (o .:? "negativeDeviceCategories" .!= mempty)
2797− <*> (o .:? "negativeOperatingSystems" .!= mempty)
2798− <*> (o .:? "positiveAdSizes" .!= mempty)
2799− <*> (o .:? "negativeSiteUrls" .!= mempty)
2800− <*> (o .:? "negativeAdTypeSegments" .!= mempty)
2801− <*>
2802− (o .:? "positiveVideoAdPositionSegments" .!= mempty)
2803− <*> (o .:? "positiveInventorySlots" .!= mempty)
2804− <*> (o .:? "negativeMobileApps" .!= mempty)
2805− <*> (o .:? "negativeIcmInterests" .!= mempty))
2806−
2807−instance ToJSON InventorySegmentTargeting where
2808− toJSON InventorySegmentTargeting{..}
2809− = object
2810− (catMaybes
2811− [("negativeVideoDurationSegments" .=) <$>
2812− _istNegativeVideoDurationSegments,
2813− ("negativeIcmBrands" .=) <$> _istNegativeIcmBrands,
2814− ("negativeKeyValues" .=) <$> _istNegativeKeyValues,
2815− ("positiveAudienceSegments" .=) <$>
2816− _istPositiveAudienceSegments,
2817− ("positiveXfpPlacements" .=) <$>
2818− _istPositiveXfpPlacements,
2819− ("negativeXfpAdSlots" .=) <$> _istNegativeXfpAdSlots,
2820− ("positiveOperatingSystemVersions" .=) <$>
2821− _istPositiveOperatingSystemVersions,
2822− ("positiveSizes" .=) <$> _istPositiveSizes,
2823− ("positiveDeviceCategories" .=) <$>
2824− _istPositiveDeviceCategories,
2825− ("positiveLocations" .=) <$> _istPositiveLocations,
2826− ("negativeAdSizes" .=) <$> _istNegativeAdSizes,
2827− ("positiveOperatingSystems" .=) <$>
2828− _istPositiveOperatingSystems,
2829− ("positiveSiteUrls" .=) <$> _istPositiveSiteUrls,
2830− ("negativeInventorySlots" .=) <$>
2831− _istNegativeInventorySlots,
2832− ("negativeVideoAdPositionSegments" .=) <$>
2833− _istNegativeVideoAdPositionSegments,
2834− ("positiveAdTypeSegments" .=) <$>
2835− _istPositiveAdTypeSegments,
2836− ("positiveIcmInterests" .=) <$>
2837− _istPositiveIcmInterests,
2838− ("positiveMobileApps" .=) <$> _istPositiveMobileApps,
2839− ("positiveKeyValues" .=) <$> _istPositiveKeyValues,
2840− ("positiveIcmBrands" .=) <$> _istPositiveIcmBrands,
2841− ("positiveVideoDurationSegments" .=) <$>
2842− _istPositiveVideoDurationSegments,
2843− ("negativeAudienceSegments" .=) <$>
2844− _istNegativeAudienceSegments,
2845− ("negativeXfpPlacements" .=) <$>
2846− _istNegativeXfpPlacements,
2847− ("positiveXfpAdSlots" .=) <$> _istPositiveXfpAdSlots,
2848− ("negativeOperatingSystemVersions" .=) <$>
2849− _istNegativeOperatingSystemVersions,
2850− ("negativeSizes" .=) <$> _istNegativeSizes,
2851− ("negativeLocations" .=) <$> _istNegativeLocations,
2852− ("negativeDeviceCategories" .=) <$>
2853− _istNegativeDeviceCategories,
2854− ("negativeOperatingSystems" .=) <$>
2855− _istNegativeOperatingSystems,
2856− ("positiveAdSizes" .=) <$> _istPositiveAdSizes,
2857− ("negativeSiteUrls" .=) <$> _istNegativeSiteUrls,
2858− ("negativeAdTypeSegments" .=) <$>
2859− _istNegativeAdTypeSegments,
2860− ("positiveVideoAdPositionSegments" .=) <$>
2861− _istPositiveVideoAdPositionSegments,
2862− ("positiveInventorySlots" .=) <$>
2863− _istPositiveInventorySlots,
2864− ("negativeMobileApps" .=) <$> _istNegativeMobileApps,
2865− ("negativeIcmInterests" .=) <$>
2866− _istNegativeIcmInterests])
2867−
2868−--
2869−-- /See:/ 'sharedTargeting' smart constructor.
2870−data SharedTargeting = SharedTargeting
2871− { _stKey :: !(Maybe Text)
2872− , _stExclusions :: !(Maybe [Maybe TargetingValue])
2873− , _stInclusions :: !(Maybe [Maybe TargetingValue])
2874− } deriving (Eq,Read,Show,Data,Typeable,Generic)
2875−
2876−-- | Creates a value of 'SharedTargeting' with the minimum fields required to make a request.
2877−--
2878−-- Use one of the following lenses to modify other fields as desired:
2879−--
2880−-- * 'stKey'
2881−--
2882−-- * 'stExclusions'
2883−--
2884−-- * 'stInclusions'
2885−sharedTargeting
2886− :: SharedTargeting
2887−sharedTargeting =
2888− SharedTargeting
2889− { _stKey = Nothing
2890− , _stExclusions = Nothing
2891− , _stInclusions = Nothing
2892− }
2893−
2894−-- | The key representing the shared targeting criterion.
2895−stKey :: Lens' SharedTargeting (Maybe Text)
2896−stKey = lens _stKey (\ s a -> s{_stKey = a})
2897−
2898−-- | The list of values to exclude from targeting.
2899−stExclusions :: Lens' SharedTargeting [Maybe TargetingValue]
2900−stExclusions
2901− = lens _stExclusions (\ s a -> s{_stExclusions = a})
2902− . _Default
2903− . _Coerce
2904−
2905−-- | The list of value to include as part of the targeting.
2906−stInclusions :: Lens' SharedTargeting [Maybe TargetingValue]
2907−stInclusions
2908− = lens _stInclusions (\ s a -> s{_stInclusions = a})
2909− . _Default
2910− . _Coerce
2911−
2912−instance FromJSON SharedTargeting where
2913− parseJSON
2914− = withObject "SharedTargeting"
2915− (\ o ->
2916− SharedTargeting <$>
2917− (o .:? "key") <*> (o .:? "exclusions" .!= mempty) <*>
2918− (o .:? "inclusions" .!= mempty))
2919−
2920−instance ToJSON SharedTargeting where
2921− toJSON SharedTargeting{..}
2922− = object
2923− (catMaybes
2924− [("key" .=) <$> _stKey,
2925− ("exclusions" .=) <$> _stExclusions,
2926− ("inclusions" .=) <$> _stInclusions])
2927−
2928−--
2929−-- /See:/ 'webPropertyDto' smart constructor.
2930−data WebPropertyDto = WebPropertyDto
2931− { _wpdEnabledForPreferredDeals :: !(Maybe Bool)
2932− , _wpdSyndicationProduct :: !(Maybe Text)
2933− , _wpdName :: !(Maybe Text)
2934− , _wpdPropertyCode :: !(Maybe Text)
2935− , _wpdId :: !(Maybe Int32)
2936− , _wpdSiteUrls :: !(Maybe [Text])
2937− , _wpdAllowInterestTargetedAds :: !(Maybe Bool)
2938− } deriving (Eq,Read,Show,Data,Typeable,Generic)
2939−
2940−-- | Creates a value of 'WebPropertyDto' with the minimum fields required to make a request.
2941−--
2942−-- Use one of the following lenses to modify other fields as desired:
2943−--
2944−-- * 'wpdEnabledForPreferredDeals'
2945−--
2946−-- * 'wpdSyndicationProduct'
2947−--
2948−-- * 'wpdName'
2949−--
2950−-- * 'wpdPropertyCode'
2951−--
2952−-- * 'wpdId'
2953−--
2954−-- * 'wpdSiteUrls'
2955−--
2956−-- * 'wpdAllowInterestTargetedAds'
2957−webPropertyDto
2958− :: WebPropertyDto
2959−webPropertyDto =
2960− WebPropertyDto
2961− { _wpdEnabledForPreferredDeals = Nothing
2962− , _wpdSyndicationProduct = Nothing
2963− , _wpdName = Nothing
2964− , _wpdPropertyCode = Nothing
2965− , _wpdId = Nothing
2966− , _wpdSiteUrls = Nothing
2967− , _wpdAllowInterestTargetedAds = Nothing
2968− }
2969−
2970−wpdEnabledForPreferredDeals :: Lens' WebPropertyDto (Maybe Bool)
2971−wpdEnabledForPreferredDeals
2972− = lens _wpdEnabledForPreferredDeals
2973− (\ s a -> s{_wpdEnabledForPreferredDeals = a})
2974−
2975−wpdSyndicationProduct :: Lens' WebPropertyDto (Maybe Text)
2976−wpdSyndicationProduct
2977− = lens _wpdSyndicationProduct
2978− (\ s a -> s{_wpdSyndicationProduct = a})
2979−
2980−wpdName :: Lens' WebPropertyDto (Maybe Text)
2981−wpdName = lens _wpdName (\ s a -> s{_wpdName = a})
2982−
2983−wpdPropertyCode :: Lens' WebPropertyDto (Maybe Text)
2984−wpdPropertyCode
2985− = lens _wpdPropertyCode
2986− (\ s a -> s{_wpdPropertyCode = a})
2987−
2988−wpdId :: Lens' WebPropertyDto (Maybe Int32)
2989−wpdId = lens _wpdId (\ s a -> s{_wpdId = a})
2990−
2991−wpdSiteUrls :: Lens' WebPropertyDto [Text]
2992−wpdSiteUrls
2993− = lens _wpdSiteUrls (\ s a -> s{_wpdSiteUrls = a}) .
2994− _Default
2995− . _Coerce
2996−
2997−wpdAllowInterestTargetedAds :: Lens' WebPropertyDto (Maybe Bool)
2998−wpdAllowInterestTargetedAds
2999− = lens _wpdAllowInterestTargetedAds
3000− (\ s a -> s{_wpdAllowInterestTargetedAds = a})
3001−
3002−instance FromJSON WebPropertyDto where
3003− parseJSON
3004− = withObject "WebPropertyDto"
3005− (\ o ->
3006− WebPropertyDto <$>
3007− (o .:? "enabledForPreferredDeals") <*>
3008− (o .:? "syndicationProduct")
3009− <*> (o .:? "name")
3010− <*> (o .:? "propertyCode")
3011− <*> (o .:? "id")
3012− <*> (o .:? "siteUrls" .!= mempty)
3013− <*> (o .:? "allowInterestTargetedAds"))
3014−
3015−instance ToJSON WebPropertyDto where
3016− toJSON WebPropertyDto{..}
3017− = object
3018− (catMaybes
3019− [("enabledForPreferredDeals" .=) <$>
3020− _wpdEnabledForPreferredDeals,
3021− ("syndicationProduct" .=) <$> _wpdSyndicationProduct,
3022− ("name" .=) <$> _wpdName,
3023− ("propertyCode" .=) <$> _wpdPropertyCode,
3024− ("id" .=) <$> _wpdId,
3025− ("siteUrls" .=) <$> _wpdSiteUrls,
3026− ("allowInterestTargetedAds" .=) <$>
3027− _wpdAllowInterestTargetedAds])
3028−
3029−--
3030−-- /See:/ 'listClientAccessCapabilitiesRequest' smart constructor.
3031−newtype ListClientAccessCapabilitiesRequest = ListClientAccessCapabilitiesRequest
3032− { _lcacrSponsorAccountId :: Maybe Int64
3033− } deriving (Eq,Read,Show,Data,Typeable,Generic)
3034−
3035−-- | Creates a value of 'ListClientAccessCapabilitiesRequest' with the minimum fields required to make a request.
3036−--
3037−-- Use one of the following lenses to modify other fields as desired:
3038−--
3039−-- * 'lcacrSponsorAccountId'
3040−listClientAccessCapabilitiesRequest
3041− :: ListClientAccessCapabilitiesRequest
3042−listClientAccessCapabilitiesRequest =
3043− ListClientAccessCapabilitiesRequest
3044− { _lcacrSponsorAccountId = Nothing
3045− }
3046−
3047−lcacrSponsorAccountId :: Lens' ListClientAccessCapabilitiesRequest (Maybe Int64)
3048−lcacrSponsorAccountId
3049− = lens _lcacrSponsorAccountId
3050− (\ s a -> s{_lcacrSponsorAccountId = a})
3051−
3052−instance FromJSON ListClientAccessCapabilitiesRequest
3053− where
3054− parseJSON
3055− = withObject "ListClientAccessCapabilitiesRequest"
3056− (\ o ->
3057− ListClientAccessCapabilitiesRequest <$>
3058− (o .:? "sponsorAccountId"))
3059−
3060−instance ToJSON ListClientAccessCapabilitiesRequest
3061− where
3062− toJSON ListClientAccessCapabilitiesRequest{..}
3063− = object
3064− (catMaybes
3065− [("sponsorAccountId" .=) <$> _lcacrSponsorAccountId])
3066−
3067−--
3068−-- /See:/ 'targetingValueDayPartTargeting' smart constructor.
3069−data TargetingValueDayPartTargeting = TargetingValueDayPartTargeting
3070− { _tvdptTimeZoneType :: !(Maybe Text)
3071− , _tvdptDayParts :: !(Maybe [Maybe TargetingValueDayPartTargetingDayPart])
3072− } deriving (Eq,Read,Show,Data,Typeable,Generic)
3073−
3074−-- | Creates a value of 'TargetingValueDayPartTargeting' with the minimum fields required to make a request.
3075−--
3076−-- Use one of the following lenses to modify other fields as desired:
3077−--
3078−-- * 'tvdptTimeZoneType'
3079−--
3080−-- * 'tvdptDayParts'
3081−targetingValueDayPartTargeting
3082− :: TargetingValueDayPartTargeting
3083−targetingValueDayPartTargeting =
3084− TargetingValueDayPartTargeting
3085− { _tvdptTimeZoneType = Nothing
3086− , _tvdptDayParts = Nothing
3087− }
3088−
3089−tvdptTimeZoneType :: Lens' TargetingValueDayPartTargeting (Maybe Text)
3090−tvdptTimeZoneType
3091− = lens _tvdptTimeZoneType
3092− (\ s a -> s{_tvdptTimeZoneType = a})
3093−
3094−tvdptDayParts :: Lens' TargetingValueDayPartTargeting [Maybe TargetingValueDayPartTargetingDayPart]
3095−tvdptDayParts
3096− = lens _tvdptDayParts
3097− (\ s a -> s{_tvdptDayParts = a})
3098− . _Default
3099− . _Coerce
3100−
3101−instance FromJSON TargetingValueDayPartTargeting
3102− where
3103− parseJSON
3104− = withObject "TargetingValueDayPartTargeting"
3105− (\ o ->
3106− TargetingValueDayPartTargeting <$>
3107− (o .:? "timeZoneType") <*>
3108− (o .:? "dayParts" .!= mempty))
3109−
3110−instance ToJSON TargetingValueDayPartTargeting where
3111− toJSON TargetingValueDayPartTargeting{..}
3112− = object
3113− (catMaybes
3114− [("timeZoneType" .=) <$> _tvdptTimeZoneType,
3115− ("dayParts" .=) <$> _tvdptDayParts])
3116−
3117−--
3118−-- /See:/ 'creativeItemServingRestrictions' smart constructor.
3119−data CreativeItemServingRestrictions = CreativeItemServingRestrictions
3120− { _cisrContexts :: !(Maybe [CreativeItemContextsItemServingRestrictions])
3121− , _cisrReason :: !(Maybe Text)
3122− , _cisrDisapprovalReasons :: !(Maybe [CreativeItemDisapprovalReasonsItemServingRestrictions])
3123− } deriving (Eq,Read,Show,Data,Typeable,Generic)
3124−
3125−-- | Creates a value of 'CreativeItemServingRestrictions' with the minimum fields required to make a request.
3126−--
3127−-- Use one of the following lenses to modify other fields as desired:
3128−--
3129−-- * 'cisrContexts'
3130−--
3131−-- * 'cisrReason'
3132−--
3133−-- * 'cisrDisapprovalReasons'
3134−creativeItemServingRestrictions
3135− :: CreativeItemServingRestrictions
3136−creativeItemServingRestrictions =
3137− CreativeItemServingRestrictions
3138− { _cisrContexts = Nothing
3139− , _cisrReason = Nothing
3140− , _cisrDisapprovalReasons = Nothing
3141− }
3142−
3143−-- | All known contexts\/restrictions.
3144−cisrContexts :: Lens' CreativeItemServingRestrictions [CreativeItemContextsItemServingRestrictions]
3145−cisrContexts
3146− = lens _cisrContexts (\ s a -> s{_cisrContexts = a})
3147− . _Default
3148− . _Coerce
3149−
3150−-- | Why the creative is ineligible to serve in this context (e.g., it has
3151−-- been explicitly disapproved or is pending review).
3152−cisrReason :: Lens' CreativeItemServingRestrictions (Maybe Text)
3153−cisrReason
3154− = lens _cisrReason (\ s a -> s{_cisrReason = a})
3155−
3156−-- | The reasons for disapproval within this restriction, if any. Note that
3157−-- not all disapproval reasons may be categorized, so it is possible for
3158−-- the creative to have a status of DISAPPROVED or CONDITIONALLY_APPROVED
3159−-- with an empty list for disapproval_reasons. In this case, please reach
3160−-- out to your TAM to help debug the issue.
3161−cisrDisapprovalReasons :: Lens' CreativeItemServingRestrictions [CreativeItemDisapprovalReasonsItemServingRestrictions]
3162−cisrDisapprovalReasons
3163− = lens _cisrDisapprovalReasons
3164− (\ s a -> s{_cisrDisapprovalReasons = a})
3165− . _Default
3166− . _Coerce
3167−
3168−instance FromJSON CreativeItemServingRestrictions
3169− where
3170− parseJSON
3171− = withObject "CreativeItemServingRestrictions"
3172− (\ o ->
3173− CreativeItemServingRestrictions <$>
3174− (o .:? "contexts" .!= mempty) <*> (o .:? "reason")
3175− <*> (o .:? "disapprovalReasons" .!= mempty))
3176−
3177−instance ToJSON CreativeItemServingRestrictions where
3178− toJSON CreativeItemServingRestrictions{..}
3179− = object
3180− (catMaybes
3181− [("contexts" .=) <$> _cisrContexts,
3182− ("reason" .=) <$> _cisrReason,
3183− ("disapprovalReasons" .=) <$>
3184− _cisrDisapprovalReasons])
3185−
3186−--
3187−-- /See:/ 'listOffersRequest' smart constructor.
3188−newtype ListOffersRequest = ListOffersRequest
3189− { _lorSinceTimestampMillis :: Maybe Int64
3190− } deriving (Eq,Read,Show,Data,Typeable,Generic)
3191−
3192−-- | Creates a value of 'ListOffersRequest' with the minimum fields required to make a request.
3193−--
3194−-- Use one of the following lenses to modify other fields as desired:
3195−--
3196−-- * 'lorSinceTimestampMillis'
3197−listOffersRequest
3198− :: ListOffersRequest
3199−listOffersRequest =
3200− ListOffersRequest
3201− { _lorSinceTimestampMillis = Nothing
3202− }
3203−
3204−lorSinceTimestampMillis :: Lens' ListOffersRequest (Maybe Int64)
3205−lorSinceTimestampMillis
3206− = lens _lorSinceTimestampMillis
3207− (\ s a -> s{_lorSinceTimestampMillis = a})
3208−
3209−instance FromJSON ListOffersRequest where
3210− parseJSON
3211− = withObject "ListOffersRequest"
3212− (\ o ->
3213− ListOffersRequest <$> (o .:? "sinceTimestampMillis"))
3214−
3215−instance ToJSON ListOffersRequest where
3216− toJSON ListOffersRequest{..}
3217− = object
3218− (catMaybes
3219− [("sinceTimestampMillis" .=) <$>
3220− _lorSinceTimestampMillis])
3221−
3222−--
3223−-- /See:/ 'pretargetingConfigItemPlacements' smart constructor.
3224−data PretargetingConfigItemPlacements = PretargetingConfigItemPlacements
3225− { _pcipToken :: !(Maybe Text)
3226− , _pcipType :: !(Maybe Text)
3227− } deriving (Eq,Read,Show,Data,Typeable,Generic)
3228−
3229−-- | Creates a value of 'PretargetingConfigItemPlacements' with the minimum fields required to make a request.
3230−--
3231−-- Use one of the following lenses to modify other fields as desired:
3232−--
3233−-- * 'pcipToken'
3234−--
3235−-- * 'pcipType'
3236−pretargetingConfigItemPlacements
3237− :: PretargetingConfigItemPlacements
3238−pretargetingConfigItemPlacements =
3239− PretargetingConfigItemPlacements
3240− { _pcipToken = Nothing
3241− , _pcipType = Nothing
3242− }
3243−
3244−-- | The value of the placement. Interpretation depends on the placement
3245−-- type, e.g. URL for a site placement, channel name for a channel
3246−-- placement, app id for a mobile app placement.
3247−pcipToken :: Lens' PretargetingConfigItemPlacements (Maybe Text)
3248−pcipToken
3249− = lens _pcipToken (\ s a -> s{_pcipToken = a})
3250−
3251−-- | The type of the placement.
3252−pcipType :: Lens' PretargetingConfigItemPlacements (Maybe Text)
3253−pcipType = lens _pcipType (\ s a -> s{_pcipType = a})
3254−
3255−instance FromJSON PretargetingConfigItemPlacements
3256− where
3257− parseJSON
3258− = withObject "PretargetingConfigItemPlacements"
3259− (\ o ->
3260− PretargetingConfigItemPlacements <$>
3261− (o .:? "token") <*> (o .:? "type"))
3262−
3263−instance ToJSON PretargetingConfigItemPlacements
3264− where
3265− toJSON PretargetingConfigItemPlacements{..}
3266− = object
3267− (catMaybes
3268− [("token" .=) <$> _pcipToken,
3269− ("type" .=) <$> _pcipType])
3270−
3271−--
3272−-- /See:/ 'creativeItemDisapprovalReasonsItemServingRestrictions' smart constructor.
3273−data CreativeItemDisapprovalReasonsItemServingRestrictions = CreativeItemDisapprovalReasonsItemServingRestrictions
3274− { _cidrisrReason :: !(Maybe Text)
3275− , _cidrisrDetails :: !(Maybe [Text])
3276− } deriving (Eq,Read,Show,Data,Typeable,Generic)
3277−
3278−-- | Creates a value of 'CreativeItemDisapprovalReasonsItemServingRestrictions' with the minimum fields required to make a request.
3279−--
3280−-- Use one of the following lenses to modify other fields as desired:
3281−--
3282−-- * 'cidrisrReason'
3283−--
3284−-- * 'cidrisrDetails'
3285−creativeItemDisapprovalReasonsItemServingRestrictions
3286− :: CreativeItemDisapprovalReasonsItemServingRestrictions
3287−creativeItemDisapprovalReasonsItemServingRestrictions =
3288− CreativeItemDisapprovalReasonsItemServingRestrictions
3289− { _cidrisrReason = Nothing
3290− , _cidrisrDetails = Nothing
3291− }
3292−
3293−-- | The categorized reason for disapproval.
3294−cidrisrReason :: Lens' CreativeItemDisapprovalReasonsItemServingRestrictions (Maybe Text)
3295−cidrisrReason
3296− = lens _cidrisrReason
3297− (\ s a -> s{_cidrisrReason = a})
3298−
3299−-- | Additional details about the reason for disapproval.
3300−cidrisrDetails :: Lens' CreativeItemDisapprovalReasonsItemServingRestrictions [Text]
3301−cidrisrDetails
3302− = lens _cidrisrDetails
3303− (\ s a -> s{_cidrisrDetails = a})
3304− . _Default
3305− . _Coerce
3306−
3307−instance FromJSON
3308− CreativeItemDisapprovalReasonsItemServingRestrictions
3309− where
3310− parseJSON
3311− = withObject
3312− "CreativeItemDisapprovalReasonsItemServingRestrictions"
3313− (\ o ->
3314− CreativeItemDisapprovalReasonsItemServingRestrictions
3315− <$>
3316− (o .:? "reason") <*> (o .:? "details" .!= mempty))
3317−
3318−instance ToJSON
3319− CreativeItemDisapprovalReasonsItemServingRestrictions
3320− where
3321− toJSON
3322− CreativeItemDisapprovalReasonsItemServingRestrictions{..}
3323− = object
3324− (catMaybes
3325− [("reason" .=) <$> _cidrisrReason,
3326− ("details" .=) <$> _cidrisrDetails])
3327−
3328−-- | An order can contain multiple deals. A deal contains the terms and
3329−-- targeting information that is used for serving.
3330−--
3331−-- /See:/ 'marketplaceDeal' smart constructor.
3332−data MarketplaceDeal = MarketplaceDeal
3333− { _mdExternalDealId :: !(Maybe Text)
3334− , _mdBuyerPrivateData :: !(Maybe (Maybe PrivateData))
3335− , _mdWebPropertyCode :: !(Maybe Text)
3336− , _mdCreationTimeMs :: !(Maybe Int64)
3337− , _mdTerms :: !(Maybe (Maybe DealTerms))
3338− , _mdOfferRevisionNumber :: !(Maybe Int64)
3339− , _mdLastUpdateTimeMs :: !(Maybe Int64)
3340− , _mdKind :: !Text
3341− , _mdDeliveryControl :: !(Maybe (Maybe DeliveryControl))
3342− , _mdFlightStartTimeMs :: !(Maybe Int64)
3343− , _mdSharedTargetings :: !(Maybe [Maybe SharedTargeting])
3344− , _mdDealId :: !(Maybe Text)
3345− , _mdInventoryDescription :: !(Maybe Text)
3346− , _mdSyndicationProduct :: !(Maybe Text)
3347− , _mdFlightEndTimeMs :: !(Maybe Int64)
3348− , _mdName :: !(Maybe Text)
3349− , _mdSellerContacts :: !(Maybe [Maybe ContactInformation])
3350− , _mdOfferId :: !(Maybe Text)
3351− , _mdOrderId :: !(Maybe Text)
3352− } deriving (Eq,Read,Show,Data,Typeable,Generic)
3353−
3354−-- | Creates a value of 'MarketplaceDeal' with the minimum fields required to make a request.
3355−--
3356−-- Use one of the following lenses to modify other fields as desired:
3357−--
3358−-- * 'mdExternalDealId'
3359−--
3360−-- * 'mdBuyerPrivateData'
3361−--
3362−-- * 'mdWebPropertyCode'
3363−--
3364−-- * 'mdCreationTimeMs'
3365−--
3366−-- * 'mdTerms'
3367−--
3368−-- * 'mdOfferRevisionNumber'
3369−--
3370−-- * 'mdLastUpdateTimeMs'
3371−--
3372−-- * 'mdKind'
3373−--
3374−-- * 'mdDeliveryControl'
3375−--
3376−-- * 'mdFlightStartTimeMs'
3377−--
3378−-- * 'mdSharedTargetings'
3379−--
3380−-- * 'mdDealId'
3381−--
3382−-- * 'mdInventoryDescription'
3383−--
3384−-- * 'mdSyndicationProduct'
3385−--
3386−-- * 'mdFlightEndTimeMs'
3387−--
3388−-- * 'mdName'
3389−--
3390−-- * 'mdSellerContacts'
3391−--
3392−-- * 'mdOfferId'
3393−--
3394−-- * 'mdOrderId'
3395−marketplaceDeal
3396− :: MarketplaceDeal
3397−marketplaceDeal =
3398− MarketplaceDeal
3399− { _mdExternalDealId = Nothing
3400− , _mdBuyerPrivateData = Nothing
3401− , _mdWebPropertyCode = Nothing
3402− , _mdCreationTimeMs = Nothing
3403− , _mdTerms = Nothing
3404− , _mdOfferRevisionNumber = Nothing
3405− , _mdLastUpdateTimeMs = Nothing
3406− , _mdKind = "adexchangebuyer#marketplaceDeal"
3407− , _mdDeliveryControl = Nothing
3408− , _mdFlightStartTimeMs = Nothing
3409− , _mdSharedTargetings = Nothing
3410− , _mdDealId = Nothing
3411− , _mdInventoryDescription = Nothing
3412− , _mdSyndicationProduct = Nothing
3413− , _mdFlightEndTimeMs = Nothing
3414− , _mdName = Nothing
3415− , _mdSellerContacts = Nothing
3416− , _mdOfferId = Nothing
3417− , _mdOrderId = Nothing
3418− }
3419−
3420−-- | The external deal id assigned to this deal once the deal is finalized.
3421−-- This is the deal-id that shows up in serving\/reporting etc. (readonly)
3422−mdExternalDealId :: Lens' MarketplaceDeal (Maybe Text)
3423−mdExternalDealId
3424− = lens _mdExternalDealId
3425− (\ s a -> s{_mdExternalDealId = a})
3426−
3427−-- | Buyer private data (hidden from seller).
3428−mdBuyerPrivateData :: Lens' MarketplaceDeal (Maybe (Maybe PrivateData))
3429−mdBuyerPrivateData
3430− = lens _mdBuyerPrivateData
3431− (\ s a -> s{_mdBuyerPrivateData = a})
3432−
3433−mdWebPropertyCode :: Lens' MarketplaceDeal (Maybe Text)
3434−mdWebPropertyCode
3435− = lens _mdWebPropertyCode
3436− (\ s a -> s{_mdWebPropertyCode = a})
3437−
3438−-- | The time (ms since epoch) of the deal creation. (readonly)
3439−mdCreationTimeMs :: Lens' MarketplaceDeal (Maybe Int64)
3440−mdCreationTimeMs
3441− = lens _mdCreationTimeMs
3442− (\ s a -> s{_mdCreationTimeMs = a})
3443−
3444−-- | The negotiable terms of the deal. (updatable)
3445−mdTerms :: Lens' MarketplaceDeal (Maybe (Maybe DealTerms))
3446−mdTerms = lens _mdTerms (\ s a -> s{_mdTerms = a})
3447−
3448−-- | The revision number of the offer that the deal was created from
3449−-- (readonly, except on create)
3450−mdOfferRevisionNumber :: Lens' MarketplaceDeal (Maybe Int64)
3451−mdOfferRevisionNumber
3452− = lens _mdOfferRevisionNumber
3453− (\ s a -> s{_mdOfferRevisionNumber = a})
3454−
3455−-- | The time (ms since epoch) when the deal was last updated. (readonly)
3456−mdLastUpdateTimeMs :: Lens' MarketplaceDeal (Maybe Int64)
3457−mdLastUpdateTimeMs
3458− = lens _mdLastUpdateTimeMs
3459− (\ s a -> s{_mdLastUpdateTimeMs = a})
3460−
3461−-- | Identifies what kind of resource this is. Value: the fixed string
3462−-- \"adexchangebuyer#marketplaceDeal\".
3463−mdKind :: Lens' MarketplaceDeal Text
3464−mdKind = lens _mdKind (\ s a -> s{_mdKind = a})
3465−
3466−-- | The set of fields around delivery control that are interesting for a
3467−-- buyer to see but are non-negotiable. These are set by the publisher.
3468−-- This message is assigned an id of 100 since some day we would want to
3469−-- model this as a protobuf extension.
3470−mdDeliveryControl :: Lens' MarketplaceDeal (Maybe (Maybe DeliveryControl))
3471−mdDeliveryControl
3472− = lens _mdDeliveryControl
3473− (\ s a -> s{_mdDeliveryControl = a})
3474−
3475−-- | Proposed flight start time of the deal (ms since epoch) This will
3476−-- generally be stored in a granularity of a second. (updatable)
3477−mdFlightStartTimeMs :: Lens' MarketplaceDeal (Maybe Int64)
3478−mdFlightStartTimeMs
3479− = lens _mdFlightStartTimeMs
3480− (\ s a -> s{_mdFlightStartTimeMs = a})
3481−
3482−-- | The shared targeting visible to buyers and sellers. (updatable)
3483−mdSharedTargetings :: Lens' MarketplaceDeal [Maybe SharedTargeting]
3484−mdSharedTargetings
3485− = lens _mdSharedTargetings
3486− (\ s a -> s{_mdSharedTargetings = a})
3487− . _Default
3488− . _Coerce
3489−
3490−-- | A unique deal=id for the deal (readonly).
3491−mdDealId :: Lens' MarketplaceDeal (Maybe Text)
3492−mdDealId = lens _mdDealId (\ s a -> s{_mdDealId = a})
3493−
3494−-- | Description for the deal terms. (updatable)
3495−mdInventoryDescription :: Lens' MarketplaceDeal (Maybe Text)
3496−mdInventoryDescription
3497− = lens _mdInventoryDescription
3498− (\ s a -> s{_mdInventoryDescription = a})
3499−
3500−-- | The syndication product associated with the deal. (readonly, except on
3501−-- create)
3502−mdSyndicationProduct :: Lens' MarketplaceDeal (Maybe Text)
3503−mdSyndicationProduct
3504− = lens _mdSyndicationProduct
3505− (\ s a -> s{_mdSyndicationProduct = a})
3506−
3507−-- | Proposed flight end time of the deal (ms since epoch) This will
3508−-- generally be stored in a granularity of a second. (updatable)
3509−mdFlightEndTimeMs :: Lens' MarketplaceDeal (Maybe Int64)
3510−mdFlightEndTimeMs
3511− = lens _mdFlightEndTimeMs
3512− (\ s a -> s{_mdFlightEndTimeMs = a})
3513−
3514−-- | The name of the deal. (updatable)
3515−mdName :: Lens' MarketplaceDeal (Maybe Text)
3516−mdName = lens _mdName (\ s a -> s{_mdName = a})
3517−
3518−-- | Optional Seller contact information for the deal (buyer-readonly)
3519−mdSellerContacts :: Lens' MarketplaceDeal [Maybe ContactInformation]
3520−mdSellerContacts
3521− = lens _mdSellerContacts
3522− (\ s a -> s{_mdSellerContacts = a})
3523− . _Default
3524− . _Coerce
3525−
3526−-- | The offer-id from which this deal was created. (readonly, except on
3527−-- create)
3528−mdOfferId :: Lens' MarketplaceDeal (Maybe Text)
3529−mdOfferId
3530− = lens _mdOfferId (\ s a -> s{_mdOfferId = a})
3531−
3532−mdOrderId :: Lens' MarketplaceDeal (Maybe Text)
3533−mdOrderId
3534− = lens _mdOrderId (\ s a -> s{_mdOrderId = a})
3535−
3536−instance FromJSON MarketplaceDeal where
3537− parseJSON
3538− = withObject "MarketplaceDeal"
3539− (\ o ->
3540− MarketplaceDeal <$>
3541− (o .:? "externalDealId") <*>
3542− (o .:? "buyerPrivateData")
3543− <*> (o .:? "webPropertyCode")
3544− <*> (o .:? "creationTimeMs")
3545− <*> (o .:? "terms")
3546− <*> (o .:? "offerRevisionNumber")
3547− <*> (o .:? "lastUpdateTimeMs")
3548− <*>
3549− (o .:? "kind" .!= "adexchangebuyer#marketplaceDeal")
3550− <*> (o .:? "deliveryControl")
3551− <*> (o .:? "flightStartTimeMs")
3552− <*> (o .:? "sharedTargetings" .!= mempty)
3553− <*> (o .:? "dealId")
3554− <*> (o .:? "inventoryDescription")
3555− <*> (o .:? "syndicationProduct")
3556− <*> (o .:? "flightEndTimeMs")
3557− <*> (o .:? "name")
3558− <*> (o .:? "sellerContacts" .!= mempty)
3559− <*> (o .:? "offerId")
3560− <*> (o .:? "orderId"))
3561−
3562−instance ToJSON MarketplaceDeal where
3563− toJSON MarketplaceDeal{..}
3564− = object
3565− (catMaybes
3566− [("externalDealId" .=) <$> _mdExternalDealId,
3567− ("buyerPrivateData" .=) <$> _mdBuyerPrivateData,
3568− ("webPropertyCode" .=) <$> _mdWebPropertyCode,
3569− ("creationTimeMs" .=) <$> _mdCreationTimeMs,
3570− ("terms" .=) <$> _mdTerms,
3571− ("offerRevisionNumber" .=) <$>
3572− _mdOfferRevisionNumber,
3573− ("lastUpdateTimeMs" .=) <$> _mdLastUpdateTimeMs,
3574− Just ("kind" .= _mdKind),
3575− ("deliveryControl" .=) <$> _mdDeliveryControl,
3576− ("flightStartTimeMs" .=) <$> _mdFlightStartTimeMs,
3577− ("sharedTargetings" .=) <$> _mdSharedTargetings,
3578− ("dealId" .=) <$> _mdDealId,
3579− ("inventoryDescription" .=) <$>
3580− _mdInventoryDescription,
3581− ("syndicationProduct" .=) <$> _mdSyndicationProduct,
3582− ("flightEndTimeMs" .=) <$> _mdFlightEndTimeMs,
3583− ("name" .=) <$> _mdName,
3584− ("sellerContacts" .=) <$> _mdSellerContacts,
3585− ("offerId" .=) <$> _mdOfferId,
3586− ("orderId" .=) <$> _mdOrderId])
3587−
3588−--
3589−-- /See:/ 'clientAccessCapabilities' smart constructor.
3590−data ClientAccessCapabilities = ClientAccessCapabilities
3591− { _cacClientAccountId :: !(Maybe Int64)
3592− , _cacCapabilities :: !(Maybe [Int32])
3593− } deriving (Eq,Read,Show,Data,Typeable,Generic)
3594−
3595−-- | Creates a value of 'ClientAccessCapabilities' with the minimum fields required to make a request.
3596−--
3597−-- Use one of the following lenses to modify other fields as desired:
3598−--
3599−-- * 'cacClientAccountId'
3600−--
3601−-- * 'cacCapabilities'
3602−clientAccessCapabilities
3603− :: ClientAccessCapabilities
3604−clientAccessCapabilities =
3605− ClientAccessCapabilities
3606− { _cacClientAccountId = Nothing
3607− , _cacCapabilities = Nothing
3608− }
3609−
3610−cacClientAccountId :: Lens' ClientAccessCapabilities (Maybe Int64)
3611−cacClientAccountId
3612− = lens _cacClientAccountId
3613− (\ s a -> s{_cacClientAccountId = a})
3614−
3615−cacCapabilities :: Lens' ClientAccessCapabilities [Int32]
3616−cacCapabilities
3617− = lens _cacCapabilities
3618− (\ s a -> s{_cacCapabilities = a})
3619− . _Default
3620− . _Coerce
3621−
3622−instance FromJSON ClientAccessCapabilities where
3623− parseJSON
3624− = withObject "ClientAccessCapabilities"
3625− (\ o ->
3626− ClientAccessCapabilities <$>
3627− (o .:? "clientAccountId") <*>
3628− (o .:? "capabilities" .!= mempty))
3629−
3630−instance ToJSON ClientAccessCapabilities where
3631− toJSON ClientAccessCapabilities{..}
3632− = object
3633− (catMaybes
3634− [("clientAccountId" .=) <$> _cacClientAccountId,
3635− ("capabilities" .=) <$> _cacCapabilities])
3636−
3637−--
3638−-- /See:/ 'deleteOrderDealsResponse' smart constructor.
3639−data DeleteOrderDealsResponse = DeleteOrderDealsResponse
3640− { _dodrDeals :: !(Maybe [Maybe MarketplaceDeal])
3641− , _dodrOrderRevisionNumber :: !(Maybe Int64)
3642− } deriving (Eq,Read,Show,Data,Typeable,Generic)
3643−
3644−-- | Creates a value of 'DeleteOrderDealsResponse' with the minimum fields required to make a request.
3645−--
3646−-- Use one of the following lenses to modify other fields as desired:
3647−--
3648−-- * 'dodrDeals'
3649−--
3650−-- * 'dodrOrderRevisionNumber'
3651−deleteOrderDealsResponse
3652− :: DeleteOrderDealsResponse
3653−deleteOrderDealsResponse =
3654− DeleteOrderDealsResponse
3655− { _dodrDeals = Nothing
3656− , _dodrOrderRevisionNumber = Nothing
3657− }
3658−
3659−-- | List of deals deleted (in the same order as passed in the request)
3660−dodrDeals :: Lens' DeleteOrderDealsResponse [Maybe MarketplaceDeal]
3661−dodrDeals
3662− = lens _dodrDeals (\ s a -> s{_dodrDeals = a}) .
3663− _Default
3664− . _Coerce
3665−
3666−-- | The updated revision number for the order.
3667−dodrOrderRevisionNumber :: Lens' DeleteOrderDealsResponse (Maybe Int64)
3668−dodrOrderRevisionNumber
3669− = lens _dodrOrderRevisionNumber
3670− (\ s a -> s{_dodrOrderRevisionNumber = a})
3671−
3672−instance FromJSON DeleteOrderDealsResponse where
3673− parseJSON
3674− = withObject "DeleteOrderDealsResponse"
3675− (\ o ->
3676− DeleteOrderDealsResponse <$>
3677− (o .:? "deals" .!= mempty) <*>
3678− (o .:? "orderRevisionNumber"))
3679−
3680−instance ToJSON DeleteOrderDealsResponse where
3681− toJSON DeleteOrderDealsResponse{..}
3682− = object
3683− (catMaybes
3684− [("deals" .=) <$> _dodrDeals,
3685− ("orderRevisionNumber" .=) <$>
3686− _dodrOrderRevisionNumber])
3687−
3688−-- | The configuration data for an Ad Exchange performance report list.
3689−--
3690−-- /See:/ 'performanceReport' smart constructor.
3691−data PerformanceReport = PerformanceReport
3692− { _prFilteredBidRate :: !(Maybe Double)
3693− , _prKind :: !Text
3694− , _prLatency95thPercentile :: !(Maybe Double)
3695− , _prCookieMatcherStatusRate :: !(Maybe [Either Text Int64])
3696− , _prHostedMatchStatusRate :: !(Maybe [Either Text Int64])
3697− , _prUnsuccessfulRequestRate :: !(Maybe Double)
3698− , _prBidRequestRate :: !(Maybe Double)
3699− , _prQuotaThrottledLimit :: !(Maybe Double)
3700− , _prQuotaConfiguredLimit :: !(Maybe Double)
3701− , _prSuccessfulRequestRate :: !(Maybe Double)
3702− , _prLatency85thPercentile :: !(Maybe Double)
3703− , _prCalloutStatusRate :: !(Maybe [Either Text Int64])
3704− , _prLatency50thPercentile :: !(Maybe Double)
3705− , _prBidRate :: !(Maybe Double)
3706− , _prCreativeStatusRate :: !(Maybe [Either Text Int64])
3707− , _prNoQuotaInRegion :: !(Maybe Double)
3708− , _prRegion :: !(Maybe Text)
3709− , _prInventoryMatchRate :: !(Maybe Double)
3710− , _prPixelMatchResponses :: !(Maybe Double)
3711− , _prTimestamp :: !(Maybe Int64)
3712− , _prPixelMatchRequests :: !(Maybe Double)
3713− , _prOutOfQuota :: !(Maybe Double)
3714− } deriving (Eq,Read,Show,Data,Typeable,Generic)
3715−
3716−-- | Creates a value of 'PerformanceReport' with the minimum fields required to make a request.
3717−--
3718−-- Use one of the following lenses to modify other fields as desired:
3719−--
3720−-- * 'prFilteredBidRate'
3721−--
3722−-- * 'prKind'
3723−--
3724−-- * 'prLatency95thPercentile'
3725−--
3726−-- * 'prCookieMatcherStatusRate'
3727−--
3728−-- * 'prHostedMatchStatusRate'
3729−--
3730−-- * 'prUnsuccessfulRequestRate'
3731−--
3732−-- * 'prBidRequestRate'
3733−--
3734−-- * 'prQuotaThrottledLimit'
3735−--
3736−-- * 'prQuotaConfiguredLimit'
3737−--
3738−-- * 'prSuccessfulRequestRate'
3739−--
3740−-- * 'prLatency85thPercentile'
3741−--
3742−-- * 'prCalloutStatusRate'
3743−--
3744−-- * 'prLatency50thPercentile'
3745−--
3746−-- * 'prBidRate'
3747−--
3748−-- * 'prCreativeStatusRate'
3749−--
3750−-- * 'prNoQuotaInRegion'
3751−--
3752−-- * 'prRegion'
3753−--
3754−-- * 'prInventoryMatchRate'
3755−--
3756−-- * 'prPixelMatchResponses'
3757−--
3758−-- * 'prTimestamp'
3759−--
3760−-- * 'prPixelMatchRequests'
3761−--
3762−-- * 'prOutOfQuota'
3763−performanceReport
3764− :: PerformanceReport
3765−performanceReport =
3766− PerformanceReport
3767− { _prFilteredBidRate = Nothing
3768− , _prKind = "adexchangebuyer#performanceReport"
3769− , _prLatency95thPercentile = Nothing
3770− , _prCookieMatcherStatusRate = Nothing
3771− , _prHostedMatchStatusRate = Nothing
3772− , _prUnsuccessfulRequestRate = Nothing
3773− , _prBidRequestRate = Nothing
3774− , _prQuotaThrottledLimit = Nothing
3775− , _prQuotaConfiguredLimit = Nothing
3776− , _prSuccessfulRequestRate = Nothing
3777− , _prLatency85thPercentile = Nothing
3778− , _prCalloutStatusRate = Nothing
3779− , _prLatency50thPercentile = Nothing
3780− , _prBidRate = Nothing
3781− , _prCreativeStatusRate = Nothing
3782− , _prNoQuotaInRegion = Nothing
3783− , _prRegion = Nothing
3784− , _prInventoryMatchRate = Nothing
3785− , _prPixelMatchResponses = Nothing
3786− , _prTimestamp = Nothing
3787− , _prPixelMatchRequests = Nothing
3788− , _prOutOfQuota = Nothing
3789− }
3790−
3791−-- | The number of bid responses that were filtered due to a policy violation
3792−-- or other errors.
3793−prFilteredBidRate :: Lens' PerformanceReport (Maybe Double)
3794−prFilteredBidRate
3795− = lens _prFilteredBidRate
3796− (\ s a -> s{_prFilteredBidRate = a})
3797−
3798−-- | Resource type.
3799−prKind :: Lens' PerformanceReport Text
3800−prKind = lens _prKind (\ s a -> s{_prKind = a})
3801−
3802−-- | The 95th percentile round trip latency(ms) as perceived from Google
3803−-- servers for the duration period covered by the report.
3804−prLatency95thPercentile :: Lens' PerformanceReport (Maybe Double)
3805−prLatency95thPercentile
3806− = lens _prLatency95thPercentile
3807− (\ s a -> s{_prLatency95thPercentile = a})
3808−
3809−-- | Average QPS for cookie matcher operations.
3810−prCookieMatcherStatusRate :: Lens' PerformanceReport [Either Text Int64]
3811−prCookieMatcherStatusRate
3812− = lens _prCookieMatcherStatusRate
3813− (\ s a -> s{_prCookieMatcherStatusRate = a})
3814− . _Default
3815− . _Coerce
3816−
3817−-- | Average QPS for hosted match operations.
3818−prHostedMatchStatusRate :: Lens' PerformanceReport [Either Text Int64]
3819−prHostedMatchStatusRate
3820− = lens _prHostedMatchStatusRate
3821− (\ s a -> s{_prHostedMatchStatusRate = a})
3822− . _Default
3823− . _Coerce
3824−
3825−-- | The number of bid responses that were unsuccessful due to timeouts,
3826−-- incorrect formatting, etc.
3827−prUnsuccessfulRequestRate :: Lens' PerformanceReport (Maybe Double)
3828−prUnsuccessfulRequestRate
3829− = lens _prUnsuccessfulRequestRate
3830− (\ s a -> s{_prUnsuccessfulRequestRate = a})
3831−
3832−-- | The number of bid requests sent to your bidder.
3833−prBidRequestRate :: Lens' PerformanceReport (Maybe Double)
3834−prBidRequestRate
3835− = lens _prBidRequestRate
3836− (\ s a -> s{_prBidRequestRate = a})
3837−
3838−-- | The throttled quota limits for this account.
3839−prQuotaThrottledLimit :: Lens' PerformanceReport (Maybe Double)
3840−prQuotaThrottledLimit
3841− = lens _prQuotaThrottledLimit
3842− (\ s a -> s{_prQuotaThrottledLimit = a})
3843−
3844−-- | The configured quota limits for this account.
3845−prQuotaConfiguredLimit :: Lens' PerformanceReport (Maybe Double)
3846−prQuotaConfiguredLimit
3847− = lens _prQuotaConfiguredLimit
3848− (\ s a -> s{_prQuotaConfiguredLimit = a})
3849−
3850−-- | The number of properly formed bid responses received by our servers
3851−-- within the deadline.
3852−prSuccessfulRequestRate :: Lens' PerformanceReport (Maybe Double)
3853−prSuccessfulRequestRate
3854− = lens _prSuccessfulRequestRate
3855− (\ s a -> s{_prSuccessfulRequestRate = a})
3856−
3857−-- | The 85th percentile round trip latency(ms) as perceived from Google
3858−-- servers for the duration period covered by the report.
3859−prLatency85thPercentile :: Lens' PerformanceReport (Maybe Double)
3860−prLatency85thPercentile
3861− = lens _prLatency85thPercentile
3862− (\ s a -> s{_prLatency85thPercentile = a})
3863−
3864−-- | Rate of various prefiltering statuses per match. Please refer to the
3865−-- callout-status-codes.txt file for different statuses.
3866−prCalloutStatusRate :: Lens' PerformanceReport [Either Text Int64]
3867−prCalloutStatusRate
3868− = lens _prCalloutStatusRate
3869− (\ s a -> s{_prCalloutStatusRate = a})
3870− . _Default
3871− . _Coerce
3872−
3873−-- | The 50th percentile round trip latency(ms) as perceived from Google
3874−-- servers for the duration period covered by the report.
3875−prLatency50thPercentile :: Lens' PerformanceReport (Maybe Double)
3876−prLatency50thPercentile
3877− = lens _prLatency50thPercentile
3878− (\ s a -> s{_prLatency50thPercentile = a})
3879−
3880−-- | The number of bid responses with an ad.
3881−prBidRate :: Lens' PerformanceReport (Maybe Double)
3882−prBidRate
3883− = lens _prBidRate (\ s a -> s{_prBidRate = a})
3884−
3885−-- | Rate of ads with a given status. Please refer to the
3886−-- creative-status-codes.txt file for different statuses.
3887−prCreativeStatusRate :: Lens' PerformanceReport [Either Text Int64]
3888−prCreativeStatusRate
3889− = lens _prCreativeStatusRate
3890− (\ s a -> s{_prCreativeStatusRate = a})
3891− . _Default
3892− . _Coerce
3893−
3894−-- | Rate of various quota account statuses per quota check.
3895−prNoQuotaInRegion :: Lens' PerformanceReport (Maybe Double)
3896−prNoQuotaInRegion
3897− = lens _prNoQuotaInRegion
3898− (\ s a -> s{_prNoQuotaInRegion = a})
3899−
3900−-- | The trading location of this data.
3901−prRegion :: Lens' PerformanceReport (Maybe Text)
3902−prRegion = lens _prRegion (\ s a -> s{_prRegion = a})
3903−
3904−-- | The number of potential queries based on your pretargeting settings.
3905−prInventoryMatchRate :: Lens' PerformanceReport (Maybe Double)
3906−prInventoryMatchRate
3907− = lens _prInventoryMatchRate
3908− (\ s a -> s{_prInventoryMatchRate = a})
3909−
3910−-- | Average QPS for pixel match responses from clients.
3911−prPixelMatchResponses :: Lens' PerformanceReport (Maybe Double)
3912−prPixelMatchResponses
3913− = lens _prPixelMatchResponses
3914− (\ s a -> s{_prPixelMatchResponses = a})
3915−
3916−-- | The unix timestamp of the starting time of this performance data.
3917−prTimestamp :: Lens' PerformanceReport (Maybe Int64)
3918−prTimestamp
3919− = lens _prTimestamp (\ s a -> s{_prTimestamp = a})
3920−
3921−-- | Average QPS for pixel match requests from clients.
3922−prPixelMatchRequests :: Lens' PerformanceReport (Maybe Double)
3923−prPixelMatchRequests
3924− = lens _prPixelMatchRequests
3925− (\ s a -> s{_prPixelMatchRequests = a})
3926−
3927−-- | Rate of various quota account statuses per quota check.
3928−prOutOfQuota :: Lens' PerformanceReport (Maybe Double)
3929−prOutOfQuota
3930− = lens _prOutOfQuota (\ s a -> s{_prOutOfQuota = a})
3931−
3932−instance FromJSON PerformanceReport where
3933− parseJSON
3934− = withObject "PerformanceReport"
3935− (\ o ->
3936− PerformanceReport <$>
3937− (o .:? "filteredBidRate") <*>
3938− (o .:? "kind" .!=
3939− "adexchangebuyer#performanceReport")
3940− <*> (o .:? "latency95thPercentile")
3941− <*> (o .:? "cookieMatcherStatusRate" .!= mempty)
3942− <*> (o .:? "hostedMatchStatusRate" .!= mempty)
3943− <*> (o .:? "unsuccessfulRequestRate")
3944− <*> (o .:? "bidRequestRate")
3945− <*> (o .:? "quotaThrottledLimit")
3946− <*> (o .:? "quotaConfiguredLimit")
3947− <*> (o .:? "successfulRequestRate")
3948− <*> (o .:? "latency85thPercentile")
3949− <*> (o .:? "calloutStatusRate" .!= mempty)
3950− <*> (o .:? "latency50thPercentile")
3951− <*> (o .:? "bidRate")
3952− <*> (o .:? "creativeStatusRate" .!= mempty)
3953− <*> (o .:? "noQuotaInRegion")
3954− <*> (o .:? "region")
3955− <*> (o .:? "inventoryMatchRate")
3956− <*> (o .:? "pixelMatchResponses")
3957− <*> (o .:? "timestamp")
3958− <*> (o .:? "pixelMatchRequests")
3959− <*> (o .:? "outOfQuota"))
3960−
3961−instance ToJSON PerformanceReport where
3962− toJSON PerformanceReport{..}
3963− = object
3964− (catMaybes
3965− [("filteredBidRate" .=) <$> _prFilteredBidRate,
3966− Just ("kind" .= _prKind),
3967− ("latency95thPercentile" .=) <$>
3968− _prLatency95thPercentile,
3969− ("cookieMatcherStatusRate" .=) <$>
3970− _prCookieMatcherStatusRate,
3971− ("hostedMatchStatusRate" .=) <$>
3972− _prHostedMatchStatusRate,
3973− ("unsuccessfulRequestRate" .=) <$>
3974− _prUnsuccessfulRequestRate,
3975− ("bidRequestRate" .=) <$> _prBidRequestRate,
3976− ("quotaThrottledLimit" .=) <$>
3977− _prQuotaThrottledLimit,
3978− ("quotaConfiguredLimit" .=) <$>
3979− _prQuotaConfiguredLimit,
3980− ("successfulRequestRate" .=) <$>
3981− _prSuccessfulRequestRate,
3982− ("latency85thPercentile" .=) <$>
3983− _prLatency85thPercentile,
3984− ("calloutStatusRate" .=) <$> _prCalloutStatusRate,
3985− ("latency50thPercentile" .=) <$>
3986− _prLatency50thPercentile,
3987− ("bidRate" .=) <$> _prBidRate,
3988− ("creativeStatusRate" .=) <$> _prCreativeStatusRate,
3989− ("noQuotaInRegion" .=) <$> _prNoQuotaInRegion,
3990− ("region" .=) <$> _prRegion,
3991− ("inventoryMatchRate" .=) <$> _prInventoryMatchRate,
3992− ("pixelMatchResponses" .=) <$>
3993− _prPixelMatchResponses,
3994− ("timestamp" .=) <$> _prTimestamp,
3995− ("pixelMatchRequests" .=) <$> _prPixelMatchRequests,
3996− ("outOfQuota" .=) <$> _prOutOfQuota])
3997−
3998−--
3999−-- /See:/ 'buyerDto' smart constructor.
4000−data BuyerDto = BuyerDto
4001− { _bdSponsorAccountId :: !(Maybe Int32)
4002− , _bdEnabledForInterestTargetingDeals :: !(Maybe Bool)
4003− , _bdCustomerId :: !(Maybe Int32)
4004− , _bdEnabledForPreferredDeals :: !(Maybe Bool)
4005− , _bdAccountId :: !(Maybe Int32)
4006− , _bdDisplayName :: !(Maybe Text)
4007− , _bdId :: !(Maybe Int32)
4008− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4009−
4010−-- | Creates a value of 'BuyerDto' with the minimum fields required to make a request.
4011−--
4012−-- Use one of the following lenses to modify other fields as desired:
4013−--
4014−-- * 'bdSponsorAccountId'
4015−--
4016−-- * 'bdEnabledForInterestTargetingDeals'
4017−--
4018−-- * 'bdCustomerId'
4019−--
4020−-- * 'bdEnabledForPreferredDeals'
4021−--
4022−-- * 'bdAccountId'
4023−--
4024−-- * 'bdDisplayName'
4025−--
4026−-- * 'bdId'
4027−buyerDto
4028− :: BuyerDto
4029−buyerDto =
4030− BuyerDto
4031− { _bdSponsorAccountId = Nothing
4032− , _bdEnabledForInterestTargetingDeals = Nothing
4033− , _bdCustomerId = Nothing
4034− , _bdEnabledForPreferredDeals = Nothing
4035− , _bdAccountId = Nothing
4036− , _bdDisplayName = Nothing
4037− , _bdId = Nothing
4038− }
4039−
4040−bdSponsorAccountId :: Lens' BuyerDto (Maybe Int32)
4041−bdSponsorAccountId
4042− = lens _bdSponsorAccountId
4043− (\ s a -> s{_bdSponsorAccountId = a})
4044−
4045−bdEnabledForInterestTargetingDeals :: Lens' BuyerDto (Maybe Bool)
4046−bdEnabledForInterestTargetingDeals
4047− = lens _bdEnabledForInterestTargetingDeals
4048− (\ s a -> s{_bdEnabledForInterestTargetingDeals = a})
4049−
4050−bdCustomerId :: Lens' BuyerDto (Maybe Int32)
4051−bdCustomerId
4052− = lens _bdCustomerId (\ s a -> s{_bdCustomerId = a})
4053−
4054−bdEnabledForPreferredDeals :: Lens' BuyerDto (Maybe Bool)
4055−bdEnabledForPreferredDeals
4056− = lens _bdEnabledForPreferredDeals
4057− (\ s a -> s{_bdEnabledForPreferredDeals = a})
4058−
4059−bdAccountId :: Lens' BuyerDto (Maybe Int32)
4060−bdAccountId
4061− = lens _bdAccountId (\ s a -> s{_bdAccountId = a})
4062−
4063−bdDisplayName :: Lens' BuyerDto (Maybe Text)
4064−bdDisplayName
4065− = lens _bdDisplayName
4066− (\ s a -> s{_bdDisplayName = a})
4067−
4068−bdId :: Lens' BuyerDto (Maybe Int32)
4069−bdId = lens _bdId (\ s a -> s{_bdId = a})
4070−
4071−instance FromJSON BuyerDto where
4072− parseJSON
4073− = withObject "BuyerDto"
4074− (\ o ->
4075− BuyerDto <$>
4076− (o .:? "sponsorAccountId") <*>
4077− (o .:? "enabledForInterestTargetingDeals")
4078− <*> (o .:? "customerId")
4079− <*> (o .:? "enabledForPreferredDeals")
4080− <*> (o .:? "accountId")
4081− <*> (o .:? "displayName")
4082− <*> (o .:? "id"))
4083−
4084−instance ToJSON BuyerDto where
4085− toJSON BuyerDto{..}
4086− = object
4087− (catMaybes
4088− [("sponsorAccountId" .=) <$> _bdSponsorAccountId,
4089− ("enabledForInterestTargetingDeals" .=) <$>
4090− _bdEnabledForInterestTargetingDeals,
4091− ("customerId" .=) <$> _bdCustomerId,
4092− ("enabledForPreferredDeals" .=) <$>
4093− _bdEnabledForPreferredDeals,
4094− ("accountId" .=) <$> _bdAccountId,
4095− ("displayName" .=) <$> _bdDisplayName,
4096− ("id" .=) <$> _bdId])
4097−
4098−--
4099−-- /See:/ 'pretargetingConfigList' smart constructor.
4100−data PretargetingConfigList = PretargetingConfigList
4101− { _pclKind :: !Text
4102− , _pclItems :: !(Maybe [Maybe PretargetingConfig])
4103− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4104−
4105−-- | Creates a value of 'PretargetingConfigList' with the minimum fields required to make a request.
4106−--
4107−-- Use one of the following lenses to modify other fields as desired:
4108−--
4109−-- * 'pclKind'
4110−--
4111−-- * 'pclItems'
4112−pretargetingConfigList
4113− :: PretargetingConfigList
4114−pretargetingConfigList =
4115− PretargetingConfigList
4116− { _pclKind = "adexchangebuyer#pretargetingConfigList"
4117− , _pclItems = Nothing
4118− }
4119−
4120−-- | Resource type.
4121−pclKind :: Lens' PretargetingConfigList Text
4122−pclKind = lens _pclKind (\ s a -> s{_pclKind = a})
4123−
4124−-- | A list of pretargeting configs
4125−pclItems :: Lens' PretargetingConfigList [Maybe PretargetingConfig]
4126−pclItems
4127− = lens _pclItems (\ s a -> s{_pclItems = a}) .
4128− _Default
4129− . _Coerce
4130−
4131−instance FromJSON PretargetingConfigList where
4132− parseJSON
4133− = withObject "PretargetingConfigList"
4134− (\ o ->
4135− PretargetingConfigList <$>
4136− (o .:? "kind" .!=
4137− "adexchangebuyer#pretargetingConfigList")
4138− <*> (o .:? "items" .!= mempty))
4139−
4140−instance ToJSON PretargetingConfigList where
4141− toJSON PretargetingConfigList{..}
4142− = object
4143− (catMaybes
4144− [Just ("kind" .= _pclKind),
4145− ("items" .=) <$> _pclItems])
4146−
4147−--
4148−-- /See:/ 'dealTermsNonGuaranteedFixedPriceTerms' smart constructor.
4149−newtype DealTermsNonGuaranteedFixedPriceTerms = DealTermsNonGuaranteedFixedPriceTerms
4150− { _dtngfptFixedPrices :: Maybe [Maybe PricePerBuyer]
4151− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4152−
4153−-- | Creates a value of 'DealTermsNonGuaranteedFixedPriceTerms' with the minimum fields required to make a request.
4154−--
4155−-- Use one of the following lenses to modify other fields as desired:
4156−--
4157−-- * 'dtngfptFixedPrices'
4158−dealTermsNonGuaranteedFixedPriceTerms
4159− :: DealTermsNonGuaranteedFixedPriceTerms
4160−dealTermsNonGuaranteedFixedPriceTerms =
4161− DealTermsNonGuaranteedFixedPriceTerms
4162− { _dtngfptFixedPrices = Nothing
4163− }
4164−
4165−-- | Fixed price for the specified buyer.
4166−dtngfptFixedPrices :: Lens' DealTermsNonGuaranteedFixedPriceTerms [Maybe PricePerBuyer]
4167−dtngfptFixedPrices
4168− = lens _dtngfptFixedPrices
4169− (\ s a -> s{_dtngfptFixedPrices = a})
4170− . _Default
4171− . _Coerce
4172−
4173−instance FromJSON
4174− DealTermsNonGuaranteedFixedPriceTerms where
4175− parseJSON
4176− = withObject "DealTermsNonGuaranteedFixedPriceTerms"
4177− (\ o ->
4178− DealTermsNonGuaranteedFixedPriceTerms <$>
4179− (o .:? "fixedPrices" .!= mempty))
4180−
4181−instance ToJSON DealTermsNonGuaranteedFixedPriceTerms
4182− where
4183− toJSON DealTermsNonGuaranteedFixedPriceTerms{..}
4184− = object
4185− (catMaybes
4186− [("fixedPrices" .=) <$> _dtngfptFixedPrices])
4187−
4188−--
4189−-- /See:/ 'adSlotDto' smart constructor.
4190−data AdSlotDto = AdSlotDto
4191− { _asdWebPropertyId :: !(Maybe Int32)
4192− , _asdSize :: !(Maybe Text)
4193− , _asdChannelCode :: !(Maybe Text)
4194− , _asdChannelId :: !(Maybe Int32)
4195− , _asdName :: !(Maybe Text)
4196− , _asdDescription :: !(Maybe Text)
4197− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4198−
4199−-- | Creates a value of 'AdSlotDto' with the minimum fields required to make a request.
4200−--
4201−-- Use one of the following lenses to modify other fields as desired:
4202−--
4203−-- * 'asdWebPropertyId'
4204−--
4205−-- * 'asdSize'
4206−--
4207−-- * 'asdChannelCode'
4208−--
4209−-- * 'asdChannelId'
4210−--
4211−-- * 'asdName'
4212−--
4213−-- * 'asdDescription'
4214−adSlotDto
4215− :: AdSlotDto
4216−adSlotDto =
4217− AdSlotDto
4218− { _asdWebPropertyId = Nothing
4219− , _asdSize = Nothing
4220− , _asdChannelCode = Nothing
4221− , _asdChannelId = Nothing
4222− , _asdName = Nothing
4223− , _asdDescription = Nothing
4224− }
4225−
4226−asdWebPropertyId :: Lens' AdSlotDto (Maybe Int32)
4227−asdWebPropertyId
4228− = lens _asdWebPropertyId
4229− (\ s a -> s{_asdWebPropertyId = a})
4230−
4231−asdSize :: Lens' AdSlotDto (Maybe Text)
4232−asdSize = lens _asdSize (\ s a -> s{_asdSize = a})
4233−
4234−asdChannelCode :: Lens' AdSlotDto (Maybe Text)
4235−asdChannelCode
4236− = lens _asdChannelCode
4237− (\ s a -> s{_asdChannelCode = a})
4238−
4239−asdChannelId :: Lens' AdSlotDto (Maybe Int32)
4240−asdChannelId
4241− = lens _asdChannelId (\ s a -> s{_asdChannelId = a})
4242−
4243−asdName :: Lens' AdSlotDto (Maybe Text)
4244−asdName = lens _asdName (\ s a -> s{_asdName = a})
4245−
4246−asdDescription :: Lens' AdSlotDto (Maybe Text)
4247−asdDescription
4248− = lens _asdDescription
4249− (\ s a -> s{_asdDescription = a})
4250−
4251−instance FromJSON AdSlotDto where
4252− parseJSON
4253− = withObject "AdSlotDto"
4254− (\ o ->
4255− AdSlotDto <$>
4256− (o .:? "webPropertyId") <*> (o .:? "size") <*>
4257− (o .:? "channelCode")
4258− <*> (o .:? "channelId")
4259− <*> (o .:? "name")
4260− <*> (o .:? "description"))
4261−
4262−instance ToJSON AdSlotDto where
4263− toJSON AdSlotDto{..}
4264− = object
4265− (catMaybes
4266− [("webPropertyId" .=) <$> _asdWebPropertyId,
4267− ("size" .=) <$> _asdSize,
4268− ("channelCode" .=) <$> _asdChannelCode,
4269− ("channelId" .=) <$> _asdChannelId,
4270− ("name" .=) <$> _asdName,
4271− ("description" .=) <$> _asdDescription])
4272−
4273−--
4274−-- /See:/ 'accountItemBidderLocation' smart constructor.
4275−data AccountItemBidderLocation = AccountItemBidderLocation
4276− { _aiblUrl :: !(Maybe Text)
4277− , _aiblMaximumQps :: !(Maybe Int32)
4278− , _aiblRegion :: !(Maybe Text)
4279− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4280−
4281−-- | Creates a value of 'AccountItemBidderLocation' with the minimum fields required to make a request.
4282−--
4283−-- Use one of the following lenses to modify other fields as desired:
4284−--
4285−-- * 'aiblUrl'
4286−--
4287−-- * 'aiblMaximumQps'
4288−--
4289−-- * 'aiblRegion'
4290−accountItemBidderLocation
4291− :: AccountItemBidderLocation
4292−accountItemBidderLocation =
4293− AccountItemBidderLocation
4294− { _aiblUrl = Nothing
4295− , _aiblMaximumQps = Nothing
4296− , _aiblRegion = Nothing
4297− }
4298−
4299−-- | The URL to which the Ad Exchange will send bid requests.
4300−aiblUrl :: Lens' AccountItemBidderLocation (Maybe Text)
4301−aiblUrl = lens _aiblUrl (\ s a -> s{_aiblUrl = a})
4302−
4303−-- | The maximum queries per second the Ad Exchange will send.
4304−aiblMaximumQps :: Lens' AccountItemBidderLocation (Maybe Int32)
4305−aiblMaximumQps
4306− = lens _aiblMaximumQps
4307− (\ s a -> s{_aiblMaximumQps = a})
4308−
4309−-- | The geographical region the Ad Exchange should send requests from. Only
4310−-- used by some quota systems, but always setting the value is recommended.
4311−-- Allowed values: - ASIA - EUROPE - US_EAST - US_WEST
4312−aiblRegion :: Lens' AccountItemBidderLocation (Maybe Text)
4313−aiblRegion
4314− = lens _aiblRegion (\ s a -> s{_aiblRegion = a})
4315−
4316−instance FromJSON AccountItemBidderLocation where
4317− parseJSON
4318− = withObject "AccountItemBidderLocation"
4319− (\ o ->
4320− AccountItemBidderLocation <$>
4321− (o .:? "url") <*> (o .:? "maximumQps") <*>
4322− (o .:? "region"))
4323−
4324−instance ToJSON AccountItemBidderLocation where
4325− toJSON AccountItemBidderLocation{..}
4326− = object
4327− (catMaybes
4328− [("url" .=) <$> _aiblUrl,
4329− ("maximumQps" .=) <$> _aiblMaximumQps,
4330− ("region" .=) <$> _aiblRegion])
4331−
4332−-- | Represents an order in the marketplace. An order is the unit of
4333−-- negotiation between a seller and a buyer and contains deals which are
4334−-- served. Each field in an order can have one of the following setting:
4335−-- (readonly) - It is an error to try and set this field. (buyer-readonly)
4336−-- - Only the seller can set this field. (seller-readonly) - Only the buyer
4337−-- can set this field. (updatable) - The field is updatable at all times by
4338−-- either buyer or the seller.
4339−--
4340−-- /See:/ 'marketplaceOrder' smart constructor.
4341−data MarketplaceOrder = MarketplaceOrder
4342− { _mBuyerPrivateData :: !(Maybe (Maybe PrivateData))
4343− , _mIsSetupComplete :: !(Maybe Bool)
4344− , _mBuyerContacts :: !(Maybe [Maybe ContactInformation])
4345− , _mKind :: !Text
4346− , _mOriginatorRole :: !(Maybe Text)
4347− , _mRevisionNumber :: !(Maybe Int64)
4348− , _mBilledBuyer :: !(Maybe (Maybe Buyer))
4349− , _mIsRenegotiating :: !(Maybe Bool)
4350− , _mHasSellerSignedOff :: !(Maybe Bool)
4351− , _mSeller :: !(Maybe (Maybe Seller))
4352− , _mOrderState :: !(Maybe Text)
4353− , _mName :: !(Maybe Text)
4354− , _mSellerContacts :: !(Maybe [Maybe ContactInformation])
4355− , _mLastUpdaterRole :: !(Maybe Text)
4356− , _mLabels :: !(Maybe [Maybe MarketplaceLabel])
4357− , _mRevisionTimeMs :: !(Maybe Int64)
4358− , _mOrderId :: !(Maybe Text)
4359− , _mLastUpdaterOrCommentorRole :: !(Maybe Text)
4360− , _mHasBuyerSignedOff :: !(Maybe Bool)
4361− , _mBuyer :: !(Maybe (Maybe Buyer))
4362− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4363−
4364−-- | Creates a value of 'MarketplaceOrder' with the minimum fields required to make a request.
4365−--
4366−-- Use one of the following lenses to modify other fields as desired:
4367−--
4368−-- * 'mBuyerPrivateData'
4369−--
4370−-- * 'mIsSetupComplete'
4371−--
4372−-- * 'mBuyerContacts'
4373−--
4374−-- * 'mKind'
4375−--
4376−-- * 'mOriginatorRole'
4377−--
4378−-- * 'mRevisionNumber'
4379−--
4380−-- * 'mBilledBuyer'
4381−--
4382−-- * 'mIsRenegotiating'
4383−--
4384−-- * 'mHasSellerSignedOff'
4385−--
4386−-- * 'mSeller'
4387−--
4388−-- * 'mOrderState'
4389−--
4390−-- * 'mName'
4391−--
4392−-- * 'mSellerContacts'
4393−--
4394−-- * 'mLastUpdaterRole'
4395−--
4396−-- * 'mLabels'
4397−--
4398−-- * 'mRevisionTimeMs'
4399−--
4400−-- * 'mOrderId'
4401−--
4402−-- * 'mLastUpdaterOrCommentorRole'
4403−--
4404−-- * 'mHasBuyerSignedOff'
4405−--
4406−-- * 'mBuyer'
4407−marketplaceOrder
4408− :: MarketplaceOrder
4409−marketplaceOrder =
4410− MarketplaceOrder
4411− { _mBuyerPrivateData = Nothing
4412− , _mIsSetupComplete = Nothing
4413− , _mBuyerContacts = Nothing
4414− , _mKind = "adexchangebuyer#marketplaceOrder"
4415− , _mOriginatorRole = Nothing
4416− , _mRevisionNumber = Nothing
4417− , _mBilledBuyer = Nothing
4418− , _mIsRenegotiating = Nothing
4419− , _mHasSellerSignedOff = Nothing
4420− , _mSeller = Nothing
4421− , _mOrderState = Nothing
4422− , _mName = Nothing
4423− , _mSellerContacts = Nothing
4424− , _mLastUpdaterRole = Nothing
4425− , _mLabels = Nothing
4426− , _mRevisionTimeMs = Nothing
4427− , _mOrderId = Nothing
4428− , _mLastUpdaterOrCommentorRole = Nothing
4429− , _mHasBuyerSignedOff = Nothing
4430− , _mBuyer = Nothing
4431− }
4432−
4433−-- | Private data for buyer. (hidden from seller).
4434−mBuyerPrivateData :: Lens' MarketplaceOrder (Maybe (Maybe PrivateData))
4435−mBuyerPrivateData
4436− = lens _mBuyerPrivateData
4437− (\ s a -> s{_mBuyerPrivateData = a})
4438−
4439−-- | True, if the buyside inventory setup is complete for this order.
4440−-- (readonly)
4441−mIsSetupComplete :: Lens' MarketplaceOrder (Maybe Bool)
4442−mIsSetupComplete
4443− = lens _mIsSetupComplete
4444− (\ s a -> s{_mIsSetupComplete = a})
4445−
4446−-- | Optional contact information fort the buyer. (seller-readonly)
4447−mBuyerContacts :: Lens' MarketplaceOrder [Maybe ContactInformation]
4448−mBuyerContacts
4449− = lens _mBuyerContacts
4450− (\ s a -> s{_mBuyerContacts = a})
4451− . _Default
4452− . _Coerce
4453−
4454−-- | Identifies what kind of resource this is. Value: the fixed string
4455−-- \"adexchangebuyer#marketplaceOrder\".
4456−mKind :: Lens' MarketplaceOrder Text
4457−mKind = lens _mKind (\ s a -> s{_mKind = a})
4458−
4459−-- | Indicates whether the buyer\/seller created the offer.(readonly)
4460−mOriginatorRole :: Lens' MarketplaceOrder (Maybe Text)
4461−mOriginatorRole
4462− = lens _mOriginatorRole
4463− (\ s a -> s{_mOriginatorRole = a})
4464−
4465−-- | The revision number for the order (readonly).
4466−mRevisionNumber :: Lens' MarketplaceOrder (Maybe Int64)
4467−mRevisionNumber
4468− = lens _mRevisionNumber
4469− (\ s a -> s{_mRevisionNumber = a})
4470−
4471−-- | Reference to the buyer that will get billed for this order. (readonly)
4472−mBilledBuyer :: Lens' MarketplaceOrder (Maybe (Maybe Buyer))
4473−mBilledBuyer
4474− = lens _mBilledBuyer (\ s a -> s{_mBilledBuyer = a})
4475−
4476−-- | True if the order is being renegotiated (readonly).
4477−mIsRenegotiating :: Lens' MarketplaceOrder (Maybe Bool)
4478−mIsRenegotiating
4479− = lens _mIsRenegotiating
4480− (\ s a -> s{_mIsRenegotiating = a})
4481−
4482−-- | When an order is in an accepted state, indicates whether the buyer has
4483−-- signed off Once both sides have signed off on a deal, the order can be
4484−-- finalized by the seller. (buyer-readonly)
4485−mHasSellerSignedOff :: Lens' MarketplaceOrder (Maybe Bool)
4486−mHasSellerSignedOff
4487− = lens _mHasSellerSignedOff
4488− (\ s a -> s{_mHasSellerSignedOff = a})
4489−
4490−-- | Reference to the seller on the order. (readonly, except on create)
4491−mSeller :: Lens' MarketplaceOrder (Maybe (Maybe Seller))
4492−mSeller = lens _mSeller (\ s a -> s{_mSeller = a})
4493−
4494−-- | The current state of the order. (readonly)
4495−mOrderState :: Lens' MarketplaceOrder (Maybe Text)
4496−mOrderState
4497− = lens _mOrderState (\ s a -> s{_mOrderState = a})
4498−
4499−-- | The name for the order (updatable)
4500−mName :: Lens' MarketplaceOrder (Maybe Text)
4501−mName = lens _mName (\ s a -> s{_mName = a})
4502−
4503−-- | Optional contact information for the seller (buyer-readonly).
4504−mSellerContacts :: Lens' MarketplaceOrder [Maybe ContactInformation]
4505−mSellerContacts
4506− = lens _mSellerContacts
4507− (\ s a -> s{_mSellerContacts = a})
4508− . _Default
4509− . _Coerce
4510−
4511−mLastUpdaterRole :: Lens' MarketplaceOrder (Maybe Text)
4512−mLastUpdaterRole
4513− = lens _mLastUpdaterRole
4514− (\ s a -> s{_mLastUpdaterRole = a})
4515−
4516−-- | List of labels associated with the order. (readonly)
4517−mLabels :: Lens' MarketplaceOrder [Maybe MarketplaceLabel]
4518−mLabels
4519− = lens _mLabels (\ s a -> s{_mLabels = a}) . _Default
4520− . _Coerce
4521−
4522−-- | The time (ms since epoch) when the order was last revised (readonly).
4523−mRevisionTimeMs :: Lens' MarketplaceOrder (Maybe Int64)
4524−mRevisionTimeMs
4525− = lens _mRevisionTimeMs
4526− (\ s a -> s{_mRevisionTimeMs = a})
4527−
4528−-- | The unique id of the order. (readonly).
4529−mOrderId :: Lens' MarketplaceOrder (Maybe Text)
4530−mOrderId = lens _mOrderId (\ s a -> s{_mOrderId = a})
4531−
4532−-- | The role of the last user that either updated the order or left a
4533−-- comment. (readonly)
4534−mLastUpdaterOrCommentorRole :: Lens' MarketplaceOrder (Maybe Text)
4535−mLastUpdaterOrCommentorRole
4536− = lens _mLastUpdaterOrCommentorRole
4537− (\ s a -> s{_mLastUpdaterOrCommentorRole = a})
4538−
4539−-- | When an order is in an accepted state, indicates whether the buyer has
4540−-- signed off Once both sides have signed off on a deal, the order can be
4541−-- finalized by the seller. (seller-readonly)
4542−mHasBuyerSignedOff :: Lens' MarketplaceOrder (Maybe Bool)
4543−mHasBuyerSignedOff
4544− = lens _mHasBuyerSignedOff
4545− (\ s a -> s{_mHasBuyerSignedOff = a})
4546−
4547−-- | Reference to the buyer on the order. (readonly, except on create)
4548−mBuyer :: Lens' MarketplaceOrder (Maybe (Maybe Buyer))
4549−mBuyer = lens _mBuyer (\ s a -> s{_mBuyer = a})
4550−
4551−instance FromJSON MarketplaceOrder where
4552− parseJSON
4553− = withObject "MarketplaceOrder"
4554− (\ o ->
4555− MarketplaceOrder <$>
4556− (o .:? "buyerPrivateData") <*>
4557− (o .:? "isSetupComplete")
4558− <*> (o .:? "buyerContacts" .!= mempty)
4559− <*>
4560− (o .:? "kind" .!= "adexchangebuyer#marketplaceOrder")
4561− <*> (o .:? "originatorRole")
4562− <*> (o .:? "revisionNumber")
4563− <*> (o .:? "billedBuyer")
4564− <*> (o .:? "isRenegotiating")
4565− <*> (o .:? "hasSellerSignedOff")
4566− <*> (o .:? "seller")
4567− <*> (o .:? "orderState")
4568− <*> (o .:? "name")
4569− <*> (o .:? "sellerContacts" .!= mempty)
4570− <*> (o .:? "lastUpdaterRole")
4571− <*> (o .:? "labels" .!= mempty)
4572− <*> (o .:? "revisionTimeMs")
4573− <*> (o .:? "orderId")
4574− <*> (o .:? "lastUpdaterOrCommentorRole")
4575− <*> (o .:? "hasBuyerSignedOff")
4576− <*> (o .:? "buyer"))
4577−
4578−instance ToJSON MarketplaceOrder where
4579− toJSON MarketplaceOrder{..}
4580− = object
4581− (catMaybes
4582− [("buyerPrivateData" .=) <$> _mBuyerPrivateData,
4583− ("isSetupComplete" .=) <$> _mIsSetupComplete,
4584− ("buyerContacts" .=) <$> _mBuyerContacts,
4585− Just ("kind" .= _mKind),
4586− ("originatorRole" .=) <$> _mOriginatorRole,
4587− ("revisionNumber" .=) <$> _mRevisionNumber,
4588− ("billedBuyer" .=) <$> _mBilledBuyer,
4589− ("isRenegotiating" .=) <$> _mIsRenegotiating,
4590− ("hasSellerSignedOff" .=) <$> _mHasSellerSignedOff,
4591− ("seller" .=) <$> _mSeller,
4592− ("orderState" .=) <$> _mOrderState,
4593− ("name" .=) <$> _mName,
4594− ("sellerContacts" .=) <$> _mSellerContacts,
4595− ("lastUpdaterRole" .=) <$> _mLastUpdaterRole,
4596− ("labels" .=) <$> _mLabels,
4597− ("revisionTimeMs" .=) <$> _mRevisionTimeMs,
4598− ("orderId" .=) <$> _mOrderId,
4599− ("lastUpdaterOrCommentorRole" .=) <$>
4600− _mLastUpdaterOrCommentorRole,
4601− ("hasBuyerSignedOff" .=) <$> _mHasBuyerSignedOff,
4602− ("buyer" .=) <$> _mBuyer])
4603−
4604−--
4605−-- /See:/ 'marketplaceLabel' smart constructor.
4606−data MarketplaceLabel = MarketplaceLabel
4607− { _mlDeprecatedMarketplaceDealParty :: !(Maybe (Maybe MarketplaceDealParty))
4608− , _mlAccountId :: !(Maybe Text)
4609− , _mlCreateTimeMs :: !(Maybe Int64)
4610− , _mlLabel :: !(Maybe Text)
4611− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4612−
4613−-- | Creates a value of 'MarketplaceLabel' with the minimum fields required to make a request.
4614−--
4615−-- Use one of the following lenses to modify other fields as desired:
4616−--
4617−-- * 'mlDeprecatedMarketplaceDealParty'
4618−--
4619−-- * 'mlAccountId'
4620−--
4621−-- * 'mlCreateTimeMs'
4622−--
4623−-- * 'mlLabel'
4624−marketplaceLabel
4625− :: MarketplaceLabel
4626−marketplaceLabel =
4627− MarketplaceLabel
4628− { _mlDeprecatedMarketplaceDealParty = Nothing
4629− , _mlAccountId = Nothing
4630− , _mlCreateTimeMs = Nothing
4631− , _mlLabel = Nothing
4632− }
4633−
4634−-- | Information about the party that created the label.
4635−mlDeprecatedMarketplaceDealParty :: Lens' MarketplaceLabel (Maybe (Maybe MarketplaceDealParty))
4636−mlDeprecatedMarketplaceDealParty
4637− = lens _mlDeprecatedMarketplaceDealParty
4638− (\ s a -> s{_mlDeprecatedMarketplaceDealParty = a})
4639−
4640−-- | The accountId of the party that created the label.
4641−mlAccountId :: Lens' MarketplaceLabel (Maybe Text)
4642−mlAccountId
4643− = lens _mlAccountId (\ s a -> s{_mlAccountId = a})
4644−
4645−-- | The creation time (in ms since epoch) for the label.
4646−mlCreateTimeMs :: Lens' MarketplaceLabel (Maybe Int64)
4647−mlCreateTimeMs
4648− = lens _mlCreateTimeMs
4649− (\ s a -> s{_mlCreateTimeMs = a})
4650−
4651−-- | The label to use.
4652−mlLabel :: Lens' MarketplaceLabel (Maybe Text)
4653−mlLabel = lens _mlLabel (\ s a -> s{_mlLabel = a})
4654−
4655−instance FromJSON MarketplaceLabel where
4656− parseJSON
4657− = withObject "MarketplaceLabel"
4658− (\ o ->
4659− MarketplaceLabel <$>
4660− (o .:? "deprecatedMarketplaceDealParty") <*>
4661− (o .:? "accountId")
4662− <*> (o .:? "createTimeMs")
4663− <*> (o .:? "label"))
4664−
4665−instance ToJSON MarketplaceLabel where
4666− toJSON MarketplaceLabel{..}
4667− = object
4668− (catMaybes
4669− [("deprecatedMarketplaceDealParty" .=) <$>
4670− _mlDeprecatedMarketplaceDealParty,
4671− ("accountId" .=) <$> _mlAccountId,
4672− ("createTimeMs" .=) <$> _mlCreateTimeMs,
4673− ("label" .=) <$> _mlLabel])
4674−
4675−--
4676−-- /See:/ 'dateTime' smart constructor.
4677−data DateTime = DateTime
4678− { _dtSecond :: !(Maybe Int32)
4679− , _dtDay :: !(Maybe Int32)
4680− , _dtYear :: !(Maybe Int32)
4681− , _dtHour :: !(Maybe Int32)
4682− , _dtMonth :: !(Maybe Int32)
4683− , _dtMinute :: !(Maybe Int32)
4684− , _dtTimeZoneId :: !(Maybe Text)
4685− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4686−
4687−-- | Creates a value of 'DateTime' with the minimum fields required to make a request.
4688−--
4689−-- Use one of the following lenses to modify other fields as desired:
4690−--
4691−-- * 'dtSecond'
4692−--
4693−-- * 'dtDay'
4694−--
4695−-- * 'dtYear'
4696−--
4697−-- * 'dtHour'
4698−--
4699−-- * 'dtMonth'
4700−--
4701−-- * 'dtMinute'
4702−--
4703−-- * 'dtTimeZoneId'
4704−dateTime
4705− :: DateTime
4706−dateTime =
4707− DateTime
4708− { _dtSecond = Nothing
4709− , _dtDay = Nothing
4710− , _dtYear = Nothing
4711− , _dtHour = Nothing
4712− , _dtMonth = Nothing
4713− , _dtMinute = Nothing
4714− , _dtTimeZoneId = Nothing
4715− }
4716−
4717−dtSecond :: Lens' DateTime (Maybe Int32)
4718−dtSecond = lens _dtSecond (\ s a -> s{_dtSecond = a})
4719−
4720−dtDay :: Lens' DateTime (Maybe Int32)
4721−dtDay = lens _dtDay (\ s a -> s{_dtDay = a})
4722−
4723−dtYear :: Lens' DateTime (Maybe Int32)
4724−dtYear = lens _dtYear (\ s a -> s{_dtYear = a})
4725−
4726−dtHour :: Lens' DateTime (Maybe Int32)
4727−dtHour = lens _dtHour (\ s a -> s{_dtHour = a})
4728−
4729−dtMonth :: Lens' DateTime (Maybe Int32)
4730−dtMonth = lens _dtMonth (\ s a -> s{_dtMonth = a})
4731−
4732−dtMinute :: Lens' DateTime (Maybe Int32)
4733−dtMinute = lens _dtMinute (\ s a -> s{_dtMinute = a})
4734−
4735−dtTimeZoneId :: Lens' DateTime (Maybe Text)
4736−dtTimeZoneId
4737− = lens _dtTimeZoneId (\ s a -> s{_dtTimeZoneId = a})
4738−
4739−instance FromJSON DateTime where
4740− parseJSON
4741− = withObject "DateTime"
4742− (\ o ->
4743− DateTime <$>
4744− (o .:? "second") <*> (o .:? "day") <*> (o .:? "year")
4745− <*> (o .:? "hour")
4746− <*> (o .:? "month")
4747− <*> (o .:? "minute")
4748− <*> (o .:? "timeZoneId"))
4749−
4750−instance ToJSON DateTime where
4751− toJSON DateTime{..}
4752− = object
4753− (catMaybes
4754− [("second" .=) <$> _dtSecond, ("day" .=) <$> _dtDay,
4755− ("year" .=) <$> _dtYear, ("hour" .=) <$> _dtHour,
4756− ("month" .=) <$> _dtMonth,
4757− ("minute" .=) <$> _dtMinute,
4758− ("timeZoneId" .=) <$> _dtTimeZoneId])
4759−
4760−--
4761−-- /See:/ 'dealTermsGuaranteedFixedPriceTerms' smart constructor.
4762−data DealTermsGuaranteedFixedPriceTerms = DealTermsGuaranteedFixedPriceTerms
4763− { _dtgfptGuaranteedLooks :: !(Maybe Int64)
4764− , _dtgfptGuaranteedImpressions :: !(Maybe Int64)
4765− , _dtgfptFixedPrices :: !(Maybe [Maybe PricePerBuyer])
4766− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4767−
4768−-- | Creates a value of 'DealTermsGuaranteedFixedPriceTerms' with the minimum fields required to make a request.
4769−--
4770−-- Use one of the following lenses to modify other fields as desired:
4771−--
4772−-- * 'dtgfptGuaranteedLooks'
4773−--
4774−-- * 'dtgfptGuaranteedImpressions'
4775−--
4776−-- * 'dtgfptFixedPrices'
4777−dealTermsGuaranteedFixedPriceTerms
4778− :: DealTermsGuaranteedFixedPriceTerms
4779−dealTermsGuaranteedFixedPriceTerms =
4780− DealTermsGuaranteedFixedPriceTerms
4781− { _dtgfptGuaranteedLooks = Nothing
4782− , _dtgfptGuaranteedImpressions = Nothing
4783− , _dtgfptFixedPrices = Nothing
4784− }
4785−
4786−-- | Count of guaranteed looks. Required for deal, optional for offer.
4787−dtgfptGuaranteedLooks :: Lens' DealTermsGuaranteedFixedPriceTerms (Maybe Int64)
4788−dtgfptGuaranteedLooks
4789− = lens _dtgfptGuaranteedLooks
4790− (\ s a -> s{_dtgfptGuaranteedLooks = a})
4791−
4792−-- | Guaranteed impressions as a percentage. This is the percentage of
4793−-- guaranteed looks that the buyer is guaranteeing to buy.
4794−dtgfptGuaranteedImpressions :: Lens' DealTermsGuaranteedFixedPriceTerms (Maybe Int64)
4795−dtgfptGuaranteedImpressions
4796− = lens _dtgfptGuaranteedImpressions
4797− (\ s a -> s{_dtgfptGuaranteedImpressions = a})
4798−
4799−-- | Fixed price for the specified buyer.
4800−dtgfptFixedPrices :: Lens' DealTermsGuaranteedFixedPriceTerms [Maybe PricePerBuyer]
4801−dtgfptFixedPrices
4802− = lens _dtgfptFixedPrices
4803− (\ s a -> s{_dtgfptFixedPrices = a})
4804− . _Default
4805− . _Coerce
4806−
4807−instance FromJSON DealTermsGuaranteedFixedPriceTerms
4808− where
4809− parseJSON
4810− = withObject "DealTermsGuaranteedFixedPriceTerms"
4811− (\ o ->
4812− DealTermsGuaranteedFixedPriceTerms <$>
4813− (o .:? "guaranteedLooks") <*>
4814− (o .:? "guaranteedImpressions")
4815− <*> (o .:? "fixedPrices" .!= mempty))
4816−
4817−instance ToJSON DealTermsGuaranteedFixedPriceTerms
4818− where
4819− toJSON DealTermsGuaranteedFixedPriceTerms{..}
4820− = object
4821− (catMaybes
4822− [("guaranteedLooks" .=) <$> _dtgfptGuaranteedLooks,
4823− ("guaranteedImpressions" .=) <$>
4824− _dtgfptGuaranteedImpressions,
4825− ("fixedPrices" .=) <$> _dtgfptFixedPrices])
4826−
4827−--
4828−-- /See:/ 'creativeItemContextsItemServingRestrictions' smart constructor.
4829−data CreativeItemContextsItemServingRestrictions = CreativeItemContextsItemServingRestrictions
4830− { _cicisrPlatform :: !(Maybe [Text])
4831− , _cicisrContextType :: !(Maybe Text)
4832− , _cicisrAuctionType :: !(Maybe [Text])
4833− , _cicisrGeoCriteriaId :: !(Maybe [Int32])
4834− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4835−
4836−-- | Creates a value of 'CreativeItemContextsItemServingRestrictions' with the minimum fields required to make a request.
4837−--
4838−-- Use one of the following lenses to modify other fields as desired:
4839−--
4840−-- * 'cicisrPlatform'
4841−--
4842−-- * 'cicisrContextType'
4843−--
4844−-- * 'cicisrAuctionType'
4845−--
4846−-- * 'cicisrGeoCriteriaId'
4847−creativeItemContextsItemServingRestrictions
4848− :: CreativeItemContextsItemServingRestrictions
4849−creativeItemContextsItemServingRestrictions =
4850− CreativeItemContextsItemServingRestrictions
4851− { _cicisrPlatform = Nothing
4852− , _cicisrContextType = Nothing
4853− , _cicisrAuctionType = Nothing
4854− , _cicisrGeoCriteriaId = Nothing
4855− }
4856−
4857−-- | Only set when contextType=PLATFORM. Represents the platforms this
4858−-- restriction applies to.
4859−cicisrPlatform :: Lens' CreativeItemContextsItemServingRestrictions [Text]
4860−cicisrPlatform
4861− = lens _cicisrPlatform
4862− (\ s a -> s{_cicisrPlatform = a})
4863− . _Default
4864− . _Coerce
4865−
4866−-- | The type of context (e.g., location, platform, auction type, SSL-ness).
4867−cicisrContextType :: Lens' CreativeItemContextsItemServingRestrictions (Maybe Text)
4868−cicisrContextType
4869− = lens _cicisrContextType
4870− (\ s a -> s{_cicisrContextType = a})
4871−
4872−-- | Only set when contextType=AUCTION_TYPE. Represents the auction types
4873−-- this restriction applies to.
4874−cicisrAuctionType :: Lens' CreativeItemContextsItemServingRestrictions [Text]
4875−cicisrAuctionType
4876− = lens _cicisrAuctionType
4877− (\ s a -> s{_cicisrAuctionType = a})
4878− . _Default
4879− . _Coerce
4880−
4881−-- | Only set when contextType=LOCATION. Represents the geo criterias this
4882−-- restriction applies to.
4883−cicisrGeoCriteriaId :: Lens' CreativeItemContextsItemServingRestrictions [Int32]
4884−cicisrGeoCriteriaId
4885− = lens _cicisrGeoCriteriaId
4886− (\ s a -> s{_cicisrGeoCriteriaId = a})
4887− . _Default
4888− . _Coerce
4889−
4890−instance FromJSON
4891− CreativeItemContextsItemServingRestrictions where
4892− parseJSON
4893− = withObject
4894− "CreativeItemContextsItemServingRestrictions"
4895− (\ o ->
4896− CreativeItemContextsItemServingRestrictions <$>
4897− (o .:? "platform" .!= mempty) <*>
4898− (o .:? "contextType")
4899− <*> (o .:? "auctionType" .!= mempty)
4900− <*> (o .:? "geoCriteriaId" .!= mempty))
4901−
4902−instance ToJSON
4903− CreativeItemContextsItemServingRestrictions where
4904− toJSON
4905− CreativeItemContextsItemServingRestrictions{..}
4906− = object
4907− (catMaybes
4908− [("platform" .=) <$> _cicisrPlatform,
4909− ("contextType" .=) <$> _cicisrContextType,
4910− ("auctionType" .=) <$> _cicisrAuctionType,
4911− ("geoCriteriaId" .=) <$> _cicisrGeoCriteriaId])
4912−
4913−--
4914−-- /See:/ 'pretargetingConfigItemDimensions' smart constructor.
4915−data PretargetingConfigItemDimensions = PretargetingConfigItemDimensions
4916− { _pcidHeight :: !(Maybe Int64)
4917− , _pcidWidth :: !(Maybe Int64)
4918− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4919−
4920−-- | Creates a value of 'PretargetingConfigItemDimensions' with the minimum fields required to make a request.
4921−--
4922−-- Use one of the following lenses to modify other fields as desired:
4923−--
4924−-- * 'pcidHeight'
4925−--
4926−-- * 'pcidWidth'
4927−pretargetingConfigItemDimensions
4928− :: PretargetingConfigItemDimensions
4929−pretargetingConfigItemDimensions =
4930− PretargetingConfigItemDimensions
4931− { _pcidHeight = Nothing
4932− , _pcidWidth = Nothing
4933− }
4934−
4935−-- | Height in pixels.
4936−pcidHeight :: Lens' PretargetingConfigItemDimensions (Maybe Int64)
4937−pcidHeight
4938− = lens _pcidHeight (\ s a -> s{_pcidHeight = a})
4939−
4940−-- | Width in pixels.
4941−pcidWidth :: Lens' PretargetingConfigItemDimensions (Maybe Int64)
4942−pcidWidth
4943− = lens _pcidWidth (\ s a -> s{_pcidWidth = a})
4944−
4945−instance FromJSON PretargetingConfigItemDimensions
4946− where
4947− parseJSON
4948− = withObject "PretargetingConfigItemDimensions"
4949− (\ o ->
4950− PretargetingConfigItemDimensions <$>
4951− (o .:? "height") <*> (o .:? "width"))
4952−
4953−instance ToJSON PretargetingConfigItemDimensions
4954− where
4955− toJSON PretargetingConfigItemDimensions{..}
4956− = object
4957− (catMaybes
4958− [("height" .=) <$> _pcidHeight,
4959− ("width" .=) <$> _pcidWidth])
4960−
4961−--
4962−-- /See:/ 'addOrderDealsRequest' smart constructor.
4963−data AddOrderDealsRequest = AddOrderDealsRequest
4964− { _aodrUpdateAction :: !(Maybe Text)
4965− , _aodrDeals :: !(Maybe [Maybe MarketplaceDeal])
4966− , _aodrOrderRevisionNumber :: !(Maybe Int64)
4967− } deriving (Eq,Read,Show,Data,Typeable,Generic)
4968−
4969−-- | Creates a value of 'AddOrderDealsRequest' with the minimum fields required to make a request.
4970−--
4971−-- Use one of the following lenses to modify other fields as desired:
4972−--
4973−-- * 'aodrUpdateAction'
4974−--
4975−-- * 'aodrDeals'
4976−--
4977−-- * 'aodrOrderRevisionNumber'
4978−addOrderDealsRequest
4979− :: AddOrderDealsRequest
4980−addOrderDealsRequest =
4981− AddOrderDealsRequest
4982− { _aodrUpdateAction = Nothing
4983− , _aodrDeals = Nothing
4984− , _aodrOrderRevisionNumber = Nothing
4985− }
4986−
4987−-- | Indicates an optional action to take on the order
4988−aodrUpdateAction :: Lens' AddOrderDealsRequest (Maybe Text)
4989−aodrUpdateAction
4990− = lens _aodrUpdateAction
4991− (\ s a -> s{_aodrUpdateAction = a})
4992−
4993−-- | The list of deals to add
4994−aodrDeals :: Lens' AddOrderDealsRequest [Maybe MarketplaceDeal]
4995−aodrDeals
4996− = lens _aodrDeals (\ s a -> s{_aodrDeals = a}) .
4997− _Default
4998− . _Coerce
4999−
5000−-- | The last known order revision number.
5001−aodrOrderRevisionNumber :: Lens' AddOrderDealsRequest (Maybe Int64)
5002−aodrOrderRevisionNumber
5003− = lens _aodrOrderRevisionNumber
5004− (\ s a -> s{_aodrOrderRevisionNumber = a})
5005−
5006−instance FromJSON AddOrderDealsRequest where
5007− parseJSON
5008− = withObject "AddOrderDealsRequest"
5009− (\ o ->
5010− AddOrderDealsRequest <$>
5011− (o .:? "updateAction") <*> (o .:? "deals" .!= mempty)
5012− <*> (o .:? "orderRevisionNumber"))
5013−
5014−instance ToJSON AddOrderDealsRequest where
5015− toJSON AddOrderDealsRequest{..}
5016− = object
5017− (catMaybes
5018− [("updateAction" .=) <$> _aodrUpdateAction,
5019− ("deals" .=) <$> _aodrDeals,
5020− ("orderRevisionNumber" .=) <$>
5021− _aodrOrderRevisionNumber])
5022−
5023−--
5024−-- /See:/ 'dealTerms' smart constructor.
5025−data DealTerms = DealTerms
5026− { _dtNonGuaranteedFixedPriceTerms :: !(Maybe (Maybe DealTermsNonGuaranteedFixedPriceTerms))
5027− , _dtNonGuaranteedAuctionTerms :: !(Maybe (Maybe DealTermsNonGuaranteedAuctionTerms))
5028− , _dtGuaranteedFixedPriceTerms :: !(Maybe (Maybe DealTermsGuaranteedFixedPriceTerms))
5029− , _dtDescription :: !(Maybe Text)
5030− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5031−
5032−-- | Creates a value of 'DealTerms' with the minimum fields required to make a request.
5033−--
5034−-- Use one of the following lenses to modify other fields as desired:
5035−--
5036−-- * 'dtNonGuaranteedFixedPriceTerms'
5037−--
5038−-- * 'dtNonGuaranteedAuctionTerms'
5039−--
5040−-- * 'dtGuaranteedFixedPriceTerms'
5041−--
5042−-- * 'dtDescription'
5043−dealTerms
5044− :: DealTerms
5045−dealTerms =
5046− DealTerms
5047− { _dtNonGuaranteedFixedPriceTerms = Nothing
5048− , _dtNonGuaranteedAuctionTerms = Nothing
5049− , _dtGuaranteedFixedPriceTerms = Nothing
5050− , _dtDescription = Nothing
5051− }
5052−
5053−-- | The terms for non-guaranteed fixed price deals.
5054−dtNonGuaranteedFixedPriceTerms :: Lens' DealTerms (Maybe (Maybe DealTermsNonGuaranteedFixedPriceTerms))
5055−dtNonGuaranteedFixedPriceTerms
5056− = lens _dtNonGuaranteedFixedPriceTerms
5057− (\ s a -> s{_dtNonGuaranteedFixedPriceTerms = a})
5058−
5059−-- | The terms for non-guaranteed auction deals.
5060−dtNonGuaranteedAuctionTerms :: Lens' DealTerms (Maybe (Maybe DealTermsNonGuaranteedAuctionTerms))
5061−dtNonGuaranteedAuctionTerms
5062− = lens _dtNonGuaranteedAuctionTerms
5063− (\ s a -> s{_dtNonGuaranteedAuctionTerms = a})
5064−
5065−-- | The terms for guaranteed fixed price deals.
5066−dtGuaranteedFixedPriceTerms :: Lens' DealTerms (Maybe (Maybe DealTermsGuaranteedFixedPriceTerms))
5067−dtGuaranteedFixedPriceTerms
5068− = lens _dtGuaranteedFixedPriceTerms
5069− (\ s a -> s{_dtGuaranteedFixedPriceTerms = a})
5070−
5071−-- | Description for the proposed terms of the deal.
5072−dtDescription :: Lens' DealTerms (Maybe Text)
5073−dtDescription
5074− = lens _dtDescription
5075− (\ s a -> s{_dtDescription = a})
5076−
5077−instance FromJSON DealTerms where
5078− parseJSON
5079− = withObject "DealTerms"
5080− (\ o ->
5081− DealTerms <$>
5082− (o .:? "nonGuaranteedFixedPriceTerms") <*>
5083− (o .:? "nonGuaranteedAuctionTerms")
5084− <*> (o .:? "guaranteedFixedPriceTerms")
5085− <*> (o .:? "description"))
5086−
5087−instance ToJSON DealTerms where
5088− toJSON DealTerms{..}
5089− = object
5090− (catMaybes
5091− [("nonGuaranteedFixedPriceTerms" .=) <$>
5092− _dtNonGuaranteedFixedPriceTerms,
5093− ("nonGuaranteedAuctionTerms" .=) <$>
5094− _dtNonGuaranteedAuctionTerms,
5095− ("guaranteedFixedPriceTerms" .=) <$>
5096− _dtGuaranteedFixedPriceTerms,
5097− ("description" .=) <$> _dtDescription])
5098−
5099−--
5100−-- /See:/ 'editHistoryDto' smart constructor.
5101−data EditHistoryDto = EditHistoryDto
5102− { _ehdLastUpdatedByLoginName :: !(Maybe Text)
5103− , _ehdCreatedByLoginName :: !(Maybe Text)
5104− , _ehdLastUpdateTimeStamp :: !(Maybe Int64)
5105− , _ehdCreatedTimeStamp :: !(Maybe Int64)
5106− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5107−
5108−-- | Creates a value of 'EditHistoryDto' with the minimum fields required to make a request.
5109−--
5110−-- Use one of the following lenses to modify other fields as desired:
5111−--
5112−-- * 'ehdLastUpdatedByLoginName'
5113−--
5114−-- * 'ehdCreatedByLoginName'
5115−--
5116−-- * 'ehdLastUpdateTimeStamp'
5117−--
5118−-- * 'ehdCreatedTimeStamp'
5119−editHistoryDto
5120− :: EditHistoryDto
5121−editHistoryDto =
5122− EditHistoryDto
5123− { _ehdLastUpdatedByLoginName = Nothing
5124− , _ehdCreatedByLoginName = Nothing
5125− , _ehdLastUpdateTimeStamp = Nothing
5126− , _ehdCreatedTimeStamp = Nothing
5127− }
5128−
5129−ehdLastUpdatedByLoginName :: Lens' EditHistoryDto (Maybe Text)
5130−ehdLastUpdatedByLoginName
5131− = lens _ehdLastUpdatedByLoginName
5132− (\ s a -> s{_ehdLastUpdatedByLoginName = a})
5133−
5134−ehdCreatedByLoginName :: Lens' EditHistoryDto (Maybe Text)
5135−ehdCreatedByLoginName
5136− = lens _ehdCreatedByLoginName
5137− (\ s a -> s{_ehdCreatedByLoginName = a})
5138−
5139−ehdLastUpdateTimeStamp :: Lens' EditHistoryDto (Maybe Int64)
5140−ehdLastUpdateTimeStamp
5141− = lens _ehdLastUpdateTimeStamp
5142− (\ s a -> s{_ehdLastUpdateTimeStamp = a})
5143−
5144−ehdCreatedTimeStamp :: Lens' EditHistoryDto (Maybe Int64)
5145−ehdCreatedTimeStamp
5146− = lens _ehdCreatedTimeStamp
5147− (\ s a -> s{_ehdCreatedTimeStamp = a})
5148−
5149−instance FromJSON EditHistoryDto where
5150− parseJSON
5151− = withObject "EditHistoryDto"
5152− (\ o ->
5153− EditHistoryDto <$>
5154− (o .:? "lastUpdatedByLoginName") <*>
5155− (o .:? "createdByLoginName")
5156− <*> (o .:? "lastUpdateTimeStamp")
5157− <*> (o .:? "createdTimeStamp"))
5158−
5159−instance ToJSON EditHistoryDto where
5160− toJSON EditHistoryDto{..}
5161− = object
5162− (catMaybes
5163− [("lastUpdatedByLoginName" .=) <$>
5164− _ehdLastUpdatedByLoginName,
5165− ("createdByLoginName" .=) <$> _ehdCreatedByLoginName,
5166− ("lastUpdateTimeStamp" .=) <$>
5167− _ehdLastUpdateTimeStamp,
5168− ("createdTimeStamp" .=) <$> _ehdCreatedTimeStamp])
5169−
5170−--
5171−-- /See:/ 'buyer' smart constructor.
5172−newtype Buyer = Buyer
5173− { _bAccountId :: Maybe Text
5174− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5175−
5176−-- | Creates a value of 'Buyer' with the minimum fields required to make a request.
5177−--
5178−-- Use one of the following lenses to modify other fields as desired:
5179−--
5180−-- * 'bAccountId'
5181−buyer
5182− :: Buyer
5183−buyer =
5184− Buyer
5185− { _bAccountId = Nothing
5186− }
5187−
5188−-- | Adx account id of the buyer.
5189−bAccountId :: Lens' Buyer (Maybe Text)
5190−bAccountId
5191− = lens _bAccountId (\ s a -> s{_bAccountId = a})
5192−
5193−instance FromJSON Buyer where
5194− parseJSON
5195− = withObject "Buyer"
5196− (\ o -> Buyer <$> (o .:? "accountId"))
5197−
5198−instance ToJSON Buyer where
5199− toJSON Buyer{..}
5200− = object
5201− (catMaybes [("accountId" .=) <$> _bAccountId])
5202−
5203−-- | If nativeAd is set, HTMLSnippet and videoURL should not be set.
5204−--
5205−-- /See:/ 'creativeNativeAd' smart constructor.
5206−data CreativeNativeAd = CreativeNativeAd
5207− { _cnaImage :: !(Maybe CreativeImageNativeAd)
5208− , _cnaAppIcon :: !(Maybe CreativeAppIconNativeAd)
5209− , _cnaClickTrackingUrl :: !(Maybe Text)
5210− , _cnaBody :: !(Maybe Text)
5211− , _cnaHeadline :: !(Maybe Text)
5212− , _cnaImpressionTrackingUrl :: !(Maybe [Text])
5213− , _cnaCallToAction :: !(Maybe Text)
5214− , _cnaStore :: !(Maybe Text)
5215− , _cnaPrice :: !(Maybe Text)
5216− , _cnaAdvertiser :: !(Maybe Text)
5217− , _cnaStarRating :: !(Maybe Double)
5218− , _cnaLogo :: !(Maybe CreativeLogoNativeAd)
5219− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5220−
5221−-- | Creates a value of 'CreativeNativeAd' with the minimum fields required to make a request.
5222−--
5223−-- Use one of the following lenses to modify other fields as desired:
5224−--
5225−-- * 'cnaImage'
5226−--
5227−-- * 'cnaAppIcon'
5228−--
5229−-- * 'cnaClickTrackingUrl'
5230−--
5231−-- * 'cnaBody'
5232−--
5233−-- * 'cnaHeadline'
5234−--
5235−-- * 'cnaImpressionTrackingUrl'
5236−--
5237−-- * 'cnaCallToAction'
5238−--
5239−-- * 'cnaStore'
5240−--
5241−-- * 'cnaPrice'
5242−--
5243−-- * 'cnaAdvertiser'
5244−--
5245−-- * 'cnaStarRating'
5246−--
5247−-- * 'cnaLogo'
5248−creativeNativeAd
5249− :: CreativeNativeAd
5250−creativeNativeAd =
5251− CreativeNativeAd
5252− { _cnaImage = Nothing
5253− , _cnaAppIcon = Nothing
5254− , _cnaClickTrackingUrl = Nothing
5255− , _cnaBody = Nothing
5256− , _cnaHeadline = Nothing
5257− , _cnaImpressionTrackingUrl = Nothing
5258− , _cnaCallToAction = Nothing
5259− , _cnaStore = Nothing
5260− , _cnaPrice = Nothing
5261− , _cnaAdvertiser = Nothing
5262− , _cnaStarRating = Nothing
5263− , _cnaLogo = Nothing
5264− }
5265−
5266−-- | A large image.
5267−cnaImage :: Lens' CreativeNativeAd (Maybe CreativeImageNativeAd)
5268−cnaImage = lens _cnaImage (\ s a -> s{_cnaImage = a})
5269−
5270−-- | The app icon, for app download ads.
5271−cnaAppIcon :: Lens' CreativeNativeAd (Maybe CreativeAppIconNativeAd)
5272−cnaAppIcon
5273− = lens _cnaAppIcon (\ s a -> s{_cnaAppIcon = a})
5274−
5275−-- | The URL to use for click tracking.
5276−cnaClickTrackingUrl :: Lens' CreativeNativeAd (Maybe Text)
5277−cnaClickTrackingUrl
5278− = lens _cnaClickTrackingUrl
5279− (\ s a -> s{_cnaClickTrackingUrl = a})
5280−
5281−-- | A long description of the ad.
5282−cnaBody :: Lens' CreativeNativeAd (Maybe Text)
5283−cnaBody = lens _cnaBody (\ s a -> s{_cnaBody = a})
5284−
5285−-- | A short title for the ad.
5286−cnaHeadline :: Lens' CreativeNativeAd (Maybe Text)
5287−cnaHeadline
5288− = lens _cnaHeadline (\ s a -> s{_cnaHeadline = a})
5289−
5290−-- | The URLs are called when the impression is rendered.
5291−cnaImpressionTrackingUrl :: Lens' CreativeNativeAd [Text]
5292−cnaImpressionTrackingUrl
5293− = lens _cnaImpressionTrackingUrl
5294− (\ s a -> s{_cnaImpressionTrackingUrl = a})
5295− . _Default
5296− . _Coerce
5297−
5298−-- | A label for the button that the user is supposed to click.
5299−cnaCallToAction :: Lens' CreativeNativeAd (Maybe Text)
5300−cnaCallToAction
5301− = lens _cnaCallToAction
5302− (\ s a -> s{_cnaCallToAction = a})
5303−
5304−-- | The URL to the app store to purchase\/download the promoted app.
5305−cnaStore :: Lens' CreativeNativeAd (Maybe Text)
5306−cnaStore = lens _cnaStore (\ s a -> s{_cnaStore = a})
5307−
5308−-- | The price of the promoted app including the currency info.
5309−cnaPrice :: Lens' CreativeNativeAd (Maybe Text)
5310−cnaPrice = lens _cnaPrice (\ s a -> s{_cnaPrice = a})
5311−
5312−cnaAdvertiser :: Lens' CreativeNativeAd (Maybe Text)
5313−cnaAdvertiser
5314− = lens _cnaAdvertiser
5315− (\ s a -> s{_cnaAdvertiser = a})
5316−
5317−-- | The app rating in the app store. Must be in the range [0-5].
5318−cnaStarRating :: Lens' CreativeNativeAd (Maybe Double)
5319−cnaStarRating
5320− = lens _cnaStarRating
5321− (\ s a -> s{_cnaStarRating = a})
5322−
5323−-- | A smaller image, for the advertiser logo.
5324−cnaLogo :: Lens' CreativeNativeAd (Maybe CreativeLogoNativeAd)
5325−cnaLogo = lens _cnaLogo (\ s a -> s{_cnaLogo = a})
5326−
5327−instance FromJSON CreativeNativeAd where
5328− parseJSON
5329− = withObject "CreativeNativeAd"
5330− (\ o ->
5331− CreativeNativeAd <$>
5332− (o .:? "image") <*> (o .:? "appIcon") <*>
5333− (o .:? "clickTrackingUrl")
5334− <*> (o .:? "body")
5335− <*> (o .:? "headline")
5336− <*> (o .:? "impressionTrackingUrl" .!= mempty)
5337− <*> (o .:? "callToAction")
5338− <*> (o .:? "store")
5339− <*> (o .:? "price")
5340− <*> (o .:? "advertiser")
5341− <*> (o .:? "starRating")
5342− <*> (o .:? "logo"))
5343−
5344−instance ToJSON CreativeNativeAd where
5345− toJSON CreativeNativeAd{..}
5346− = object
5347− (catMaybes
5348− [("image" .=) <$> _cnaImage,
5349− ("appIcon" .=) <$> _cnaAppIcon,
5350− ("clickTrackingUrl" .=) <$> _cnaClickTrackingUrl,
5351− ("body" .=) <$> _cnaBody,
5352− ("headline" .=) <$> _cnaHeadline,
5353− ("impressionTrackingUrl" .=) <$>
5354− _cnaImpressionTrackingUrl,
5355− ("callToAction" .=) <$> _cnaCallToAction,
5356− ("store" .=) <$> _cnaStore,
5357− ("price" .=) <$> _cnaPrice,
5358− ("advertiser" .=) <$> _cnaAdvertiser,
5359− ("starRating" .=) <$> _cnaStarRating,
5360− ("logo" .=) <$> _cnaLogo])
5361−
5362−--
5363−-- /See:/ 'brandDto' smart constructor.
5364−data BrandDto = BrandDto
5365− { _bAdvertiserId :: !(Maybe Int64)
5366− , _bName :: !(Maybe Text)
5367− , _bId :: !(Maybe Int64)
5368− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5369−
5370−-- | Creates a value of 'BrandDto' with the minimum fields required to make a request.
5371−--
5372−-- Use one of the following lenses to modify other fields as desired:
5373−--
5374−-- * 'bAdvertiserId'
5375−--
5376−-- * 'bName'
5377−--
5378−-- * 'bId'
5379−brandDto
5380− :: BrandDto
5381−brandDto =
5382− BrandDto
5383− { _bAdvertiserId = Nothing
5384− , _bName = Nothing
5385− , _bId = Nothing
5386− }
5387−
5388−bAdvertiserId :: Lens' BrandDto (Maybe Int64)
5389−bAdvertiserId
5390− = lens _bAdvertiserId
5391− (\ s a -> s{_bAdvertiserId = a})
5392−
5393−bName :: Lens' BrandDto (Maybe Text)
5394−bName = lens _bName (\ s a -> s{_bName = a})
5395−
5396−bId :: Lens' BrandDto (Maybe Int64)
5397−bId = lens _bId (\ s a -> s{_bId = a})
5398−
5399−instance FromJSON BrandDto where
5400− parseJSON
5401− = withObject "BrandDto"
5402− (\ o ->
5403− BrandDto <$>
5404− (o .:? "advertiserId") <*> (o .:? "name") <*>
5405− (o .:? "id"))
5406−
5407−instance ToJSON BrandDto where
5408− toJSON BrandDto{..}
5409− = object
5410− (catMaybes
5411− [("advertiserId" .=) <$> _bAdvertiserId,
5412− ("name" .=) <$> _bName, ("id" .=) <$> _bId])
5413−
5414−--
5415−-- /See:/ 'editAllOrderDealsResponse' smart constructor.
5416−newtype EditAllOrderDealsResponse = EditAllOrderDealsResponse
5417− { _eDeals :: Maybe [Maybe MarketplaceDeal]
5418− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5419−
5420−-- | Creates a value of 'EditAllOrderDealsResponse' with the minimum fields required to make a request.
5421−--
5422−-- Use one of the following lenses to modify other fields as desired:
5423−--
5424−-- * 'eDeals'
5425−editAllOrderDealsResponse
5426− :: EditAllOrderDealsResponse
5427−editAllOrderDealsResponse =
5428− EditAllOrderDealsResponse
5429− { _eDeals = Nothing
5430− }
5431−
5432−-- | List of all deals in the order after edit.
5433−eDeals :: Lens' EditAllOrderDealsResponse [Maybe MarketplaceDeal]
5434−eDeals
5435− = lens _eDeals (\ s a -> s{_eDeals = a}) . _Default .
5436− _Coerce
5437−
5438−instance FromJSON EditAllOrderDealsResponse where
5439− parseJSON
5440− = withObject "EditAllOrderDealsResponse"
5441− (\ o ->
5442− EditAllOrderDealsResponse <$>
5443− (o .:? "deals" .!= mempty))
5444−
5445−instance ToJSON EditAllOrderDealsResponse where
5446− toJSON EditAllOrderDealsResponse{..}
5447− = object (catMaybes [("deals" .=) <$> _eDeals])
5448−
5449−-- | An order is associated with a bunch of notes which may optionally be
5450−-- associated with a deal and\/or revision number.
5451−--
5452−-- /See:/ 'marketplaceNote' smart constructor.
5453−data MarketplaceNote = MarketplaceNote
5454− { _mnNote :: !(Maybe Text)
5455− , _mnKind :: !Text
5456− , _mnTimestampMs :: !(Maybe Int64)
5457− , _mnDealId :: !(Maybe Text)
5458− , _mnNoteId :: !(Maybe Text)
5459− , _mnCreatorRole :: !(Maybe Text)
5460− , _mnOrderId :: !(Maybe Text)
5461− , _mnOrderRevisionNumber :: !(Maybe Int64)
5462− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5463−
5464−-- | Creates a value of 'MarketplaceNote' with the minimum fields required to make a request.
5465−--
5466−-- Use one of the following lenses to modify other fields as desired:
5467−--
5468−-- * 'mnNote'
5469−--
5470−-- * 'mnKind'
5471−--
5472−-- * 'mnTimestampMs'
5473−--
5474−-- * 'mnDealId'
5475−--
5476−-- * 'mnNoteId'
5477−--
5478−-- * 'mnCreatorRole'
5479−--
5480−-- * 'mnOrderId'
5481−--
5482−-- * 'mnOrderRevisionNumber'
5483−marketplaceNote
5484− :: MarketplaceNote
5485−marketplaceNote =
5486− MarketplaceNote
5487− { _mnNote = Nothing
5488− , _mnKind = "adexchangebuyer#marketplaceNote"
5489− , _mnTimestampMs = Nothing
5490− , _mnDealId = Nothing
5491− , _mnNoteId = Nothing
5492− , _mnCreatorRole = Nothing
5493− , _mnOrderId = Nothing
5494− , _mnOrderRevisionNumber = Nothing
5495− }
5496−
5497−-- | The actual note to attach. (readonly, except on create)
5498−mnNote :: Lens' MarketplaceNote (Maybe Text)
5499−mnNote = lens _mnNote (\ s a -> s{_mnNote = a})
5500−
5501−-- | Identifies what kind of resource this is. Value: the fixed string
5502−-- \"adexchangebuyer#marketplaceNote\".
5503−mnKind :: Lens' MarketplaceNote Text
5504−mnKind = lens _mnKind (\ s a -> s{_mnKind = a})
5505−
5506−-- | The timestamp (ms since epoch) that this note was created. (readonly)
5507−mnTimestampMs :: Lens' MarketplaceNote (Maybe Int64)
5508−mnTimestampMs
5509− = lens _mnTimestampMs
5510− (\ s a -> s{_mnTimestampMs = a})
5511−
5512−-- | Notes can optionally be associated with a deal. (readonly, except on
5513−-- create)
5514−mnDealId :: Lens' MarketplaceNote (Maybe Text)
5515−mnDealId = lens _mnDealId (\ s a -> s{_mnDealId = a})
5516−
5517−-- | The unique id for the note. (readonly)
5518−mnNoteId :: Lens' MarketplaceNote (Maybe Text)
5519−mnNoteId = lens _mnNoteId (\ s a -> s{_mnNoteId = a})
5520−
5521−-- | The role of the person (buyer\/seller) creating the note. (readonly)
5522−mnCreatorRole :: Lens' MarketplaceNote (Maybe Text)
5523−mnCreatorRole
5524− = lens _mnCreatorRole
5525− (\ s a -> s{_mnCreatorRole = a})
5526−
5527−-- | The order_id that a note is attached to. (readonly)
5528−mnOrderId :: Lens' MarketplaceNote (Maybe Text)
5529−mnOrderId
5530− = lens _mnOrderId (\ s a -> s{_mnOrderId = a})
5531−
5532−-- | If the note is associated with an order revision number, then store that
5533−-- here. (readonly, except on create)
5534−mnOrderRevisionNumber :: Lens' MarketplaceNote (Maybe Int64)
5535−mnOrderRevisionNumber
5536− = lens _mnOrderRevisionNumber
5537− (\ s a -> s{_mnOrderRevisionNumber = a})
5538−
5539−instance FromJSON MarketplaceNote where
5540− parseJSON
5541− = withObject "MarketplaceNote"
5542− (\ o ->
5543− MarketplaceNote <$>
5544− (o .:? "note") <*>
5545− (o .:? "kind" .!= "adexchangebuyer#marketplaceNote")
5546− <*> (o .:? "timestampMs")
5547− <*> (o .:? "dealId")
5548− <*> (o .:? "noteId")
5549− <*> (o .:? "creatorRole")
5550− <*> (o .:? "orderId")
5551− <*> (o .:? "orderRevisionNumber"))
5552−
5553−instance ToJSON MarketplaceNote where
5554− toJSON MarketplaceNote{..}
5555− = object
5556− (catMaybes
5557− [("note" .=) <$> _mnNote, Just ("kind" .= _mnKind),
5558− ("timestampMs" .=) <$> _mnTimestampMs,
5559− ("dealId" .=) <$> _mnDealId,
5560− ("noteId" .=) <$> _mnNoteId,
5561− ("creatorRole" .=) <$> _mnCreatorRole,
5562− ("orderId" .=) <$> _mnOrderId,
5563− ("orderRevisionNumber" .=) <$>
5564− _mnOrderRevisionNumber])
5565−
5566−--
5567−-- /See:/ 'getNegotiationByIdRequest' smart constructor.
5568−newtype GetNegotiationByIdRequest = GetNegotiationByIdRequest
5569− { _gnbirIncludePrivateAuctions :: Maybe Bool
5570− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5571−
5572−-- | Creates a value of 'GetNegotiationByIdRequest' with the minimum fields required to make a request.
5573−--
5574−-- Use one of the following lenses to modify other fields as desired:
5575−--
5576−-- * 'gnbirIncludePrivateAuctions'
5577−getNegotiationByIdRequest
5578− :: GetNegotiationByIdRequest
5579−getNegotiationByIdRequest =
5580− GetNegotiationByIdRequest
5581− { _gnbirIncludePrivateAuctions = Nothing
5582− }
5583−
5584−gnbirIncludePrivateAuctions :: Lens' GetNegotiationByIdRequest (Maybe Bool)
5585−gnbirIncludePrivateAuctions
5586− = lens _gnbirIncludePrivateAuctions
5587− (\ s a -> s{_gnbirIncludePrivateAuctions = a})
5588−
5589−instance FromJSON GetNegotiationByIdRequest where
5590− parseJSON
5591− = withObject "GetNegotiationByIdRequest"
5592− (\ o ->
5593− GetNegotiationByIdRequest <$>
5594− (o .:? "includePrivateAuctions"))
5595−
5596−instance ToJSON GetNegotiationByIdRequest where
5597− toJSON GetNegotiationByIdRequest{..}
5598− = object
5599− (catMaybes
5600− [("includePrivateAuctions" .=) <$>
5601− _gnbirIncludePrivateAuctions])
5602−
5603−--
5604−-- /See:/ 'advertiserDto' smart constructor.
5605−data AdvertiserDto = AdvertiserDto
5606− { _adStatus :: !(Maybe Text)
5607− , _adBrands :: !(Maybe [Maybe BrandDto])
5608− , _adName :: !(Maybe Text)
5609− , _adId :: !(Maybe Int64)
5610− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5611−
5612−-- | Creates a value of 'AdvertiserDto' with the minimum fields required to make a request.
5613−--
5614−-- Use one of the following lenses to modify other fields as desired:
5615−--
5616−-- * 'adStatus'
5617−--
5618−-- * 'adBrands'
5619−--
5620−-- * 'adName'
5621−--
5622−-- * 'adId'
5623−advertiserDto
5624− :: AdvertiserDto
5625−advertiserDto =
5626− AdvertiserDto
5627− { _adStatus = Nothing
5628− , _adBrands = Nothing
5629− , _adName = Nothing
5630− , _adId = Nothing
5631− }
5632−
5633−adStatus :: Lens' AdvertiserDto (Maybe Text)
5634−adStatus = lens _adStatus (\ s a -> s{_adStatus = a})
5635−
5636−adBrands :: Lens' AdvertiserDto [Maybe BrandDto]
5637−adBrands
5638− = lens _adBrands (\ s a -> s{_adBrands = a}) .
5639− _Default
5640− . _Coerce
5641−
5642−adName :: Lens' AdvertiserDto (Maybe Text)
5643−adName = lens _adName (\ s a -> s{_adName = a})
5644−
5645−adId :: Lens' AdvertiserDto (Maybe Int64)
5646−adId = lens _adId (\ s a -> s{_adId = a})
5647−
5648−instance FromJSON AdvertiserDto where
5649− parseJSON
5650− = withObject "AdvertiserDto"
5651− (\ o ->
5652− AdvertiserDto <$>
5653− (o .:? "status") <*> (o .:? "brands" .!= mempty) <*>
5654− (o .:? "name")
5655− <*> (o .:? "id"))
5656−
5657−instance ToJSON AdvertiserDto where
5658− toJSON AdvertiserDto{..}
5659− = object
5660− (catMaybes
5661− [("status" .=) <$> _adStatus,
5662− ("brands" .=) <$> _adBrands, ("name" .=) <$> _adName,
5663− ("id" .=) <$> _adId])
5664−
5665−--
5666−-- /See:/ 'listClientAccessCapabilitiesResponse' smart constructor.
5667−newtype ListClientAccessCapabilitiesResponse = ListClientAccessCapabilitiesResponse
5668− { _lcacrClientAccessPermissions :: Maybe [Maybe ClientAccessCapabilities]
5669− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5670−
5671−-- | Creates a value of 'ListClientAccessCapabilitiesResponse' with the minimum fields required to make a request.
5672−--
5673−-- Use one of the following lenses to modify other fields as desired:
5674−--
5675−-- * 'lcacrClientAccessPermissions'
5676−listClientAccessCapabilitiesResponse
5677− :: ListClientAccessCapabilitiesResponse
5678−listClientAccessCapabilitiesResponse =
5679− ListClientAccessCapabilitiesResponse
5680− { _lcacrClientAccessPermissions = Nothing
5681− }
5682−
5683−lcacrClientAccessPermissions :: Lens' ListClientAccessCapabilitiesResponse [Maybe ClientAccessCapabilities]
5684−lcacrClientAccessPermissions
5685− = lens _lcacrClientAccessPermissions
5686− (\ s a -> s{_lcacrClientAccessPermissions = a})
5687− . _Default
5688− . _Coerce
5689−
5690−instance FromJSON
5691− ListClientAccessCapabilitiesResponse where
5692− parseJSON
5693− = withObject "ListClientAccessCapabilitiesResponse"
5694− (\ o ->
5695− ListClientAccessCapabilitiesResponse <$>
5696− (o .:? "clientAccessPermissions" .!= mempty))
5697−
5698−instance ToJSON ListClientAccessCapabilitiesResponse
5699− where
5700− toJSON ListClientAccessCapabilitiesResponse{..}
5701− = object
5702− (catMaybes
5703− [("clientAccessPermissions" .=) <$>
5704− _lcacrClientAccessPermissions])
5705−
5706−--
5707−-- /See:/ 'listOffersResponse' smart constructor.
5708−data ListOffersResponse = ListOffersResponse
5709− { _lorKind :: !Text
5710− , _lorOffers :: !(Maybe [Maybe OfferDto])
5711− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5712−
5713−-- | Creates a value of 'ListOffersResponse' with the minimum fields required to make a request.
5714−--
5715−-- Use one of the following lenses to modify other fields as desired:
5716−--
5717−-- * 'lorKind'
5718−--
5719−-- * 'lorOffers'
5720−listOffersResponse
5721− :: ListOffersResponse
5722−listOffersResponse =
5723− ListOffersResponse
5724− { _lorKind = "adexchangebuyer#offersList"
5725− , _lorOffers = Nothing
5726− }
5727−
5728−lorKind :: Lens' ListOffersResponse Text
5729−lorKind = lens _lorKind (\ s a -> s{_lorKind = a})
5730−
5731−lorOffers :: Lens' ListOffersResponse [Maybe OfferDto]
5732−lorOffers
5733− = lens _lorOffers (\ s a -> s{_lorOffers = a}) .
5734− _Default
5735− . _Coerce
5736−
5737−instance FromJSON ListOffersResponse where
5738− parseJSON
5739− = withObject "ListOffersResponse"
5740− (\ o ->
5741− ListOffersResponse <$>
5742− (o .:? "kind" .!= "adexchangebuyer#offersList") <*>
5743− (o .:? "offers" .!= mempty))
5744−
5745−instance ToJSON ListOffersResponse where
5746− toJSON ListOffersResponse{..}
5747− = object
5748− (catMaybes
5749− [Just ("kind" .= _lorKind),
5750− ("offers" .=) <$> _lorOffers])
5751−
5752−--
5753−-- /See:/ 'targetingValue' smart constructor.
5754−data TargetingValue = TargetingValue
5755− { _tvCreativeSizeValue :: !(Maybe (Maybe TargetingValueCreativeSize))
5756− , _tvStringValue :: !(Maybe Text)
5757− , _tvLongValue :: !(Maybe Int64)
5758− , _tvDayPartTargetingValue :: !(Maybe (Maybe TargetingValueDayPartTargeting))
5759− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5760−
5761−-- | Creates a value of 'TargetingValue' with the minimum fields required to make a request.
5762−--
5763−-- Use one of the following lenses to modify other fields as desired:
5764−--
5765−-- * 'tvCreativeSizeValue'
5766−--
5767−-- * 'tvStringValue'
5768−--
5769−-- * 'tvLongValue'
5770−--
5771−-- * 'tvDayPartTargetingValue'
5772−targetingValue
5773− :: TargetingValue
5774−targetingValue =
5775− TargetingValue
5776− { _tvCreativeSizeValue = Nothing
5777− , _tvStringValue = Nothing
5778− , _tvLongValue = Nothing
5779− , _tvDayPartTargetingValue = Nothing
5780− }
5781−
5782−-- | The creative size value to exclude\/include.
5783−tvCreativeSizeValue :: Lens' TargetingValue (Maybe (Maybe TargetingValueCreativeSize))
5784−tvCreativeSizeValue
5785− = lens _tvCreativeSizeValue
5786− (\ s a -> s{_tvCreativeSizeValue = a})
5787−
5788−-- | The string value to exclude\/include.
5789−tvStringValue :: Lens' TargetingValue (Maybe Text)
5790−tvStringValue
5791− = lens _tvStringValue
5792− (\ s a -> s{_tvStringValue = a})
5793−
5794−-- | The long value to exclude\/include.
5795−tvLongValue :: Lens' TargetingValue (Maybe Int64)
5796−tvLongValue
5797− = lens _tvLongValue (\ s a -> s{_tvLongValue = a})
5798−
5799−-- | The daypart targeting to include \/ exclude. Filled in when the key is
5800−-- GOOG_DAYPART_TARGETING.
5801−tvDayPartTargetingValue :: Lens' TargetingValue (Maybe (Maybe TargetingValueDayPartTargeting))
5802−tvDayPartTargetingValue
5803− = lens _tvDayPartTargetingValue
5804− (\ s a -> s{_tvDayPartTargetingValue = a})
5805−
5806−instance FromJSON TargetingValue where
5807− parseJSON
5808− = withObject "TargetingValue"
5809− (\ o ->
5810− TargetingValue <$>
5811− (o .:? "creativeSizeValue") <*> (o .:? "stringValue")
5812− <*> (o .:? "longValue")
5813− <*> (o .:? "dayPartTargetingValue"))
5814−
5815−instance ToJSON TargetingValue where
5816− toJSON TargetingValue{..}
5817− = object
5818− (catMaybes
5819− [("creativeSizeValue" .=) <$> _tvCreativeSizeValue,
5820− ("stringValue" .=) <$> _tvStringValue,
5821− ("longValue" .=) <$> _tvLongValue,
5822− ("dayPartTargetingValue" .=) <$>
5823− _tvDayPartTargetingValue])
5824−
5825−--
5826−-- /See:/ 'getFinalizedNegotiationByExternalDealIdRequest' smart constructor.
5827−newtype GetFinalizedNegotiationByExternalDealIdRequest = GetFinalizedNegotiationByExternalDealIdRequest
5828− { _gfnbedirIncludePrivateAuctions :: Maybe Bool
5829− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5830−
5831−-- | Creates a value of 'GetFinalizedNegotiationByExternalDealIdRequest' with the minimum fields required to make a request.
5832−--
5833−-- Use one of the following lenses to modify other fields as desired:
5834−--
5835−-- * 'gfnbedirIncludePrivateAuctions'
5836−getFinalizedNegotiationByExternalDealIdRequest
5837− :: GetFinalizedNegotiationByExternalDealIdRequest
5838−getFinalizedNegotiationByExternalDealIdRequest =
5839− GetFinalizedNegotiationByExternalDealIdRequest
5840− { _gfnbedirIncludePrivateAuctions = Nothing
5841− }
5842−
5843−gfnbedirIncludePrivateAuctions :: Lens' GetFinalizedNegotiationByExternalDealIdRequest (Maybe Bool)
5844−gfnbedirIncludePrivateAuctions
5845− = lens _gfnbedirIncludePrivateAuctions
5846− (\ s a -> s{_gfnbedirIncludePrivateAuctions = a})
5847−
5848−instance FromJSON
5849− GetFinalizedNegotiationByExternalDealIdRequest where
5850− parseJSON
5851− = withObject
5852− "GetFinalizedNegotiationByExternalDealIdRequest"
5853− (\ o ->
5854− GetFinalizedNegotiationByExternalDealIdRequest <$>
5855− (o .:? "includePrivateAuctions"))
5856−
5857−instance ToJSON
5858− GetFinalizedNegotiationByExternalDealIdRequest where
5859− toJSON
5860− GetFinalizedNegotiationByExternalDealIdRequest{..}
5861− = object
5862− (catMaybes
5863− [("includePrivateAuctions" .=) <$>
5864− _gfnbedirIncludePrivateAuctions])
5865−
5866−--
5867−-- /See:/ 'getNegotiationsResponse' smart constructor.
5868−data GetNegotiationsResponse = GetNegotiationsResponse
5869− { _gnrKind :: !Text
5870− , _gnrNegotiations :: !(Maybe [Maybe NegotiationDto])
5871− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5872−
5873−-- | Creates a value of 'GetNegotiationsResponse' with the minimum fields required to make a request.
5874−--
5875−-- Use one of the following lenses to modify other fields as desired:
5876−--
5877−-- * 'gnrKind'
5878−--
5879−-- * 'gnrNegotiations'
5880−getNegotiationsResponse
5881− :: GetNegotiationsResponse
5882−getNegotiationsResponse =
5883− GetNegotiationsResponse
5884− { _gnrKind = "adexchangebuyer#negotiationsList"
5885− , _gnrNegotiations = Nothing
5886− }
5887−
5888−gnrKind :: Lens' GetNegotiationsResponse Text
5889−gnrKind = lens _gnrKind (\ s a -> s{_gnrKind = a})
5890−
5891−gnrNegotiations :: Lens' GetNegotiationsResponse [Maybe NegotiationDto]
5892−gnrNegotiations
5893− = lens _gnrNegotiations
5894− (\ s a -> s{_gnrNegotiations = a})
5895− . _Default
5896− . _Coerce
5897−
5898−instance FromJSON GetNegotiationsResponse where
5899− parseJSON
5900− = withObject "GetNegotiationsResponse"
5901− (\ o ->
5902− GetNegotiationsResponse <$>
5903− (o .:? "kind" .!= "adexchangebuyer#negotiationsList")
5904− <*> (o .:? "negotiations" .!= mempty))
5905−
5906−instance ToJSON GetNegotiationsResponse where
5907− toJSON GetNegotiationsResponse{..}
5908− = object
5909− (catMaybes
5910− [Just ("kind" .= _gnrKind),
5911− ("negotiations" .=) <$> _gnrNegotiations])
5912−
5913−--
5914−-- /See:/ 'privateData' smart constructor.
5915−data PrivateData = PrivateData
5916− { _pdReferencePayload :: !(Maybe Word8)
5917− , _pdReferenceId :: !(Maybe Text)
5918− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5919−
5920−-- | Creates a value of 'PrivateData' with the minimum fields required to make a request.
5921−--
5922−-- Use one of the following lenses to modify other fields as desired:
5923−--
5924−-- * 'pdReferencePayload'
5925−--
5926−-- * 'pdReferenceId'
5927−privateData
5928− :: PrivateData
5929−privateData =
5930− PrivateData
5931− { _pdReferencePayload = Nothing
5932− , _pdReferenceId = Nothing
5933− }
5934−
5935−pdReferencePayload :: Lens' PrivateData (Maybe Word8)
5936−pdReferencePayload
5937− = lens _pdReferencePayload
5938− (\ s a -> s{_pdReferencePayload = a})
5939−
5940−pdReferenceId :: Lens' PrivateData (Maybe Text)
5941−pdReferenceId
5942− = lens _pdReferenceId
5943− (\ s a -> s{_pdReferenceId = a})
5944−
5945−instance FromJSON PrivateData where
5946− parseJSON
5947− = withObject "PrivateData"
5948− (\ o ->
5949− PrivateData <$>
5950− (o .:? "referencePayload") <*> (o .:? "referenceId"))
5951−
5952−instance ToJSON PrivateData where
5953− toJSON PrivateData{..}
5954− = object
5955− (catMaybes
5956− [("referencePayload" .=) <$> _pdReferencePayload,
5957− ("referenceId" .=) <$> _pdReferenceId])
5958−
5959−--
5960−-- /See:/ 'deliveryControlFrequencyCap' smart constructor.
5961−data DeliveryControlFrequencyCap = DeliveryControlFrequencyCap
5962− { _dcfcMaxImpressions :: !(Maybe Int32)
5963− , _dcfcNumTimeUnits :: !(Maybe Int32)
5964− , _dcfcTimeUnitType :: !(Maybe Text)
5965− } deriving (Eq,Read,Show,Data,Typeable,Generic)
5966−
5967−-- | Creates a value of 'DeliveryControlFrequencyCap' with the minimum fields required to make a request.
5968−--
5969−-- Use one of the following lenses to modify other fields as desired:
5970−--
5971−-- * 'dcfcMaxImpressions'
5972−--
5973−-- * 'dcfcNumTimeUnits'
5974−--
5975−-- * 'dcfcTimeUnitType'
5976−deliveryControlFrequencyCap
5977− :: DeliveryControlFrequencyCap
5978−deliveryControlFrequencyCap =
5979− DeliveryControlFrequencyCap
5980− { _dcfcMaxImpressions = Nothing
5981− , _dcfcNumTimeUnits = Nothing
5982− , _dcfcTimeUnitType = Nothing
5983− }
5984−
5985−dcfcMaxImpressions :: Lens' DeliveryControlFrequencyCap (Maybe Int32)
5986−dcfcMaxImpressions
5987− = lens _dcfcMaxImpressions
5988− (\ s a -> s{_dcfcMaxImpressions = a})
5989−
5990−dcfcNumTimeUnits :: Lens' DeliveryControlFrequencyCap (Maybe Int32)
5991−dcfcNumTimeUnits
5992− = lens _dcfcNumTimeUnits
5993− (\ s a -> s{_dcfcNumTimeUnits = a})
5994−
5995−dcfcTimeUnitType :: Lens' DeliveryControlFrequencyCap (Maybe Text)
5996−dcfcTimeUnitType
5997− = lens _dcfcTimeUnitType
5998− (\ s a -> s{_dcfcTimeUnitType = a})
5999−
6000−instance FromJSON DeliveryControlFrequencyCap where
6001− parseJSON
6002− = withObject "DeliveryControlFrequencyCap"
6003− (\ o ->
6004− DeliveryControlFrequencyCap <$>
6005− (o .:? "maxImpressions") <*> (o .:? "numTimeUnits")
6006− <*> (o .:? "timeUnitType"))
6007−
6008−instance ToJSON DeliveryControlFrequencyCap where
6009− toJSON DeliveryControlFrequencyCap{..}
6010− = object
6011− (catMaybes
6012− [("maxImpressions" .=) <$> _dcfcMaxImpressions,
6013− ("numTimeUnits" .=) <$> _dcfcNumTimeUnits,
6014− ("timeUnitType" .=) <$> _dcfcTimeUnitType])
6015−
6016−-- | The configuration data for Ad Exchange RTB - Budget API.
6017−--
6018−-- /See:/ 'budget' smart constructor.
6019−data Budget = Budget
6020− { _budCurrencyCode :: !(Maybe Text)
6021− , _budKind :: !Text
6022− , _budBudgetAmount :: !(Maybe Int64)
6023− , _budAccountId :: !(Maybe Int64)
6024− , _budId :: !(Maybe Text)
6025− , _budBillingId :: !(Maybe Int64)
6026− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6027−
6028−-- | Creates a value of 'Budget' with the minimum fields required to make a request.
6029−--
6030−-- Use one of the following lenses to modify other fields as desired:
6031−--
6032−-- * 'budCurrencyCode'
6033−--
6034−-- * 'budKind'
6035−--
6036−-- * 'budBudgetAmount'
6037−--
6038−-- * 'budAccountId'
6039−--
6040−-- * 'budId'
6041−--
6042−-- * 'budBillingId'
6043−budget
6044− :: Budget
6045−budget =
6046− Budget
6047− { _budCurrencyCode = Nothing
6048− , _budKind = "adexchangebuyer#budget"
6049− , _budBudgetAmount = Nothing
6050− , _budAccountId = Nothing
6051− , _budId = Nothing
6052− , _budBillingId = Nothing
6053− }
6054−
6055−-- | The currency code for the buyer. This cannot be altered here.
6056−budCurrencyCode :: Lens' Budget (Maybe Text)
6057−budCurrencyCode
6058− = lens _budCurrencyCode
6059− (\ s a -> s{_budCurrencyCode = a})
6060−
6061−-- | The kind of the resource, i.e. \"adexchangebuyer#budget\".
6062−budKind :: Lens' Budget Text
6063−budKind = lens _budKind (\ s a -> s{_budKind = a})
6064−
6065−-- | The budget amount to apply for the billingId provided. This is required
6066−-- for update requests.
6067−budBudgetAmount :: Lens' Budget (Maybe Int64)
6068−budBudgetAmount
6069− = lens _budBudgetAmount
6070− (\ s a -> s{_budBudgetAmount = a})
6071−
6072−-- | The id of the account. This is required for get and update requests.
6073−budAccountId :: Lens' Budget (Maybe Int64)
6074−budAccountId
6075− = lens _budAccountId (\ s a -> s{_budAccountId = a})
6076−
6077−-- | The unique id that describes this item.
6078−budId :: Lens' Budget (Maybe Text)
6079−budId = lens _budId (\ s a -> s{_budId = a})
6080−
6081−-- | The billing id to determine which adgroup to provide budget information
6082−-- for. This is required for get and update requests.
6083−budBillingId :: Lens' Budget (Maybe Int64)
6084−budBillingId
6085− = lens _budBillingId (\ s a -> s{_budBillingId = a})
6086−
6087−instance FromJSON Budget where
6088− parseJSON
6089− = withObject "Budget"
6090− (\ o ->
6091− Budget <$>
6092− (o .:? "currencyCode") <*>
6093− (o .:? "kind" .!= "adexchangebuyer#budget")
6094− <*> (o .:? "budgetAmount")
6095− <*> (o .:? "accountId")
6096− <*> (o .:? "id")
6097− <*> (o .:? "billingId"))
6098−
6099−instance ToJSON Budget where
6100− toJSON Budget{..}
6101− = object
6102− (catMaybes
6103− [("currencyCode" .=) <$> _budCurrencyCode,
6104− Just ("kind" .= _budKind),
6105− ("budgetAmount" .=) <$> _budBudgetAmount,
6106− ("accountId" .=) <$> _budAccountId,
6107− ("id" .=) <$> _budId,
6108− ("billingId" .=) <$> _budBillingId])
6109−
6110−--
6111−-- /See:/ 'marketplaceDealParty' smart constructor.
6112−data MarketplaceDealParty = MarketplaceDealParty
6113− { _mdpSeller :: !(Maybe (Maybe Seller))
6114− , _mdpBuyer :: !(Maybe (Maybe Buyer))
6115− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6116−
6117−-- | Creates a value of 'MarketplaceDealParty' with the minimum fields required to make a request.
6118−--
6119−-- Use one of the following lenses to modify other fields as desired:
6120−--
6121−-- * 'mdpSeller'
6122−--
6123−-- * 'mdpBuyer'
6124−marketplaceDealParty
6125− :: MarketplaceDealParty
6126−marketplaceDealParty =
6127− MarketplaceDealParty
6128− { _mdpSeller = Nothing
6129− , _mdpBuyer = Nothing
6130− }
6131−
6132−-- | The buyer\/seller associated with the deal. One of buyer\/seller is
6133−-- specified for a deal party.
6134−mdpSeller :: Lens' MarketplaceDealParty (Maybe (Maybe Seller))
6135−mdpSeller
6136− = lens _mdpSeller (\ s a -> s{_mdpSeller = a})
6137−
6138−-- | The buyer\/seller associated with the deal. One of buyer\/seller is
6139−-- specified for a deal-party.
6140−mdpBuyer :: Lens' MarketplaceDealParty (Maybe (Maybe Buyer))
6141−mdpBuyer = lens _mdpBuyer (\ s a -> s{_mdpBuyer = a})
6142−
6143−instance FromJSON MarketplaceDealParty where
6144− parseJSON
6145− = withObject "MarketplaceDealParty"
6146− (\ o ->
6147− MarketplaceDealParty <$>
6148− (o .:? "seller") <*> (o .:? "buyer"))
6149−
6150−instance ToJSON MarketplaceDealParty where
6151− toJSON MarketplaceDealParty{..}
6152− = object
6153− (catMaybes
6154− [("seller" .=) <$> _mdpSeller,
6155− ("buyer" .=) <$> _mdpBuyer])
6156−
6157−--
6158−-- /See:/ 'dealPartyDto' smart constructor.
6159−data DealPartyDto = DealPartyDto
6160− { _dpdBuyerSellerRole :: !(Maybe Text)
6161− , _dpdCustomerId :: !(Maybe Int32)
6162− , _dpdName :: !(Maybe Text)
6163− , _dpdWebProperty :: !(Maybe (Maybe WebPropertyDto))
6164− , _dpdBuyer :: !(Maybe (Maybe BuyerDto))
6165− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6166−
6167−-- | Creates a value of 'DealPartyDto' with the minimum fields required to make a request.
6168−--
6169−-- Use one of the following lenses to modify other fields as desired:
6170−--
6171−-- * 'dpdBuyerSellerRole'
6172−--
6173−-- * 'dpdCustomerId'
6174−--
6175−-- * 'dpdName'
6176−--
6177−-- * 'dpdWebProperty'
6178−--
6179−-- * 'dpdBuyer'
6180−dealPartyDto
6181− :: DealPartyDto
6182−dealPartyDto =
6183− DealPartyDto
6184− { _dpdBuyerSellerRole = Nothing
6185− , _dpdCustomerId = Nothing
6186− , _dpdName = Nothing
6187− , _dpdWebProperty = Nothing
6188− , _dpdBuyer = Nothing
6189− }
6190−
6191−dpdBuyerSellerRole :: Lens' DealPartyDto (Maybe Text)
6192−dpdBuyerSellerRole
6193− = lens _dpdBuyerSellerRole
6194− (\ s a -> s{_dpdBuyerSellerRole = a})
6195−
6196−dpdCustomerId :: Lens' DealPartyDto (Maybe Int32)
6197−dpdCustomerId
6198− = lens _dpdCustomerId
6199− (\ s a -> s{_dpdCustomerId = a})
6200−
6201−dpdName :: Lens' DealPartyDto (Maybe Text)
6202−dpdName = lens _dpdName (\ s a -> s{_dpdName = a})
6203−
6204−dpdWebProperty :: Lens' DealPartyDto (Maybe (Maybe WebPropertyDto))
6205−dpdWebProperty
6206− = lens _dpdWebProperty
6207− (\ s a -> s{_dpdWebProperty = a})
6208−
6209−dpdBuyer :: Lens' DealPartyDto (Maybe (Maybe BuyerDto))
6210−dpdBuyer = lens _dpdBuyer (\ s a -> s{_dpdBuyer = a})
6211−
6212−instance FromJSON DealPartyDto where
6213− parseJSON
6214− = withObject "DealPartyDto"
6215− (\ o ->
6216− DealPartyDto <$>
6217− (o .:? "buyerSellerRole") <*> (o .:? "customerId")
6218− <*> (o .:? "name")
6219− <*> (o .:? "webProperty")
6220− <*> (o .:? "buyer"))
6221−
6222−instance ToJSON DealPartyDto where
6223− toJSON DealPartyDto{..}
6224− = object
6225− (catMaybes
6226− [("buyerSellerRole" .=) <$> _dpdBuyerSellerRole,
6227− ("customerId" .=) <$> _dpdCustomerId,
6228− ("name" .=) <$> _dpdName,
6229− ("webProperty" .=) <$> _dpdWebProperty,
6230− ("buyer" .=) <$> _dpdBuyer])
6231−
6232−--
6233−-- /See:/ 'addOrderNotesRequest' smart constructor.
6234−newtype AddOrderNotesRequest = AddOrderNotesRequest
6235− { _aNotes :: Maybe [Maybe MarketplaceNote]
6236− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6237−
6238−-- | Creates a value of 'AddOrderNotesRequest' with the minimum fields required to make a request.
6239−--
6240−-- Use one of the following lenses to modify other fields as desired:
6241−--
6242−-- * 'aNotes'
6243−addOrderNotesRequest
6244− :: AddOrderNotesRequest
6245−addOrderNotesRequest =
6246− AddOrderNotesRequest
6247− { _aNotes = Nothing
6248− }
6249−
6250−-- | The list of notes to add.
6251−aNotes :: Lens' AddOrderNotesRequest [Maybe MarketplaceNote]
6252−aNotes
6253− = lens _aNotes (\ s a -> s{_aNotes = a}) . _Default .
6254− _Coerce
6255−
6256−instance FromJSON AddOrderNotesRequest where
6257− parseJSON
6258− = withObject "AddOrderNotesRequest"
6259− (\ o ->
6260− AddOrderNotesRequest <$> (o .:? "notes" .!= mempty))
6261−
6262−instance ToJSON AddOrderNotesRequest where
6263− toJSON AddOrderNotesRequest{..}
6264− = object (catMaybes [("notes" .=) <$> _aNotes])
6265−
6266−--
6267−-- /See:/ 'creativeItemCorrections' smart constructor.
6268−data CreativeItemCorrections = CreativeItemCorrections
6269− { _cicReason :: !(Maybe Text)
6270− , _cicDetails :: !(Maybe [Text])
6271− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6272−
6273−-- | Creates a value of 'CreativeItemCorrections' with the minimum fields required to make a request.
6274−--
6275−-- Use one of the following lenses to modify other fields as desired:
6276−--
6277−-- * 'cicReason'
6278−--
6279−-- * 'cicDetails'
6280−creativeItemCorrections
6281− :: CreativeItemCorrections
6282−creativeItemCorrections =
6283− CreativeItemCorrections
6284− { _cicReason = Nothing
6285− , _cicDetails = Nothing
6286− }
6287−
6288−-- | The type of correction that was applied to the creative.
6289−cicReason :: Lens' CreativeItemCorrections (Maybe Text)
6290−cicReason
6291− = lens _cicReason (\ s a -> s{_cicReason = a})
6292−
6293−-- | Additional details about the correction.
6294−cicDetails :: Lens' CreativeItemCorrections [Text]
6295−cicDetails
6296− = lens _cicDetails (\ s a -> s{_cicDetails = a}) .
6297− _Default
6298− . _Coerce
6299−
6300−instance FromJSON CreativeItemCorrections where
6301− parseJSON
6302− = withObject "CreativeItemCorrections"
6303− (\ o ->
6304− CreativeItemCorrections <$>
6305− (o .:? "reason") <*> (o .:? "details" .!= mempty))
6306−
6307−instance ToJSON CreativeItemCorrections where
6308− toJSON CreativeItemCorrections{..}
6309− = object
6310− (catMaybes
6311− [("reason" .=) <$> _cicReason,
6312− ("details" .=) <$> _cicDetails])
6313−
6314−--
6315−-- /See:/ 'createOrdersRequest' smart constructor.
6316−data CreateOrdersRequest = CreateOrdersRequest
6317− { _cWebPropertyCode :: !(Maybe Text)
6318− , _cOrders :: !(Maybe [Maybe MarketplaceOrder])
6319− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6320−
6321−-- | Creates a value of 'CreateOrdersRequest' with the minimum fields required to make a request.
6322−--
6323−-- Use one of the following lenses to modify other fields as desired:
6324−--
6325−-- * 'cWebPropertyCode'
6326−--
6327−-- * 'cOrders'
6328−createOrdersRequest
6329− :: CreateOrdersRequest
6330−createOrdersRequest =
6331− CreateOrdersRequest
6332− { _cWebPropertyCode = Nothing
6333− , _cOrders = Nothing
6334− }
6335−
6336−cWebPropertyCode :: Lens' CreateOrdersRequest (Maybe Text)
6337−cWebPropertyCode
6338− = lens _cWebPropertyCode
6339− (\ s a -> s{_cWebPropertyCode = a})
6340−
6341−-- | The list of orders to create.
6342−cOrders :: Lens' CreateOrdersRequest [Maybe MarketplaceOrder]
6343−cOrders
6344− = lens _cOrders (\ s a -> s{_cOrders = a}) . _Default
6345− . _Coerce
6346−
6347−instance FromJSON CreateOrdersRequest where
6348− parseJSON
6349− = withObject "CreateOrdersRequest"
6350− (\ o ->
6351− CreateOrdersRequest <$>
6352− (o .:? "webPropertyCode") <*>
6353− (o .:? "orders" .!= mempty))
6354−
6355−instance ToJSON CreateOrdersRequest where
6356− toJSON CreateOrdersRequest{..}
6357− = object
6358− (catMaybes
6359− [("webPropertyCode" .=) <$> _cWebPropertyCode,
6360− ("orders" .=) <$> _cOrders])
6361−
6362−-- | An account feed lists Ad Exchange buyer accounts that the user has
6363−-- access to. Each entry in the feed corresponds to a single buyer account.
6364−--
6365−-- /See:/ 'accountsList' smart constructor.
6366−data AccountsList = AccountsList
6367− { _alKind :: !Text
6368− , _alItems :: !(Maybe [Maybe Account])
6369− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6370−
6371−-- | Creates a value of 'AccountsList' with the minimum fields required to make a request.
6372−--
6373−-- Use one of the following lenses to modify other fields as desired:
6374−--
6375−-- * 'alKind'
6376−--
6377−-- * 'alItems'
6378−accountsList
6379− :: AccountsList
6380−accountsList =
6381− AccountsList
6382− { _alKind = "adexchangebuyer#accountsList"
6383− , _alItems = Nothing
6384− }
6385−
6386−-- | Resource type.
6387−alKind :: Lens' AccountsList Text
6388−alKind = lens _alKind (\ s a -> s{_alKind = a})
6389−
6390−-- | A list of accounts.
6391−alItems :: Lens' AccountsList [Maybe Account]
6392−alItems
6393− = lens _alItems (\ s a -> s{_alItems = a}) . _Default
6394− . _Coerce
6395−
6396−instance FromJSON AccountsList where
6397− parseJSON
6398− = withObject "AccountsList"
6399− (\ o ->
6400− AccountsList <$>
6401− (o .:? "kind" .!= "adexchangebuyer#accountsList") <*>
6402− (o .:? "items" .!= mempty))
6403−
6404−instance ToJSON AccountsList where
6405− toJSON AccountsList{..}
6406− = object
6407− (catMaybes
6408− [Just ("kind" .= _alKind),
6409− ("items" .=) <$> _alItems])
6410−
6411−--
6412−-- /See:/ 'getOrdersResponse' smart constructor.
6413−newtype GetOrdersResponse = GetOrdersResponse
6414− { _gorOrders :: Maybe [Maybe MarketplaceOrder]
6415− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6416−
6417−-- | Creates a value of 'GetOrdersResponse' with the minimum fields required to make a request.
6418−--
6419−-- Use one of the following lenses to modify other fields as desired:
6420−--
6421−-- * 'gorOrders'
6422−getOrdersResponse
6423− :: GetOrdersResponse
6424−getOrdersResponse =
6425− GetOrdersResponse
6426− { _gorOrders = Nothing
6427− }
6428−
6429−-- | The list of matching orders.
6430−gorOrders :: Lens' GetOrdersResponse [Maybe MarketplaceOrder]
6431−gorOrders
6432− = lens _gorOrders (\ s a -> s{_gorOrders = a}) .
6433− _Default
6434− . _Coerce
6435−
6436−instance FromJSON GetOrdersResponse where
6437− parseJSON
6438− = withObject "GetOrdersResponse"
6439− (\ o ->
6440− GetOrdersResponse <$> (o .:? "orders" .!= mempty))
6441−
6442−instance ToJSON GetOrdersResponse where
6443− toJSON GetOrdersResponse{..}
6444− = object (catMaybes [("orders" .=) <$> _gorOrders])
6445−
6446−--
6447−-- /See:/ 'ruleKeyValuePair' smart constructor.
6448−data RuleKeyValuePair = RuleKeyValuePair
6449− { _rkvpKeyName :: !(Maybe Text)
6450− , _rkvpValue :: !(Maybe Text)
6451− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6452−
6453−-- | Creates a value of 'RuleKeyValuePair' with the minimum fields required to make a request.
6454−--
6455−-- Use one of the following lenses to modify other fields as desired:
6456−--
6457−-- * 'rkvpKeyName'
6458−--
6459−-- * 'rkvpValue'
6460−ruleKeyValuePair
6461− :: RuleKeyValuePair
6462−ruleKeyValuePair =
6463− RuleKeyValuePair
6464− { _rkvpKeyName = Nothing
6465− , _rkvpValue = Nothing
6466− }
6467−
6468−rkvpKeyName :: Lens' RuleKeyValuePair (Maybe Text)
6469−rkvpKeyName
6470− = lens _rkvpKeyName (\ s a -> s{_rkvpKeyName = a})
6471−
6472−rkvpValue :: Lens' RuleKeyValuePair (Maybe Text)
6473−rkvpValue
6474− = lens _rkvpValue (\ s a -> s{_rkvpValue = a})
6475−
6476−instance FromJSON RuleKeyValuePair where
6477− parseJSON
6478− = withObject "RuleKeyValuePair"
6479− (\ o ->
6480− RuleKeyValuePair <$>
6481− (o .:? "keyName") <*> (o .:? "value"))
6482−
6483−instance ToJSON RuleKeyValuePair where
6484− toJSON RuleKeyValuePair{..}
6485− = object
6486− (catMaybes
6487− [("keyName" .=) <$> _rkvpKeyName,
6488− ("value" .=) <$> _rkvpValue])
6489−
6490−--
6491−-- /See:/ 'adSize' smart constructor.
6492−data AdSize = AdSize
6493− { _asHeight :: !(Maybe Int32)
6494− , _asWidth :: !(Maybe Int32)
6495− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6496−
6497−-- | Creates a value of 'AdSize' with the minimum fields required to make a request.
6498−--
6499−-- Use one of the following lenses to modify other fields as desired:
6500−--
6501−-- * 'asHeight'
6502−--
6503−-- * 'asWidth'
6504−adSize
6505− :: AdSize
6506−adSize =
6507− AdSize
6508− { _asHeight = Nothing
6509− , _asWidth = Nothing
6510− }
6511−
6512−asHeight :: Lens' AdSize (Maybe Int32)
6513−asHeight = lens _asHeight (\ s a -> s{_asHeight = a})
6514−
6515−asWidth :: Lens' AdSize (Maybe Int32)
6516−asWidth = lens _asWidth (\ s a -> s{_asWidth = a})
6517−
6518−instance FromJSON AdSize where
6519− parseJSON
6520− = withObject "AdSize"
6521− (\ o ->
6522− AdSize <$> (o .:? "height") <*> (o .:? "width"))
6523−
6524−instance ToJSON AdSize where
6525− toJSON AdSize{..}
6526− = object
6527− (catMaybes
6528− [("height" .=) <$> _asHeight,
6529− ("width" .=) <$> _asWidth])
6530−
6531−--
6532−-- /See:/ 'getOrderNotesResponse' smart constructor.
6533−newtype GetOrderNotesResponse = GetOrderNotesResponse
6534− { _gonrNotes :: Maybe [Maybe MarketplaceNote]
6535− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6536−
6537−-- | Creates a value of 'GetOrderNotesResponse' with the minimum fields required to make a request.
6538−--
6539−-- Use one of the following lenses to modify other fields as desired:
6540−--
6541−-- * 'gonrNotes'
6542−getOrderNotesResponse
6543− :: GetOrderNotesResponse
6544−getOrderNotesResponse =
6545− GetOrderNotesResponse
6546− { _gonrNotes = Nothing
6547− }
6548−
6549−-- | The list of matching notes.
6550−gonrNotes :: Lens' GetOrderNotesResponse [Maybe MarketplaceNote]
6551−gonrNotes
6552− = lens _gonrNotes (\ s a -> s{_gonrNotes = a}) .
6553− _Default
6554− . _Coerce
6555−
6556−instance FromJSON GetOrderNotesResponse where
6557− parseJSON
6558− = withObject "GetOrderNotesResponse"
6559− (\ o ->
6560− GetOrderNotesResponse <$> (o .:? "notes" .!= mempty))
6561−
6562−instance ToJSON GetOrderNotesResponse where
6563− toJSON GetOrderNotesResponse{..}
6564− = object (catMaybes [("notes" .=) <$> _gonrNotes])
6565−
6566−-- | A creative and its classification data.
6567−--
6568−-- /See:/ 'creative' smart constructor.
6569−data Creative = Creative
6570− { _cAttribute :: !(Maybe [Int32])
6571− , _cNativeAd :: !(Maybe CreativeNativeAd)
6572− , _cHeight :: !(Maybe Int32)
6573− , _cBuyerCreativeId :: !(Maybe Text)
6574− , _cAdvertiserName :: !(Maybe Text)
6575− , _cAgencyId :: !(Maybe Int64)
6576− , _cCorrections :: !(Maybe [CreativeItemCorrections])
6577− , _cProductCategories :: !(Maybe [Int32])
6578− , _cKind :: !Text
6579− , _cHTMLSnippet :: !(Maybe Text)
6580− , _cAdvertiserId :: !(Maybe [Int64])
6581− , _cRestrictedCategories :: !(Maybe [Int32])
6582− , _cDealsStatus :: !(Maybe Text)
6583− , _cWidth :: !(Maybe Int32)
6584− , _cClickThroughUrl :: !(Maybe [Text])
6585− , _cVendorType :: !(Maybe [Int32])
6586− , _cAccountId :: !(Maybe Int32)
6587− , _cImpressionTrackingUrl :: !(Maybe [Text])
6588− , _cFilteringReasons :: !(Maybe CreativeFilteringReasons)
6589− , _cVersion :: !(Maybe Int32)
6590− , _cSensitiveCategories :: !(Maybe [Int32])
6591− , _cVideoURL :: !(Maybe Text)
6592− , _cApiUploadTimestamp :: !(Maybe UTCTime)
6593− , _cServingRestrictions :: !(Maybe [CreativeItemServingRestrictions])
6594− , _cOpenAuctionStatus :: !(Maybe Text)
6595− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6596−
6597−-- | Creates a value of 'Creative' with the minimum fields required to make a request.
6598−--
6599−-- Use one of the following lenses to modify other fields as desired:
6600−--
6601−-- * 'cAttribute'
6602−--
6603−-- * 'cNativeAd'
6604−--
6605−-- * 'cHeight'
6606−--
6607−-- * 'cBuyerCreativeId'
6608−--
6609−-- * 'cAdvertiserName'
6610−--
6611−-- * 'cAgencyId'
6612−--
6613−-- * 'cCorrections'
6614−--
6615−-- * 'cProductCategories'
6616−--
6617−-- * 'cKind'
6618−--
6619−-- * 'cHTMLSnippet'
6620−--
6621−-- * 'cAdvertiserId'
6622−--
6623−-- * 'cRestrictedCategories'
6624−--
6625−-- * 'cDealsStatus'
6626−--
6627−-- * 'cWidth'
6628−--
6629−-- * 'cClickThroughUrl'
6630−--
6631−-- * 'cVendorType'
6632−--
6633−-- * 'cAccountId'
6634−--
6635−-- * 'cImpressionTrackingUrl'
6636−--
6637−-- * 'cFilteringReasons'
6638−--
6639−-- * 'cVersion'
6640−--
6641−-- * 'cSensitiveCategories'
6642−--
6643−-- * 'cVideoURL'
6644−--
6645−-- * 'cApiUploadTimestamp'
6646−--
6647−-- * 'cServingRestrictions'
6648−--
6649−-- * 'cOpenAuctionStatus'
6650−creative
6651− :: Creative
6652−creative =
6653− Creative
6654− { _cAttribute = Nothing
6655− , _cNativeAd = Nothing
6656− , _cHeight = Nothing
6657− , _cBuyerCreativeId = Nothing
6658− , _cAdvertiserName = Nothing
6659− , _cAgencyId = Nothing
6660− , _cCorrections = Nothing
6661− , _cProductCategories = Nothing
6662− , _cKind = "adexchangebuyer#creative"
6663− , _cHTMLSnippet = Nothing
6664− , _cAdvertiserId = Nothing
6665− , _cRestrictedCategories = Nothing
6666− , _cDealsStatus = Nothing
6667− , _cWidth = Nothing
6668− , _cClickThroughUrl = Nothing
6669− , _cVendorType = Nothing
6670− , _cAccountId = Nothing
6671− , _cImpressionTrackingUrl = Nothing
6672− , _cFilteringReasons = Nothing
6673− , _cVersion = Nothing
6674− , _cSensitiveCategories = Nothing
6675− , _cVideoURL = Nothing
6676− , _cApiUploadTimestamp = Nothing
6677− , _cServingRestrictions = Nothing
6678− , _cOpenAuctionStatus = Nothing
6679− }
6680−
6681−-- | All attributes for the ads that may be shown from this snippet.
6682−cAttribute :: Lens' Creative [Int32]
6683−cAttribute
6684− = lens _cAttribute (\ s a -> s{_cAttribute = a}) .
6685− _Default
6686− . _Coerce
6687−
6688−-- | If nativeAd is set, HTMLSnippet and videoURL should not be set.
6689−cNativeAd :: Lens' Creative (Maybe CreativeNativeAd)
6690−cNativeAd
6691− = lens _cNativeAd (\ s a -> s{_cNativeAd = a})
6692−
6693−-- | Ad height.
6694−cHeight :: Lens' Creative (Maybe Int32)
6695−cHeight = lens _cHeight (\ s a -> s{_cHeight = a})
6696−
6697−-- | A buyer-specific id identifying the creative in this ad.
6698−cBuyerCreativeId :: Lens' Creative (Maybe Text)
6699−cBuyerCreativeId
6700− = lens _cBuyerCreativeId
6701− (\ s a -> s{_cBuyerCreativeId = a})
6702−
6703−-- | The name of the company being advertised in the creative.
6704−cAdvertiserName :: Lens' Creative (Maybe Text)
6705−cAdvertiserName
6706− = lens _cAdvertiserName
6707− (\ s a -> s{_cAdvertiserName = a})
6708−
6709−-- | The agency id for this creative.
6710−cAgencyId :: Lens' Creative (Maybe Int64)
6711−cAgencyId
6712− = lens _cAgencyId (\ s a -> s{_cAgencyId = a})
6713−
6714−-- | Shows any corrections that were applied to this creative. Read-only.
6715−-- This field should not be set in requests.
6716−cCorrections :: Lens' Creative [CreativeItemCorrections]
6717−cCorrections
6718− = lens _cCorrections (\ s a -> s{_cCorrections = a})
6719− . _Default
6720− . _Coerce
6721−
6722−-- | Detected product categories, if any. Read-only. This field should not be
6723−-- set in requests.
6724−cProductCategories :: Lens' Creative [Int32]
6725−cProductCategories
6726− = lens _cProductCategories
6727− (\ s a -> s{_cProductCategories = a})
6728− . _Default
6729− . _Coerce
6730−
6731−-- | Resource type.
6732−cKind :: Lens' Creative Text
6733−cKind = lens _cKind (\ s a -> s{_cKind = a})
6734−
6735−-- | The HTML snippet that displays the ad when inserted in the web page. If
6736−-- set, videoURL should not be set.
6737−cHTMLSnippet :: Lens' Creative (Maybe Text)
6738−cHTMLSnippet
6739− = lens _cHTMLSnippet (\ s a -> s{_cHTMLSnippet = a})
6740−
6741−-- | Detected advertiser id, if any. Read-only. This field should not be set
6742−-- in requests.
6743−cAdvertiserId :: Lens' Creative [Int64]
6744−cAdvertiserId
6745− = lens _cAdvertiserId
6746− (\ s a -> s{_cAdvertiserId = a})
6747− . _Default
6748− . _Coerce
6749−
6750−-- | All restricted categories for the ads that may be shown from this
6751−-- snippet.
6752−cRestrictedCategories :: Lens' Creative [Int32]
6753−cRestrictedCategories
6754− = lens _cRestrictedCategories
6755− (\ s a -> s{_cRestrictedCategories = a})
6756− . _Default
6757− . _Coerce
6758−
6759−-- | Top-level deals status. Read-only. This field should not be set in
6760−-- requests. If disapproved, an entry for auctionType=DIRECT_DEALS (or ALL)
6761−-- in servingRestrictions will also exist. Note that this may be nuanced
6762−-- with other contextual restrictions, in which case it may be preferable
6763−-- to read from servingRestrictions directly.
6764−cDealsStatus :: Lens' Creative (Maybe Text)
6765−cDealsStatus
6766− = lens _cDealsStatus (\ s a -> s{_cDealsStatus = a})
6767−
6768−-- | Ad width.
6769−cWidth :: Lens' Creative (Maybe Int32)
6770−cWidth = lens _cWidth (\ s a -> s{_cWidth = a})
6771−
6772−-- | The set of destination urls for the snippet.
6773−cClickThroughUrl :: Lens' Creative [Text]
6774−cClickThroughUrl
6775− = lens _cClickThroughUrl
6776− (\ s a -> s{_cClickThroughUrl = a})
6777− . _Default
6778− . _Coerce
6779−
6780−-- | All vendor types for the ads that may be shown from this snippet.
6781−cVendorType :: Lens' Creative [Int32]
6782−cVendorType
6783− = lens _cVendorType (\ s a -> s{_cVendorType = a}) .
6784− _Default
6785− . _Coerce
6786−
6787−-- | Account id.
6788−cAccountId :: Lens' Creative (Maybe Int32)
6789−cAccountId
6790− = lens _cAccountId (\ s a -> s{_cAccountId = a})
6791−
6792−-- | The set of urls to be called to record an impression.
6793−cImpressionTrackingUrl :: Lens' Creative [Text]
6794−cImpressionTrackingUrl
6795− = lens _cImpressionTrackingUrl
6796− (\ s a -> s{_cImpressionTrackingUrl = a})
6797− . _Default
6798− . _Coerce
6799−
6800−-- | The filtering reasons for the creative. Read-only. This field should not
6801−-- be set in requests.
6802−cFilteringReasons :: Lens' Creative (Maybe CreativeFilteringReasons)
6803−cFilteringReasons
6804− = lens _cFilteringReasons
6805− (\ s a -> s{_cFilteringReasons = a})
6806−
6807−-- | The version for this creative. Read-only. This field should not be set
6808−-- in requests.
6809−cVersion :: Lens' Creative (Maybe Int32)
6810−cVersion = lens _cVersion (\ s a -> s{_cVersion = a})
6811−
6812−-- | Detected sensitive categories, if any. Read-only. This field should not
6813−-- be set in requests.
6814−cSensitiveCategories :: Lens' Creative [Int32]
6815−cSensitiveCategories
6816− = lens _cSensitiveCategories
6817− (\ s a -> s{_cSensitiveCategories = a})
6818− . _Default
6819− . _Coerce
6820−
6821−-- | The url to fetch a video ad. If set, HTMLSnippet should not be set.
6822−cVideoURL :: Lens' Creative (Maybe Text)
6823−cVideoURL
6824− = lens _cVideoURL (\ s a -> s{_cVideoURL = a})
6825−
6826−-- | The last upload timestamp of this creative if it was uploaded via API.
6827−-- Read-only. The value of this field is generated, and will be ignored for
6828−-- uploads. (formatted RFC 3339 timestamp).
6829−cApiUploadTimestamp :: Lens' Creative (Maybe UTCTime)
6830−cApiUploadTimestamp
6831− = lens _cApiUploadTimestamp
6832− (\ s a -> s{_cApiUploadTimestamp = a})
6833−
6834−-- | The granular status of this ad in specific contexts. A context here
6835−-- relates to where something ultimately serves (for example, a physical
6836−-- location, a platform, an HTTPS vs HTTP request, or the type of auction).
6837−-- Read-only. This field should not be set in requests.
6838−cServingRestrictions :: Lens' Creative [CreativeItemServingRestrictions]
6839−cServingRestrictions
6840− = lens _cServingRestrictions
6841− (\ s a -> s{_cServingRestrictions = a})
6842− . _Default
6843− . _Coerce
6844−
6845−-- | Top-level open auction status. Read-only. This field should not be set
6846−-- in requests. If disapproved, an entry for auctionType=OPEN_AUCTION (or
6847−-- ALL) in servingRestrictions will also exist. Note that this may be
6848−-- nuanced with other contextual restrictions, in which case it may be
6849−-- preferable to read from ServingRestrictions directly.
6850−cOpenAuctionStatus :: Lens' Creative (Maybe Text)
6851−cOpenAuctionStatus
6852− = lens _cOpenAuctionStatus
6853− (\ s a -> s{_cOpenAuctionStatus = a})
6854−
6855−instance FromJSON Creative where
6856− parseJSON
6857− = withObject "Creative"
6858− (\ o ->
6859− Creative <$>
6860− (o .:? "attribute" .!= mempty) <*> (o .:? "nativeAd")
6861− <*> (o .:? "height")
6862− <*> (o .:? "buyerCreativeId")
6863− <*> (o .:? "advertiserName")
6864− <*> (o .:? "agencyId")
6865− <*> (o .:? "corrections" .!= mempty)
6866− <*> (o .:? "productCategories" .!= mempty)
6867− <*> (o .:? "kind" .!= "adexchangebuyer#creative")
6868− <*> (o .:? "HTMLSnippet")
6869− <*> (o .:? "advertiserId" .!= mempty)
6870− <*> (o .:? "restrictedCategories" .!= mempty)
6871− <*> (o .:? "dealsStatus")
6872− <*> (o .:? "width")
6873− <*> (o .:? "clickThroughUrl" .!= mempty)
6874− <*> (o .:? "vendorType" .!= mempty)
6875− <*> (o .:? "accountId")
6876− <*> (o .:? "impressionTrackingUrl" .!= mempty)
6877− <*> (o .:? "filteringReasons")
6878− <*> (o .:? "version")
6879− <*> (o .:? "sensitiveCategories" .!= mempty)
6880− <*> (o .:? "videoURL")
6881− <*> (o .:? "api_upload_timestamp")
6882− <*> (o .:? "servingRestrictions" .!= mempty)
6883− <*> (o .:? "openAuctionStatus"))
6884−
6885−instance ToJSON Creative where
6886− toJSON Creative{..}
6887− = object
6888− (catMaybes
6889− [("attribute" .=) <$> _cAttribute,
6890− ("nativeAd" .=) <$> _cNativeAd,
6891− ("height" .=) <$> _cHeight,
6892− ("buyerCreativeId" .=) <$> _cBuyerCreativeId,
6893− ("advertiserName" .=) <$> _cAdvertiserName,
6894− ("agencyId" .=) <$> _cAgencyId,
6895− ("corrections" .=) <$> _cCorrections,
6896− ("productCategories" .=) <$> _cProductCategories,
6897− Just ("kind" .= _cKind),
6898− ("HTMLSnippet" .=) <$> _cHTMLSnippet,
6899− ("advertiserId" .=) <$> _cAdvertiserId,
6900− ("restrictedCategories" .=) <$>
6901− _cRestrictedCategories,
6902− ("dealsStatus" .=) <$> _cDealsStatus,
6903− ("width" .=) <$> _cWidth,
6904− ("clickThroughUrl" .=) <$> _cClickThroughUrl,
6905− ("vendorType" .=) <$> _cVendorType,
6906− ("accountId" .=) <$> _cAccountId,
6907− ("impressionTrackingUrl" .=) <$>
6908− _cImpressionTrackingUrl,
6909− ("filteringReasons" .=) <$> _cFilteringReasons,
6910− ("version" .=) <$> _cVersion,
6911− ("sensitiveCategories" .=) <$> _cSensitiveCategories,
6912− ("videoURL" .=) <$> _cVideoURL,
6913− ("api_upload_timestamp" .=) <$> _cApiUploadTimestamp,
6914− ("servingRestrictions" .=) <$> _cServingRestrictions,
6915− ("openAuctionStatus" .=) <$> _cOpenAuctionStatus])
6916−
6917−-- | Used to specify pricing rules for buyers\/advertisers. Each
6918−-- PricePerBuyer in an offer can become [0,1] deals. To check if there is a
6919−-- PricePerBuyer for a particular buyer or buyer\/advertiser pair, we look
6920−-- for the most specific matching rule - we first look for a rule matching
6921−-- the buyer and advertiser, next a rule with the buyer but an empty
6922−-- advertiser list, and otherwise look for a matching rule where no buyer
6923−-- is set.
6924−--
6925−-- /See:/ 'pricePerBuyer' smart constructor.
6926−data PricePerBuyer = PricePerBuyer
6927− { _ppbPrice :: !(Maybe (Maybe Price))
6928− , _ppbBuyer :: !(Maybe (Maybe Buyer))
6929− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6930−
6931−-- | Creates a value of 'PricePerBuyer' with the minimum fields required to make a request.
6932−--
6933−-- Use one of the following lenses to modify other fields as desired:
6934−--
6935−-- * 'ppbPrice'
6936−--
6937−-- * 'ppbBuyer'
6938−pricePerBuyer
6939− :: PricePerBuyer
6940−pricePerBuyer =
6941− PricePerBuyer
6942− { _ppbPrice = Nothing
6943− , _ppbBuyer = Nothing
6944− }
6945−
6946−-- | The specified price
6947−ppbPrice :: Lens' PricePerBuyer (Maybe (Maybe Price))
6948−ppbPrice = lens _ppbPrice (\ s a -> s{_ppbPrice = a})
6949−
6950−-- | The buyer who will pay this price. If unset, all buyers can pay this
6951−-- price (if the advertisers match, and there\'s no more specific rule
6952−-- matching the buyer).
6953−ppbBuyer :: Lens' PricePerBuyer (Maybe (Maybe Buyer))
6954−ppbBuyer = lens _ppbBuyer (\ s a -> s{_ppbBuyer = a})
6955−
6956−instance FromJSON PricePerBuyer where
6957− parseJSON
6958− = withObject "PricePerBuyer"
6959− (\ o ->
6960− PricePerBuyer <$>
6961− (o .:? "price") <*> (o .:? "buyer"))
6962−
6963−instance ToJSON PricePerBuyer where
6964− toJSON PricePerBuyer{..}
6965− = object
6966− (catMaybes
6967− [("price" .=) <$> _ppbPrice,
6968− ("buyer" .=) <$> _ppbBuyer])
6969−
6970−--
6971−-- /See:/ 'addOrderDealsResponse' smart constructor.
6972−data AddOrderDealsResponse = AddOrderDealsResponse
6973− { _aDeals :: !(Maybe [Maybe MarketplaceDeal])
6974− , _aOrderRevisionNumber :: !(Maybe Int64)
6975− } deriving (Eq,Read,Show,Data,Typeable,Generic)
6976−
6977−-- | Creates a value of 'AddOrderDealsResponse' with the minimum fields required to make a request.
6978−--
6979−-- Use one of the following lenses to modify other fields as desired:
6980−--
6981−-- * 'aDeals'
6982−--
6983−-- * 'aOrderRevisionNumber'
6984−addOrderDealsResponse
6985− :: AddOrderDealsResponse
6986−addOrderDealsResponse =
6987− AddOrderDealsResponse
6988− { _aDeals = Nothing
6989− , _aOrderRevisionNumber = Nothing
6990− }
6991−
6992−-- | List of deals added (in the same order as passed in the request)
6993−aDeals :: Lens' AddOrderDealsResponse [Maybe MarketplaceDeal]
6994−aDeals
6995− = lens _aDeals (\ s a -> s{_aDeals = a}) . _Default .
6996− _Coerce
6997−
6998−-- | The updated revision number for the order.
6999−aOrderRevisionNumber :: Lens' AddOrderDealsResponse (Maybe Int64)
7000−aOrderRevisionNumber
7001− = lens _aOrderRevisionNumber
7002− (\ s a -> s{_aOrderRevisionNumber = a})
7003−
7004−instance FromJSON AddOrderDealsResponse where
7005− parseJSON
7006− = withObject "AddOrderDealsResponse"
7007− (\ o ->
7008− AddOrderDealsResponse <$>
7009− (o .:? "deals" .!= mempty) <*>
7010− (o .:? "orderRevisionNumber"))
7011−
7012−instance ToJSON AddOrderDealsResponse where
7013− toJSON AddOrderDealsResponse{..}
7014− = object
7015− (catMaybes
7016− [("deals" .=) <$> _aDeals,
7017− ("orderRevisionNumber" .=) <$>
7018− _aOrderRevisionNumber])
7019−
7020−--
7021−-- /See:/ 'deliveryControl' smart constructor.
7022−data DeliveryControl = DeliveryControl
7023− { _dcFrequencyCaps :: !(Maybe [Maybe DeliveryControlFrequencyCap])
7024− , _dcDeliveryRateType :: !(Maybe Text)
7025− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7026−
7027−-- | Creates a value of 'DeliveryControl' with the minimum fields required to make a request.
7028−--
7029−-- Use one of the following lenses to modify other fields as desired:
7030−--
7031−-- * 'dcFrequencyCaps'
7032−--
7033−-- * 'dcDeliveryRateType'
7034−deliveryControl
7035− :: DeliveryControl
7036−deliveryControl =
7037− DeliveryControl
7038− { _dcFrequencyCaps = Nothing
7039− , _dcDeliveryRateType = Nothing
7040− }
7041−
7042−dcFrequencyCaps :: Lens' DeliveryControl [Maybe DeliveryControlFrequencyCap]
7043−dcFrequencyCaps
7044− = lens _dcFrequencyCaps
7045− (\ s a -> s{_dcFrequencyCaps = a})
7046− . _Default
7047− . _Coerce
7048−
7049−dcDeliveryRateType :: Lens' DeliveryControl (Maybe Text)
7050−dcDeliveryRateType
7051− = lens _dcDeliveryRateType
7052− (\ s a -> s{_dcDeliveryRateType = a})
7053−
7054−instance FromJSON DeliveryControl where
7055− parseJSON
7056− = withObject "DeliveryControl"
7057− (\ o ->
7058− DeliveryControl <$>
7059− (o .:? "frequencyCaps" .!= mempty) <*>
7060− (o .:? "deliveryRateType"))
7061−
7062−instance ToJSON DeliveryControl where
7063− toJSON DeliveryControl{..}
7064− = object
7065− (catMaybes
7066− [("frequencyCaps" .=) <$> _dcFrequencyCaps,
7067− ("deliveryRateType" .=) <$> _dcDeliveryRateType])
7068−
7069−-- | A large image.
7070−--
7071−-- /See:/ 'creativeImageNativeAd' smart constructor.
7072−data CreativeImageNativeAd = CreativeImageNativeAd
7073− { _cinaHeight :: !(Maybe Int32)
7074− , _cinaUrl :: !(Maybe Text)
7075− , _cinaWidth :: !(Maybe Int32)
7076− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7077−
7078−-- | Creates a value of 'CreativeImageNativeAd' with the minimum fields required to make a request.
7079−--
7080−-- Use one of the following lenses to modify other fields as desired:
7081−--
7082−-- * 'cinaHeight'
7083−--
7084−-- * 'cinaUrl'
7085−--
7086−-- * 'cinaWidth'
7087−creativeImageNativeAd
7088− :: CreativeImageNativeAd
7089−creativeImageNativeAd =
7090− CreativeImageNativeAd
7091− { _cinaHeight = Nothing
7092− , _cinaUrl = Nothing
7093− , _cinaWidth = Nothing
7094− }
7095−
7096−cinaHeight :: Lens' CreativeImageNativeAd (Maybe Int32)
7097−cinaHeight
7098− = lens _cinaHeight (\ s a -> s{_cinaHeight = a})
7099−
7100−cinaUrl :: Lens' CreativeImageNativeAd (Maybe Text)
7101−cinaUrl = lens _cinaUrl (\ s a -> s{_cinaUrl = a})
7102−
7103−cinaWidth :: Lens' CreativeImageNativeAd (Maybe Int32)
7104−cinaWidth
7105− = lens _cinaWidth (\ s a -> s{_cinaWidth = a})
7106−
7107−instance FromJSON CreativeImageNativeAd where
7108− parseJSON
7109− = withObject "CreativeImageNativeAd"
7110− (\ o ->
7111− CreativeImageNativeAd <$>
7112− (o .:? "height") <*> (o .:? "url") <*>
7113− (o .:? "width"))
7114−
7115−instance ToJSON CreativeImageNativeAd where
7116− toJSON CreativeImageNativeAd{..}
7117− = object
7118− (catMaybes
7119− [("height" .=) <$> _cinaHeight,
7120− ("url" .=) <$> _cinaUrl,
7121− ("width" .=) <$> _cinaWidth])
7122−
7123−--
7124−-- /See:/ 'targetingValueDayPartTargetingDayPart' smart constructor.
7125−data TargetingValueDayPartTargetingDayPart = TargetingValueDayPartTargetingDayPart
7126− { _tvdptdpEndHour :: !(Maybe Int32)
7127− , _tvdptdpStartHour :: !(Maybe Int32)
7128− , _tvdptdpStartMinute :: !(Maybe Int32)
7129− , _tvdptdpDayOfWeek :: !(Maybe Text)
7130− , _tvdptdpEndMinute :: !(Maybe Int32)
7131− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7132−
7133−-- | Creates a value of 'TargetingValueDayPartTargetingDayPart' with the minimum fields required to make a request.
7134−--
7135−-- Use one of the following lenses to modify other fields as desired:
7136−--
7137−-- * 'tvdptdpEndHour'
7138−--
7139−-- * 'tvdptdpStartHour'
7140−--
7141−-- * 'tvdptdpStartMinute'
7142−--
7143−-- * 'tvdptdpDayOfWeek'
7144−--
7145−-- * 'tvdptdpEndMinute'
7146−targetingValueDayPartTargetingDayPart
7147− :: TargetingValueDayPartTargetingDayPart
7148−targetingValueDayPartTargetingDayPart =
7149− TargetingValueDayPartTargetingDayPart
7150− { _tvdptdpEndHour = Nothing
7151− , _tvdptdpStartHour = Nothing
7152− , _tvdptdpStartMinute = Nothing
7153− , _tvdptdpDayOfWeek = Nothing
7154− , _tvdptdpEndMinute = Nothing
7155− }
7156−
7157−tvdptdpEndHour :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Int32)
7158−tvdptdpEndHour
7159− = lens _tvdptdpEndHour
7160− (\ s a -> s{_tvdptdpEndHour = a})
7161−
7162−tvdptdpStartHour :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Int32)
7163−tvdptdpStartHour
7164− = lens _tvdptdpStartHour
7165− (\ s a -> s{_tvdptdpStartHour = a})
7166−
7167−tvdptdpStartMinute :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Int32)
7168−tvdptdpStartMinute
7169− = lens _tvdptdpStartMinute
7170− (\ s a -> s{_tvdptdpStartMinute = a})
7171−
7172−tvdptdpDayOfWeek :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Text)
7173−tvdptdpDayOfWeek
7174− = lens _tvdptdpDayOfWeek
7175− (\ s a -> s{_tvdptdpDayOfWeek = a})
7176−
7177−tvdptdpEndMinute :: Lens' TargetingValueDayPartTargetingDayPart (Maybe Int32)
7178−tvdptdpEndMinute
7179− = lens _tvdptdpEndMinute
7180− (\ s a -> s{_tvdptdpEndMinute = a})
7181−
7182−instance FromJSON
7183− TargetingValueDayPartTargetingDayPart where
7184− parseJSON
7185− = withObject "TargetingValueDayPartTargetingDayPart"
7186− (\ o ->
7187− TargetingValueDayPartTargetingDayPart <$>
7188− (o .:? "endHour") <*> (o .:? "startHour") <*>
7189− (o .:? "startMinute")
7190− <*> (o .:? "dayOfWeek")
7191− <*> (o .:? "endMinute"))
7192−
7193−instance ToJSON TargetingValueDayPartTargetingDayPart
7194− where
7195− toJSON TargetingValueDayPartTargetingDayPart{..}
7196− = object
7197− (catMaybes
7198− [("endHour" .=) <$> _tvdptdpEndHour,
7199− ("startHour" .=) <$> _tvdptdpStartHour,
7200− ("startMinute" .=) <$> _tvdptdpStartMinute,
7201− ("dayOfWeek" .=) <$> _tvdptdpDayOfWeek,
7202− ("endMinute" .=) <$> _tvdptdpEndMinute])
7203−
7204−--
7205−-- /See:/ 'negotiationRoundDto' smart constructor.
7206−data NegotiationRoundDto = NegotiationRoundDto
7207− { _nrdTerms :: !(Maybe (Maybe TermsDto))
7208− , _nrdKind :: !Text
7209− , _nrdOriginatorRole :: !(Maybe Text)
7210− , _nrdAction :: !(Maybe Text)
7211− , _nrdDbmPartnerId :: !(Maybe Int64)
7212− , _nrdNotes :: !(Maybe Text)
7213− , _nrdNegotiationId :: !(Maybe Int64)
7214− , _nrdEditHistory :: !(Maybe (Maybe EditHistoryDto))
7215− , _nrdRoundNumber :: !(Maybe Int64)
7216− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7217−
7218−-- | Creates a value of 'NegotiationRoundDto' with the minimum fields required to make a request.
7219−--
7220−-- Use one of the following lenses to modify other fields as desired:
7221−--
7222−-- * 'nrdTerms'
7223−--
7224−-- * 'nrdKind'
7225−--
7226−-- * 'nrdOriginatorRole'
7227−--
7228−-- * 'nrdAction'
7229−--
7230−-- * 'nrdDbmPartnerId'
7231−--
7232−-- * 'nrdNotes'
7233−--
7234−-- * 'nrdNegotiationId'
7235−--
7236−-- * 'nrdEditHistory'
7237−--
7238−-- * 'nrdRoundNumber'
7239−negotiationRoundDto
7240− :: NegotiationRoundDto
7241−negotiationRoundDto =
7242− NegotiationRoundDto
7243− { _nrdTerms = Nothing
7244− , _nrdKind = "adexchangebuyer#negotiationRound"
7245− , _nrdOriginatorRole = Nothing
7246− , _nrdAction = Nothing
7247− , _nrdDbmPartnerId = Nothing
7248− , _nrdNotes = Nothing
7249− , _nrdNegotiationId = Nothing
7250− , _nrdEditHistory = Nothing
7251− , _nrdRoundNumber = Nothing
7252− }
7253−
7254−-- | The detailed terms proposed in this negotiation round.
7255−nrdTerms :: Lens' NegotiationRoundDto (Maybe (Maybe TermsDto))
7256−nrdTerms = lens _nrdTerms (\ s a -> s{_nrdTerms = a})
7257−
7258−nrdKind :: Lens' NegotiationRoundDto Text
7259−nrdKind = lens _nrdKind (\ s a -> s{_nrdKind = a})
7260−
7261−-- | The role, either buyer or seller, initiating this negotiation round.
7262−nrdOriginatorRole :: Lens' NegotiationRoundDto (Maybe Text)
7263−nrdOriginatorRole
7264− = lens _nrdOriginatorRole
7265− (\ s a -> s{_nrdOriginatorRole = a})
7266−
7267−-- | The action performed by this negotiation round.
7268−nrdAction :: Lens' NegotiationRoundDto (Maybe Text)
7269−nrdAction
7270− = lens _nrdAction (\ s a -> s{_nrdAction = a})
7271−
7272−-- | Stores DBM partner ID for use by DBM
7273−nrdDbmPartnerId :: Lens' NegotiationRoundDto (Maybe Int64)
7274−nrdDbmPartnerId
7275− = lens _nrdDbmPartnerId
7276− (\ s a -> s{_nrdDbmPartnerId = a})
7277−
7278−-- | Notes regarding this negotiation round.
7279−nrdNotes :: Lens' NegotiationRoundDto (Maybe Text)
7280−nrdNotes = lens _nrdNotes (\ s a -> s{_nrdNotes = a})
7281−
7282−-- | The ID of the negotiation to which this negotiation round applies.
7283−nrdNegotiationId :: Lens' NegotiationRoundDto (Maybe Int64)
7284−nrdNegotiationId
7285− = lens _nrdNegotiationId
7286− (\ s a -> s{_nrdNegotiationId = a})
7287−
7288−-- | The edit history of this negotiation round.
7289−nrdEditHistory :: Lens' NegotiationRoundDto (Maybe (Maybe EditHistoryDto))
7290−nrdEditHistory
7291− = lens _nrdEditHistory
7292− (\ s a -> s{_nrdEditHistory = a})
7293−
7294−-- | The number of this negotiation round, in sequence.
7295−nrdRoundNumber :: Lens' NegotiationRoundDto (Maybe Int64)
7296−nrdRoundNumber
7297− = lens _nrdRoundNumber
7298− (\ s a -> s{_nrdRoundNumber = a})
7299−
7300−instance FromJSON NegotiationRoundDto where
7301− parseJSON
7302− = withObject "NegotiationRoundDto"
7303− (\ o ->
7304− NegotiationRoundDto <$>
7305− (o .:? "terms") <*>
7306− (o .:? "kind" .!= "adexchangebuyer#negotiationRound")
7307− <*> (o .:? "originatorRole")
7308− <*> (o .:? "action")
7309− <*> (o .:? "dbmPartnerId")
7310− <*> (o .:? "notes")
7311− <*> (o .:? "negotiationId")
7312− <*> (o .:? "editHistory")
7313− <*> (o .:? "roundNumber"))
7314−
7315−instance ToJSON NegotiationRoundDto where
7316− toJSON NegotiationRoundDto{..}
7317− = object
7318− (catMaybes
7319− [("terms" .=) <$> _nrdTerms,
7320− Just ("kind" .= _nrdKind),
7321− ("originatorRole" .=) <$> _nrdOriginatorRole,
7322− ("action" .=) <$> _nrdAction,
7323− ("dbmPartnerId" .=) <$> _nrdDbmPartnerId,
7324− ("notes" .=) <$> _nrdNotes,
7325− ("negotiationId" .=) <$> _nrdNegotiationId,
7326− ("editHistory" .=) <$> _nrdEditHistory,
7327− ("roundNumber" .=) <$> _nrdRoundNumber])
7328−
7329−--
7330−-- /See:/ 'dealTermsNonGuaranteedAuctionTerms' smart constructor.
7331−data DealTermsNonGuaranteedAuctionTerms = DealTermsNonGuaranteedAuctionTerms
7332− { _dtngatReservePricePerBuyers :: !(Maybe [Maybe PricePerBuyer])
7333− , _dtngatPrivateAuctionId :: !(Maybe Text)
7334− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7335−
7336−-- | Creates a value of 'DealTermsNonGuaranteedAuctionTerms' with the minimum fields required to make a request.
7337−--
7338−-- Use one of the following lenses to modify other fields as desired:
7339−--
7340−-- * 'dtngatReservePricePerBuyers'
7341−--
7342−-- * 'dtngatPrivateAuctionId'
7343−dealTermsNonGuaranteedAuctionTerms
7344− :: DealTermsNonGuaranteedAuctionTerms
7345−dealTermsNonGuaranteedAuctionTerms =
7346− DealTermsNonGuaranteedAuctionTerms
7347− { _dtngatReservePricePerBuyers = Nothing
7348− , _dtngatPrivateAuctionId = Nothing
7349− }
7350−
7351−-- | Reserve price for the specified buyer.
7352−dtngatReservePricePerBuyers :: Lens' DealTermsNonGuaranteedAuctionTerms [Maybe PricePerBuyer]
7353−dtngatReservePricePerBuyers
7354− = lens _dtngatReservePricePerBuyers
7355− (\ s a -> s{_dtngatReservePricePerBuyers = a})
7356− . _Default
7357− . _Coerce
7358−
7359−-- | Id of the corresponding private auction.
7360−dtngatPrivateAuctionId :: Lens' DealTermsNonGuaranteedAuctionTerms (Maybe Text)
7361−dtngatPrivateAuctionId
7362− = lens _dtngatPrivateAuctionId
7363− (\ s a -> s{_dtngatPrivateAuctionId = a})
7364−
7365−instance FromJSON DealTermsNonGuaranteedAuctionTerms
7366− where
7367− parseJSON
7368− = withObject "DealTermsNonGuaranteedAuctionTerms"
7369− (\ o ->
7370− DealTermsNonGuaranteedAuctionTerms <$>
7371− (o .:? "reservePricePerBuyers" .!= mempty) <*>
7372− (o .:? "privateAuctionId"))
7373−
7374−instance ToJSON DealTermsNonGuaranteedAuctionTerms
7375− where
7376− toJSON DealTermsNonGuaranteedAuctionTerms{..}
7377− = object
7378− (catMaybes
7379− [("reservePricePerBuyers" .=) <$>
7380− _dtngatReservePricePerBuyers,
7381− ("privateAuctionId" .=) <$> _dtngatPrivateAuctionId])
7382−
7383−--
7384−-- /See:/ 'statsDto' smart constructor.
7385−data StatsDto = StatsDto
7386− { _sdBids :: !(Maybe Int64)
7387− , _sdSpend :: !(Maybe (Maybe MoneyDto))
7388− , _sdImpressions :: !(Maybe Int64)
7389− , _sdGoodBids :: !(Maybe Int64)
7390− , _sdRevenue :: !(Maybe (Maybe MoneyDto))
7391− , _sdRequests :: !(Maybe Int64)
7392− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7393−
7394−-- | Creates a value of 'StatsDto' with the minimum fields required to make a request.
7395−--
7396−-- Use one of the following lenses to modify other fields as desired:
7397−--
7398−-- * 'sdBids'
7399−--
7400−-- * 'sdSpend'
7401−--
7402−-- * 'sdImpressions'
7403−--
7404−-- * 'sdGoodBids'
7405−--
7406−-- * 'sdRevenue'
7407−--
7408−-- * 'sdRequests'
7409−statsDto
7410− :: StatsDto
7411−statsDto =
7412− StatsDto
7413− { _sdBids = Nothing
7414− , _sdSpend = Nothing
7415− , _sdImpressions = Nothing
7416− , _sdGoodBids = Nothing
7417− , _sdRevenue = Nothing
7418− , _sdRequests = Nothing
7419− }
7420−
7421−sdBids :: Lens' StatsDto (Maybe Int64)
7422−sdBids = lens _sdBids (\ s a -> s{_sdBids = a})
7423−
7424−sdSpend :: Lens' StatsDto (Maybe (Maybe MoneyDto))
7425−sdSpend = lens _sdSpend (\ s a -> s{_sdSpend = a})
7426−
7427−sdImpressions :: Lens' StatsDto (Maybe Int64)
7428−sdImpressions
7429− = lens _sdImpressions
7430− (\ s a -> s{_sdImpressions = a})
7431−
7432−sdGoodBids :: Lens' StatsDto (Maybe Int64)
7433−sdGoodBids
7434− = lens _sdGoodBids (\ s a -> s{_sdGoodBids = a})
7435−
7436−sdRevenue :: Lens' StatsDto (Maybe (Maybe MoneyDto))
7437−sdRevenue
7438− = lens _sdRevenue (\ s a -> s{_sdRevenue = a})
7439−
7440−sdRequests :: Lens' StatsDto (Maybe Int64)
7441−sdRequests
7442− = lens _sdRequests (\ s a -> s{_sdRequests = a})
7443−
7444−instance FromJSON StatsDto where
7445− parseJSON
7446− = withObject "StatsDto"
7447− (\ o ->
7448− StatsDto <$>
7449− (o .:? "bids") <*> (o .:? "spend") <*>
7450− (o .:? "impressions")
7451− <*> (o .:? "goodBids")
7452− <*> (o .:? "revenue")
7453− <*> (o .:? "requests"))
7454−
7455−instance ToJSON StatsDto where
7456− toJSON StatsDto{..}
7457− = object
7458− (catMaybes
7459− [("bids" .=) <$> _sdBids, ("spend" .=) <$> _sdSpend,
7460− ("impressions" .=) <$> _sdImpressions,
7461− ("goodBids" .=) <$> _sdGoodBids,
7462− ("revenue" .=) <$> _sdRevenue,
7463− ("requests" .=) <$> _sdRequests])
7464−
7465−--
7466−-- /See:/ 'getOffersResponse' smart constructor.
7467−newtype GetOffersResponse = GetOffersResponse
7468− { _gorOffers :: Maybe [Maybe MarketplaceOffer]
7469− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7470−
7471−-- | Creates a value of 'GetOffersResponse' with the minimum fields required to make a request.
7472−--
7473−-- Use one of the following lenses to modify other fields as desired:
7474−--
7475−-- * 'gorOffers'
7476−getOffersResponse
7477− :: GetOffersResponse
7478−getOffersResponse =
7479− GetOffersResponse
7480− { _gorOffers = Nothing
7481− }
7482−
7483−-- | The returned list of offers.
7484−gorOffers :: Lens' GetOffersResponse [Maybe MarketplaceOffer]
7485−gorOffers
7486− = lens _gorOffers (\ s a -> s{_gorOffers = a}) .
7487− _Default
7488− . _Coerce
7489−
7490−instance FromJSON GetOffersResponse where
7491− parseJSON
7492− = withObject "GetOffersResponse"
7493− (\ o ->
7494− GetOffersResponse <$> (o .:? "offers" .!= mempty))
7495−
7496−instance ToJSON GetOffersResponse where
7497− toJSON GetOffersResponse{..}
7498− = object (catMaybes [("offers" .=) <$> _gorOffers])
7499−
7500−-- | The app icon, for app download ads.
7501−--
7502−-- /See:/ 'creativeAppIconNativeAd' smart constructor.
7503−data CreativeAppIconNativeAd = CreativeAppIconNativeAd
7504− { _cainaHeight :: !(Maybe Int32)
7505− , _cainaUrl :: !(Maybe Text)
7506− , _cainaWidth :: !(Maybe Int32)
7507− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7508−
7509−-- | Creates a value of 'CreativeAppIconNativeAd' with the minimum fields required to make a request.
7510−--
7511−-- Use one of the following lenses to modify other fields as desired:
7512−--
7513−-- * 'cainaHeight'
7514−--
7515−-- * 'cainaUrl'
7516−--
7517−-- * 'cainaWidth'
7518−creativeAppIconNativeAd
7519− :: CreativeAppIconNativeAd
7520−creativeAppIconNativeAd =
7521− CreativeAppIconNativeAd
7522− { _cainaHeight = Nothing
7523− , _cainaUrl = Nothing
7524− , _cainaWidth = Nothing
7525− }
7526−
7527−cainaHeight :: Lens' CreativeAppIconNativeAd (Maybe Int32)
7528−cainaHeight
7529− = lens _cainaHeight (\ s a -> s{_cainaHeight = a})
7530−
7531−cainaUrl :: Lens' CreativeAppIconNativeAd (Maybe Text)
7532−cainaUrl = lens _cainaUrl (\ s a -> s{_cainaUrl = a})
7533−
7534−cainaWidth :: Lens' CreativeAppIconNativeAd (Maybe Int32)
7535−cainaWidth
7536− = lens _cainaWidth (\ s a -> s{_cainaWidth = a})
7537−
7538−instance FromJSON CreativeAppIconNativeAd where
7539− parseJSON
7540− = withObject "CreativeAppIconNativeAd"
7541− (\ o ->
7542− CreativeAppIconNativeAd <$>
7543− (o .:? "height") <*> (o .:? "url") <*>
7544− (o .:? "width"))
7545−
7546−instance ToJSON CreativeAppIconNativeAd where
7547− toJSON CreativeAppIconNativeAd{..}
7548− = object
7549− (catMaybes
7550− [("height" .=) <$> _cainaHeight,
7551− ("url" .=) <$> _cainaUrl,
7552− ("width" .=) <$> _cainaWidth])
7553−
7554−-- | Configuration data for an Ad Exchange buyer account.
7555−--
7556−-- /See:/ 'account' smart constructor.
7557−data Account = Account
7558− { _aMaximumTotalQps :: !(Maybe Int32)
7559− , _aKind :: !Text
7560− , _aCookieMatchingUrl :: !(Maybe Text)
7561− , _aMaximumActiveCreatives :: !(Maybe Int32)
7562− , _aCookieMatchingNid :: !(Maybe Text)
7563− , _aNumberActiveCreatives :: !(Maybe Int32)
7564− , _aId :: !(Maybe Int32)
7565− , _aBidderLocation :: !(Maybe [AccountItemBidderLocation])
7566− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7567−
7568−-- | Creates a value of 'Account' with the minimum fields required to make a request.
7569−--
7570−-- Use one of the following lenses to modify other fields as desired:
7571−--
7572−-- * 'aMaximumTotalQps'
7573−--
7574−-- * 'aKind'
7575−--
7576−-- * 'aCookieMatchingUrl'
7577−--
7578−-- * 'aMaximumActiveCreatives'
7579−--
7580−-- * 'aCookieMatchingNid'
7581−--
7582−-- * 'aNumberActiveCreatives'
7583−--
7584−-- * 'aId'
7585−--
7586−-- * 'aBidderLocation'
7587−account
7588− :: Account
7589−account =
7590− Account
7591− { _aMaximumTotalQps = Nothing
7592− , _aKind = "adexchangebuyer#account"
7593− , _aCookieMatchingUrl = Nothing
7594− , _aMaximumActiveCreatives = Nothing
7595− , _aCookieMatchingNid = Nothing
7596− , _aNumberActiveCreatives = Nothing
7597− , _aId = Nothing
7598− , _aBidderLocation = Nothing
7599− }
7600−
7601−-- | The sum of all bidderLocation.maximumQps values cannot exceed this.
7602−-- Please contact your technical account manager if you need to change
7603−-- this.
7604−aMaximumTotalQps :: Lens' Account (Maybe Int32)
7605−aMaximumTotalQps
7606− = lens _aMaximumTotalQps
7607− (\ s a -> s{_aMaximumTotalQps = a})
7608−
7609−-- | Resource type.
7610−aKind :: Lens' Account Text
7611−aKind = lens _aKind (\ s a -> s{_aKind = a})
7612−
7613−-- | The base URL used in cookie match requests.
7614−aCookieMatchingUrl :: Lens' Account (Maybe Text)
7615−aCookieMatchingUrl
7616− = lens _aCookieMatchingUrl
7617− (\ s a -> s{_aCookieMatchingUrl = a})
7618−
7619−-- | The maximum number of active creatives that an account can have, where a
7620−-- creative is active if it was inserted or bid with in the last 30 days.
7621−-- Please contact your technical account manager if you need to change
7622−-- this.
7623−aMaximumActiveCreatives :: Lens' Account (Maybe Int32)
7624−aMaximumActiveCreatives
7625− = lens _aMaximumActiveCreatives
7626− (\ s a -> s{_aMaximumActiveCreatives = a})
7627−
7628−-- | The nid parameter value used in cookie match requests. Please contact
7629−-- your technical account manager if you need to change this.
7630−aCookieMatchingNid :: Lens' Account (Maybe Text)
7631−aCookieMatchingNid
7632− = lens _aCookieMatchingNid
7633− (\ s a -> s{_aCookieMatchingNid = a})
7634−
7635−-- | The number of creatives that this account inserted or bid with in the
7636−-- last 30 days.
7637−aNumberActiveCreatives :: Lens' Account (Maybe Int32)
7638−aNumberActiveCreatives
7639− = lens _aNumberActiveCreatives
7640− (\ s a -> s{_aNumberActiveCreatives = a})
7641−
7642−-- | Account id.
7643−aId :: Lens' Account (Maybe Int32)
7644−aId = lens _aId (\ s a -> s{_aId = a})
7645−
7646−-- | Your bidder locations that have distinct URLs.
7647−aBidderLocation :: Lens' Account [AccountItemBidderLocation]
7648−aBidderLocation
7649− = lens _aBidderLocation
7650− (\ s a -> s{_aBidderLocation = a})
7651− . _Default
7652− . _Coerce
7653−
7654−instance FromJSON Account where
7655− parseJSON
7656− = withObject "Account"
7657− (\ o ->
7658− Account <$>
7659− (o .:? "maximumTotalQps") <*>
7660− (o .:? "kind" .!= "adexchangebuyer#account")
7661− <*> (o .:? "cookieMatchingUrl")
7662− <*> (o .:? "maximumActiveCreatives")
7663− <*> (o .:? "cookieMatchingNid")
7664− <*> (o .:? "numberActiveCreatives")
7665− <*> (o .:? "id")
7666− <*> (o .:? "bidderLocation" .!= mempty))
7667−
7668−instance ToJSON Account where
7669− toJSON Account{..}
7670− = object
7671− (catMaybes
7672− [("maximumTotalQps" .=) <$> _aMaximumTotalQps,
7673− Just ("kind" .= _aKind),
7674− ("cookieMatchingUrl" .=) <$> _aCookieMatchingUrl,
7675− ("maximumActiveCreatives" .=) <$>
7676− _aMaximumActiveCreatives,
7677− ("cookieMatchingNid" .=) <$> _aCookieMatchingNid,
7678− ("numberActiveCreatives" .=) <$>
7679− _aNumberActiveCreatives,
7680− ("id" .=) <$> _aId,
7681− ("bidderLocation" .=) <$> _aBidderLocation])
7682−
7683−--
7684−-- /See:/ 'seller' smart constructor.
7685−data Seller = Seller
7686− { _sAccountId :: !(Maybe Text)
7687− , _sSubAccountId :: !(Maybe Text)
7688− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7689−
7690−-- | Creates a value of 'Seller' with the minimum fields required to make a request.
7691−--
7692−-- Use one of the following lenses to modify other fields as desired:
7693−--
7694−-- * 'sAccountId'
7695−--
7696−-- * 'sSubAccountId'
7697−seller
7698− :: Seller
7699−seller =
7700− Seller
7701− { _sAccountId = Nothing
7702− , _sSubAccountId = Nothing
7703− }
7704−
7705−-- | The unique id for the seller. The seller fills in this field. The seller
7706−-- account id is then available to buyer in the offer.
7707−sAccountId :: Lens' Seller (Maybe Text)
7708−sAccountId
7709− = lens _sAccountId (\ s a -> s{_sAccountId = a})
7710−
7711−-- | Optional sub-account id for the seller.
7712−sSubAccountId :: Lens' Seller (Maybe Text)
7713−sSubAccountId
7714− = lens _sSubAccountId
7715− (\ s a -> s{_sSubAccountId = a})
7716−
7717−instance FromJSON Seller where
7718− parseJSON
7719− = withObject "Seller"
7720− (\ o ->
7721− Seller <$>
7722− (o .:? "accountId") <*> (o .:? "subAccountId"))
7723−
7724−instance ToJSON Seller where
7725− toJSON Seller{..}
7726− = object
7727− (catMaybes
7728− [("accountId" .=) <$> _sAccountId,
7729− ("subAccountId" .=) <$> _sSubAccountId])
7730−
7731−--
7732−-- /See:/ 'deleteOrderDealsRequest' smart constructor.
7733−data DeleteOrderDealsRequest = DeleteOrderDealsRequest
7734− { _dUpdateAction :: !(Maybe Text)
7735− , _dDealIds :: !(Maybe [Text])
7736− , _dOrderRevisionNumber :: !(Maybe Int64)
7737− } deriving (Eq,Read,Show,Data,Typeable,Generic)
7738−
7739−-- | Creates a value of 'DeleteOrderDealsRequest' with the minimum fields required to make a request.
7740−--
7741−-- Use one of the following lenses to modify other fields as desired:
7742−--
7743−-- * 'dUpdateAction'
7744−--
7745−-- * 'dDealIds'
7746−--
7747−-- * 'dOrderRevisionNumber'
7748−deleteOrderDealsRequest
7749− :: DeleteOrderDealsRequest
7750−deleteOrderDealsRequest =
7751− DeleteOrderDealsRequest
7752− { _dUpdateAction = Nothing
7753− , _dDealIds = Nothing
7754− , _dOrderRevisionNumber = Nothing
7755− }
7756−
7757−dUpdateAction :: Lens' DeleteOrderDealsRequest (Maybe Text)
7758−dUpdateAction
7759− = lens _dUpdateAction
7760− (\ s a -> s{_dUpdateAction = a})
7761−
7762−-- | List of deals to delete for a given order
7763−dDealIds :: Lens' DeleteOrderDealsRequest [Text]
7764−dDealIds
7765− = lens _dDealIds (\ s a -> s{_dDealIds = a}) .
7766− _Default
7767− . _Coerce
7768−
7769−-- | The last known order revision number.
7770−dOrderRevisionNumber :: Lens' DeleteOrderDealsRequest (Maybe Int64)
7771−dOrderRevisionNumber
7772− = lens _dOrderRevisionNumber
7773− (\ s a -> s{_dOrderRevisionNumber = a})
7774−
7775−instance FromJSON DeleteOrderDealsRequest where
7776− parseJSON
7777− = withObject "DeleteOrderDealsRequest"
7778− (\ o ->
7779− DeleteOrderDealsRequest <$>
7780− (o .:? "updateAction") <*>
7781− (o .:? "dealIds" .!= mempty)
7782− <*> (o .:? "orderRevisionNumber"))
7783−
7784−instance ToJSON DeleteOrderDealsRequest where
7785− toJSON DeleteOrderDealsRequest{..}
7786− = object
7787− (catMaybes
7788− [("updateAction" .=) <$> _dUpdateAction,
7789− ("dealIds" .=) <$> _dDealIds,
7790− ("orderRevisionNumber" .=) <$>
7791− _dOrderRevisionNumber])