{-# 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.DryRunResults 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 DryRunResults = DryRunResults'
{
DryRunResults -> Maybe Text
deploymentType :: Prelude.Maybe Prelude.Text,
DryRunResults -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (DryRunResults -> DryRunResults -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DryRunResults -> DryRunResults -> Bool
$c/= :: DryRunResults -> DryRunResults -> Bool
== :: DryRunResults -> DryRunResults -> Bool
$c== :: DryRunResults -> DryRunResults -> Bool
Prelude.Eq, ReadPrec [DryRunResults]
ReadPrec DryRunResults
Int -> ReadS DryRunResults
ReadS [DryRunResults]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DryRunResults]
$creadListPrec :: ReadPrec [DryRunResults]
readPrec :: ReadPrec DryRunResults
$creadPrec :: ReadPrec DryRunResults
readList :: ReadS [DryRunResults]
$creadList :: ReadS [DryRunResults]
readsPrec :: Int -> ReadS DryRunResults
$creadsPrec :: Int -> ReadS DryRunResults
Prelude.Read, Int -> DryRunResults -> ShowS
[DryRunResults] -> ShowS
DryRunResults -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DryRunResults] -> ShowS
$cshowList :: [DryRunResults] -> ShowS
show :: DryRunResults -> String
$cshow :: DryRunResults -> String
showsPrec :: Int -> DryRunResults -> ShowS
$cshowsPrec :: Int -> DryRunResults -> ShowS
Prelude.Show, forall x. Rep DryRunResults x -> DryRunResults
forall x. DryRunResults -> Rep DryRunResults x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DryRunResults x -> DryRunResults
$cfrom :: forall x. DryRunResults -> Rep DryRunResults x
Prelude.Generic)
newDryRunResults ::
DryRunResults
newDryRunResults :: DryRunResults
newDryRunResults =
DryRunResults'
{ $sel:deploymentType:DryRunResults' :: Maybe Text
deploymentType = forall a. Maybe a
Prelude.Nothing,
$sel:message:DryRunResults' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing
}
dryRunResults_deploymentType :: Lens.Lens' DryRunResults (Prelude.Maybe Prelude.Text)
dryRunResults_deploymentType :: Lens' DryRunResults (Maybe Text)
dryRunResults_deploymentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DryRunResults' {Maybe Text
deploymentType :: Maybe Text
$sel:deploymentType:DryRunResults' :: DryRunResults -> Maybe Text
deploymentType} -> Maybe Text
deploymentType) (\s :: DryRunResults
s@DryRunResults' {} Maybe Text
a -> DryRunResults
s {$sel:deploymentType:DryRunResults' :: Maybe Text
deploymentType = Maybe Text
a} :: DryRunResults)
dryRunResults_message :: Lens.Lens' DryRunResults (Prelude.Maybe Prelude.Text)
dryRunResults_message :: Lens' DryRunResults (Maybe Text)
dryRunResults_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DryRunResults' {Maybe Text
message :: Maybe Text
$sel:message:DryRunResults' :: DryRunResults -> Maybe Text
message} -> Maybe Text
message) (\s :: DryRunResults
s@DryRunResults' {} Maybe Text
a -> DryRunResults
s {$sel:message:DryRunResults' :: Maybe Text
message = Maybe Text
a} :: DryRunResults)
instance Data.FromJSON DryRunResults where
parseJSON :: Value -> Parser DryRunResults
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DryRunResults"
( \Object
x ->
Maybe Text -> Maybe Text -> DryRunResults
DryRunResults'
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
"DeploymentType")
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 DryRunResults where
hashWithSalt :: Int -> DryRunResults -> Int
hashWithSalt Int
_salt DryRunResults' {Maybe Text
message :: Maybe Text
deploymentType :: Maybe Text
$sel:message:DryRunResults' :: DryRunResults -> Maybe Text
$sel:deploymentType:DryRunResults' :: DryRunResults -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deploymentType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
instance Prelude.NFData DryRunResults where
rnf :: DryRunResults -> ()
rnf DryRunResults' {Maybe Text
message :: Maybe Text
deploymentType :: Maybe Text
$sel:message:DryRunResults' :: DryRunResults -> Maybe Text
$sel:deploymentType:DryRunResults' :: DryRunResults -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deploymentType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message