module Network.AWS.CognitoSync.GetIdentityPoolConfiguration
(
GetIdentityPoolConfiguration
, getIdentityPoolConfiguration
, gipcIdentityPoolId
, GetIdentityPoolConfigurationResponse
, getIdentityPoolConfigurationResponse
, gipcrCognitoStreams
, gipcrIdentityPoolId
, gipcrPushSync
) where
import Network.AWS.Data (Object)
import Network.AWS.Prelude
import Network.AWS.Request.RestJSON
import Network.AWS.CognitoSync.Types
import qualified GHC.Exts
newtype GetIdentityPoolConfiguration = GetIdentityPoolConfiguration
{ _gipcIdentityPoolId :: Text
} deriving (Eq, Ord, Read, Show, Monoid, IsString)
getIdentityPoolConfiguration :: Text
-> GetIdentityPoolConfiguration
getIdentityPoolConfiguration p1 = GetIdentityPoolConfiguration
{ _gipcIdentityPoolId = p1
}
gipcIdentityPoolId :: Lens' GetIdentityPoolConfiguration Text
gipcIdentityPoolId =
lens _gipcIdentityPoolId (\s a -> s { _gipcIdentityPoolId = a })
data GetIdentityPoolConfigurationResponse = GetIdentityPoolConfigurationResponse
{ _gipcrCognitoStreams :: Maybe CognitoStreams
, _gipcrIdentityPoolId :: Maybe Text
, _gipcrPushSync :: Maybe PushSync
} deriving (Eq, Read, Show)
getIdentityPoolConfigurationResponse :: GetIdentityPoolConfigurationResponse
getIdentityPoolConfigurationResponse = GetIdentityPoolConfigurationResponse
{ _gipcrIdentityPoolId = Nothing
, _gipcrPushSync = Nothing
, _gipcrCognitoStreams = Nothing
}
gipcrCognitoStreams :: Lens' GetIdentityPoolConfigurationResponse (Maybe CognitoStreams)
gipcrCognitoStreams =
lens _gipcrCognitoStreams (\s a -> s { _gipcrCognitoStreams = a })
gipcrIdentityPoolId :: Lens' GetIdentityPoolConfigurationResponse (Maybe Text)
gipcrIdentityPoolId =
lens _gipcrIdentityPoolId (\s a -> s { _gipcrIdentityPoolId = a })
gipcrPushSync :: Lens' GetIdentityPoolConfigurationResponse (Maybe PushSync)
gipcrPushSync = lens _gipcrPushSync (\s a -> s { _gipcrPushSync = a })
instance ToPath GetIdentityPoolConfiguration where
toPath GetIdentityPoolConfiguration{..} = mconcat
[ "/identitypools/"
, toText _gipcIdentityPoolId
, "/configuration"
]
instance ToQuery GetIdentityPoolConfiguration where
toQuery = const mempty
instance ToHeaders GetIdentityPoolConfiguration
instance ToJSON GetIdentityPoolConfiguration where
toJSON = const (toJSON Empty)
instance AWSRequest GetIdentityPoolConfiguration where
type Sv GetIdentityPoolConfiguration = CognitoSync
type Rs GetIdentityPoolConfiguration = GetIdentityPoolConfigurationResponse
request = get
response = jsonResponse
instance FromJSON GetIdentityPoolConfigurationResponse where
parseJSON = withObject "GetIdentityPoolConfigurationResponse" $ \o -> GetIdentityPoolConfigurationResponse
<$> o .:? "CognitoStreams"
<*> o .:? "IdentityPoolId"
<*> o .:? "PushSync"