{-# 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.CloudSearchDomains.Types.SearchStatus where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SearchStatus = SearchStatus'
{
SearchStatus -> Maybe Text
rid :: Prelude.Maybe Prelude.Text,
SearchStatus -> Maybe Integer
timems :: Prelude.Maybe Prelude.Integer
}
deriving (SearchStatus -> SearchStatus -> Bool
(SearchStatus -> SearchStatus -> Bool)
-> (SearchStatus -> SearchStatus -> Bool) -> Eq SearchStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchStatus -> SearchStatus -> Bool
$c/= :: SearchStatus -> SearchStatus -> Bool
== :: SearchStatus -> SearchStatus -> Bool
$c== :: SearchStatus -> SearchStatus -> Bool
Prelude.Eq, ReadPrec [SearchStatus]
ReadPrec SearchStatus
Int -> ReadS SearchStatus
ReadS [SearchStatus]
(Int -> ReadS SearchStatus)
-> ReadS [SearchStatus]
-> ReadPrec SearchStatus
-> ReadPrec [SearchStatus]
-> Read SearchStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchStatus]
$creadListPrec :: ReadPrec [SearchStatus]
readPrec :: ReadPrec SearchStatus
$creadPrec :: ReadPrec SearchStatus
readList :: ReadS [SearchStatus]
$creadList :: ReadS [SearchStatus]
readsPrec :: Int -> ReadS SearchStatus
$creadsPrec :: Int -> ReadS SearchStatus
Prelude.Read, Int -> SearchStatus -> ShowS
[SearchStatus] -> ShowS
SearchStatus -> String
(Int -> SearchStatus -> ShowS)
-> (SearchStatus -> String)
-> ([SearchStatus] -> ShowS)
-> Show SearchStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchStatus] -> ShowS
$cshowList :: [SearchStatus] -> ShowS
show :: SearchStatus -> String
$cshow :: SearchStatus -> String
showsPrec :: Int -> SearchStatus -> ShowS
$cshowsPrec :: Int -> SearchStatus -> ShowS
Prelude.Show, (forall x. SearchStatus -> Rep SearchStatus x)
-> (forall x. Rep SearchStatus x -> SearchStatus)
-> Generic SearchStatus
forall x. Rep SearchStatus x -> SearchStatus
forall x. SearchStatus -> Rep SearchStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchStatus x -> SearchStatus
$cfrom :: forall x. SearchStatus -> Rep SearchStatus x
Prelude.Generic)
newSearchStatus ::
SearchStatus
newSearchStatus :: SearchStatus
newSearchStatus =
SearchStatus' :: Maybe Text -> Maybe Integer -> SearchStatus
SearchStatus'
{ $sel:rid:SearchStatus' :: Maybe Text
rid = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timems:SearchStatus' :: Maybe Integer
timems = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
searchStatus_rid :: Lens.Lens' SearchStatus (Prelude.Maybe Prelude.Text)
searchStatus_rid :: (Maybe Text -> f (Maybe Text)) -> SearchStatus -> f SearchStatus
searchStatus_rid = (SearchStatus -> Maybe Text)
-> (SearchStatus -> Maybe Text -> SearchStatus)
-> Lens SearchStatus SearchStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchStatus' {Maybe Text
rid :: Maybe Text
$sel:rid:SearchStatus' :: SearchStatus -> Maybe Text
rid} -> Maybe Text
rid) (\s :: SearchStatus
s@SearchStatus' {} Maybe Text
a -> SearchStatus
s {$sel:rid:SearchStatus' :: Maybe Text
rid = Maybe Text
a} :: SearchStatus)
searchStatus_timems :: Lens.Lens' SearchStatus (Prelude.Maybe Prelude.Integer)
searchStatus_timems :: (Maybe Integer -> f (Maybe Integer))
-> SearchStatus -> f SearchStatus
searchStatus_timems = (SearchStatus -> Maybe Integer)
-> (SearchStatus -> Maybe Integer -> SearchStatus)
-> Lens SearchStatus SearchStatus (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchStatus' {Maybe Integer
timems :: Maybe Integer
$sel:timems:SearchStatus' :: SearchStatus -> Maybe Integer
timems} -> Maybe Integer
timems) (\s :: SearchStatus
s@SearchStatus' {} Maybe Integer
a -> SearchStatus
s {$sel:timems:SearchStatus' :: Maybe Integer
timems = Maybe Integer
a} :: SearchStatus)
instance Core.FromJSON SearchStatus where
parseJSON :: Value -> Parser SearchStatus
parseJSON =
String
-> (Object -> Parser SearchStatus) -> Value -> Parser SearchStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SearchStatus"
( \Object
x ->
Maybe Text -> Maybe Integer -> SearchStatus
SearchStatus'
(Maybe Text -> Maybe Integer -> SearchStatus)
-> Parser (Maybe Text) -> Parser (Maybe Integer -> SearchStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"rid") Parser (Maybe Integer -> SearchStatus)
-> Parser (Maybe Integer) -> Parser SearchStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timems")
)
instance Prelude.Hashable SearchStatus
instance Prelude.NFData SearchStatus