module Network.AWS.CloudHSM.ModifyLunaClient
(
ModifyLunaClient
, modifyLunaClient
, mlcCertificate
, mlcClientArn
, ModifyLunaClientResponse
, modifyLunaClientResponse
, mlcrClientArn
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.CloudHSM.Types
import qualified GHC.Exts
data ModifyLunaClient = ModifyLunaClient
{ _mlcCertificate :: Text
, _mlcClientArn :: Text
} deriving (Eq, Ord, Read, Show)
modifyLunaClient :: Text
-> Text
-> ModifyLunaClient
modifyLunaClient p1 p2 = ModifyLunaClient
{ _mlcClientArn = p1
, _mlcCertificate = p2
}
mlcCertificate :: Lens' ModifyLunaClient Text
mlcCertificate = lens _mlcCertificate (\s a -> s { _mlcCertificate = a })
mlcClientArn :: Lens' ModifyLunaClient Text
mlcClientArn = lens _mlcClientArn (\s a -> s { _mlcClientArn = a })
newtype ModifyLunaClientResponse = ModifyLunaClientResponse
{ _mlcrClientArn :: Maybe Text
} deriving (Eq, Ord, Read, Show, Monoid)
modifyLunaClientResponse :: ModifyLunaClientResponse
modifyLunaClientResponse = ModifyLunaClientResponse
{ _mlcrClientArn = Nothing
}
mlcrClientArn :: Lens' ModifyLunaClientResponse (Maybe Text)
mlcrClientArn = lens _mlcrClientArn (\s a -> s { _mlcrClientArn = a })
instance ToPath ModifyLunaClient where
toPath = const "/"
instance ToQuery ModifyLunaClient where
toQuery = const mempty
instance ToHeaders ModifyLunaClient
instance ToJSON ModifyLunaClient where
toJSON ModifyLunaClient{..} = object
[ "ClientArn" .= _mlcClientArn
, "Certificate" .= _mlcCertificate
]
instance AWSRequest ModifyLunaClient where
type Sv ModifyLunaClient = CloudHSM
type Rs ModifyLunaClient = ModifyLunaClientResponse
request = post "ModifyLunaClient"
response = jsonResponse
instance FromJSON ModifyLunaClientResponse where
parseJSON = withObject "ModifyLunaClientResponse" $ \o -> ModifyLunaClientResponse
<$> o .:? "ClientArn"