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