{-# 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.AppFlow.Types.ConnectorEntity 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 ConnectorEntity = ConnectorEntity'
{
ConnectorEntity -> Maybe Bool
hasNestedEntities :: Prelude.Maybe Prelude.Bool,
ConnectorEntity -> Maybe Text
label :: Prelude.Maybe Prelude.Text,
ConnectorEntity -> Text
name :: Prelude.Text
}
deriving (ConnectorEntity -> ConnectorEntity -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectorEntity -> ConnectorEntity -> Bool
$c/= :: ConnectorEntity -> ConnectorEntity -> Bool
== :: ConnectorEntity -> ConnectorEntity -> Bool
$c== :: ConnectorEntity -> ConnectorEntity -> Bool
Prelude.Eq, ReadPrec [ConnectorEntity]
ReadPrec ConnectorEntity
Int -> ReadS ConnectorEntity
ReadS [ConnectorEntity]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectorEntity]
$creadListPrec :: ReadPrec [ConnectorEntity]
readPrec :: ReadPrec ConnectorEntity
$creadPrec :: ReadPrec ConnectorEntity
readList :: ReadS [ConnectorEntity]
$creadList :: ReadS [ConnectorEntity]
readsPrec :: Int -> ReadS ConnectorEntity
$creadsPrec :: Int -> ReadS ConnectorEntity
Prelude.Read, Int -> ConnectorEntity -> ShowS
[ConnectorEntity] -> ShowS
ConnectorEntity -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectorEntity] -> ShowS
$cshowList :: [ConnectorEntity] -> ShowS
show :: ConnectorEntity -> String
$cshow :: ConnectorEntity -> String
showsPrec :: Int -> ConnectorEntity -> ShowS
$cshowsPrec :: Int -> ConnectorEntity -> ShowS
Prelude.Show, forall x. Rep ConnectorEntity x -> ConnectorEntity
forall x. ConnectorEntity -> Rep ConnectorEntity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConnectorEntity x -> ConnectorEntity
$cfrom :: forall x. ConnectorEntity -> Rep ConnectorEntity x
Prelude.Generic)
newConnectorEntity ::
Prelude.Text ->
ConnectorEntity
newConnectorEntity :: Text -> ConnectorEntity
newConnectorEntity Text
pName_ =
ConnectorEntity'
{ $sel:hasNestedEntities:ConnectorEntity' :: Maybe Bool
hasNestedEntities =
forall a. Maybe a
Prelude.Nothing,
$sel:label:ConnectorEntity' :: Maybe Text
label = forall a. Maybe a
Prelude.Nothing,
$sel:name:ConnectorEntity' :: Text
name = Text
pName_
}
connectorEntity_hasNestedEntities :: Lens.Lens' ConnectorEntity (Prelude.Maybe Prelude.Bool)
connectorEntity_hasNestedEntities :: Lens' ConnectorEntity (Maybe Bool)
connectorEntity_hasNestedEntities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorEntity' {Maybe Bool
hasNestedEntities :: Maybe Bool
$sel:hasNestedEntities:ConnectorEntity' :: ConnectorEntity -> Maybe Bool
hasNestedEntities} -> Maybe Bool
hasNestedEntities) (\s :: ConnectorEntity
s@ConnectorEntity' {} Maybe Bool
a -> ConnectorEntity
s {$sel:hasNestedEntities:ConnectorEntity' :: Maybe Bool
hasNestedEntities = Maybe Bool
a} :: ConnectorEntity)
connectorEntity_label :: Lens.Lens' ConnectorEntity (Prelude.Maybe Prelude.Text)
connectorEntity_label :: Lens' ConnectorEntity (Maybe Text)
connectorEntity_label = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorEntity' {Maybe Text
label :: Maybe Text
$sel:label:ConnectorEntity' :: ConnectorEntity -> Maybe Text
label} -> Maybe Text
label) (\s :: ConnectorEntity
s@ConnectorEntity' {} Maybe Text
a -> ConnectorEntity
s {$sel:label:ConnectorEntity' :: Maybe Text
label = Maybe Text
a} :: ConnectorEntity)
connectorEntity_name :: Lens.Lens' ConnectorEntity Prelude.Text
connectorEntity_name :: Lens' ConnectorEntity Text
connectorEntity_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorEntity' {Text
name :: Text
$sel:name:ConnectorEntity' :: ConnectorEntity -> Text
name} -> Text
name) (\s :: ConnectorEntity
s@ConnectorEntity' {} Text
a -> ConnectorEntity
s {$sel:name:ConnectorEntity' :: Text
name = Text
a} :: ConnectorEntity)
instance Data.FromJSON ConnectorEntity where
parseJSON :: Value -> Parser ConnectorEntity
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConnectorEntity"
( \Object
x ->
Maybe Bool -> Maybe Text -> Text -> ConnectorEntity
ConnectorEntity'
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
"hasNestedEntities")
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
"label")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
)
instance Prelude.Hashable ConnectorEntity where
hashWithSalt :: Int -> ConnectorEntity -> Int
hashWithSalt Int
_salt ConnectorEntity' {Maybe Bool
Maybe Text
Text
name :: Text
label :: Maybe Text
hasNestedEntities :: Maybe Bool
$sel:name:ConnectorEntity' :: ConnectorEntity -> Text
$sel:label:ConnectorEntity' :: ConnectorEntity -> Maybe Text
$sel:hasNestedEntities:ConnectorEntity' :: ConnectorEntity -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
hasNestedEntities
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
label
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData ConnectorEntity where
rnf :: ConnectorEntity -> ()
rnf ConnectorEntity' {Maybe Bool
Maybe Text
Text
name :: Text
label :: Maybe Text
hasNestedEntities :: Maybe Bool
$sel:name:ConnectorEntity' :: ConnectorEntity -> Text
$sel:label:ConnectorEntity' :: ConnectorEntity -> Maybe Text
$sel:hasNestedEntities:ConnectorEntity' :: ConnectorEntity -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
hasNestedEntities
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
label
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name