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