amazonka-mobile 1.5.0 → 1.6.0
raw patch · 20 files changed
+181/−159 lines, 20 filesdep ~amazonka-coredep ~amazonka-testPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: amazonka-core, amazonka-test
API changes (from Hackage documentation)
+ Network.AWS.Mobile.ListBundles: instance Network.AWS.Pager.AWSPager Network.AWS.Mobile.ListBundles.ListBundles
+ Network.AWS.Mobile.ListProjects: instance Network.AWS.Pager.AWSPager Network.AWS.Mobile.ListProjects.ListProjects
Files
- README.md +1/−1
- amazonka-mobile.cabal +5/−5
- gen/Network/AWS/Mobile.hs +3/−3
- gen/Network/AWS/Mobile/CreateProject.hs +16/−16
- gen/Network/AWS/Mobile/DeleteProject.hs +9/−9
- gen/Network/AWS/Mobile/DescribeBundle.hs +5/−5
- gen/Network/AWS/Mobile/DescribeProject.hs +6/−6
- gen/Network/AWS/Mobile/ExportBundle.hs +8/−8
- gen/Network/AWS/Mobile/ExportProject.hs +11/−11
- gen/Network/AWS/Mobile/ListBundles.hs +20/−10
- gen/Network/AWS/Mobile/ListProjects.hs +20/−10
- gen/Network/AWS/Mobile/Types.hs +18/−16
- gen/Network/AWS/Mobile/Types/Product.hs +44/−44
- gen/Network/AWS/Mobile/Types/Sum.hs +1/−1
- gen/Network/AWS/Mobile/UpdateProject.hs +9/−9
- gen/Network/AWS/Mobile/Waiters.hs +1/−1
- test/Main.hs +1/−1
- test/Test/AWS/Gen/Mobile.hs +1/−1
- test/Test/AWS/Mobile.hs +1/−1
- test/Test/AWS/Mobile/Internal.hs +1/−1
README.md view
@@ -8,7 +8,7 @@ ## Version -`1.5.0`+`1.6.0` ## Description
amazonka-mobile.cabal view
@@ -1,5 +1,5 @@ name: amazonka-mobile-version: 1.5.0+version: 1.6.0 synopsis: Amazon Mobile SDK. homepage: https://github.com/brendanhay/amazonka bug-reports: https://github.com/brendanhay/amazonka/issues@@ -7,7 +7,7 @@ license-file: LICENSE author: Brendan Hay maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>-copyright: Copyright (c) 2013-2017 Brendan Hay+copyright: Copyright (c) 2013-2018 Brendan Hay category: Network, AWS, Cloud, Distributed Computing build-type: Simple cabal-version: >= 1.10@@ -62,7 +62,7 @@ , Network.AWS.Mobile.Types.Sum build-depends:- amazonka-core == 1.5.0.*+ amazonka-core == 1.6.0.* , base >= 4.7 && < 5 test-suite amazonka-mobile-test@@ -82,8 +82,8 @@ , Test.AWS.Mobile.Internal build-depends:- amazonka-core == 1.5.0.*- , amazonka-test == 1.5.0.*+ amazonka-core == 1.6.0.*+ , amazonka-test == 1.6.0.* , amazonka-mobile , base , bytestring
gen/Network/AWS/Mobile.hs view
@@ -5,7 +5,7 @@ -- | -- Module : Network.AWS.Mobile--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -52,7 +52,7 @@ -- * Operations -- $operations - -- ** ListProjects+ -- ** ListProjects (Paginated) , module Network.AWS.Mobile.ListProjects -- ** DeleteProject@@ -61,7 +61,7 @@ -- ** UpdateProject , module Network.AWS.Mobile.UpdateProject - -- ** ListBundles+ -- ** ListBundles (Paginated) , module Network.AWS.Mobile.ListBundles -- ** DescribeProject
gen/Network/AWS/Mobile/CreateProject.hs view
@@ -12,7 +12,7 @@ -- | -- Module : Network.AWS.Mobile.CreateProject--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -53,7 +53,7 @@ -- -- /See:/ 'createProject' smart constructor. data CreateProject = CreateProject'- { _cpContents :: !(Maybe Base64)+ { _cpContents :: !(Maybe ByteString) , _cpName :: !(Maybe Text) , _cpRegion :: !(Maybe Text) , _cpSnapshotId :: !(Maybe Text)@@ -64,7 +64,7 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'cpContents' - ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation. -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This 'Lens' accepts and returns only raw unencoded data.+-- * 'cpContents' - ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation. -- -- * 'cpName' - Name of the project. --@@ -75,28 +75,28 @@ :: CreateProject createProject = CreateProject'- { _cpContents = Nothing- , _cpName = Nothing- , _cpRegion = Nothing- , _cpSnapshotId = Nothing- }+ { _cpContents = Nothing+ , _cpName = Nothing+ , _cpRegion = Nothing+ , _cpSnapshotId = Nothing+ } --- | ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation. -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This 'Lens' accepts and returns only raw unencoded data.+-- | ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation. cpContents :: Lens' CreateProject (Maybe ByteString)-cpContents = lens _cpContents (\ s a -> s{_cpContents = a}) . mapping _Base64;+cpContents = lens _cpContents (\ s a -> s{_cpContents = a}) -- | Name of the project. cpName :: Lens' CreateProject (Maybe Text)-cpName = lens _cpName (\ s a -> s{_cpName = a});+cpName = lens _cpName (\ s a -> s{_cpName = a}) -- | Default region where project resources should be created. cpRegion :: Lens' CreateProject (Maybe Text)-cpRegion = lens _cpRegion (\ s a -> s{_cpRegion = a});+cpRegion = lens _cpRegion (\ s a -> s{_cpRegion = a}) -- | Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included in the share URL when a project is exported. cpSnapshotId :: Lens' CreateProject (Maybe Text)-cpSnapshotId = lens _cpSnapshotId (\ s a -> s{_cpSnapshotId = a});+cpSnapshotId = lens _cpSnapshotId (\ s a -> s{_cpSnapshotId = a}) instance AWSRequest CreateProject where type Rs CreateProject = CreateProjectResponse@@ -153,15 +153,15 @@ -> CreateProjectResponse createProjectResponse pResponseStatus_ = CreateProjectResponse'- {_cprsDetails = Nothing, _cprsResponseStatus = pResponseStatus_}+ {_cprsDetails = Nothing, _cprsResponseStatus = pResponseStatus_} -- | Detailed information about the created AWS Mobile Hub project. cprsDetails :: Lens' CreateProjectResponse (Maybe ProjectDetails)-cprsDetails = lens _cprsDetails (\ s a -> s{_cprsDetails = a});+cprsDetails = lens _cprsDetails (\ s a -> s{_cprsDetails = a}) -- | -- | The response status code. cprsResponseStatus :: Lens' CreateProjectResponse Int-cprsResponseStatus = lens _cprsResponseStatus (\ s a -> s{_cprsResponseStatus = a});+cprsResponseStatus = lens _cprsResponseStatus (\ s a -> s{_cprsResponseStatus = a}) instance NFData CreateProjectResponse where
gen/Network/AWS/Mobile/DeleteProject.hs view
@@ -12,7 +12,7 @@ -- | -- Module : Network.AWS.Mobile.DeleteProject--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -68,7 +68,7 @@ -- | Unique project identifier. dpProjectId :: Lens' DeleteProject Text-dpProjectId = lens _dpProjectId (\ s a -> s{_dpProjectId = a});+dpProjectId = lens _dpProjectId (\ s a -> s{_dpProjectId = a}) instance AWSRequest DeleteProject where type Rs DeleteProject = DeleteProjectResponse@@ -125,22 +125,22 @@ -> DeleteProjectResponse deleteProjectResponse pResponseStatus_ = DeleteProjectResponse'- { _dprsDeletedResources = Nothing- , _dprsOrphanedResources = Nothing- , _dprsResponseStatus = pResponseStatus_- }+ { _dprsDeletedResources = Nothing+ , _dprsOrphanedResources = Nothing+ , _dprsResponseStatus = pResponseStatus_+ } -- | Resources which were deleted. dprsDeletedResources :: Lens' DeleteProjectResponse [Resource]-dprsDeletedResources = lens _dprsDeletedResources (\ s a -> s{_dprsDeletedResources = a}) . _Default . _Coerce;+dprsDeletedResources = lens _dprsDeletedResources (\ s a -> s{_dprsDeletedResources = a}) . _Default . _Coerce -- | Resources which were not deleted, due to a risk of losing potentially important data or files. dprsOrphanedResources :: Lens' DeleteProjectResponse [Resource]-dprsOrphanedResources = lens _dprsOrphanedResources (\ s a -> s{_dprsOrphanedResources = a}) . _Default . _Coerce;+dprsOrphanedResources = lens _dprsOrphanedResources (\ s a -> s{_dprsOrphanedResources = a}) . _Default . _Coerce -- | -- | The response status code. dprsResponseStatus :: Lens' DeleteProjectResponse Int-dprsResponseStatus = lens _dprsResponseStatus (\ s a -> s{_dprsResponseStatus = a});+dprsResponseStatus = lens _dprsResponseStatus (\ s a -> s{_dprsResponseStatus = a}) instance NFData DeleteProjectResponse where
gen/Network/AWS/Mobile/DescribeBundle.hs view
@@ -12,7 +12,7 @@ -- | -- Module : Network.AWS.Mobile.DescribeBundle--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -67,7 +67,7 @@ -- | Unique bundle identifier. dbBundleId :: Lens' DescribeBundle Text-dbBundleId = lens _dbBundleId (\ s a -> s{_dbBundleId = a});+dbBundleId = lens _dbBundleId (\ s a -> s{_dbBundleId = a}) instance AWSRequest DescribeBundle where type Rs DescribeBundle = DescribeBundleResponse@@ -119,15 +119,15 @@ -> DescribeBundleResponse describeBundleResponse pResponseStatus_ = DescribeBundleResponse'- {_dbrsDetails = Nothing, _dbrsResponseStatus = pResponseStatus_}+ {_dbrsDetails = Nothing, _dbrsResponseStatus = pResponseStatus_} -- | The details of the bundle. dbrsDetails :: Lens' DescribeBundleResponse (Maybe BundleDetails)-dbrsDetails = lens _dbrsDetails (\ s a -> s{_dbrsDetails = a});+dbrsDetails = lens _dbrsDetails (\ s a -> s{_dbrsDetails = a}) -- | -- | The response status code. dbrsResponseStatus :: Lens' DescribeBundleResponse Int-dbrsResponseStatus = lens _dbrsResponseStatus (\ s a -> s{_dbrsResponseStatus = a});+dbrsResponseStatus = lens _dbrsResponseStatus (\ s a -> s{_dbrsResponseStatus = a}) instance NFData DescribeBundleResponse where
gen/Network/AWS/Mobile/DescribeProject.hs view
@@ -12,7 +12,7 @@ -- | -- Module : Network.AWS.Mobile.DescribeProject--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -72,11 +72,11 @@ -- | If set to true, causes AWS Mobile Hub to synchronize information from other services, e.g., update state of AWS CloudFormation stacks in the AWS Mobile Hub project. dSyncFromResources :: Lens' DescribeProject (Maybe Bool)-dSyncFromResources = lens _dSyncFromResources (\ s a -> s{_dSyncFromResources = a});+dSyncFromResources = lens _dSyncFromResources (\ s a -> s{_dSyncFromResources = a}) -- | Unique project identifier. dProjectId :: Lens' DescribeProject Text-dProjectId = lens _dProjectId (\ s a -> s{_dProjectId = a});+dProjectId = lens _dProjectId (\ s a -> s{_dProjectId = a}) instance AWSRequest DescribeProject where type Rs DescribeProject = DescribeProjectResponse@@ -130,15 +130,15 @@ -> DescribeProjectResponse describeProjectResponse pResponseStatus_ = DescribeProjectResponse'- {_drsDetails = Nothing, _drsResponseStatus = pResponseStatus_}+ {_drsDetails = Nothing, _drsResponseStatus = pResponseStatus_} -- | Undocumented member. drsDetails :: Lens' DescribeProjectResponse (Maybe ProjectDetails)-drsDetails = lens _drsDetails (\ s a -> s{_drsDetails = a});+drsDetails = lens _drsDetails (\ s a -> s{_drsDetails = a}) -- | -- | The response status code. drsResponseStatus :: Lens' DescribeProjectResponse Int-drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});+drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a}) instance NFData DescribeProjectResponse where
gen/Network/AWS/Mobile/ExportBundle.hs view
@@ -12,7 +12,7 @@ -- | -- Module : Network.AWS.Mobile.ExportBundle--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -72,20 +72,20 @@ -> ExportBundle exportBundle pBundleId_ = ExportBundle'- {_ebPlatform = Nothing, _ebProjectId = Nothing, _ebBundleId = pBundleId_}+ {_ebPlatform = Nothing, _ebProjectId = Nothing, _ebBundleId = pBundleId_} -- | Developer desktop or target application platform. ebPlatform :: Lens' ExportBundle (Maybe Platform)-ebPlatform = lens _ebPlatform (\ s a -> s{_ebPlatform = a});+ebPlatform = lens _ebPlatform (\ s a -> s{_ebPlatform = a}) -- | Unique project identifier. ebProjectId :: Lens' ExportBundle (Maybe Text)-ebProjectId = lens _ebProjectId (\ s a -> s{_ebProjectId = a});+ebProjectId = lens _ebProjectId (\ s a -> s{_ebProjectId = a}) -- | Unique bundle identifier. ebBundleId :: Lens' ExportBundle Text-ebBundleId = lens _ebBundleId (\ s a -> s{_ebBundleId = a});+ebBundleId = lens _ebBundleId (\ s a -> s{_ebBundleId = a}) instance AWSRequest ExportBundle where type Rs ExportBundle = ExportBundleResponse@@ -143,15 +143,15 @@ -> ExportBundleResponse exportBundleResponse pResponseStatus_ = ExportBundleResponse'- {_ebrsDownloadURL = Nothing, _ebrsResponseStatus = pResponseStatus_}+ {_ebrsDownloadURL = Nothing, _ebrsResponseStatus = pResponseStatus_} -- | URL which contains the custom-generated SDK and tool packages used to integrate the client mobile app or web app with the AWS resources created by the AWS Mobile Hub project. ebrsDownloadURL :: Lens' ExportBundleResponse (Maybe Text)-ebrsDownloadURL = lens _ebrsDownloadURL (\ s a -> s{_ebrsDownloadURL = a});+ebrsDownloadURL = lens _ebrsDownloadURL (\ s a -> s{_ebrsDownloadURL = a}) -- | -- | The response status code. ebrsResponseStatus :: Lens' ExportBundleResponse Int-ebrsResponseStatus = lens _ebrsResponseStatus (\ s a -> s{_ebrsResponseStatus = a});+ebrsResponseStatus = lens _ebrsResponseStatus (\ s a -> s{_ebrsResponseStatus = a}) instance NFData ExportBundleResponse where
gen/Network/AWS/Mobile/ExportProject.hs view
@@ -12,7 +12,7 @@ -- | -- Module : Network.AWS.Mobile.ExportProject--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -69,7 +69,7 @@ -- | Unique project identifier. epProjectId :: Lens' ExportProject Text-epProjectId = lens _epProjectId (\ s a -> s{_epProjectId = a});+epProjectId = lens _epProjectId (\ s a -> s{_epProjectId = a}) instance AWSRequest ExportProject where type Rs ExportProject = ExportProjectResponse@@ -132,27 +132,27 @@ -> ExportProjectResponse exportProjectResponse pResponseStatus_ = ExportProjectResponse'- { _eprsShareURL = Nothing- , _eprsDownloadURL = Nothing- , _eprsSnapshotId = Nothing- , _eprsResponseStatus = pResponseStatus_- }+ { _eprsShareURL = Nothing+ , _eprsDownloadURL = Nothing+ , _eprsSnapshotId = Nothing+ , _eprsResponseStatus = pResponseStatus_+ } -- | URL which can be shared to allow other AWS users to create their own project in AWS Mobile Hub with the same configuration as the specified project. This URL pertains to a snapshot in time of the project configuration that is created when this API is called. If you want to share additional changes to your project configuration, then you will need to create and share a new snapshot by calling this method again. eprsShareURL :: Lens' ExportProjectResponse (Maybe Text)-eprsShareURL = lens _eprsShareURL (\ s a -> s{_eprsShareURL = a});+eprsShareURL = lens _eprsShareURL (\ s a -> s{_eprsShareURL = a}) -- | URL which can be used to download the exported project configuation file(s). eprsDownloadURL :: Lens' ExportProjectResponse (Maybe Text)-eprsDownloadURL = lens _eprsDownloadURL (\ s a -> s{_eprsDownloadURL = a});+eprsDownloadURL = lens _eprsDownloadURL (\ s a -> s{_eprsDownloadURL = a}) -- | Unique identifier for the exported snapshot of the project configuration. This snapshot identifier is included in the share URL. eprsSnapshotId :: Lens' ExportProjectResponse (Maybe Text)-eprsSnapshotId = lens _eprsSnapshotId (\ s a -> s{_eprsSnapshotId = a});+eprsSnapshotId = lens _eprsSnapshotId (\ s a -> s{_eprsSnapshotId = a}) -- | -- | The response status code. eprsResponseStatus :: Lens' ExportProjectResponse Int-eprsResponseStatus = lens _eprsResponseStatus (\ s a -> s{_eprsResponseStatus = a});+eprsResponseStatus = lens _eprsResponseStatus (\ s a -> s{_eprsResponseStatus = a}) instance NFData ExportProjectResponse where
gen/Network/AWS/Mobile/ListBundles.hs view
@@ -12,7 +12,7 @@ -- | -- Module : Network.AWS.Mobile.ListBundles--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -21,6 +21,8 @@ -- List all available bundles. -- --+--+-- This operation returns paginated results. module Network.AWS.Mobile.ListBundles ( -- * Creating a Request@@ -42,6 +44,7 @@ import Network.AWS.Lens import Network.AWS.Mobile.Types import Network.AWS.Mobile.Types.Product+import Network.AWS.Pager import Network.AWS.Prelude import Network.AWS.Request import Network.AWS.Response@@ -71,12 +74,19 @@ -- | Pagination token. Set to null to start listing bundles from start. If non-null pagination token is returned in a result, then pass its value in here in another request to list more bundles. lbNextToken :: Lens' ListBundles (Maybe Text)-lbNextToken = lens _lbNextToken (\ s a -> s{_lbNextToken = a});+lbNextToken = lens _lbNextToken (\ s a -> s{_lbNextToken = a}) -- | Maximum number of records to list in a single response. lbMaxResults :: Lens' ListBundles (Maybe Int)-lbMaxResults = lens _lbMaxResults (\ s a -> s{_lbMaxResults = a});+lbMaxResults = lens _lbMaxResults (\ s a -> s{_lbMaxResults = a}) +instance AWSPager ListBundles where+ page rq rs+ | stop (rs ^. lbrsNextToken) = Nothing+ | stop (rs ^. lbrsBundleList) = Nothing+ | otherwise =+ Just $ rq & lbNextToken .~ rs ^. lbrsNextToken+ instance AWSRequest ListBundles where type Rs ListBundles = ListBundlesResponse request = get mobile@@ -134,22 +144,22 @@ -> ListBundlesResponse listBundlesResponse pResponseStatus_ = ListBundlesResponse'- { _lbrsBundleList = Nothing- , _lbrsNextToken = Nothing- , _lbrsResponseStatus = pResponseStatus_- }+ { _lbrsBundleList = Nothing+ , _lbrsNextToken = Nothing+ , _lbrsResponseStatus = pResponseStatus_+ } -- | A list of bundles. lbrsBundleList :: Lens' ListBundlesResponse [BundleDetails]-lbrsBundleList = lens _lbrsBundleList (\ s a -> s{_lbrsBundleList = a}) . _Default . _Coerce;+lbrsBundleList = lens _lbrsBundleList (\ s a -> s{_lbrsBundleList = a}) . _Default . _Coerce -- | Pagination token. If non-null pagination token is returned in a result, then pass its value in another request to fetch more entries. lbrsNextToken :: Lens' ListBundlesResponse (Maybe Text)-lbrsNextToken = lens _lbrsNextToken (\ s a -> s{_lbrsNextToken = a});+lbrsNextToken = lens _lbrsNextToken (\ s a -> s{_lbrsNextToken = a}) -- | -- | The response status code. lbrsResponseStatus :: Lens' ListBundlesResponse Int-lbrsResponseStatus = lens _lbrsResponseStatus (\ s a -> s{_lbrsResponseStatus = a});+lbrsResponseStatus = lens _lbrsResponseStatus (\ s a -> s{_lbrsResponseStatus = a}) instance NFData ListBundlesResponse where
gen/Network/AWS/Mobile/ListProjects.hs view
@@ -12,7 +12,7 @@ -- | -- Module : Network.AWS.Mobile.ListProjects--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -21,6 +21,8 @@ -- Lists projects in AWS Mobile Hub. -- --+--+-- This operation returns paginated results. module Network.AWS.Mobile.ListProjects ( -- * Creating a Request@@ -42,6 +44,7 @@ import Network.AWS.Lens import Network.AWS.Mobile.Types import Network.AWS.Mobile.Types.Product+import Network.AWS.Pager import Network.AWS.Prelude import Network.AWS.Request import Network.AWS.Response@@ -71,12 +74,19 @@ -- | Pagination token. Set to null to start listing projects from start. If non-null pagination token is returned in a result, then pass its value in here in another request to list more projects. lpNextToken :: Lens' ListProjects (Maybe Text)-lpNextToken = lens _lpNextToken (\ s a -> s{_lpNextToken = a});+lpNextToken = lens _lpNextToken (\ s a -> s{_lpNextToken = a}) -- | Maximum number of records to list in a single response. lpMaxResults :: Lens' ListProjects (Maybe Int)-lpMaxResults = lens _lpMaxResults (\ s a -> s{_lpMaxResults = a});+lpMaxResults = lens _lpMaxResults (\ s a -> s{_lpMaxResults = a}) +instance AWSPager ListProjects where+ page rq rs+ | stop (rs ^. lprsNextToken) = Nothing+ | stop (rs ^. lprsProjects) = Nothing+ | otherwise =+ Just $ rq & lpNextToken .~ rs ^. lprsNextToken+ instance AWSRequest ListProjects where type Rs ListProjects = ListProjectsResponse request = get mobile@@ -133,22 +143,22 @@ -> ListProjectsResponse listProjectsResponse pResponseStatus_ = ListProjectsResponse'- { _lprsNextToken = Nothing- , _lprsProjects = Nothing- , _lprsResponseStatus = pResponseStatus_- }+ { _lprsNextToken = Nothing+ , _lprsProjects = Nothing+ , _lprsResponseStatus = pResponseStatus_+ } -- | Undocumented member. lprsNextToken :: Lens' ListProjectsResponse (Maybe Text)-lprsNextToken = lens _lprsNextToken (\ s a -> s{_lprsNextToken = a});+lprsNextToken = lens _lprsNextToken (\ s a -> s{_lprsNextToken = a}) -- | Undocumented member. lprsProjects :: Lens' ListProjectsResponse [ProjectSummary]-lprsProjects = lens _lprsProjects (\ s a -> s{_lprsProjects = a}) . _Default . _Coerce;+lprsProjects = lens _lprsProjects (\ s a -> s{_lprsProjects = a}) . _Default . _Coerce -- | -- | The response status code. lprsResponseStatus :: Lens' ListProjectsResponse Int-lprsResponseStatus = lens _lprsResponseStatus (\ s a -> s{_lprsResponseStatus = a});+lprsResponseStatus = lens _lprsResponseStatus (\ s a -> s{_lprsResponseStatus = a}) instance NFData ListProjectsResponse where
gen/Network/AWS/Mobile/Types.hs view
@@ -4,7 +4,7 @@ -- | -- Module : Network.AWS.Mobile.Types--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -79,24 +79,24 @@ mobile :: Service mobile = Service- { _svcAbbrev = "Mobile"- , _svcSigner = v4- , _svcPrefix = "mobile"- , _svcVersion = "2017-07-01"- , _svcEndpoint = defaultEndpoint mobile- , _svcTimeout = Just 70- , _svcCheck = statusSuccess- , _svcError = parseJSONError "Mobile"- , _svcRetry = retry- }+ { _svcAbbrev = "Mobile"+ , _svcSigner = v4+ , _svcPrefix = "mobile"+ , _svcVersion = "2017-07-01"+ , _svcEndpoint = defaultEndpoint mobile+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "Mobile"+ , _svcRetry = retry+ } where retry = Exponential- { _retryBase = 5.0e-2- , _retryGrowth = 2- , _retryAttempts = 5- , _retryCheck = check- }+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ } check e | has (hasCode "ThrottledException" . hasStatus 400) e = Just "throttled_exception"@@ -105,6 +105,8 @@ Just "throttling_exception" | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling" | has (hasStatus 504) e = Just "gateway_timeout"+ | has (hasCode "RequestThrottledException" . hasStatus 400) e =+ Just "request_throttled_exception" | has (hasStatus 502) e = Just "bad_gateway" | has (hasStatus 503) e = Just "service_unavailable" | has (hasStatus 500) e = Just "general_server_error"
gen/Network/AWS/Mobile/Types/Product.hs view
@@ -9,7 +9,7 @@ -- | -- Module : Network.AWS.Mobile.Types.Product--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -55,38 +55,38 @@ :: BundleDetails bundleDetails = BundleDetails'- { _bdAvailablePlatforms = Nothing- , _bdBundleId = Nothing- , _bdVersion = Nothing- , _bdIconURL = Nothing- , _bdTitle = Nothing- , _bdDescription = Nothing- }+ { _bdAvailablePlatforms = Nothing+ , _bdBundleId = Nothing+ , _bdVersion = Nothing+ , _bdIconURL = Nothing+ , _bdTitle = Nothing+ , _bdDescription = Nothing+ } -- | Undocumented member. bdAvailablePlatforms :: Lens' BundleDetails [Platform]-bdAvailablePlatforms = lens _bdAvailablePlatforms (\ s a -> s{_bdAvailablePlatforms = a}) . _Default . _Coerce;+bdAvailablePlatforms = lens _bdAvailablePlatforms (\ s a -> s{_bdAvailablePlatforms = a}) . _Default . _Coerce -- | Undocumented member. bdBundleId :: Lens' BundleDetails (Maybe Text)-bdBundleId = lens _bdBundleId (\ s a -> s{_bdBundleId = a});+bdBundleId = lens _bdBundleId (\ s a -> s{_bdBundleId = a}) -- | Undocumented member. bdVersion :: Lens' BundleDetails (Maybe Text)-bdVersion = lens _bdVersion (\ s a -> s{_bdVersion = a});+bdVersion = lens _bdVersion (\ s a -> s{_bdVersion = a}) -- | Undocumented member. bdIconURL :: Lens' BundleDetails (Maybe Text)-bdIconURL = lens _bdIconURL (\ s a -> s{_bdIconURL = a});+bdIconURL = lens _bdIconURL (\ s a -> s{_bdIconURL = a}) -- | Undocumented member. bdTitle :: Lens' BundleDetails (Maybe Text)-bdTitle = lens _bdTitle (\ s a -> s{_bdTitle = a});+bdTitle = lens _bdTitle (\ s a -> s{_bdTitle = a}) -- | Undocumented member. bdDescription :: Lens' BundleDetails (Maybe Text)-bdDescription = lens _bdDescription (\ s a -> s{_bdDescription = a});+bdDescription = lens _bdDescription (\ s a -> s{_bdDescription = a}) instance FromJSON BundleDetails where parseJSON@@ -144,48 +144,48 @@ :: ProjectDetails projectDetails = ProjectDetails'- { _pdState = Nothing- , _pdResources = Nothing- , _pdCreatedDate = Nothing- , _pdConsoleURL = Nothing- , _pdName = Nothing- , _pdRegion = Nothing- , _pdProjectId = Nothing- , _pdLastUpdatedDate = Nothing- }+ { _pdState = Nothing+ , _pdResources = Nothing+ , _pdCreatedDate = Nothing+ , _pdConsoleURL = Nothing+ , _pdName = Nothing+ , _pdRegion = Nothing+ , _pdProjectId = Nothing+ , _pdLastUpdatedDate = Nothing+ } -- | Undocumented member. pdState :: Lens' ProjectDetails (Maybe ProjectState)-pdState = lens _pdState (\ s a -> s{_pdState = a});+pdState = lens _pdState (\ s a -> s{_pdState = a}) -- | Undocumented member. pdResources :: Lens' ProjectDetails [Resource]-pdResources = lens _pdResources (\ s a -> s{_pdResources = a}) . _Default . _Coerce;+pdResources = lens _pdResources (\ s a -> s{_pdResources = a}) . _Default . _Coerce -- | Date the project was created. pdCreatedDate :: Lens' ProjectDetails (Maybe UTCTime)-pdCreatedDate = lens _pdCreatedDate (\ s a -> s{_pdCreatedDate = a}) . mapping _Time;+pdCreatedDate = lens _pdCreatedDate (\ s a -> s{_pdCreatedDate = a}) . mapping _Time -- | Website URL for this project in the AWS Mobile Hub console. pdConsoleURL :: Lens' ProjectDetails (Maybe Text)-pdConsoleURL = lens _pdConsoleURL (\ s a -> s{_pdConsoleURL = a});+pdConsoleURL = lens _pdConsoleURL (\ s a -> s{_pdConsoleURL = a}) -- | Undocumented member. pdName :: Lens' ProjectDetails (Maybe Text)-pdName = lens _pdName (\ s a -> s{_pdName = a});+pdName = lens _pdName (\ s a -> s{_pdName = a}) -- | Undocumented member. pdRegion :: Lens' ProjectDetails (Maybe Text)-pdRegion = lens _pdRegion (\ s a -> s{_pdRegion = a});+pdRegion = lens _pdRegion (\ s a -> s{_pdRegion = a}) -- | Undocumented member. pdProjectId :: Lens' ProjectDetails (Maybe Text)-pdProjectId = lens _pdProjectId (\ s a -> s{_pdProjectId = a});+pdProjectId = lens _pdProjectId (\ s a -> s{_pdProjectId = a}) -- | Date of the last modification of the project. pdLastUpdatedDate :: Lens' ProjectDetails (Maybe UTCTime)-pdLastUpdatedDate = lens _pdLastUpdatedDate (\ s a -> s{_pdLastUpdatedDate = a}) . mapping _Time;+pdLastUpdatedDate = lens _pdLastUpdatedDate (\ s a -> s{_pdLastUpdatedDate = a}) . mapping _Time instance FromJSON ProjectDetails where parseJSON@@ -229,11 +229,11 @@ -- | Name of the project. psName :: Lens' ProjectSummary (Maybe Text)-psName = lens _psName (\ s a -> s{_psName = a});+psName = lens _psName (\ s a -> s{_psName = a}) -- | Unique project identifier. psProjectId :: Lens' ProjectSummary (Maybe Text)-psProjectId = lens _psProjectId (\ s a -> s{_psProjectId = a});+psProjectId = lens _psProjectId (\ s a -> s{_psProjectId = a}) instance FromJSON ProjectSummary where parseJSON@@ -277,33 +277,33 @@ :: Resource resource = Resource'- { _rFeature = Nothing- , _rArn = Nothing- , _rName = Nothing- , _rAttributes = Nothing- , _rType = Nothing- }+ { _rFeature = Nothing+ , _rArn = Nothing+ , _rName = Nothing+ , _rAttributes = Nothing+ , _rType = Nothing+ } -- | Undocumented member. rFeature :: Lens' Resource (Maybe Text)-rFeature = lens _rFeature (\ s a -> s{_rFeature = a});+rFeature = lens _rFeature (\ s a -> s{_rFeature = a}) -- | Undocumented member. rArn :: Lens' Resource (Maybe Text)-rArn = lens _rArn (\ s a -> s{_rArn = a});+rArn = lens _rArn (\ s a -> s{_rArn = a}) -- | Undocumented member. rName :: Lens' Resource (Maybe Text)-rName = lens _rName (\ s a -> s{_rName = a});+rName = lens _rName (\ s a -> s{_rName = a}) -- | Undocumented member. rAttributes :: Lens' Resource (HashMap Text Text)-rAttributes = lens _rAttributes (\ s a -> s{_rAttributes = a}) . _Default . _Map;+rAttributes = lens _rAttributes (\ s a -> s{_rAttributes = a}) . _Default . _Map -- | Undocumented member. rType :: Lens' Resource (Maybe Text)-rType = lens _rType (\ s a -> s{_rType = a});+rType = lens _rType (\ s a -> s{_rType = a}) instance FromJSON Resource where parseJSON
gen/Network/AWS/Mobile/Types/Sum.hs view
@@ -9,7 +9,7 @@ -- | -- Module : Network.AWS.Mobile.Types.Sum--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated
gen/Network/AWS/Mobile/UpdateProject.hs view
@@ -12,7 +12,7 @@ -- | -- Module : Network.AWS.Mobile.UpdateProject--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated@@ -51,7 +51,7 @@ -- -- /See:/ 'updateProject' smart constructor. data UpdateProject = UpdateProject'- { _upContents :: !(Maybe Base64)+ { _upContents :: !(Maybe ByteString) , _upProjectId :: !Text } deriving (Eq, Read, Show, Data, Typeable, Generic) @@ -60,7 +60,7 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'upContents' - ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation. -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This 'Lens' accepts and returns only raw unencoded data.+-- * 'upContents' - ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation. -- -- * 'upProjectId' - Unique project identifier. updateProject@@ -70,13 +70,13 @@ UpdateProject' {_upContents = Nothing, _upProjectId = pProjectId_} --- | ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation. -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This 'Lens' accepts and returns only raw unencoded data.+-- | ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation. upContents :: Lens' UpdateProject (Maybe ByteString)-upContents = lens _upContents (\ s a -> s{_upContents = a}) . mapping _Base64;+upContents = lens _upContents (\ s a -> s{_upContents = a}) -- | Unique project identifier. upProjectId :: Lens' UpdateProject Text-upProjectId = lens _upProjectId (\ s a -> s{_upProjectId = a});+upProjectId = lens _upProjectId (\ s a -> s{_upProjectId = a}) instance AWSRequest UpdateProject where type Rs UpdateProject = UpdateProjectResponse@@ -131,15 +131,15 @@ -> UpdateProjectResponse updateProjectResponse pResponseStatus_ = UpdateProjectResponse'- {_uprsDetails = Nothing, _uprsResponseStatus = pResponseStatus_}+ {_uprsDetails = Nothing, _uprsResponseStatus = pResponseStatus_} -- | Detailed information about the updated AWS Mobile Hub project. uprsDetails :: Lens' UpdateProjectResponse (Maybe ProjectDetails)-uprsDetails = lens _uprsDetails (\ s a -> s{_uprsDetails = a});+uprsDetails = lens _uprsDetails (\ s a -> s{_uprsDetails = a}) -- | -- | The response status code. uprsResponseStatus :: Lens' UpdateProjectResponse Int-uprsResponseStatus = lens _uprsResponseStatus (\ s a -> s{_uprsResponseStatus = a});+uprsResponseStatus = lens _uprsResponseStatus (\ s a -> s{_uprsResponseStatus = a}) instance NFData UpdateProjectResponse where
gen/Network/AWS/Mobile/Waiters.hs view
@@ -7,7 +7,7 @@ -- | -- Module : Network.AWS.Mobile.Waiters--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated
test/Main.hs view
@@ -2,7 +2,7 @@ -- | -- Module : Main--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated
test/Test/AWS/Gen/Mobile.hs view
@@ -5,7 +5,7 @@ -- | -- Module : Test.AWS.Gen.Mobile--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated
test/Test/AWS/Mobile.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Test.AWS.Mobile--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated
test/Test/AWS/Mobile/Internal.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Test.AWS.Mobile.Internal--- Copyright : (c) 2013-2017 Brendan Hay+-- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated