{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CloudSearch.Types.SuggesterStatus where
import Amazonka.CloudSearch.Types.OptionStatus
import Amazonka.CloudSearch.Types.Suggester
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SuggesterStatus = SuggesterStatus'
{ SuggesterStatus -> Suggester
options :: Suggester,
SuggesterStatus -> OptionStatus
status :: OptionStatus
}
deriving (SuggesterStatus -> SuggesterStatus -> Bool
(SuggesterStatus -> SuggesterStatus -> Bool)
-> (SuggesterStatus -> SuggesterStatus -> Bool)
-> Eq SuggesterStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuggesterStatus -> SuggesterStatus -> Bool
$c/= :: SuggesterStatus -> SuggesterStatus -> Bool
== :: SuggesterStatus -> SuggesterStatus -> Bool
$c== :: SuggesterStatus -> SuggesterStatus -> Bool
Prelude.Eq, ReadPrec [SuggesterStatus]
ReadPrec SuggesterStatus
Int -> ReadS SuggesterStatus
ReadS [SuggesterStatus]
(Int -> ReadS SuggesterStatus)
-> ReadS [SuggesterStatus]
-> ReadPrec SuggesterStatus
-> ReadPrec [SuggesterStatus]
-> Read SuggesterStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SuggesterStatus]
$creadListPrec :: ReadPrec [SuggesterStatus]
readPrec :: ReadPrec SuggesterStatus
$creadPrec :: ReadPrec SuggesterStatus
readList :: ReadS [SuggesterStatus]
$creadList :: ReadS [SuggesterStatus]
readsPrec :: Int -> ReadS SuggesterStatus
$creadsPrec :: Int -> ReadS SuggesterStatus
Prelude.Read, Int -> SuggesterStatus -> ShowS
[SuggesterStatus] -> ShowS
SuggesterStatus -> String
(Int -> SuggesterStatus -> ShowS)
-> (SuggesterStatus -> String)
-> ([SuggesterStatus] -> ShowS)
-> Show SuggesterStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuggesterStatus] -> ShowS
$cshowList :: [SuggesterStatus] -> ShowS
show :: SuggesterStatus -> String
$cshow :: SuggesterStatus -> String
showsPrec :: Int -> SuggesterStatus -> ShowS
$cshowsPrec :: Int -> SuggesterStatus -> ShowS
Prelude.Show, (forall x. SuggesterStatus -> Rep SuggesterStatus x)
-> (forall x. Rep SuggesterStatus x -> SuggesterStatus)
-> Generic SuggesterStatus
forall x. Rep SuggesterStatus x -> SuggesterStatus
forall x. SuggesterStatus -> Rep SuggesterStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SuggesterStatus x -> SuggesterStatus
$cfrom :: forall x. SuggesterStatus -> Rep SuggesterStatus x
Prelude.Generic)
newSuggesterStatus ::
Suggester ->
OptionStatus ->
SuggesterStatus
newSuggesterStatus :: Suggester -> OptionStatus -> SuggesterStatus
newSuggesterStatus Suggester
pOptions_ OptionStatus
pStatus_ =
SuggesterStatus' :: Suggester -> OptionStatus -> SuggesterStatus
SuggesterStatus'
{ $sel:options:SuggesterStatus' :: Suggester
options = Suggester
pOptions_,
$sel:status:SuggesterStatus' :: OptionStatus
status = OptionStatus
pStatus_
}
suggesterStatus_options :: Lens.Lens' SuggesterStatus Suggester
suggesterStatus_options :: (Suggester -> f Suggester) -> SuggesterStatus -> f SuggesterStatus
suggesterStatus_options = (SuggesterStatus -> Suggester)
-> (SuggesterStatus -> Suggester -> SuggesterStatus)
-> Lens SuggesterStatus SuggesterStatus Suggester Suggester
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuggesterStatus' {Suggester
options :: Suggester
$sel:options:SuggesterStatus' :: SuggesterStatus -> Suggester
options} -> Suggester
options) (\s :: SuggesterStatus
s@SuggesterStatus' {} Suggester
a -> SuggesterStatus
s {$sel:options:SuggesterStatus' :: Suggester
options = Suggester
a} :: SuggesterStatus)
suggesterStatus_status :: Lens.Lens' SuggesterStatus OptionStatus
suggesterStatus_status :: (OptionStatus -> f OptionStatus)
-> SuggesterStatus -> f SuggesterStatus
suggesterStatus_status = (SuggesterStatus -> OptionStatus)
-> (SuggesterStatus -> OptionStatus -> SuggesterStatus)
-> Lens SuggesterStatus SuggesterStatus OptionStatus OptionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuggesterStatus' {OptionStatus
status :: OptionStatus
$sel:status:SuggesterStatus' :: SuggesterStatus -> OptionStatus
status} -> OptionStatus
status) (\s :: SuggesterStatus
s@SuggesterStatus' {} OptionStatus
a -> SuggesterStatus
s {$sel:status:SuggesterStatus' :: OptionStatus
status = OptionStatus
a} :: SuggesterStatus)
instance Core.FromXML SuggesterStatus where
parseXML :: [Node] -> Either String SuggesterStatus
parseXML [Node]
x =
Suggester -> OptionStatus -> SuggesterStatus
SuggesterStatus'
(Suggester -> OptionStatus -> SuggesterStatus)
-> Either String Suggester
-> Either String (OptionStatus -> SuggesterStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Suggester
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Options")
Either String (OptionStatus -> SuggesterStatus)
-> Either String OptionStatus -> Either String SuggesterStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String OptionStatus
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Status")
instance Prelude.Hashable SuggesterStatus
instance Prelude.NFData SuggesterStatus