module Network.AWS.CloudSearch.DefineAnalysisScheme
(
DefineAnalysisScheme
, defineAnalysisScheme
, das2AnalysisScheme
, das2DomainName
, DefineAnalysisSchemeResponse
, defineAnalysisSchemeResponse
, dasr1AnalysisScheme
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.CloudSearch.Types
import qualified GHC.Exts
data DefineAnalysisScheme = DefineAnalysisScheme
{ _das2AnalysisScheme :: AnalysisScheme
, _das2DomainName :: Text
} deriving (Eq, Read, Show)
defineAnalysisScheme :: Text
-> AnalysisScheme
-> DefineAnalysisScheme
defineAnalysisScheme p1 p2 = DefineAnalysisScheme
{ _das2DomainName = p1
, _das2AnalysisScheme = p2
}
das2AnalysisScheme :: Lens' DefineAnalysisScheme AnalysisScheme
das2AnalysisScheme =
lens _das2AnalysisScheme (\s a -> s { _das2AnalysisScheme = a })
das2DomainName :: Lens' DefineAnalysisScheme Text
das2DomainName = lens _das2DomainName (\s a -> s { _das2DomainName = a })
newtype DefineAnalysisSchemeResponse = DefineAnalysisSchemeResponse
{ _dasr1AnalysisScheme :: AnalysisSchemeStatus
} deriving (Eq, Read, Show)
defineAnalysisSchemeResponse :: AnalysisSchemeStatus
-> DefineAnalysisSchemeResponse
defineAnalysisSchemeResponse p1 = DefineAnalysisSchemeResponse
{ _dasr1AnalysisScheme = p1
}
dasr1AnalysisScheme :: Lens' DefineAnalysisSchemeResponse AnalysisSchemeStatus
dasr1AnalysisScheme =
lens _dasr1AnalysisScheme (\s a -> s { _dasr1AnalysisScheme = a })
instance ToPath DefineAnalysisScheme where
toPath = const "/"
instance ToQuery DefineAnalysisScheme where
toQuery DefineAnalysisScheme{..} = mconcat
[ "AnalysisScheme" =? _das2AnalysisScheme
, "DomainName" =? _das2DomainName
]
instance ToHeaders DefineAnalysisScheme
instance AWSRequest DefineAnalysisScheme where
type Sv DefineAnalysisScheme = CloudSearch
type Rs DefineAnalysisScheme = DefineAnalysisSchemeResponse
request = post "DefineAnalysisScheme"
response = xmlResponse
instance FromXML DefineAnalysisSchemeResponse where
parseXML = withElement "DefineAnalysisSchemeResult" $ \x -> DefineAnalysisSchemeResponse
<$> x .@ "AnalysisScheme"