packages feed

gogol-apps-activity 0.0.1 → 0.1.0

raw patch · 7 files changed

+187/−137 lines, 7 filesdep ~gogol-corePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: gogol-core

API changes (from Hackage documentation)

- Network.Google.AppsActivity.Types: driveMetadataReadonlyScope :: OAuthScope
- Network.Google.AppsActivity.Types: driveReadonlyScope :: OAuthScope
- Network.Google.Resource.AppsActivity.Activities.List: instance GHC.Generics.Constructor Network.Google.Resource.AppsActivity.Activities.List.C1_0ActivitiesList
- Network.Google.Resource.AppsActivity.Activities.List: instance GHC.Generics.Datatype Network.Google.Resource.AppsActivity.Activities.List.D1ActivitiesList
- Network.Google.Resource.AppsActivity.Activities.List: instance GHC.Generics.Selector Network.Google.Resource.AppsActivity.Activities.List.S1_0_0ActivitiesList
- Network.Google.Resource.AppsActivity.Activities.List: instance GHC.Generics.Selector Network.Google.Resource.AppsActivity.Activities.List.S1_0_1ActivitiesList
- Network.Google.Resource.AppsActivity.Activities.List: instance GHC.Generics.Selector Network.Google.Resource.AppsActivity.Activities.List.S1_0_2ActivitiesList
- Network.Google.Resource.AppsActivity.Activities.List: instance GHC.Generics.Selector Network.Google.Resource.AppsActivity.Activities.List.S1_0_3ActivitiesList
- Network.Google.Resource.AppsActivity.Activities.List: instance GHC.Generics.Selector Network.Google.Resource.AppsActivity.Activities.List.S1_0_4ActivitiesList
- Network.Google.Resource.AppsActivity.Activities.List: instance GHC.Generics.Selector Network.Google.Resource.AppsActivity.Activities.List.S1_0_5ActivitiesList
- Network.Google.Resource.AppsActivity.Activities.List: instance GHC.Generics.Selector Network.Google.Resource.AppsActivity.Activities.List.S1_0_6ActivitiesList
+ Network.Google.AppsActivity: activityScope :: Proxy '["https://www.googleapis.com/auth/activity"]
+ Network.Google.AppsActivity: driveMetadataReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/drive.metadata.readonly"]
+ Network.Google.AppsActivity: driveMetadataScope :: Proxy '["https://www.googleapis.com/auth/drive.metadata"]
+ Network.Google.AppsActivity: driveReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/drive.readonly"]
+ Network.Google.AppsActivity: driveScope :: Proxy '["https://www.googleapis.com/auth/drive"]
+ Network.Google.AppsActivity: uIsDeleted :: Lens' User (Maybe Bool)
+ Network.Google.AppsActivity: uPermissionId :: Lens' User (Maybe Text)
+ Network.Google.AppsActivity.Types: driveMetadataReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/drive.metadata.readonly"]
+ Network.Google.AppsActivity.Types: driveReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/drive.readonly"]
+ Network.Google.AppsActivity.Types: uIsDeleted :: Lens' User (Maybe Bool)
+ Network.Google.AppsActivity.Types: uPermissionId :: Lens' User (Maybe Text)
- Network.Google.AppsActivity: appsActivityService :: Service
+ Network.Google.AppsActivity: appsActivityService :: ServiceConfig
- Network.Google.AppsActivity.Types: activityScope :: OAuthScope
+ Network.Google.AppsActivity.Types: activityScope :: Proxy '["https://www.googleapis.com/auth/activity"]
- Network.Google.AppsActivity.Types: appsActivityService :: Service
+ Network.Google.AppsActivity.Types: appsActivityService :: ServiceConfig
- Network.Google.AppsActivity.Types: driveMetadataScope :: OAuthScope
+ Network.Google.AppsActivity.Types: driveMetadataScope :: Proxy '["https://www.googleapis.com/auth/drive.metadata"]
- Network.Google.AppsActivity.Types: driveScope :: OAuthScope
+ Network.Google.AppsActivity.Types: driveScope :: Proxy '["https://www.googleapis.com/auth/drive"]

Files

