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