{-# 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.AnalysisSchemeStatus where
import Amazonka.CloudSearch.Types.AnalysisScheme
import Amazonka.CloudSearch.Types.OptionStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AnalysisSchemeStatus = AnalysisSchemeStatus'
{ AnalysisSchemeStatus -> AnalysisScheme
options :: AnalysisScheme,
AnalysisSchemeStatus -> OptionStatus
status :: OptionStatus
}
deriving (AnalysisSchemeStatus -> AnalysisSchemeStatus -> Bool
(AnalysisSchemeStatus -> AnalysisSchemeStatus -> Bool)
-> (AnalysisSchemeStatus -> AnalysisSchemeStatus -> Bool)
-> Eq AnalysisSchemeStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnalysisSchemeStatus -> AnalysisSchemeStatus -> Bool
$c/= :: AnalysisSchemeStatus -> AnalysisSchemeStatus -> Bool
== :: AnalysisSchemeStatus -> AnalysisSchemeStatus -> Bool
$c== :: AnalysisSchemeStatus -> AnalysisSchemeStatus -> Bool
Prelude.Eq, ReadPrec [AnalysisSchemeStatus]
ReadPrec AnalysisSchemeStatus
Int -> ReadS AnalysisSchemeStatus
ReadS [AnalysisSchemeStatus]
(Int -> ReadS AnalysisSchemeStatus)
-> ReadS [AnalysisSchemeStatus]
-> ReadPrec AnalysisSchemeStatus
-> ReadPrec [AnalysisSchemeStatus]
-> Read AnalysisSchemeStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnalysisSchemeStatus]
$creadListPrec :: ReadPrec [AnalysisSchemeStatus]
readPrec :: ReadPrec AnalysisSchemeStatus
$creadPrec :: ReadPrec AnalysisSchemeStatus
readList :: ReadS [AnalysisSchemeStatus]
$creadList :: ReadS [AnalysisSchemeStatus]
readsPrec :: Int -> ReadS AnalysisSchemeStatus
$creadsPrec :: Int -> ReadS AnalysisSchemeStatus
Prelude.Read, Int -> AnalysisSchemeStatus -> ShowS
[AnalysisSchemeStatus] -> ShowS
AnalysisSchemeStatus -> String
(Int -> AnalysisSchemeStatus -> ShowS)
-> (AnalysisSchemeStatus -> String)
-> ([AnalysisSchemeStatus] -> ShowS)
-> Show AnalysisSchemeStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnalysisSchemeStatus] -> ShowS
$cshowList :: [AnalysisSchemeStatus] -> ShowS
show :: AnalysisSchemeStatus -> String
$cshow :: AnalysisSchemeStatus -> String
showsPrec :: Int -> AnalysisSchemeStatus -> ShowS
$cshowsPrec :: Int -> AnalysisSchemeStatus -> ShowS
Prelude.Show, (forall x. AnalysisSchemeStatus -> Rep AnalysisSchemeStatus x)
-> (forall x. Rep AnalysisSchemeStatus x -> AnalysisSchemeStatus)
-> Generic AnalysisSchemeStatus
forall x. Rep AnalysisSchemeStatus x -> AnalysisSchemeStatus
forall x. AnalysisSchemeStatus -> Rep AnalysisSchemeStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AnalysisSchemeStatus x -> AnalysisSchemeStatus
$cfrom :: forall x. AnalysisSchemeStatus -> Rep AnalysisSchemeStatus x
Prelude.Generic)
newAnalysisSchemeStatus ::
AnalysisScheme ->
OptionStatus ->
AnalysisSchemeStatus
newAnalysisSchemeStatus :: AnalysisScheme -> OptionStatus -> AnalysisSchemeStatus
newAnalysisSchemeStatus AnalysisScheme
pOptions_ OptionStatus
pStatus_ =
AnalysisSchemeStatus' :: AnalysisScheme -> OptionStatus -> AnalysisSchemeStatus
AnalysisSchemeStatus'
{ $sel:options:AnalysisSchemeStatus' :: AnalysisScheme
options = AnalysisScheme
pOptions_,
$sel:status:AnalysisSchemeStatus' :: OptionStatus
status = OptionStatus
pStatus_
}
analysisSchemeStatus_options :: Lens.Lens' AnalysisSchemeStatus AnalysisScheme
analysisSchemeStatus_options :: (AnalysisScheme -> f AnalysisScheme)
-> AnalysisSchemeStatus -> f AnalysisSchemeStatus
analysisSchemeStatus_options = (AnalysisSchemeStatus -> AnalysisScheme)
-> (AnalysisSchemeStatus -> AnalysisScheme -> AnalysisSchemeStatus)
-> Lens
AnalysisSchemeStatus
AnalysisSchemeStatus
AnalysisScheme
AnalysisScheme
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalysisSchemeStatus' {AnalysisScheme
options :: AnalysisScheme
$sel:options:AnalysisSchemeStatus' :: AnalysisSchemeStatus -> AnalysisScheme
options} -> AnalysisScheme
options) (\s :: AnalysisSchemeStatus
s@AnalysisSchemeStatus' {} AnalysisScheme
a -> AnalysisSchemeStatus
s {$sel:options:AnalysisSchemeStatus' :: AnalysisScheme
options = AnalysisScheme
a} :: AnalysisSchemeStatus)
analysisSchemeStatus_status :: Lens.Lens' AnalysisSchemeStatus OptionStatus
analysisSchemeStatus_status :: (OptionStatus -> f OptionStatus)
-> AnalysisSchemeStatus -> f AnalysisSchemeStatus
analysisSchemeStatus_status = (AnalysisSchemeStatus -> OptionStatus)
-> (AnalysisSchemeStatus -> OptionStatus -> AnalysisSchemeStatus)
-> Lens
AnalysisSchemeStatus AnalysisSchemeStatus OptionStatus OptionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalysisSchemeStatus' {OptionStatus
status :: OptionStatus
$sel:status:AnalysisSchemeStatus' :: AnalysisSchemeStatus -> OptionStatus
status} -> OptionStatus
status) (\s :: AnalysisSchemeStatus
s@AnalysisSchemeStatus' {} OptionStatus
a -> AnalysisSchemeStatus
s {$sel:status:AnalysisSchemeStatus' :: OptionStatus
status = OptionStatus
a} :: AnalysisSchemeStatus)
instance Core.FromXML AnalysisSchemeStatus where
parseXML :: [Node] -> Either String AnalysisSchemeStatus
parseXML [Node]
x =
AnalysisScheme -> OptionStatus -> AnalysisSchemeStatus
AnalysisSchemeStatus'
(AnalysisScheme -> OptionStatus -> AnalysisSchemeStatus)
-> Either String AnalysisScheme
-> Either String (OptionStatus -> AnalysisSchemeStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String AnalysisScheme
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Options")
Either String (OptionStatus -> AnalysisSchemeStatus)
-> Either String OptionStatus -> Either String AnalysisSchemeStatus
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 AnalysisSchemeStatus
instance Prelude.NFData AnalysisSchemeStatus