@@ -1,5 +1,6 @@
1{-# LANGUAGE DeriveDataTypeable #-}
1{-# LANGUAGE DeriveDataTypeable #-}
2{-# LANGUAGE DeriveGeneric #-}
2{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE NoImplicitPrelude #-}
3{-# LANGUAGE OverloadedStrings #-}
4{-# LANGUAGE OverloadedStrings #-}
4{-# LANGUAGE RecordWildCards #-}
5{-# LANGUAGE RecordWildCards #-}
@@ -22,7 +23,7 @@ import Network.Google.Prelude
22-- /See:/ 'postUserInfo' smart constructor.
23-- /See:/ 'postUserInfo' smart constructor.
23data PostUserInfo = PostUserInfo
24data PostUserInfo = PostUserInfo
24 { _puiPostUserInfo :: !(Maybe PostPerUserInfo)
25 { _puiPostUserInfo :: !(Maybe PostPerUserInfo)
25− , _puiPost :: !(Maybe Post)
26+ , _puiPost :: !(Maybe Post')
26 , _puiKind :: !Text
27 , _puiKind :: !Text
27 } deriving (Eq,Show,Data,Typeable,Generic)
28 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -51,7 +52,7 @@ puiPostUserInfo
51 (\ s a -> s{_puiPostUserInfo = a})
52 (\ s a -> s{_puiPostUserInfo = a})
53-- | The Post resource.
54-- | The Post resource.
54−puiPost :: Lens' PostUserInfo (Maybe Post)
55+puiPost :: Lens' PostUserInfo (Maybe Post')
55puiPost = lens _puiPost (\ s a -> s{_puiPost = a})
56puiPost = lens _puiPost (\ s a -> s{_puiPost = a})
57-- | The kind of this entity. Always blogger#postUserInfo
58-- | The kind of this entity. Always blogger#postUserInfo
@@ -111,7 +112,7 @@ data PostList = PostList
111 { _plEtag :: !(Maybe Text)
112 { _plEtag :: !(Maybe Text)
112 , _plNextPageToken :: !(Maybe Text)
113 , _plNextPageToken :: !(Maybe Text)
113 , _plKind :: !Text
114 , _plKind :: !Text
114− , _plItems :: !(Maybe [Post])
115+ , _plItems :: !(Maybe [Post'])
115 } deriving (Eq,Show,Data,Typeable,Generic)
116 } deriving (Eq,Show,Data,Typeable,Generic)
117-- | Creates a value of 'PostList' with the minimum fields required to make a request.
118-- | Creates a value of 'PostList' with the minimum fields required to make a request.
@@ -150,7 +151,7 @@ plKind :: Lens' PostList Text
150plKind = lens _plKind (\ s a -> s{_plKind = a})
151plKind = lens _plKind (\ s a -> s{_plKind = a})
152-- | The list of Posts for this Blog.
153-- | The list of Posts for this Blog.
153−plItems :: Lens' PostList [Post]
154+plItems :: Lens' PostList [Post']
155 = lens _plItems (\ s a -> s{_plItems = a}) . _Default
156 = lens _plItems (\ s a -> s{_plItems = a}) . _Default
156 . _Coerce
157 . _Coerce
@@ -359,7 +360,7 @@ instance ToJSON PostLocation where
359-- /See:/ 'blogPosts' smart constructor.
360-- /See:/ 'blogPosts' smart constructor.
360data BlogPosts = BlogPosts
361data BlogPosts = BlogPosts
361 { _bpTotalItems :: !(Maybe Int32)
362 { _bpTotalItems :: !(Maybe Int32)
362− , _bpItems :: !(Maybe [Post])
363+ , _bpItems :: !(Maybe [Post'])
363 , _bpSelfLink :: !(Maybe Text)
364 , _bpSelfLink :: !(Maybe Text)
364 } deriving (Eq,Show,Data,Typeable,Generic)
365 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -387,7 +388,7 @@ bpTotalItems
387 = lens _bpTotalItems (\ s a -> s{_bpTotalItems = a})
388 = lens _bpTotalItems (\ s a -> s{_bpTotalItems = a})
389-- | The List of Posts for this Blog.
390-- | The List of Posts for this Blog.
390−bpItems :: Lens' BlogPosts [Post]
391+bpItems :: Lens' BlogPosts [Post']
392 = lens _bpItems (\ s a -> s{_bpItems = a}) . _Default
393 = lens _bpItems (\ s a -> s{_bpItems = a}) . _Default
393 . _Coerce
394 . _Coerce
@@ -415,7 +416,7 @@ instance ToJSON BlogPosts where
417-- /See:/ 'post' smart constructor.
418-- /See:/ 'post' smart constructor.
418−data Post = Post
419+data Post' = Post'
419 { _posImages :: !(Maybe [PostImagesItem])
420 { _posImages :: !(Maybe [PostImagesItem])
420 , _posStatus :: !(Maybe Text)
421 , _posStatus :: !(Maybe Text)
421 , _posEtag :: !(Maybe Text)
422 , _posEtag :: !(Maybe Text)
@@ -479,9 +480,9 @@ data Post = Post
480-- * 'posTitle'
481-- * 'posTitle'
482− :: Post
483+ :: Post'
485 { _posImages = Nothing
486 { _posImages = Nothing
486 , _posStatus = Nothing
487 , _posStatus = Nothing
487 , _posEtag = Nothing
488 , _posEtag = Nothing
@@ -504,107 +505,107 @@ post =
506-- | Display image for the Post.
507-- | Display image for the Post.
507−posImages :: Lens' Post [PostImagesItem]
508+posImages :: Lens' Post' [PostImagesItem]
509 = lens _posImages (\ s a -> s{_posImages = a}) .
510 = lens _posImages (\ s a -> s{_posImages = a}) .
511 . _Coerce
512 . _Coerce
513-- | Status of the post. Only set for admin-level requests
514-- | Status of the post. Only set for admin-level requests
514−posStatus :: Lens' Post (Maybe Text)
515+posStatus :: Lens' Post' (Maybe Text)
516 = lens _posStatus (\ s a -> s{_posStatus = a})
517 = lens _posStatus (\ s a -> s{_posStatus = a})
518-- | Etag of the resource.
519-- | Etag of the resource.
519−posEtag :: Lens' Post (Maybe Text)
520+posEtag :: Lens' Post' (Maybe Text)
520posEtag = lens _posEtag (\ s a -> s{_posEtag = a})
521posEtag = lens _posEtag (\ s a -> s{_posEtag = a})
522-- | Comment control and display setting for readers of this post.
523-- | Comment control and display setting for readers of this post.
523−posReaderComments :: Lens' Post (Maybe Text)
524+posReaderComments :: Lens' Post' (Maybe Text)
524posReaderComments
525posReaderComments
525 = lens _posReaderComments
526 = lens _posReaderComments
526 (\ s a -> s{_posReaderComments = a})
527 (\ s a -> s{_posReaderComments = a})
528-- | The location for geotagged posts.
529-- | The location for geotagged posts.
529−posLocation :: Lens' Post (Maybe PostLocation)
530+posLocation :: Lens' Post' (Maybe PostLocation)
530posLocation
531posLocation
531 = lens _posLocation (\ s a -> s{_posLocation = a})
532 = lens _posLocation (\ s a -> s{_posLocation = a})
533-- | The kind of this entity. Always blogger#post
534-- | The kind of this entity. Always blogger#post
534−posKind :: Lens' Post Text
535+posKind :: Lens' Post' Text
535posKind = lens _posKind (\ s a -> s{_posKind = a})
536posKind = lens _posKind (\ s a -> s{_posKind = a})
537-- | RFC 3339 date-time when this Post was published.
538-- | RFC 3339 date-time when this Post was published.
538−posPublished :: Lens' Post (Maybe UTCTime)
539+posPublished :: Lens' Post' (Maybe UTCTime)
539posPublished
540posPublished
540 = lens _posPublished (\ s a -> s{_posPublished = a})
541 = lens _posPublished (\ s a -> s{_posPublished = a})
541 . mapping _DateTime
542 . mapping _DateTime
543-- | The URL where this Post is displayed.
544-- | The URL where this Post is displayed.
544−posURL :: Lens' Post (Maybe Text)
545+posURL :: Lens' Post' (Maybe Text)
545posURL = lens _posURL (\ s a -> s{_posURL = a})
546posURL = lens _posURL (\ s a -> s{_posURL = a})
547-- | Data about the blog containing this Post.
548-- | Data about the blog containing this Post.
548−posBlog :: Lens' Post (Maybe PostBlog)
549+posBlog :: Lens' Post' (Maybe PostBlog)
549posBlog = lens _posBlog (\ s a -> s{_posBlog = a})
550posBlog = lens _posBlog (\ s a -> s{_posBlog = a})
551-- | The JSON meta-data for the Post.
552-- | The JSON meta-data for the Post.
552−posCustomMetaData :: Lens' Post (Maybe Text)
553+posCustomMetaData :: Lens' Post' (Maybe Text)
553posCustomMetaData
554posCustomMetaData
554 = lens _posCustomMetaData
555 = lens _posCustomMetaData
555 (\ s a -> s{_posCustomMetaData = a})
556 (\ s a -> s{_posCustomMetaData = a})
557-- | The content of the Post. May contain HTML markup.
558-- | The content of the Post. May contain HTML markup.
558−posContent :: Lens' Post (Maybe Text)
559+posContent :: Lens' Post' (Maybe Text)
559posContent
560posContent
560 = lens _posContent (\ s a -> s{_posContent = a})
561 = lens _posContent (\ s a -> s{_posContent = a})
562-- | The container of comments on this Post.
563-- | The container of comments on this Post.
563−posReplies :: Lens' Post (Maybe PostReplies)
564+posReplies :: Lens' Post' (Maybe PostReplies)
564posReplies
565posReplies
565 = lens _posReplies (\ s a -> s{_posReplies = a})
566 = lens _posReplies (\ s a -> s{_posReplies = a})
567-- | The API REST URL to fetch this resource from.
568-- | The API REST URL to fetch this resource from.
568−posSelfLink :: Lens' Post (Maybe Text)
569+posSelfLink :: Lens' Post' (Maybe Text)
569posSelfLink
570posSelfLink
570 = lens _posSelfLink (\ s a -> s{_posSelfLink = a})
571 = lens _posSelfLink (\ s a -> s{_posSelfLink = a})
572-- | The author of this Post.
573-- | The author of this Post.
573−posAuthor :: Lens' Post (Maybe PostAuthor)
574+posAuthor :: Lens' Post' (Maybe PostAuthor)
575 = lens _posAuthor (\ s a -> s{_posAuthor = a})
576 = lens _posAuthor (\ s a -> s{_posAuthor = a})
577-- | The identifier of this Post.
578-- | The identifier of this Post.
578−posId :: Lens' Post (Maybe Text)
579+posId :: Lens' Post' (Maybe Text)
579posId = lens _posId (\ s a -> s{_posId = a})
580posId = lens _posId (\ s a -> s{_posId = a})
581-- | The list of labels this Post was tagged with.
582-- | The list of labels this Post was tagged with.
582−posLabels :: Lens' Post [Text]
583+posLabels :: Lens' Post' [Text]
584 = lens _posLabels (\ s a -> s{_posLabels = a}) .
585 = lens _posLabels (\ s a -> s{_posLabels = a}) .
586 . _Coerce
587 . _Coerce
588-- | RFC 3339 date-time when this Post was last updated.
589-- | RFC 3339 date-time when this Post was last updated.
589−posUpdated :: Lens' Post (Maybe UTCTime)
590+posUpdated :: Lens' Post' (Maybe UTCTime)
590posUpdated
591posUpdated
591 = lens _posUpdated (\ s a -> s{_posUpdated = a}) .
592 = lens _posUpdated (\ s a -> s{_posUpdated = a}) .
592 mapping _DateTime
593 mapping _DateTime
594-- | The title link URL, similar to atom\'s related link.
595-- | The title link URL, similar to atom\'s related link.
595−posTitleLink :: Lens' Post (Maybe Text)
596+posTitleLink :: Lens' Post' (Maybe Text)
596posTitleLink
597posTitleLink
597 = lens _posTitleLink (\ s a -> s{_posTitleLink = a})
598 = lens _posTitleLink (\ s a -> s{_posTitleLink = a})
599-- | The title of the Post.
600-- | The title of the Post.
600−posTitle :: Lens' Post (Maybe Text)
601+posTitle :: Lens' Post' (Maybe Text)
601posTitle = lens _posTitle (\ s a -> s{_posTitle = a})
602posTitle = lens _posTitle (\ s a -> s{_posTitle = a})
603−instance FromJSON Post where
604+instance FromJSON Post' where
604 parseJSON
605 parseJSON
605 = withObject "Post"
606 = withObject "Post"
607− Post <$>
608+ Post' <$>
608 (o .:? "images" .!= mempty) <*> (o .:? "status") <*>
609 (o .:? "images" .!= mempty) <*> (o .:? "status") <*>
609 (o .:? "etag")
610 (o .:? "etag")
610 <*> (o .:? "readerComments")
611 <*> (o .:? "readerComments")
@@ -624,8 +625,8 @@ instance FromJSON Post where
624 <*> (o .:? "titleLink")
625 <*> (o .:? "titleLink")
625 <*> (o .:? "title"))
626 <*> (o .:? "title"))
627−instance ToJSON Post where
628+instance ToJSON Post' where
628− toJSON Post{..}
629+ toJSON Post'{..}
630 (catMaybes
631 (catMaybes
631 [("images" .=) <$> _posImages,
632 [("images" .=) <$> _posImages,