@@ -317,180 +317,6 @@ instance ToJSON ResultTable where
317317 [Just ("kind" .= _rtKind), ("rows" .=) <$> _rtRows,
318318 ("columnHeaders" .=) <$> _rtColumnHeaders])
319319
320−-- | Contains single batchReportDefinition resource.
321−--
322−-- /See:/ 'batchReportDefinition' smart constructor.
323−data BatchReportDefinition = BatchReportDefinition'
324− { _brdStatus :: !(Maybe Text)
325− , _brdKind :: !Text
326− , _brdName :: !(Maybe Text)
327− , _brdId :: !(Maybe Text)
328− , _brdType :: !(Maybe Text)
329− } deriving (Eq,Show,Data,Typeable,Generic)
330−
331−-- | Creates a value of 'BatchReportDefinition' with the minimum fields required to make a request.
332−--
333−-- Use one of the following lenses to modify other fields as desired:
334−--
335−-- * 'brdStatus'
336−--
337−-- * 'brdKind'
338−--
339−-- * 'brdName'
340−--
341−-- * 'brdId'
342−--
343−-- * 'brdType'
344−batchReportDefinition
345− :: BatchReportDefinition
346−batchReportDefinition =
347− BatchReportDefinition'
348− { _brdStatus = Nothing
349− , _brdKind = "youtubeAnalytics#batchReportDefinition"
350− , _brdName = Nothing
351− , _brdId = Nothing
352− , _brdType = Nothing
353− }
354−
355−-- | Status of the report definition.
356−brdStatus :: Lens' BatchReportDefinition (Maybe Text)
357−brdStatus
358− = lens _brdStatus (\ s a -> s{_brdStatus = a})
359−
360−-- | This value specifies the type of data of this item. For batch report
361−-- definition the kind property value is
362−-- youtubeAnalytics#batchReportDefinition.
363−brdKind :: Lens' BatchReportDefinition Text
364−brdKind = lens _brdKind (\ s a -> s{_brdKind = a})
365−
366−-- | Name of the report definition.
367−brdName :: Lens' BatchReportDefinition (Maybe Text)
368−brdName = lens _brdName (\ s a -> s{_brdName = a})
369−
370−-- | The ID that YouTube assigns and uses to uniquely identify the report
371−-- definition.
372−brdId :: Lens' BatchReportDefinition (Maybe Text)
373−brdId = lens _brdId (\ s a -> s{_brdId = a})
374−
375−-- | Type of the report definition.
376−brdType :: Lens' BatchReportDefinition (Maybe Text)
377−brdType = lens _brdType (\ s a -> s{_brdType = a})
378−
379−instance FromJSON BatchReportDefinition where
380− parseJSON
381− = withObject "BatchReportDefinition"
382− (\ o ->
383− BatchReportDefinition' <$>
384− (o .:? "status") <*>
385− (o .:? "kind" .!=
386− "youtubeAnalytics#batchReportDefinition")
387− <*> (o .:? "name")
388− <*> (o .:? "id")
389− <*> (o .:? "type"))
390−
391−instance ToJSON BatchReportDefinition where
392− toJSON BatchReportDefinition'{..}
393− = object
394− (catMaybes
395− [("status" .=) <$> _brdStatus,
396− Just ("kind" .= _brdKind), ("name" .=) <$> _brdName,
397− ("id" .=) <$> _brdId, ("type" .=) <$> _brdType])
398−
399−-- | Contains single batchReport resource.
400−--
401−-- /See:/ 'batchReport' smart constructor.
402−data BatchReport = BatchReport'
403− { _brTimeUpdated :: !(Maybe DateTime')
404− , _brKind :: !Text
405− , _brReportId :: !(Maybe Text)
406− , _brTimeSpan :: !(Maybe BatchReportTimeSpan)
407− , _brOutputs :: !(Maybe [BatchReportOutputsItem])
408− , _brId :: !(Maybe Text)
409− } deriving (Eq,Show,Data,Typeable,Generic)
410−
411−-- | Creates a value of 'BatchReport' with the minimum fields required to make a request.
412−--
413−-- Use one of the following lenses to modify other fields as desired:
414−--
415−-- * 'brTimeUpdated'
416−--
417−-- * 'brKind'
418−--
419−-- * 'brReportId'
420−--
421−-- * 'brTimeSpan'
422−--
423−-- * 'brOutputs'
424−--
425−-- * 'brId'
426−batchReport
427− :: BatchReport
428−batchReport =
429− BatchReport'
430− { _brTimeUpdated = Nothing
431− , _brKind = "youtubeAnalytics#batchReport"
432− , _brReportId = Nothing
433− , _brTimeSpan = Nothing
434− , _brOutputs = Nothing
435− , _brId = Nothing
436− }
437−
438−-- | The time when the report was updated.
439−brTimeUpdated :: Lens' BatchReport (Maybe UTCTime)
440−brTimeUpdated
441− = lens _brTimeUpdated
442− (\ s a -> s{_brTimeUpdated = a})
443− . mapping _DateTime
444−
445−-- | This value specifies the type of data of this item. For batch report the
446−-- kind property value is youtubeAnalytics#batchReport.
447−brKind :: Lens' BatchReport Text
448−brKind = lens _brKind (\ s a -> s{_brKind = a})
449−
450−-- | The ID of the the report definition.
451−brReportId :: Lens' BatchReport (Maybe Text)
452−brReportId
453− = lens _brReportId (\ s a -> s{_brReportId = a})
454−
455−-- | Period included in the report. For reports containing all entities
456−-- endTime is not set. Both startTime and endTime are inclusive.
457−brTimeSpan :: Lens' BatchReport (Maybe BatchReportTimeSpan)
458−brTimeSpan
459− = lens _brTimeSpan (\ s a -> s{_brTimeSpan = a})
460−
461−-- | Report outputs.
462−brOutputs :: Lens' BatchReport [BatchReportOutputsItem]
463−brOutputs
464− = lens _brOutputs (\ s a -> s{_brOutputs = a}) .
465− _Default
466− . _Coerce
467−
468−-- | The ID that YouTube assigns and uses to uniquely identify the report.
469−brId :: Lens' BatchReport (Maybe Text)
470−brId = lens _brId (\ s a -> s{_brId = a})
471−
472−instance FromJSON BatchReport where
473− parseJSON
474− = withObject "BatchReport"
475− (\ o ->
476− BatchReport' <$>
477− (o .:? "timeUpdated") <*>
478− (o .:? "kind" .!= "youtubeAnalytics#batchReport")
479− <*> (o .:? "reportId")
480− <*> (o .:? "timeSpan")
481− <*> (o .:? "outputs" .!= mempty)
482− <*> (o .:? "id"))
483−
484−instance ToJSON BatchReport where
485− toJSON BatchReport'{..}
486− = object
487− (catMaybes
488− [("timeUpdated" .=) <$> _brTimeUpdated,
489− Just ("kind" .= _brKind),
490− ("reportId" .=) <$> _brReportId,
491− ("timeSpan" .=) <$> _brTimeSpan,
492− ("outputs" .=) <$> _brOutputs, ("id" .=) <$> _brId])
493−
494320--
495321-- /See:/ 'groupSnippet' smart constructor.
496322data GroupSnippet = GroupSnippet'
@@ -606,222 +432,6 @@ instance ToJSON GroupItem where
606432 ("resource" .=) <$> _giResource,
607433 ("groupId" .=) <$> _giGroupId, ("id" .=) <$> _giId])
608434
609−-- | A paginated list of batchReportDefinition resources returned in response
610−-- to a youtubeAnalytics.batchReportDefinitions.list request.
611−--
612−-- /See:/ 'batchReportDefinitionList' smart constructor.
613−data BatchReportDefinitionList = BatchReportDefinitionList'
614− { _brdlKind :: !Text
615− , _brdlItems :: !(Maybe [BatchReportDefinition])
616− } deriving (Eq,Show,Data,Typeable,Generic)
617−
618−-- | Creates a value of 'BatchReportDefinitionList' with the minimum fields required to make a request.
619−--
620−-- Use one of the following lenses to modify other fields as desired:
621−--
622−-- * 'brdlKind'
623−--
624−-- * 'brdlItems'
625−batchReportDefinitionList
626− :: BatchReportDefinitionList
627−batchReportDefinitionList =
628− BatchReportDefinitionList'
629− { _brdlKind = "youtubeAnalytics#batchReportDefinitionList"
630− , _brdlItems = Nothing
631− }
632−
633−-- | This value specifies the type of data included in the API response. For
634−-- the list method, the kind property value is
635−-- youtubeAnalytics#batchReportDefinitionList.
636−brdlKind :: Lens' BatchReportDefinitionList Text
637−brdlKind = lens _brdlKind (\ s a -> s{_brdlKind = a})
638−
639−-- | A list of batchReportDefinition resources that match the request
640−-- criteria.
641−brdlItems :: Lens' BatchReportDefinitionList [BatchReportDefinition]
642−brdlItems
643− = lens _brdlItems (\ s a -> s{_brdlItems = a}) .
644− _Default
645− . _Coerce
646−
647−instance FromJSON BatchReportDefinitionList where
648− parseJSON
649− = withObject "BatchReportDefinitionList"
650− (\ o ->
651− BatchReportDefinitionList' <$>
652− (o .:? "kind" .!=
653− "youtubeAnalytics#batchReportDefinitionList")
654− <*> (o .:? "items" .!= mempty))
655−
656−instance ToJSON BatchReportDefinitionList where
657− toJSON BatchReportDefinitionList'{..}
658− = object
659− (catMaybes
660− [Just ("kind" .= _brdlKind),
661− ("items" .=) <$> _brdlItems])
662−
663−-- | A paginated list of batchReport resources returned in response to a
664−-- youtubeAnalytics.batchReport.list request.
665−--
666−-- /See:/ 'batchReportList' smart constructor.
667−data BatchReportList = BatchReportList'
668− { _brlKind :: !Text
669− , _brlItems :: !(Maybe [BatchReport])
670− } deriving (Eq,Show,Data,Typeable,Generic)
671−
672−-- | Creates a value of 'BatchReportList' with the minimum fields required to make a request.
673−--
674−-- Use one of the following lenses to modify other fields as desired:
675−--
676−-- * 'brlKind'
677−--
678−-- * 'brlItems'
679−batchReportList
680− :: BatchReportList
681−batchReportList =
682− BatchReportList'
683− { _brlKind = "youtubeAnalytics#batchReportList"
684− , _brlItems = Nothing
685− }
686−
687−-- | This value specifies the type of data included in the API response. For
688−-- the list method, the kind property value is
689−-- youtubeAnalytics#batchReportList.
690−brlKind :: Lens' BatchReportList Text
691−brlKind = lens _brlKind (\ s a -> s{_brlKind = a})
692−
693−-- | A list of batchReport resources that match the request criteria.
694−brlItems :: Lens' BatchReportList [BatchReport]
695−brlItems
696− = lens _brlItems (\ s a -> s{_brlItems = a}) .
697− _Default
698− . _Coerce
699−
700−instance FromJSON BatchReportList where
701− parseJSON
702− = withObject "BatchReportList"
703− (\ o ->
704− BatchReportList' <$>
705− (o .:? "kind" .!= "youtubeAnalytics#batchReportList")
706− <*> (o .:? "items" .!= mempty))
707−
708−instance ToJSON BatchReportList where
709− toJSON BatchReportList'{..}
710− = object
711− (catMaybes
712− [Just ("kind" .= _brlKind),
713− ("items" .=) <$> _brlItems])
714−
715−--
716−-- /See:/ 'batchReportOutputsItem' smart constructor.
717−data BatchReportOutputsItem = BatchReportOutputsItem'
718− { _broiFormat :: !(Maybe Text)
719− , _broiDownloadURL :: !(Maybe Text)
720− , _broiType :: !Text
721− } deriving (Eq,Show,Data,Typeable,Generic)
722−
723−-- | Creates a value of 'BatchReportOutputsItem' with the minimum fields required to make a request.
724−--
725−-- Use one of the following lenses to modify other fields as desired:
726−--
727−-- * 'broiFormat'
728−--
729−-- * 'broiDownloadURL'
730−--
731−-- * 'broiType'
732−batchReportOutputsItem
733− :: BatchReportOutputsItem
734−batchReportOutputsItem =
735− BatchReportOutputsItem'
736− { _broiFormat = Nothing
737− , _broiDownloadURL = Nothing
738− , _broiType = "cloudStorageOutput"
739− }
740−
741−-- | Format of the output.
742−broiFormat :: Lens' BatchReportOutputsItem (Maybe Text)
743−broiFormat
744− = lens _broiFormat (\ s a -> s{_broiFormat = a})
745−
746−-- | Cloud storage URL to download this report. This URL is valid for 30
747−-- minutes.
748−broiDownloadURL :: Lens' BatchReportOutputsItem (Maybe Text)
749−broiDownloadURL
750− = lens _broiDownloadURL
751− (\ s a -> s{_broiDownloadURL = a})
752−
753−-- | Type of the output.
754−broiType :: Lens' BatchReportOutputsItem Text
755−broiType = lens _broiType (\ s a -> s{_broiType = a})
756−
757−instance FromJSON BatchReportOutputsItem where
758− parseJSON
759− = withObject "BatchReportOutputsItem"
760− (\ o ->
761− BatchReportOutputsItem' <$>
762− (o .:? "format") <*> (o .:? "downloadUrl") <*>
763− (o .:? "type" .!= "cloudStorageOutput"))
764−
765−instance ToJSON BatchReportOutputsItem where
766− toJSON BatchReportOutputsItem'{..}
767− = object
768− (catMaybes
769− [("format" .=) <$> _broiFormat,
770− ("downloadUrl" .=) <$> _broiDownloadURL,
771− Just ("type" .= _broiType)])
772−
773−-- | Period included in the report. For reports containing all entities
774−-- endTime is not set. Both startTime and endTime are inclusive.
775−--
776−-- /See:/ 'batchReportTimeSpan' smart constructor.
777−data BatchReportTimeSpan = BatchReportTimeSpan'
778− { _brtsStartTime :: !(Maybe DateTime')
779− , _brtsEndTime :: !(Maybe DateTime')
780− } deriving (Eq,Show,Data,Typeable,Generic)
781−
782−-- | Creates a value of 'BatchReportTimeSpan' with the minimum fields required to make a request.
783−--
784−-- Use one of the following lenses to modify other fields as desired:
785−--
786−-- * 'brtsStartTime'
787−--
788−-- * 'brtsEndTime'
789−batchReportTimeSpan
790− :: BatchReportTimeSpan
791−batchReportTimeSpan =
792− BatchReportTimeSpan'
793− { _brtsStartTime = Nothing
794− , _brtsEndTime = Nothing
795− }
796−
797−-- | Start of the period included in the report. Inclusive.
798−brtsStartTime :: Lens' BatchReportTimeSpan (Maybe UTCTime)
799−brtsStartTime
800− = lens _brtsStartTime
801− (\ s a -> s{_brtsStartTime = a})
802− . mapping _DateTime
803−
804−-- | End of the period included in the report. Inclusive. For reports
805−-- containing all entities endTime is not set.
806−brtsEndTime :: Lens' BatchReportTimeSpan (Maybe UTCTime)
807−brtsEndTime
808− = lens _brtsEndTime (\ s a -> s{_brtsEndTime = a}) .
809− mapping _DateTime
810−
811−instance FromJSON BatchReportTimeSpan where
812− parseJSON
813− = withObject "BatchReportTimeSpan"
814− (\ o ->
815− BatchReportTimeSpan' <$>
816− (o .:? "startTime") <*> (o .:? "endTime"))
817−
818−instance ToJSON BatchReportTimeSpan where
819− toJSON BatchReportTimeSpan'{..}
820− = object
821− (catMaybes
822− [("startTime" .=) <$> _brtsStartTime,
823− ("endTime" .=) <$> _brtsEndTime])
824−
825435-- | A paginated list of grouList resources returned in response to a
826436-- youtubeAnalytics.groupApi.list request.
827437--