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