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