{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.CloudSearchDomains.Types.Product where
import Network.AWS.CloudSearchDomains.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data Bucket = Bucket'
{ _bValue :: !(Maybe Text)
, _bCount :: !(Maybe Integer)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
bucket
:: Bucket
bucket =
Bucket'
{ _bValue = Nothing
, _bCount = Nothing
}
bValue :: Lens' Bucket (Maybe Text)
bValue = lens _bValue (\ s a -> s{_bValue = a});
bCount :: Lens' Bucket (Maybe Integer)
bCount = lens _bCount (\ s a -> s{_bCount = a});
instance FromJSON Bucket where
parseJSON
= withObject "Bucket"
(\ x ->
Bucket' <$> (x .:? "value") <*> (x .:? "count"))
instance Hashable Bucket
instance NFData Bucket
newtype BucketInfo = BucketInfo'
{ _biBuckets :: Maybe [Bucket]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
bucketInfo
:: BucketInfo
bucketInfo =
BucketInfo'
{ _biBuckets = Nothing
}
biBuckets :: Lens' BucketInfo [Bucket]
biBuckets = lens _biBuckets (\ s a -> s{_biBuckets = a}) . _Default . _Coerce;
instance FromJSON BucketInfo where
parseJSON
= withObject "BucketInfo"
(\ x -> BucketInfo' <$> (x .:? "buckets" .!= mempty))
instance Hashable BucketInfo
instance NFData BucketInfo
newtype DocumentServiceWarning = DocumentServiceWarning'
{ _dswMessage :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
documentServiceWarning
:: DocumentServiceWarning
documentServiceWarning =
DocumentServiceWarning'
{ _dswMessage = Nothing
}
dswMessage :: Lens' DocumentServiceWarning (Maybe Text)
dswMessage = lens _dswMessage (\ s a -> s{_dswMessage = a});
instance FromJSON DocumentServiceWarning where
parseJSON
= withObject "DocumentServiceWarning"
(\ x ->
DocumentServiceWarning' <$> (x .:? "message"))
instance Hashable DocumentServiceWarning
instance NFData DocumentServiceWarning
data FieldStats = FieldStats'
{ _fsMax :: !(Maybe Text)
, _fsMean :: !(Maybe Text)
, _fsCount :: !(Maybe Integer)
, _fsMissing :: !(Maybe Integer)
, _fsStddev :: !(Maybe Double)
, _fsMin :: !(Maybe Text)
, _fsSumOfSquares :: !(Maybe Double)
, _fsSum :: !(Maybe Double)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
fieldStats
:: FieldStats
fieldStats =
FieldStats'
{ _fsMax = Nothing
, _fsMean = Nothing
, _fsCount = Nothing
, _fsMissing = Nothing
, _fsStddev = Nothing
, _fsMin = Nothing
, _fsSumOfSquares = Nothing
, _fsSum = Nothing
}
fsMax :: Lens' FieldStats (Maybe Text)
fsMax = lens _fsMax (\ s a -> s{_fsMax = a});
fsMean :: Lens' FieldStats (Maybe Text)
fsMean = lens _fsMean (\ s a -> s{_fsMean = a});
fsCount :: Lens' FieldStats (Maybe Integer)
fsCount = lens _fsCount (\ s a -> s{_fsCount = a});
fsMissing :: Lens' FieldStats (Maybe Integer)
fsMissing = lens _fsMissing (\ s a -> s{_fsMissing = a});
fsStddev :: Lens' FieldStats (Maybe Double)
fsStddev = lens _fsStddev (\ s a -> s{_fsStddev = a});
fsMin :: Lens' FieldStats (Maybe Text)
fsMin = lens _fsMin (\ s a -> s{_fsMin = a});
fsSumOfSquares :: Lens' FieldStats (Maybe Double)
fsSumOfSquares = lens _fsSumOfSquares (\ s a -> s{_fsSumOfSquares = a});
fsSum :: Lens' FieldStats (Maybe Double)
fsSum = lens _fsSum (\ s a -> s{_fsSum = a});
instance FromJSON FieldStats where
parseJSON
= withObject "FieldStats"
(\ x ->
FieldStats' <$>
(x .:? "max") <*> (x .:? "mean") <*> (x .:? "count")
<*> (x .:? "missing")
<*> (x .:? "stddev")
<*> (x .:? "min")
<*> (x .:? "sumOfSquares")
<*> (x .:? "sum"))
instance Hashable FieldStats
instance NFData FieldStats
data Hit = Hit'
{ _hitExprs :: !(Maybe (Map Text Text))
, _hitId :: !(Maybe Text)
, _hitHighlights :: !(Maybe (Map Text Text))
, _hitFields :: !(Maybe (Map Text [Text]))
} deriving (Eq,Read,Show,Data,Typeable,Generic)
hit
:: Hit
hit =
Hit'
{ _hitExprs = Nothing
, _hitId = Nothing
, _hitHighlights = Nothing
, _hitFields = Nothing
}
hitExprs :: Lens' Hit (HashMap Text Text)
hitExprs = lens _hitExprs (\ s a -> s{_hitExprs = a}) . _Default . _Map;
hitId :: Lens' Hit (Maybe Text)
hitId = lens _hitId (\ s a -> s{_hitId = a});
hitHighlights :: Lens' Hit (HashMap Text Text)
hitHighlights = lens _hitHighlights (\ s a -> s{_hitHighlights = a}) . _Default . _Map;
hitFields :: Lens' Hit (HashMap Text [Text])
hitFields = lens _hitFields (\ s a -> s{_hitFields = a}) . _Default . _Map;
instance FromJSON Hit where
parseJSON
= withObject "Hit"
(\ x ->
Hit' <$>
(x .:? "exprs" .!= mempty) <*> (x .:? "id") <*>
(x .:? "highlights" .!= mempty)
<*> (x .:? "fields" .!= mempty))
instance Hashable Hit
instance NFData Hit
data Hits = Hits'
{ _hCursor :: !(Maybe Text)
, _hHit :: !(Maybe [Hit])
, _hStart :: !(Maybe Integer)
, _hFound :: !(Maybe Integer)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
hits
:: Hits
hits =
Hits'
{ _hCursor = Nothing
, _hHit = Nothing
, _hStart = Nothing
, _hFound = Nothing
}
hCursor :: Lens' Hits (Maybe Text)
hCursor = lens _hCursor (\ s a -> s{_hCursor = a});
hHit :: Lens' Hits [Hit]
hHit = lens _hHit (\ s a -> s{_hHit = a}) . _Default . _Coerce;
hStart :: Lens' Hits (Maybe Integer)
hStart = lens _hStart (\ s a -> s{_hStart = a});
hFound :: Lens' Hits (Maybe Integer)
hFound = lens _hFound (\ s a -> s{_hFound = a});
instance FromJSON Hits where
parseJSON
= withObject "Hits"
(\ x ->
Hits' <$>
(x .:? "cursor") <*> (x .:? "hit" .!= mempty) <*>
(x .:? "start")
<*> (x .:? "found"))
instance Hashable Hits
instance NFData Hits
data SearchStatus = SearchStatus'
{ _sRid :: !(Maybe Text)
, _sTimems :: !(Maybe Integer)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
searchStatus
:: SearchStatus
searchStatus =
SearchStatus'
{ _sRid = Nothing
, _sTimems = Nothing
}
sRid :: Lens' SearchStatus (Maybe Text)
sRid = lens _sRid (\ s a -> s{_sRid = a});
sTimems :: Lens' SearchStatus (Maybe Integer)
sTimems = lens _sTimems (\ s a -> s{_sTimems = a});
instance FromJSON SearchStatus where
parseJSON
= withObject "SearchStatus"
(\ x ->
SearchStatus' <$> (x .:? "rid") <*> (x .:? "timems"))
instance Hashable SearchStatus
instance NFData SearchStatus
data SuggestModel = SuggestModel'
{ _smFound :: !(Maybe Integer)
, _smSuggestions :: !(Maybe [SuggestionMatch])
, _smQuery :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
suggestModel
:: SuggestModel
suggestModel =
SuggestModel'
{ _smFound = Nothing
, _smSuggestions = Nothing
, _smQuery = Nothing
}
smFound :: Lens' SuggestModel (Maybe Integer)
smFound = lens _smFound (\ s a -> s{_smFound = a});
smSuggestions :: Lens' SuggestModel [SuggestionMatch]
smSuggestions = lens _smSuggestions (\ s a -> s{_smSuggestions = a}) . _Default . _Coerce;
smQuery :: Lens' SuggestModel (Maybe Text)
smQuery = lens _smQuery (\ s a -> s{_smQuery = a});
instance FromJSON SuggestModel where
parseJSON
= withObject "SuggestModel"
(\ x ->
SuggestModel' <$>
(x .:? "found") <*> (x .:? "suggestions" .!= mempty)
<*> (x .:? "query"))
instance Hashable SuggestModel
instance NFData SuggestModel
data SuggestStatus = SuggestStatus'
{ _ssRid :: !(Maybe Text)
, _ssTimems :: !(Maybe Integer)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
suggestStatus
:: SuggestStatus
suggestStatus =
SuggestStatus'
{ _ssRid = Nothing
, _ssTimems = Nothing
}
ssRid :: Lens' SuggestStatus (Maybe Text)
ssRid = lens _ssRid (\ s a -> s{_ssRid = a});
ssTimems :: Lens' SuggestStatus (Maybe Integer)
ssTimems = lens _ssTimems (\ s a -> s{_ssTimems = a});
instance FromJSON SuggestStatus where
parseJSON
= withObject "SuggestStatus"
(\ x ->
SuggestStatus' <$>
(x .:? "rid") <*> (x .:? "timems"))
instance Hashable SuggestStatus
instance NFData SuggestStatus
data SuggestionMatch = SuggestionMatch'
{ _smSuggestion :: !(Maybe Text)
, _smScore :: !(Maybe Integer)
, _smId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
suggestionMatch
:: SuggestionMatch
suggestionMatch =
SuggestionMatch'
{ _smSuggestion = Nothing
, _smScore = Nothing
, _smId = Nothing
}
smSuggestion :: Lens' SuggestionMatch (Maybe Text)
smSuggestion = lens _smSuggestion (\ s a -> s{_smSuggestion = a});
smScore :: Lens' SuggestionMatch (Maybe Integer)
smScore = lens _smScore (\ s a -> s{_smScore = a});
smId :: Lens' SuggestionMatch (Maybe Text)
smId = lens _smId (\ s a -> s{_smId = a});
instance FromJSON SuggestionMatch where
parseJSON
= withObject "SuggestionMatch"
(\ x ->
SuggestionMatch' <$>
(x .:? "suggestion") <*> (x .:? "score") <*>
(x .:? "id"))
instance Hashable SuggestionMatch
instance NFData SuggestionMatch