{-# 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.Lens as Lens
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
(ConnectorEntity -> ConnectorEntity -> Bool)
-> (ConnectorEntity -> ConnectorEntity -> Bool)
-> Eq ConnectorEntity
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]
(Int -> ReadS ConnectorEntity)
-> ReadS [ConnectorEntity]
-> ReadPrec ConnectorEntity
-> ReadPrec [ConnectorEntity]
-> Read 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
(Int -> ConnectorEntity -> ShowS)
-> (ConnectorEntity -> String)
-> ([ConnectorEntity] -> ShowS)
-> Show ConnectorEntity
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. ConnectorEntity -> Rep ConnectorEntity x)
-> (forall x. Rep ConnectorEntity x -> ConnectorEntity)
-> Generic ConnectorEntity
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' :: Maybe Bool -> Maybe Text -> Text -> ConnectorEntity
ConnectorEntity'
{ $sel:hasNestedEntities:ConnectorEntity' :: Maybe Bool
hasNestedEntities =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:label:ConnectorEntity' :: Maybe Text
label = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ConnectorEntity' :: Text
name = Text
pName_
}
connectorEntity_hasNestedEntities :: Lens.Lens' ConnectorEntity (Prelude.Maybe Prelude.Bool)
connectorEntity_hasNestedEntities :: (Maybe Bool -> f (Maybe Bool))
-> ConnectorEntity -> f ConnectorEntity
connectorEntity_hasNestedEntities = (ConnectorEntity -> Maybe Bool)
-> (ConnectorEntity -> Maybe Bool -> ConnectorEntity)
-> Lens ConnectorEntity ConnectorEntity (Maybe Bool) (Maybe Bool)
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 :: (Maybe Text -> f (Maybe Text))
-> ConnectorEntity -> f ConnectorEntity
connectorEntity_label = (ConnectorEntity -> Maybe Text)
-> (ConnectorEntity -> Maybe Text -> ConnectorEntity)
-> Lens ConnectorEntity ConnectorEntity (Maybe Text) (Maybe Text)
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 :: (Text -> f Text) -> ConnectorEntity -> f ConnectorEntity
connectorEntity_name = (ConnectorEntity -> Text)
-> (ConnectorEntity -> Text -> ConnectorEntity)
-> Lens ConnectorEntity ConnectorEntity Text Text
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 Core.FromJSON ConnectorEntity where
parseJSON :: Value -> Parser ConnectorEntity
parseJSON =
String
-> (Object -> Parser ConnectorEntity)
-> Value
-> Parser ConnectorEntity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConnectorEntity"
( \Object
x ->
Maybe Bool -> Maybe Text -> Text -> ConnectorEntity
ConnectorEntity'
(Maybe Bool -> Maybe Text -> Text -> ConnectorEntity)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Text -> ConnectorEntity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hasNestedEntities")
Parser (Maybe Text -> Text -> ConnectorEntity)
-> Parser (Maybe Text) -> Parser (Text -> ConnectorEntity)
forall (f :: * -> *) a b. Applicative f => 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
"label")
Parser (Text -> ConnectorEntity)
-> Parser Text -> Parser ConnectorEntity
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
)
instance Prelude.Hashable ConnectorEntity
instance Prelude.NFData ConnectorEntity