module Network.AWS.StorageGateway.UpdateGatewayInformation
(
UpdateGatewayInformation
, updateGatewayInformation
, ugiGatewayARN
, ugiGatewayName
, ugiGatewayTimezone
, UpdateGatewayInformationResponse
, updateGatewayInformationResponse
, ugirGatewayARN
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.StorageGateway.Types
import qualified GHC.Exts
data UpdateGatewayInformation = UpdateGatewayInformation
{ _ugiGatewayARN :: Text
, _ugiGatewayName :: Maybe Text
, _ugiGatewayTimezone :: Maybe Text
} deriving (Eq, Ord, Read, Show)
updateGatewayInformation :: Text
-> UpdateGatewayInformation
updateGatewayInformation p1 = UpdateGatewayInformation
{ _ugiGatewayARN = p1
, _ugiGatewayName = Nothing
, _ugiGatewayTimezone = Nothing
}
ugiGatewayARN :: Lens' UpdateGatewayInformation Text
ugiGatewayARN = lens _ugiGatewayARN (\s a -> s { _ugiGatewayARN = a })
ugiGatewayName :: Lens' UpdateGatewayInformation (Maybe Text)
ugiGatewayName = lens _ugiGatewayName (\s a -> s { _ugiGatewayName = a })
ugiGatewayTimezone :: Lens' UpdateGatewayInformation (Maybe Text)
ugiGatewayTimezone =
lens _ugiGatewayTimezone (\s a -> s { _ugiGatewayTimezone = a })
newtype UpdateGatewayInformationResponse = UpdateGatewayInformationResponse
{ _ugirGatewayARN :: Maybe Text
} deriving (Eq, Ord, Read, Show, Monoid)
updateGatewayInformationResponse :: UpdateGatewayInformationResponse
updateGatewayInformationResponse = UpdateGatewayInformationResponse
{ _ugirGatewayARN = Nothing
}
ugirGatewayARN :: Lens' UpdateGatewayInformationResponse (Maybe Text)
ugirGatewayARN = lens _ugirGatewayARN (\s a -> s { _ugirGatewayARN = a })
instance ToPath UpdateGatewayInformation where
toPath = const "/"
instance ToQuery UpdateGatewayInformation where
toQuery = const mempty
instance ToHeaders UpdateGatewayInformation
instance ToJSON UpdateGatewayInformation where
toJSON UpdateGatewayInformation{..} = object
[ "GatewayARN" .= _ugiGatewayARN
, "GatewayName" .= _ugiGatewayName
, "GatewayTimezone" .= _ugiGatewayTimezone
]
instance AWSRequest UpdateGatewayInformation where
type Sv UpdateGatewayInformation = StorageGateway
type Rs UpdateGatewayInformation = UpdateGatewayInformationResponse
request = post "UpdateGatewayInformation"
response = jsonResponse
instance FromJSON UpdateGatewayInformationResponse where
parseJSON = withObject "UpdateGatewayInformationResponse" $ \o -> UpdateGatewayInformationResponse
<$> o .:? "GatewayARN"