module Network.Google.Blogger.Types.Sum where
import Network.Google.Prelude
data PostsListOrderBy
= Published
| Updated
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PostsListOrderBy
instance FromText PostsListOrderBy where
fromText = \case
"published" -> Just Published
"updated" -> Just Updated
_ -> Nothing
instance ToText PostsListOrderBy where
toText = \case
Published -> "published"
Updated -> "updated"
instance FromJSON PostsListOrderBy where
parseJSON = parseJSONText "PostsListOrderBy"
instance ToJSON PostsListOrderBy where
toJSON = toJSONText
data PostsListView
= Admin
| Author
| Reader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PostsListView
instance FromText PostsListView where
fromText = \case
"ADMIN" -> Just Admin
"AUTHOR" -> Just Author
"READER" -> Just Reader
_ -> Nothing
instance ToText PostsListView where
toText = \case
Admin -> "ADMIN"
Author -> "AUTHOR"
Reader -> "READER"
instance FromJSON PostsListView where
parseJSON = parseJSONText "PostsListView"
instance ToJSON PostsListView where
toJSON = toJSONText
data PageViewsGetRange
= PVGR30DAYS
| PVGR7DAYS
| PVGRAll
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PageViewsGetRange
instance FromText PageViewsGetRange where
fromText = \case
"30DAYS" -> Just PVGR30DAYS
"7DAYS" -> Just PVGR7DAYS
"all" -> Just PVGRAll
_ -> Nothing
instance ToText PageViewsGetRange where
toText = \case
PVGR30DAYS -> "30DAYS"
PVGR7DAYS -> "7DAYS"
PVGRAll -> "all"
instance FromJSON PageViewsGetRange where
parseJSON = parseJSONText "PageViewsGetRange"
instance ToJSON PageViewsGetRange where
toJSON = toJSONText
data CommentsListView
= CLVAdmin
| CLVAuthor
| CLVReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable CommentsListView
instance FromText CommentsListView where
fromText = \case
"ADMIN" -> Just CLVAdmin
"AUTHOR" -> Just CLVAuthor
"READER" -> Just CLVReader
_ -> Nothing
instance ToText CommentsListView where
toText = \case
CLVAdmin -> "ADMIN"
CLVAuthor -> "AUTHOR"
CLVReader -> "READER"
instance FromJSON CommentsListView where
parseJSON = parseJSONText "CommentsListView"
instance ToJSON CommentsListView where
toJSON = toJSONText
data PostUserInfosListStatus
= Draft
| Live
| Scheduled
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PostUserInfosListStatus
instance FromText PostUserInfosListStatus where
fromText = \case
"draft" -> Just Draft
"live" -> Just Live
"scheduled" -> Just Scheduled
_ -> Nothing
instance ToText PostUserInfosListStatus where
toText = \case
Draft -> "draft"
Live -> "live"
Scheduled -> "scheduled"
instance FromJSON PostUserInfosListStatus where
parseJSON = parseJSONText "PostUserInfosListStatus"
instance ToJSON PostUserInfosListStatus where
toJSON = toJSONText
data PostsGetView
= PGVAdmin
| PGVAuthor
| PGVReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PostsGetView
instance FromText PostsGetView where
fromText = \case
"ADMIN" -> Just PGVAdmin
"AUTHOR" -> Just PGVAuthor
"READER" -> Just PGVReader
_ -> Nothing
instance ToText PostsGetView where
toText = \case
PGVAdmin -> "ADMIN"
PGVAuthor -> "AUTHOR"
PGVReader -> "READER"
instance FromJSON PostsGetView where
parseJSON = parseJSONText "PostsGetView"
instance ToJSON PostsGetView where
toJSON = toJSONText
data PostsSearchOrderBy
= PSOBPublished
| PSOBUpdated
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PostsSearchOrderBy
instance FromText PostsSearchOrderBy where
fromText = \case
"published" -> Just PSOBPublished
"updated" -> Just PSOBUpdated
_ -> Nothing
instance ToText PostsSearchOrderBy where
toText = \case
PSOBPublished -> "published"
PSOBUpdated -> "updated"
instance FromJSON PostsSearchOrderBy where
parseJSON = parseJSONText "PostsSearchOrderBy"
instance ToJSON PostsSearchOrderBy where
toJSON = toJSONText
data CommentsListByBlogStatus
= CLBBSEmptied
| CLBBSLive
| CLBBSPending
| CLBBSSpam
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable CommentsListByBlogStatus
instance FromText CommentsListByBlogStatus where
fromText = \case
"emptied" -> Just CLBBSEmptied
"live" -> Just CLBBSLive
"pending" -> Just CLBBSPending
"spam" -> Just CLBBSSpam
_ -> Nothing
instance ToText CommentsListByBlogStatus where
toText = \case
CLBBSEmptied -> "emptied"
CLBBSLive -> "live"
CLBBSPending -> "pending"
CLBBSSpam -> "spam"
instance FromJSON CommentsListByBlogStatus where
parseJSON = parseJSONText "CommentsListByBlogStatus"
instance ToJSON CommentsListByBlogStatus where
toJSON = toJSONText
data PagesGetView
= PAdmin
| PAuthor
| PReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PagesGetView
instance FromText PagesGetView where
fromText = \case
"ADMIN" -> Just PAdmin
"AUTHOR" -> Just PAuthor
"READER" -> Just PReader
_ -> Nothing
instance ToText PagesGetView where
toText = \case
PAdmin -> "ADMIN"
PAuthor -> "AUTHOR"
PReader -> "READER"
instance FromJSON PagesGetView where
parseJSON = parseJSONText "PagesGetView"
instance ToJSON PagesGetView where
toJSON = toJSONText
data PostUserInfosListOrderBy
= PUILOBPublished
| PUILOBUpdated
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PostUserInfosListOrderBy
instance FromText PostUserInfosListOrderBy where
fromText = \case
"published" -> Just PUILOBPublished
"updated" -> Just PUILOBUpdated
_ -> Nothing
instance ToText PostUserInfosListOrderBy where
toText = \case
PUILOBPublished -> "published"
PUILOBUpdated -> "updated"
instance FromJSON PostUserInfosListOrderBy where
parseJSON = parseJSONText "PostUserInfosListOrderBy"
instance ToJSON PostUserInfosListOrderBy where
toJSON = toJSONText
data BlogsGetView
= BGVAdmin
| BGVAuthor
| BGVReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable BlogsGetView
instance FromText BlogsGetView where
fromText = \case
"ADMIN" -> Just BGVAdmin
"AUTHOR" -> Just BGVAuthor
"READER" -> Just BGVReader
_ -> Nothing
instance ToText BlogsGetView where
toText = \case
BGVAdmin -> "ADMIN"
BGVAuthor -> "AUTHOR"
BGVReader -> "READER"
instance FromJSON BlogsGetView where
parseJSON = parseJSONText "BlogsGetView"
instance ToJSON BlogsGetView where
toJSON = toJSONText
data BlogsGetByURLView
= BGBUVAdmin
| BGBUVAuthor
| BGBUVReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable BlogsGetByURLView
instance FromText BlogsGetByURLView where
fromText = \case
"ADMIN" -> Just BGBUVAdmin
"AUTHOR" -> Just BGBUVAuthor
"READER" -> Just BGBUVReader
_ -> Nothing
instance ToText BlogsGetByURLView where
toText = \case
BGBUVAdmin -> "ADMIN"
BGBUVAuthor -> "AUTHOR"
BGBUVReader -> "READER"
instance FromJSON BlogsGetByURLView where
parseJSON = parseJSONText "BlogsGetByURLView"
instance ToJSON BlogsGetByURLView where
toJSON = toJSONText
data CommentsListStatus
= CLSEmptied
| CLSLive
| CLSPending
| CLSSpam
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable CommentsListStatus
instance FromText CommentsListStatus where
fromText = \case
"emptied" -> Just CLSEmptied
"live" -> Just CLSLive
"pending" -> Just CLSPending
"spam" -> Just CLSSpam
_ -> Nothing
instance ToText CommentsListStatus where
toText = \case
CLSEmptied -> "emptied"
CLSLive -> "live"
CLSPending -> "pending"
CLSSpam -> "spam"
instance FromJSON CommentsListStatus where
parseJSON = parseJSONText "CommentsListStatus"
instance ToJSON CommentsListStatus where
toJSON = toJSONText
data BlogsListByUserStatus
= BLBUSDeleted
| BLBUSLive
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable BlogsListByUserStatus
instance FromText BlogsListByUserStatus where
fromText = \case
"DELETED" -> Just BLBUSDeleted
"LIVE" -> Just BLBUSLive
_ -> Nothing
instance ToText BlogsListByUserStatus where
toText = \case
BLBUSDeleted -> "DELETED"
BLBUSLive -> "LIVE"
instance FromJSON BlogsListByUserStatus where
parseJSON = parseJSONText "BlogsListByUserStatus"
instance ToJSON BlogsListByUserStatus where
toJSON = toJSONText
data PagesListView
= PLVAdmin
| PLVAuthor
| PLVReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PagesListView
instance FromText PagesListView where
fromText = \case
"ADMIN" -> Just PLVAdmin
"AUTHOR" -> Just PLVAuthor
"READER" -> Just PLVReader
_ -> Nothing
instance ToText PagesListView where
toText = \case
PLVAdmin -> "ADMIN"
PLVAuthor -> "AUTHOR"
PLVReader -> "READER"
instance FromJSON PagesListView where
parseJSON = parseJSONText "PagesListView"
instance ToJSON PagesListView where
toJSON = toJSONText
data PostsListStatus
= PLSDraft
| PLSLive
| PLSScheduled
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PostsListStatus
instance FromText PostsListStatus where
fromText = \case
"draft" -> Just PLSDraft
"live" -> Just PLSLive
"scheduled" -> Just PLSScheduled
_ -> Nothing
instance ToText PostsListStatus where
toText = \case
PLSDraft -> "draft"
PLSLive -> "live"
PLSScheduled -> "scheduled"
instance FromJSON PostsListStatus where
parseJSON = parseJSONText "PostsListStatus"
instance ToJSON PostsListStatus where
toJSON = toJSONText
data BlogsListByUserView
= BLBUVAdmin
| BLBUVAuthor
| BLBUVReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable BlogsListByUserView
instance FromText BlogsListByUserView where
fromText = \case
"ADMIN" -> Just BLBUVAdmin
"AUTHOR" -> Just BLBUVAuthor
"READER" -> Just BLBUVReader
_ -> Nothing
instance ToText BlogsListByUserView where
toText = \case
BLBUVAdmin -> "ADMIN"
BLBUVAuthor -> "AUTHOR"
BLBUVReader -> "READER"
instance FromJSON BlogsListByUserView where
parseJSON = parseJSONText "BlogsListByUserView"
instance ToJSON BlogsListByUserView where
toJSON = toJSONText
data PostUserInfosListView
= PUILVAdmin
| PUILVAuthor
| PUILVReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PostUserInfosListView
instance FromText PostUserInfosListView where
fromText = \case
"ADMIN" -> Just PUILVAdmin
"AUTHOR" -> Just PUILVAuthor
"READER" -> Just PUILVReader
_ -> Nothing
instance ToText PostUserInfosListView where
toText = \case
PUILVAdmin -> "ADMIN"
PUILVAuthor -> "AUTHOR"
PUILVReader -> "READER"
instance FromJSON PostUserInfosListView where
parseJSON = parseJSONText "PostUserInfosListView"
instance ToJSON PostUserInfosListView where
toJSON = toJSONText
data CommentsGetView
= CGVAdmin
| CGVAuthor
| CGVReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable CommentsGetView
instance FromText CommentsGetView where
fromText = \case
"ADMIN" -> Just CGVAdmin
"AUTHOR" -> Just CGVAuthor
"READER" -> Just CGVReader
_ -> Nothing
instance ToText CommentsGetView where
toText = \case
CGVAdmin -> "ADMIN"
CGVAuthor -> "AUTHOR"
CGVReader -> "READER"
instance FromJSON CommentsGetView where
parseJSON = parseJSONText "CommentsGetView"
instance ToJSON CommentsGetView where
toJSON = toJSONText
data PostsGetByPathView
= PGBPVAdmin
| PGBPVAuthor
| PGBPVReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PostsGetByPathView
instance FromText PostsGetByPathView where
fromText = \case
"ADMIN" -> Just PGBPVAdmin
"AUTHOR" -> Just PGBPVAuthor
"READER" -> Just PGBPVReader
_ -> Nothing
instance ToText PostsGetByPathView where
toText = \case
PGBPVAdmin -> "ADMIN"
PGBPVAuthor -> "AUTHOR"
PGBPVReader -> "READER"
instance FromJSON PostsGetByPathView where
parseJSON = parseJSONText "PostsGetByPathView"
instance ToJSON PostsGetByPathView where
toJSON = toJSONText
data PagesListStatus
= PDraft
| PLive
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable PagesListStatus
instance FromText PagesListStatus where
fromText = \case
"draft" -> Just PDraft
"live" -> Just PLive
_ -> Nothing
instance ToText PagesListStatus where
toText = \case
PDraft -> "draft"
PLive -> "live"
instance FromJSON PagesListStatus where
parseJSON = parseJSONText "PagesListStatus"
instance ToJSON PagesListStatus where
toJSON = toJSONText
data BlogsListByUserRole
= BLBURAdmin
| BLBURAuthor
| BLBURReader
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable BlogsListByUserRole
instance FromText BlogsListByUserRole where
fromText = \case
"ADMIN" -> Just BLBURAdmin
"AUTHOR" -> Just BLBURAuthor
"READER" -> Just BLBURReader
_ -> Nothing
instance ToText BlogsListByUserRole where
toText = \case
BLBURAdmin -> "ADMIN"
BLBURAuthor -> "AUTHOR"
BLBURReader -> "READER"
instance FromJSON BlogsListByUserRole where
parseJSON = parseJSONText "BlogsListByUserRole"
instance ToJSON BlogsListByUserRole where
toJSON = toJSONText