{-# 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.ChangeProgressDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ChangeProgressDetails = ChangeProgressDetails'
{
ChangeProgressDetails -> Maybe Text
changeId :: Prelude.Maybe Prelude.Text,
ChangeProgressDetails -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (ChangeProgressDetails -> ChangeProgressDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChangeProgressDetails -> ChangeProgressDetails -> Bool
$c/= :: ChangeProgressDetails -> ChangeProgressDetails -> Bool
== :: ChangeProgressDetails -> ChangeProgressDetails -> Bool
$c== :: ChangeProgressDetails -> ChangeProgressDetails -> Bool
Prelude.Eq, ReadPrec [ChangeProgressDetails]
ReadPrec ChangeProgressDetails
Int -> ReadS ChangeProgressDetails
ReadS [ChangeProgressDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChangeProgressDetails]
$creadListPrec :: ReadPrec [ChangeProgressDetails]
readPrec :: ReadPrec ChangeProgressDetails
$creadPrec :: ReadPrec ChangeProgressDetails
readList :: ReadS [ChangeProgressDetails]
$creadList :: ReadS [ChangeProgressDetails]
readsPrec :: Int -> ReadS ChangeProgressDetails
$creadsPrec :: Int -> ReadS ChangeProgressDetails
Prelude.Read, Int -> ChangeProgressDetails -> ShowS
[ChangeProgressDetails] -> ShowS
ChangeProgressDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChangeProgressDetails] -> ShowS
$cshowList :: [ChangeProgressDetails] -> ShowS
show :: ChangeProgressDetails -> String
$cshow :: ChangeProgressDetails -> String
showsPrec :: Int -> ChangeProgressDetails -> ShowS
$cshowsPrec :: Int -> ChangeProgressDetails -> ShowS
Prelude.Show, forall x. Rep ChangeProgressDetails x -> ChangeProgressDetails
forall x. ChangeProgressDetails -> Rep ChangeProgressDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChangeProgressDetails x -> ChangeProgressDetails
$cfrom :: forall x. ChangeProgressDetails -> Rep ChangeProgressDetails x
Prelude.Generic)
newChangeProgressDetails ::
ChangeProgressDetails
newChangeProgressDetails :: ChangeProgressDetails
newChangeProgressDetails =
ChangeProgressDetails'
{ $sel:changeId:ChangeProgressDetails' :: Maybe Text
changeId = forall a. Maybe a
Prelude.Nothing,
$sel:message:ChangeProgressDetails' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing
}
changeProgressDetails_changeId :: Lens.Lens' ChangeProgressDetails (Prelude.Maybe Prelude.Text)
changeProgressDetails_changeId :: Lens' ChangeProgressDetails (Maybe Text)
changeProgressDetails_changeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangeProgressDetails' {Maybe Text
changeId :: Maybe Text
$sel:changeId:ChangeProgressDetails' :: ChangeProgressDetails -> Maybe Text
changeId} -> Maybe Text
changeId) (\s :: ChangeProgressDetails
s@ChangeProgressDetails' {} Maybe Text
a -> ChangeProgressDetails
s {$sel:changeId:ChangeProgressDetails' :: Maybe Text
changeId = Maybe Text
a} :: ChangeProgressDetails)
changeProgressDetails_message :: Lens.Lens' ChangeProgressDetails (Prelude.Maybe Prelude.Text)
changeProgressDetails_message :: Lens' ChangeProgressDetails (Maybe Text)
changeProgressDetails_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangeProgressDetails' {Maybe Text
message :: Maybe Text
$sel:message:ChangeProgressDetails' :: ChangeProgressDetails -> Maybe Text
message} -> Maybe Text
message) (\s :: ChangeProgressDetails
s@ChangeProgressDetails' {} Maybe Text
a -> ChangeProgressDetails
s {$sel:message:ChangeProgressDetails' :: Maybe Text
message = Maybe Text
a} :: ChangeProgressDetails)
instance Data.FromJSON ChangeProgressDetails where
parseJSON :: Value -> Parser ChangeProgressDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ChangeProgressDetails"
( \Object
x ->
Maybe Text -> Maybe Text -> ChangeProgressDetails
ChangeProgressDetails'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ChangeId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Message")
)
instance Prelude.Hashable ChangeProgressDetails where
hashWithSalt :: Int -> ChangeProgressDetails -> Int
hashWithSalt Int
_salt ChangeProgressDetails' {Maybe Text
message :: Maybe Text
changeId :: Maybe Text
$sel:message:ChangeProgressDetails' :: ChangeProgressDetails -> Maybe Text
$sel:changeId:ChangeProgressDetails' :: ChangeProgressDetails -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
changeId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
instance Prelude.NFData ChangeProgressDetails where
rnf :: ChangeProgressDetails -> ()
rnf ChangeProgressDetails' {Maybe Text
message :: Maybe Text
changeId :: Maybe Text
$sel:message:ChangeProgressDetails' :: ChangeProgressDetails -> Maybe Text
$sel:changeId:ChangeProgressDetails' :: ChangeProgressDetails -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
changeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message