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