module Network.AWS.Greengrass.GetSubscriptionDefinitionVersion
(
getSubscriptionDefinitionVersion
, GetSubscriptionDefinitionVersion
, gsdvSubscriptionDefinitionId
, gsdvSubscriptionDefinitionVersionId
, getSubscriptionDefinitionVersionResponse
, GetSubscriptionDefinitionVersionResponse
, gsdvrsDefinition
, gsdvrsARN
, gsdvrsCreationTimestamp
, gsdvrsVersion
, gsdvrsId
, gsdvrsResponseStatus
) where
import Network.AWS.Greengrass.Types
import Network.AWS.Greengrass.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data GetSubscriptionDefinitionVersion = GetSubscriptionDefinitionVersion'
{ _gsdvSubscriptionDefinitionId :: !Text
, _gsdvSubscriptionDefinitionVersionId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getSubscriptionDefinitionVersion
:: Text
-> Text
-> GetSubscriptionDefinitionVersion
getSubscriptionDefinitionVersion pSubscriptionDefinitionId_ pSubscriptionDefinitionVersionId_ =
GetSubscriptionDefinitionVersion'
{ _gsdvSubscriptionDefinitionId = pSubscriptionDefinitionId_
, _gsdvSubscriptionDefinitionVersionId = pSubscriptionDefinitionVersionId_
}
gsdvSubscriptionDefinitionId :: Lens' GetSubscriptionDefinitionVersion Text
gsdvSubscriptionDefinitionId = lens _gsdvSubscriptionDefinitionId (\ s a -> s{_gsdvSubscriptionDefinitionId = a});
gsdvSubscriptionDefinitionVersionId :: Lens' GetSubscriptionDefinitionVersion Text
gsdvSubscriptionDefinitionVersionId = lens _gsdvSubscriptionDefinitionVersionId (\ s a -> s{_gsdvSubscriptionDefinitionVersionId = a});
instance AWSRequest GetSubscriptionDefinitionVersion
where
type Rs GetSubscriptionDefinitionVersion =
GetSubscriptionDefinitionVersionResponse
request = get greengrass
response
= receiveJSON
(\ s h x ->
GetSubscriptionDefinitionVersionResponse' <$>
(x .?> "Definition") <*> (x .?> "Arn") <*>
(x .?> "CreationTimestamp")
<*> (x .?> "Version")
<*> (x .?> "Id")
<*> (pure (fromEnum s)))
instance Hashable GetSubscriptionDefinitionVersion
where
instance NFData GetSubscriptionDefinitionVersion
where
instance ToHeaders GetSubscriptionDefinitionVersion
where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath GetSubscriptionDefinitionVersion
where
toPath GetSubscriptionDefinitionVersion'{..}
= mconcat
["/greengrass/definition/subscriptions/",
toBS _gsdvSubscriptionDefinitionId, "/versions/",
toBS _gsdvSubscriptionDefinitionVersionId]
instance ToQuery GetSubscriptionDefinitionVersion
where
toQuery = const mempty
data GetSubscriptionDefinitionVersionResponse = GetSubscriptionDefinitionVersionResponse'
{ _gsdvrsDefinition :: !(Maybe SubscriptionDefinitionVersion)
, _gsdvrsARN :: !(Maybe Text)
, _gsdvrsCreationTimestamp :: !(Maybe Text)
, _gsdvrsVersion :: !(Maybe Text)
, _gsdvrsId :: !(Maybe Text)
, _gsdvrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getSubscriptionDefinitionVersionResponse
:: Int
-> GetSubscriptionDefinitionVersionResponse
getSubscriptionDefinitionVersionResponse pResponseStatus_ =
GetSubscriptionDefinitionVersionResponse'
{ _gsdvrsDefinition = Nothing
, _gsdvrsARN = Nothing
, _gsdvrsCreationTimestamp = Nothing
, _gsdvrsVersion = Nothing
, _gsdvrsId = Nothing
, _gsdvrsResponseStatus = pResponseStatus_
}
gsdvrsDefinition :: Lens' GetSubscriptionDefinitionVersionResponse (Maybe SubscriptionDefinitionVersion)
gsdvrsDefinition = lens _gsdvrsDefinition (\ s a -> s{_gsdvrsDefinition = a});
gsdvrsARN :: Lens' GetSubscriptionDefinitionVersionResponse (Maybe Text)
gsdvrsARN = lens _gsdvrsARN (\ s a -> s{_gsdvrsARN = a});
gsdvrsCreationTimestamp :: Lens' GetSubscriptionDefinitionVersionResponse (Maybe Text)
gsdvrsCreationTimestamp = lens _gsdvrsCreationTimestamp (\ s a -> s{_gsdvrsCreationTimestamp = a});
gsdvrsVersion :: Lens' GetSubscriptionDefinitionVersionResponse (Maybe Text)
gsdvrsVersion = lens _gsdvrsVersion (\ s a -> s{_gsdvrsVersion = a});
gsdvrsId :: Lens' GetSubscriptionDefinitionVersionResponse (Maybe Text)
gsdvrsId = lens _gsdvrsId (\ s a -> s{_gsdvrsId = a});
gsdvrsResponseStatus :: Lens' GetSubscriptionDefinitionVersionResponse Int
gsdvrsResponseStatus = lens _gsdvrsResponseStatus (\ s a -> s{_gsdvrsResponseStatus = a});
instance NFData
GetSubscriptionDefinitionVersionResponse
where