{-# 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.ElasticSearch.Types.CognitoOptionsStatus where
import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.Types.CognitoOptions
import Amazonka.ElasticSearch.Types.OptionStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CognitoOptionsStatus = CognitoOptionsStatus'
{
CognitoOptionsStatus -> CognitoOptions
options :: CognitoOptions,
CognitoOptionsStatus -> OptionStatus
status :: OptionStatus
}
deriving (CognitoOptionsStatus -> CognitoOptionsStatus -> Bool
(CognitoOptionsStatus -> CognitoOptionsStatus -> Bool)
-> (CognitoOptionsStatus -> CognitoOptionsStatus -> Bool)
-> Eq CognitoOptionsStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CognitoOptionsStatus -> CognitoOptionsStatus -> Bool
$c/= :: CognitoOptionsStatus -> CognitoOptionsStatus -> Bool
== :: CognitoOptionsStatus -> CognitoOptionsStatus -> Bool
$c== :: CognitoOptionsStatus -> CognitoOptionsStatus -> Bool
Prelude.Eq, ReadPrec [CognitoOptionsStatus]
ReadPrec CognitoOptionsStatus
Int -> ReadS CognitoOptionsStatus
ReadS [CognitoOptionsStatus]
(Int -> ReadS CognitoOptionsStatus)
-> ReadS [CognitoOptionsStatus]
-> ReadPrec CognitoOptionsStatus
-> ReadPrec [CognitoOptionsStatus]
-> Read CognitoOptionsStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CognitoOptionsStatus]
$creadListPrec :: ReadPrec [CognitoOptionsStatus]
readPrec :: ReadPrec CognitoOptionsStatus
$creadPrec :: ReadPrec CognitoOptionsStatus
readList :: ReadS [CognitoOptionsStatus]
$creadList :: ReadS [CognitoOptionsStatus]
readsPrec :: Int -> ReadS CognitoOptionsStatus
$creadsPrec :: Int -> ReadS CognitoOptionsStatus
Prelude.Read, Int -> CognitoOptionsStatus -> ShowS
[CognitoOptionsStatus] -> ShowS
CognitoOptionsStatus -> String
(Int -> CognitoOptionsStatus -> ShowS)
-> (CognitoOptionsStatus -> String)
-> ([CognitoOptionsStatus] -> ShowS)
-> Show CognitoOptionsStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CognitoOptionsStatus] -> ShowS
$cshowList :: [CognitoOptionsStatus] -> ShowS
show :: CognitoOptionsStatus -> String
$cshow :: CognitoOptionsStatus -> String
showsPrec :: Int -> CognitoOptionsStatus -> ShowS
$cshowsPrec :: Int -> CognitoOptionsStatus -> ShowS
Prelude.Show, (forall x. CognitoOptionsStatus -> Rep CognitoOptionsStatus x)
-> (forall x. Rep CognitoOptionsStatus x -> CognitoOptionsStatus)
-> Generic CognitoOptionsStatus
forall x. Rep CognitoOptionsStatus x -> CognitoOptionsStatus
forall x. CognitoOptionsStatus -> Rep CognitoOptionsStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CognitoOptionsStatus x -> CognitoOptionsStatus
$cfrom :: forall x. CognitoOptionsStatus -> Rep CognitoOptionsStatus x
Prelude.Generic)
newCognitoOptionsStatus ::
CognitoOptions ->
OptionStatus ->
CognitoOptionsStatus
newCognitoOptionsStatus :: CognitoOptions -> OptionStatus -> CognitoOptionsStatus
newCognitoOptionsStatus CognitoOptions
pOptions_ OptionStatus
pStatus_ =
CognitoOptionsStatus' :: CognitoOptions -> OptionStatus -> CognitoOptionsStatus
CognitoOptionsStatus'
{ $sel:options:CognitoOptionsStatus' :: CognitoOptions
options = CognitoOptions
pOptions_,
$sel:status:CognitoOptionsStatus' :: OptionStatus
status = OptionStatus
pStatus_
}
cognitoOptionsStatus_options :: Lens.Lens' CognitoOptionsStatus CognitoOptions
cognitoOptionsStatus_options :: (CognitoOptions -> f CognitoOptions)
-> CognitoOptionsStatus -> f CognitoOptionsStatus
cognitoOptionsStatus_options = (CognitoOptionsStatus -> CognitoOptions)
-> (CognitoOptionsStatus -> CognitoOptions -> CognitoOptionsStatus)
-> Lens
CognitoOptionsStatus
CognitoOptionsStatus
CognitoOptions
CognitoOptions
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CognitoOptionsStatus' {CognitoOptions
options :: CognitoOptions
$sel:options:CognitoOptionsStatus' :: CognitoOptionsStatus -> CognitoOptions
options} -> CognitoOptions
options) (\s :: CognitoOptionsStatus
s@CognitoOptionsStatus' {} CognitoOptions
a -> CognitoOptionsStatus
s {$sel:options:CognitoOptionsStatus' :: CognitoOptions
options = CognitoOptions
a} :: CognitoOptionsStatus)
cognitoOptionsStatus_status :: Lens.Lens' CognitoOptionsStatus OptionStatus
cognitoOptionsStatus_status :: (OptionStatus -> f OptionStatus)
-> CognitoOptionsStatus -> f CognitoOptionsStatus
cognitoOptionsStatus_status = (CognitoOptionsStatus -> OptionStatus)
-> (CognitoOptionsStatus -> OptionStatus -> CognitoOptionsStatus)
-> Lens
CognitoOptionsStatus CognitoOptionsStatus OptionStatus OptionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CognitoOptionsStatus' {OptionStatus
status :: OptionStatus
$sel:status:CognitoOptionsStatus' :: CognitoOptionsStatus -> OptionStatus
status} -> OptionStatus
status) (\s :: CognitoOptionsStatus
s@CognitoOptionsStatus' {} OptionStatus
a -> CognitoOptionsStatus
s {$sel:status:CognitoOptionsStatus' :: OptionStatus
status = OptionStatus
a} :: CognitoOptionsStatus)
instance Core.FromJSON CognitoOptionsStatus where
parseJSON :: Value -> Parser CognitoOptionsStatus
parseJSON =
String
-> (Object -> Parser CognitoOptionsStatus)
-> Value
-> Parser CognitoOptionsStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CognitoOptionsStatus"
( \Object
x ->
CognitoOptions -> OptionStatus -> CognitoOptionsStatus
CognitoOptionsStatus'
(CognitoOptions -> OptionStatus -> CognitoOptionsStatus)
-> Parser CognitoOptions
-> Parser (OptionStatus -> CognitoOptionsStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser CognitoOptions
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Options")
Parser (OptionStatus -> CognitoOptionsStatus)
-> Parser OptionStatus -> Parser CognitoOptionsStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser OptionStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Status")
)
instance Prelude.Hashable CognitoOptionsStatus
instance Prelude.NFData CognitoOptionsStatus