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