{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.AppStream.StartFleet
(
startFleet
, StartFleet
, staName
, startFleetResponse
, StartFleetResponse
, sfrsResponseStatus
) where
import Network.AWS.AppStream.Types
import Network.AWS.AppStream.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype StartFleet = StartFleet'
{ _staName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
startFleet
:: Text
-> StartFleet
startFleet pName_ = StartFleet' {_staName = pName_}
staName :: Lens' StartFleet Text
staName = lens _staName (\ s a -> s{_staName = a})
instance AWSRequest StartFleet where
type Rs StartFleet = StartFleetResponse
request = postJSON appStream
response
= receiveEmpty
(\ s h x ->
StartFleetResponse' <$> (pure (fromEnum s)))
instance Hashable StartFleet where
instance NFData StartFleet where
instance ToHeaders StartFleet where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("PhotonAdminProxyService.StartFleet" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StartFleet where
toJSON StartFleet'{..}
= object (catMaybes [Just ("Name" .= _staName)])
instance ToPath StartFleet where
toPath = const "/"
instance ToQuery StartFleet where
toQuery = const mempty
newtype StartFleetResponse = StartFleetResponse'
{ _sfrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
startFleetResponse
:: Int
-> StartFleetResponse
startFleetResponse pResponseStatus_ =
StartFleetResponse' {_sfrsResponseStatus = pResponseStatus_}
sfrsResponseStatus :: Lens' StartFleetResponse Int
sfrsResponseStatus = lens _sfrsResponseStatus (\ s a -> s{_sfrsResponseStatus = a})
instance NFData StartFleetResponse where