module Network.AWS.CloudSearch.DeleteExpression
(
DeleteExpression
, deleteExpression
, de2DomainName
, de2ExpressionName
, DeleteExpressionResponse
, deleteExpressionResponse
, der1Expression
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.CloudSearch.Types
import qualified GHC.Exts
data DeleteExpression = DeleteExpression
{ _de2DomainName :: Text
, _de2ExpressionName :: Text
} deriving (Eq, Ord, Read, Show)
deleteExpression :: Text
-> Text
-> DeleteExpression
deleteExpression p1 p2 = DeleteExpression
{ _de2DomainName = p1
, _de2ExpressionName = p2
}
de2DomainName :: Lens' DeleteExpression Text
de2DomainName = lens _de2DomainName (\s a -> s { _de2DomainName = a })
de2ExpressionName :: Lens' DeleteExpression Text
de2ExpressionName =
lens _de2ExpressionName (\s a -> s { _de2ExpressionName = a })
newtype DeleteExpressionResponse = DeleteExpressionResponse
{ _der1Expression :: ExpressionStatus
} deriving (Eq, Read, Show)
deleteExpressionResponse :: ExpressionStatus
-> DeleteExpressionResponse
deleteExpressionResponse p1 = DeleteExpressionResponse
{ _der1Expression = p1
}
der1Expression :: Lens' DeleteExpressionResponse ExpressionStatus
der1Expression = lens _der1Expression (\s a -> s { _der1Expression = a })
instance ToPath DeleteExpression where
toPath = const "/"
instance ToQuery DeleteExpression where
toQuery DeleteExpression{..} = mconcat
[ "DomainName" =? _de2DomainName
, "ExpressionName" =? _de2ExpressionName
]
instance ToHeaders DeleteExpression
instance AWSRequest DeleteExpression where
type Sv DeleteExpression = CloudSearch
type Rs DeleteExpression = DeleteExpressionResponse
request = post "DeleteExpression"
response = xmlResponse
instance FromXML DeleteExpressionResponse where
parseXML = withElement "DeleteExpressionResult" $ \x -> DeleteExpressionResponse
<$> x .@ "Expression"