README.md view
@@ -8,7 +8,7 @@  ## Version -`0.0.1`+`0.1.0`   ## Description@@ -18,9 +18,9 @@  ## Contribute -For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).+For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/gogol/issues). -> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+> _Note:_ this library is an auto-generated Haskell package. Please see `gogol-gen` for more information.   ## Licence
gen/Network/Google/AppsActivity.hs view
@@ -7,7 +7,7 @@  -- | -- Module      : Network.Google.AppsActivity--- Copyright   : (c) 2015 Brendan Hay+-- Copyright   : (c) 2015-2016 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com> -- Stability   : auto-generated@@ -21,6 +21,13 @@     -- * Service Configuration       appsActivityService +    -- * OAuth Scopes+    , driveMetadataReadOnlyScope+    , activityScope+    , driveReadOnlyScope+    , driveScope+    , driveMetadataScope+     -- * API Declaration     , AppsActivityAPI @@ -81,7 +88,9 @@     , User     , user     , uPhoto+    , uIsDeleted     , uName+    , uPermissionId      -- ** EventAdditionalEventTypesItem     , EventAdditionalEventTypesItem (..)
gen/Network/Google/AppsActivity/Types.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DataKinds          #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric      #-} {-# LANGUAGE NoImplicitPrelude  #-}@@ -7,7 +8,7 @@  -- | -- Module      : Network.Google.AppsActivity.Types--- Copyright   : (c) 2015 Brendan Hay+-- Copyright   : (c) 2015-2016 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com> -- Stability   : auto-generated@@ -19,9 +20,9 @@       appsActivityService      -- * OAuth Scopes-    , driveMetadataReadonlyScope+    , driveMetadataReadOnlyScope     , activityScope-    , driveReadonlyScope+    , driveReadOnlyScope     , driveScope     , driveMetadataScope @@ -75,7 +76,9 @@     , User     , user     , uPhoto+    , uIsDeleted     , uName+    , uPermissionId      -- * EventAdditionalEventTypesItem     , EventAdditionalEventTypesItem (..)@@ -124,27 +127,27 @@ import           Network.Google.Prelude  -- | Default request referring to version 'v1' of the Google Apps Activity API. This contains the host and root path used as a starting point for constructing service requests.-appsActivityService :: Service+appsActivityService :: ServiceConfig appsActivityService   = defaultService (ServiceId "appsactivity:v1")       "www.googleapis.com"  -- | View metadata for files in your Google Drive-driveMetadataReadonlyScope :: OAuthScope-driveMetadataReadonlyScope = "https://www.googleapis.com/auth/drive.metadata.readonly";+driveMetadataReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/drive.metadata.readonly"]+driveMetadataReadOnlyScope = Proxy;  -- | View the activity history of your Google Apps-activityScope :: OAuthScope-activityScope = "https://www.googleapis.com/auth/activity";+activityScope :: Proxy '["https://www.googleapis.com/auth/activity"]+activityScope = Proxy;  -- | View the files in your Google Drive-driveReadonlyScope :: OAuthScope-driveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly";+driveReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/drive.readonly"]+driveReadOnlyScope = Proxy;  -- | View and manage the files in your Google Drive-driveScope :: OAuthScope-driveScope = "https://www.googleapis.com/auth/drive";+driveScope :: Proxy '["https://www.googleapis.com/auth/drive"]+driveScope = Proxy;  -- | View and manage metadata of files in your Google Drive-driveMetadataScope :: OAuthScope-driveMetadataScope = "https://www.googleapis.com/auth/drive.metadata";+driveMetadataScope :: Proxy '["https://www.googleapis.com/auth/drive.metadata"]+driveMetadataScope = Proxy;
gen/Network/Google/AppsActivity/Types/Product.hs view
@@ -9,7 +9,7 @@  -- | -- Module      : Network.Google.AppsActivity.Types.Product--- Copyright   : (c) 2015 Brendan Hay+-- Copyright   : (c) 2015-2016 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com> -- Stability   : auto-generated@@ -24,7 +24,7 @@ -- Drive is a parent for all files within it. -- -- /See:/ 'parent' smart constructor.-data Parent = Parent+data Parent = Parent'     { _pIsRoot :: !(Maybe Bool)     , _pId     :: !(Maybe Text)     , _pTitle  :: !(Maybe Text)@@ -42,7 +42,7 @@ parent     :: Parent parent =-    Parent+    Parent'     { _pIsRoot = Nothing     , _pId = Nothing     , _pTitle = Nothing@@ -64,12 +64,12 @@         parseJSON           = withObject "Parent"               (\ o ->-                 Parent <$>+                 Parent' <$>                    (o .:? "isRoot") <*> (o .:? "id") <*>                      (o .:? "title"))  instance ToJSON Parent where-        toJSON Parent{..}+        toJSON Parent'{..}           = object               (catMaybes                  [("isRoot" .=) <$> _pIsRoot, ("id" .=) <$> _pId,@@ -78,7 +78,7 @@ -- | Photo information for a user. -- -- /See:/ 'photo' smart constructor.-newtype Photo = Photo+newtype Photo = Photo'     { _pURL :: Maybe Text     } deriving (Eq,Show,Data,Typeable,Generic) @@ -90,7 +90,7 @@ photo     :: Photo photo =-    Photo+    Photo'     { _pURL = Nothing     } @@ -100,16 +100,17 @@  instance FromJSON Photo where         parseJSON-          = withObject "Photo" (\ o -> Photo <$> (o .:? "url"))+          = withObject "Photo"+              (\ o -> Photo' <$> (o .:? "url"))  instance ToJSON Photo where-        toJSON Photo{..}+        toJSON Photo'{..}           = object (catMaybes [("url" .=) <$> _pURL])  -- | Represents the changes associated with an action taken by a user. -- -- /See:/ 'event' smart constructor.-data Event = Event+data Event = Event'     { _ePrimaryEventType     :: !(Maybe EventPrimaryEventType)     , _eUser                 :: !(Maybe User)     , _eEventTimeMillis      :: !(Maybe (Textual Word64))@@ -145,7 +146,7 @@ event     :: Event event =-    Event+    Event'     { _ePrimaryEventType = Nothing     , _eUser = Nothing     , _eEventTimeMillis = Nothing@@ -218,7 +219,7 @@         parseJSON           = withObject "Event"               (\ o ->-                 Event <$>+                 Event' <$>                    (o .:? "primaryEventType") <*> (o .:? "user") <*>                      (o .:? "eventTimeMillis")                      <*> (o .:? "rename")@@ -229,7 +230,7 @@                      <*> (o .:? "move"))  instance ToJSON Event where-        toJSON Event{..}+        toJSON Event'{..}           = object               (catMaybes                  [("primaryEventType" .=) <$> _ePrimaryEventType,@@ -246,7 +247,7 @@ -- token to retrieve the next page of results. -- -- /See:/ 'listActivitiesResponse' smart constructor.-data ListActivitiesResponse = ListActivitiesResponse+data ListActivitiesResponse = ListActivitiesResponse'     { _larNextPageToken :: !(Maybe Text)     , _larActivities    :: !(Maybe [Activity])     } deriving (Eq,Show,Data,Typeable,Generic)@@ -261,7 +262,7 @@ listActivitiesResponse     :: ListActivitiesResponse listActivitiesResponse =-    ListActivitiesResponse+    ListActivitiesResponse'     { _larNextPageToken = Nothing     , _larActivities = Nothing     }@@ -284,12 +285,12 @@         parseJSON           = withObject "ListActivitiesResponse"               (\ o ->-                 ListActivitiesResponse <$>+                 ListActivitiesResponse' <$>                    (o .:? "nextPageToken") <*>                      (o .:? "activities" .!= mempty))  instance ToJSON ListActivitiesResponse where-        toJSON ListActivitiesResponse{..}+        toJSON ListActivitiesResponse'{..}           = object               (catMaybes                  [("nextPageToken" .=) <$> _larNextPageToken,@@ -299,7 +300,7 @@ -- a result of a permissionChange type event. -- -- /See:/ 'permissionChange' smart constructor.-data PermissionChange = PermissionChange+data PermissionChange = PermissionChange'     { _pcAddedPermissions   :: !(Maybe [Permission])     , _pcRemovedPermissions :: !(Maybe [Permission])     } deriving (Eq,Show,Data,Typeable,Generic)@@ -314,7 +315,7 @@ permissionChange     :: PermissionChange permissionChange =-    PermissionChange+    PermissionChange'     { _pcAddedPermissions = Nothing     , _pcRemovedPermissions = Nothing     }@@ -339,12 +340,12 @@         parseJSON           = withObject "PermissionChange"               (\ o ->-                 PermissionChange <$>+                 PermissionChange' <$>                    (o .:? "addedPermissions" .!= mempty) <*>                      (o .:? "removedPermissions" .!= mempty))  instance ToJSON PermissionChange where-        toJSON PermissionChange{..}+        toJSON PermissionChange'{..}           = object               (catMaybes                  [("addedPermissions" .=) <$> _pcAddedPermissions,@@ -353,9 +354,11 @@ -- | A representation of a user. -- -- /See:/ 'user' smart constructor.-data User = User-    { _uPhoto :: !(Maybe Photo)-    , _uName  :: !(Maybe Text)+data User = User'+    { _uPhoto        :: !(Maybe Photo)+    , _uIsDeleted    :: !(Maybe Bool)+    , _uName         :: !(Maybe Text)+    , _uPermissionId :: !(Maybe Text)     } deriving (Eq,Show,Data,Typeable,Generic)  -- | Creates a value of 'User' with the minimum fields required to make a request.@@ -364,40 +367,68 @@ -- -- * 'uPhoto' --+-- * 'uIsDeleted'+-- -- * 'uName'+--+-- * 'uPermissionId' user     :: User user =-    User+    User'     { _uPhoto = Nothing+    , _uIsDeleted = Nothing     , _uName = Nothing+    , _uPermissionId = Nothing     } --- | The profile photo of the user.+-- | The profile photo of the user. Not present if the user has no profile+-- photo. uPhoto :: Lens' User (Maybe Photo) uPhoto = lens _uPhoto (\ s a -> s{_uPhoto = a}) +-- | A boolean which indicates whether the specified User was deleted. If+-- true, name, photo and permission_id will be omitted.+uIsDeleted :: Lens' User (Maybe Bool)+uIsDeleted+  = lens _uIsDeleted (\ s a -> s{_uIsDeleted = a})+ -- | The displayable name of the user. uName :: Lens' User (Maybe Text) uName = lens _uName (\ s a -> s{_uName = a}) +-- | The permission ID associated with this user. Equivalent to the Drive+-- API\'s permission ID for this user, returned as part of the Drive+-- Permissions resource.+uPermissionId :: Lens' User (Maybe Text)+uPermissionId+  = lens _uPermissionId+      (\ s a -> s{_uPermissionId = a})+ instance FromJSON User where         parseJSON           = withObject "User"-              (\ o -> User <$> (o .:? "photo") <*> (o .:? "name"))+              (\ o ->+                 User' <$>+                   (o .:? "photo") <*> (o .:? "isDeleted") <*>+                     (o .:? "name")+                     <*> (o .:? "permissionId"))  instance ToJSON User where-        toJSON User{..}+        toJSON User'{..}           = object               (catMaybes-                 [("photo" .=) <$> _uPhoto, ("name" .=) <$> _uName])+                 [("photo" .=) <$> _uPhoto,+                  ("isDeleted" .=) <$> _uIsDeleted,+                  ("name" .=) <$> _uName,+                  ("permissionId" .=) <$> _uPermissionId])  -- | An Activity resource is a combined view of multiple events. An activity -- has a list of individual events and a combined view of the common fields -- among all events. -- -- /See:/ 'activity' smart constructor.-data Activity = Activity+data Activity = Activity'     { _aSingleEvents  :: !(Maybe [Event])     , _aCombinedEvent :: !(Maybe Event)     } deriving (Eq,Show,Data,Typeable,Generic)@@ -412,7 +443,7 @@ activity     :: Activity activity =-    Activity+    Activity'     { _aSingleEvents = Nothing     , _aCombinedEvent = Nothing     }@@ -435,12 +466,12 @@         parseJSON           = withObject "Activity"               (\ o ->-                 Activity <$>+                 Activity' <$>                    (o .:? "singleEvents" .!= mempty) <*>                      (o .:? "combinedEvent"))  instance ToJSON Activity where-        toJSON Activity{..}+        toJSON Activity'{..}           = object               (catMaybes                  [("singleEvents" .=) <$> _aSingleEvents,@@ -449,7 +480,7 @@ -- | Contains information about a renametype event. -- -- /See:/ 'rename' smart constructor.-data Rename = Rename+data Rename = Rename'     { _rNewTitle :: !(Maybe Text)     , _rOldTitle :: !(Maybe Text)     } deriving (Eq,Show,Data,Typeable,Generic)@@ -464,7 +495,7 @@ rename     :: Rename rename =-    Rename+    Rename'     { _rNewTitle = Nothing     , _rOldTitle = Nothing     }@@ -483,10 +514,11 @@         parseJSON           = withObject "Rename"               (\ o ->-                 Rename <$> (o .:? "newTitle") <*> (o .:? "oldTitle"))+                 Rename' <$>+                   (o .:? "newTitle") <*> (o .:? "oldTitle"))  instance ToJSON Rename where-        toJSON Rename{..}+        toJSON Rename'{..}           = object               (catMaybes                  [("newTitle" .=) <$> _rNewTitle,@@ -497,7 +529,7 @@ -- contained in a corresponding Drive Permissions object. -- -- /See:/ 'permission' smart constructor.-data Permission = Permission+data Permission = Permission'     { _pWithLink     :: !(Maybe Bool)     , _pUser         :: !(Maybe User)     , _pRole         :: !(Maybe PermissionRole)@@ -524,7 +556,7 @@ permission     :: Permission permission =-    Permission+    Permission'     { _pWithLink = Nothing     , _pUser = Nothing     , _pRole = Nothing@@ -566,7 +598,7 @@         parseJSON           = withObject "Permission"               (\ o ->-                 Permission <$>+                 Permission' <$>                    (o .:? "withLink") <*> (o .:? "user") <*>                      (o .:? "role")                      <*> (o .:? "name")@@ -574,7 +606,7 @@                      <*> (o .:? "permissionId"))  instance ToJSON Permission where-        toJSON Permission{..}+        toJSON Permission'{..}           = object               (catMaybes                  [("withLink" .=) <$> _pWithLink,@@ -585,7 +617,7 @@ -- | Information about the object modified by the event. -- -- /See:/ 'target' smart constructor.-data Target = Target+data Target = Target'     { _tMimeType :: !(Maybe Text)     , _tName     :: !(Maybe Text)     , _tId       :: !(Maybe Text)@@ -603,7 +635,7 @@ target     :: Target target =-    Target+    Target'     { _tMimeType = Nothing     , _tName = Nothing     , _tId = Nothing@@ -628,12 +660,12 @@         parseJSON           = withObject "Target"               (\ o ->-                 Target <$>+                 Target' <$>                    (o .:? "mimeType") <*> (o .:? "name") <*>                      (o .:? "id"))  instance ToJSON Target where-        toJSON Target{..}+        toJSON Target'{..}           = object               (catMaybes                  [("mimeType" .=) <$> _tMimeType,@@ -643,7 +675,7 @@ -- of a move type event. -- -- /See:/ 'move' smart constructor.-data Move = Move+data Move = Move'     { _mAddedParents   :: !(Maybe [Parent])     , _mRemovedParents :: !(Maybe [Parent])     } deriving (Eq,Show,Data,Typeable,Generic)@@ -658,7 +690,7 @@ move     :: Move move =-    Move+    Move'     { _mAddedParents = Nothing     , _mRemovedParents = Nothing     }@@ -683,12 +715,12 @@         parseJSON           = withObject "Move"               (\ o ->-                 Move <$>+                 Move' <$>                    (o .:? "addedParents" .!= mempty) <*>                      (o .:? "removedParents" .!= mempty))  instance ToJSON Move where-        toJSON Move{..}+        toJSON Move'{..}           = object               (catMaybes                  [("addedParents" .=) <$> _mAddedParents,
gen/Network/Google/AppsActivity/Types/Sum.hs view
@@ -8,7 +8,7 @@  -- | -- Module      : Network.Google.AppsActivity.Types.Sum--- Copyright   : (c) 2015 Brendan Hay+-- Copyright   : (c) 2015-2016 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com> -- Stability   : auto-generated@@ -42,27 +42,27 @@       -- ^ @untrash@     | EPETUpload       -- ^ @upload@-      deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)  instance Hashable EventPrimaryEventType -instance FromText EventPrimaryEventType where-    fromText = \case-        "comment" -> Just EPETComment-        "create" -> Just EPETCreate-        "edit" -> Just EPETEdit-        "emptyTrash" -> Just EPETEmptyTrash-        "move" -> Just EPETMove-        "permissionChange" -> Just EPETPermissionChange-        "rename" -> Just EPETRename-        "trash" -> Just EPETTrash-        "unknown" -> Just EPETUnknown-        "untrash" -> Just EPETUntrash-        "upload" -> Just EPETUpload-        _ -> Nothing+instance FromHttpApiData EventPrimaryEventType where+    parseQueryParam = \case+        "comment" -> Right EPETComment+        "create" -> Right EPETCreate+        "edit" -> Right EPETEdit+        "emptyTrash" -> Right EPETEmptyTrash+        "move" -> Right EPETMove+        "permissionChange" -> Right EPETPermissionChange+        "rename" -> Right EPETRename+        "trash" -> Right EPETTrash+        "unknown" -> Right EPETUnknown+        "untrash" -> Right EPETUntrash+        "upload" -> Right EPETUpload+        x -> Left ("Unable to parse EventPrimaryEventType from: " <> x) -instance ToText EventPrimaryEventType where-    toText = \case+instance ToHttpApiData EventPrimaryEventType where+    toQueryParam = \case         EPETComment -> "comment"         EPETCreate -> "create"         EPETEdit -> "edit"@@ -92,20 +92,20 @@       -- ^ @reader@     | Writer       -- ^ @writer@-      deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)  instance Hashable PermissionRole -instance FromText PermissionRole where-    fromText = \case-        "commenter" -> Just Commenter-        "owner" -> Just Owner-        "reader" -> Just Reader-        "writer" -> Just Writer-        _ -> Nothing+instance FromHttpApiData PermissionRole where+    parseQueryParam = \case+        "commenter" -> Right Commenter+        "owner" -> Right Owner+        "reader" -> Right Reader+        "writer" -> Right Writer+        x -> Left ("Unable to parse PermissionRole from: " <> x) -instance ToText PermissionRole where-    toText = \case+instance ToHttpApiData PermissionRole where+    toQueryParam = \case         Commenter -> "commenter"         Owner -> "owner"         Reader -> "reader"@@ -127,20 +127,20 @@       -- ^ @group@     | PTUser       -- ^ @user@-      deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)  instance Hashable PermissionType -instance FromText PermissionType where-    fromText = \case-        "anyone" -> Just PTAnyone-        "domain" -> Just PTDomain-        "group" -> Just PTGroup-        "user" -> Just PTUser-        _ -> Nothing+instance FromHttpApiData PermissionType where+    parseQueryParam = \case+        "anyone" -> Right PTAnyone+        "domain" -> Right PTDomain+        "group" -> Right PTGroup+        "user" -> Right PTUser+        x -> Left ("Unable to parse PermissionType from: " <> x) -instance ToText PermissionType where-    toText = \case+instance ToHttpApiData PermissionType where+    toQueryParam = \case         PTAnyone -> "anyone"         PTDomain -> "domain"         PTGroup -> "group"@@ -175,27 +175,27 @@       -- ^ @untrash@     | EAETIUpload       -- ^ @upload@-      deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)  instance Hashable EventAdditionalEventTypesItem -instance FromText EventAdditionalEventTypesItem where-    fromText = \case-        "comment" -> Just EAETIComment-        "create" -> Just EAETICreate-        "edit" -> Just EAETIEdit-        "emptyTrash" -> Just EAETIEmptyTrash-        "move" -> Just EAETIMove-        "permissionChange" -> Just EAETIPermissionChange-        "rename" -> Just EAETIRename-        "trash" -> Just EAETITrash-        "unknown" -> Just EAETIUnknown-        "untrash" -> Just EAETIUntrash-        "upload" -> Just EAETIUpload-        _ -> Nothing+instance FromHttpApiData EventAdditionalEventTypesItem where+    parseQueryParam = \case+        "comment" -> Right EAETIComment+        "create" -> Right EAETICreate+        "edit" -> Right EAETIEdit+        "emptyTrash" -> Right EAETIEmptyTrash+        "move" -> Right EAETIMove+        "permissionChange" -> Right EAETIPermissionChange+        "rename" -> Right EAETIRename+        "trash" -> Right EAETITrash+        "unknown" -> Right EAETIUnknown+        "untrash" -> Right EAETIUntrash+        "upload" -> Right EAETIUpload+        x -> Left ("Unable to parse EventAdditionalEventTypesItem from: " <> x) -instance ToText EventAdditionalEventTypesItem where-    toText = \case+instance ToHttpApiData EventAdditionalEventTypesItem where+    toQueryParam = \case         EAETIComment -> "comment"         EAETICreate -> "create"         EAETIEdit -> "edit"@@ -221,18 +221,18 @@       -- ^ @driveUi@     | None       -- ^ @none@-      deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)  instance Hashable ActivitiesListGroupingStrategy -instance FromText ActivitiesListGroupingStrategy where-    fromText = \case-        "driveUi" -> Just DriveUi-        "none" -> Just None-        _ -> Nothing+instance FromHttpApiData ActivitiesListGroupingStrategy where+    parseQueryParam = \case+        "driveUi" -> Right DriveUi+        "none" -> Right None+        x -> Left ("Unable to parse ActivitiesListGroupingStrategy from: " <> x) -instance ToText ActivitiesListGroupingStrategy where-    toText = \case+instance ToHttpApiData ActivitiesListGroupingStrategy where+    toQueryParam = \case         DriveUi -> "driveUi"         None -> "none" 
gen/Network/Google/Resource/AppsActivity/Activities/List.hs view
@@ -14,7 +14,7 @@  -- | -- Module      : Network.Google.Resource.AppsActivity.Activities.List--- Copyright   : (c) 2015 Brendan Hay+-- Copyright   : (c) 2015-2016 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com> -- Stability   : auto-generated@@ -76,7 +76,7 @@ -- using the source parameter. -- -- /See:/ 'activitiesList' smart constructor.-data ActivitiesList = ActivitiesList+data ActivitiesList = ActivitiesList'     { _alDriveFileId      :: !(Maybe Text)     , _alDriveAncestorId  :: !(Maybe Text)     , _alGroupingStrategy :: !ActivitiesListGroupingStrategy@@ -106,7 +106,7 @@ activitiesList     :: ActivitiesList activitiesList =-    ActivitiesList+    ActivitiesList'     { _alDriveFileId = Nothing     , _alDriveAncestorId = Nothing     , _alGroupingStrategy = DriveUi@@ -160,7 +160,13 @@  instance GoogleRequest ActivitiesList where         type Rs ActivitiesList = ListActivitiesResponse-        requestClient ActivitiesList{..}+        type Scopes ActivitiesList =+             '["https://www.googleapis.com/auth/activity",+               "https://www.googleapis.com/auth/drive",+               "https://www.googleapis.com/auth/drive.metadata",+               "https://www.googleapis.com/auth/drive.metadata.readonly",+               "https://www.googleapis.com/auth/drive.readonly"]+        requestClient ActivitiesList'{..}           = go _alDriveFileId _alDriveAncestorId               (Just _alGroupingStrategy)               (Just _alUserId)
gogol-apps-activity.cabal view
@@ -1,5 +1,5 @@ name:                  gogol-apps-activity-version:               0.0.1+version:               0.1.0 synopsis:              Google Apps Activity SDK. homepage:              https://github.com/brendanhay/gogol bug-reports:           https://github.com/brendanhay/gogol/issues@@ -7,7 +7,7 @@ license-file:          LICENSE author:                Brendan Hay maintainer:            Brendan Hay <brendan.g.hay@gmail.com>-copyright:             Copyright (c) 2015 Brendan Hay+copyright:             Copyright (c) 2015-2016 Brendan Hay category:              Network, Google, Cloud build-type:            Simple cabal-version:         >= 1.10@@ -42,5 +42,5 @@         , Network.Google.AppsActivity.Types.Sum      build-depends:-          gogol-core == 0.0.1.*+          gogol-core == 0.1.0.*         , base       >= 4.7 && < 5