module Network.AWS.CognitoSync.GetIdentityPoolConfiguration
(
getIdentityPoolConfiguration
, GetIdentityPoolConfiguration
, gipcIdentityPoolId
, getIdentityPoolConfigurationResponse
, GetIdentityPoolConfigurationResponse
, gipcrsIdentityPoolId
, gipcrsCognitoStreams
, gipcrsPushSync
, gipcrsResponseStatus
) where
import Network.AWS.CognitoSync.Types
import Network.AWS.CognitoSync.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype GetIdentityPoolConfiguration = GetIdentityPoolConfiguration'
{ _gipcIdentityPoolId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getIdentityPoolConfiguration
:: Text
-> GetIdentityPoolConfiguration
getIdentityPoolConfiguration pIdentityPoolId_ =
GetIdentityPoolConfiguration'
{ _gipcIdentityPoolId = pIdentityPoolId_
}
gipcIdentityPoolId :: Lens' GetIdentityPoolConfiguration Text
gipcIdentityPoolId = lens _gipcIdentityPoolId (\ s a -> s{_gipcIdentityPoolId = a});
instance AWSRequest GetIdentityPoolConfiguration
where
type Rs GetIdentityPoolConfiguration =
GetIdentityPoolConfigurationResponse
request = get cognitoSync
response
= receiveJSON
(\ s h x ->
GetIdentityPoolConfigurationResponse' <$>
(x .?> "IdentityPoolId") <*> (x .?> "CognitoStreams")
<*> (x .?> "PushSync")
<*> (pure (fromEnum s)))
instance Hashable GetIdentityPoolConfiguration
instance ToHeaders GetIdentityPoolConfiguration where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath GetIdentityPoolConfiguration where
toPath GetIdentityPoolConfiguration'{..}
= mconcat
["/identitypools/", toBS _gipcIdentityPoolId,
"/configuration"]
instance ToQuery GetIdentityPoolConfiguration where
toQuery = const mempty
data GetIdentityPoolConfigurationResponse = GetIdentityPoolConfigurationResponse'
{ _gipcrsIdentityPoolId :: !(Maybe Text)
, _gipcrsCognitoStreams :: !(Maybe CognitoStreams)
, _gipcrsPushSync :: !(Maybe PushSync)
, _gipcrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getIdentityPoolConfigurationResponse
:: Int
-> GetIdentityPoolConfigurationResponse
getIdentityPoolConfigurationResponse pResponseStatus_ =
GetIdentityPoolConfigurationResponse'
{ _gipcrsIdentityPoolId = Nothing
, _gipcrsCognitoStreams = Nothing
, _gipcrsPushSync = Nothing
, _gipcrsResponseStatus = pResponseStatus_
}
gipcrsIdentityPoolId :: Lens' GetIdentityPoolConfigurationResponse (Maybe Text)
gipcrsIdentityPoolId = lens _gipcrsIdentityPoolId (\ s a -> s{_gipcrsIdentityPoolId = a});
gipcrsCognitoStreams :: Lens' GetIdentityPoolConfigurationResponse (Maybe CognitoStreams)
gipcrsCognitoStreams = lens _gipcrsCognitoStreams (\ s a -> s{_gipcrsCognitoStreams = a});
gipcrsPushSync :: Lens' GetIdentityPoolConfigurationResponse (Maybe PushSync)
gipcrsPushSync = lens _gipcrsPushSync (\ s a -> s{_gipcrsPushSync = a});
gipcrsResponseStatus :: Lens' GetIdentityPoolConfigurationResponse Int
gipcrsResponseStatus = lens _gipcrsResponseStatus (\ s a -> s{_gipcrsResponseStatus = a});