{-# 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.ConnectorEntityField where
import Amazonka.AppFlow.Types.DestinationFieldProperties
import Amazonka.AppFlow.Types.SourceFieldProperties
import Amazonka.AppFlow.Types.SupportedFieldTypeDetails
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConnectorEntityField = ConnectorEntityField'
{
ConnectorEntityField -> Maybe SourceFieldProperties
sourceProperties :: Prelude.Maybe SourceFieldProperties,
ConnectorEntityField -> Maybe SupportedFieldTypeDetails
supportedFieldTypeDetails :: Prelude.Maybe SupportedFieldTypeDetails,
ConnectorEntityField -> Maybe DestinationFieldProperties
destinationProperties :: Prelude.Maybe DestinationFieldProperties,
ConnectorEntityField -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ConnectorEntityField -> Maybe Text
label :: Prelude.Maybe Prelude.Text,
ConnectorEntityField -> Text
identifier :: Prelude.Text
}
deriving (ConnectorEntityField -> ConnectorEntityField -> Bool
(ConnectorEntityField -> ConnectorEntityField -> Bool)
-> (ConnectorEntityField -> ConnectorEntityField -> Bool)
-> Eq ConnectorEntityField
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectorEntityField -> ConnectorEntityField -> Bool
$c/= :: ConnectorEntityField -> ConnectorEntityField -> Bool
== :: ConnectorEntityField -> ConnectorEntityField -> Bool
$c== :: ConnectorEntityField -> ConnectorEntityField -> Bool
Prelude.Eq, ReadPrec [ConnectorEntityField]
ReadPrec ConnectorEntityField
Int -> ReadS ConnectorEntityField
ReadS [ConnectorEntityField]
(Int -> ReadS ConnectorEntityField)
-> ReadS [ConnectorEntityField]
-> ReadPrec ConnectorEntityField
-> ReadPrec [ConnectorEntityField]
-> Read ConnectorEntityField
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectorEntityField]
$creadListPrec :: ReadPrec [ConnectorEntityField]
readPrec :: ReadPrec ConnectorEntityField
$creadPrec :: ReadPrec ConnectorEntityField
readList :: ReadS [ConnectorEntityField]
$creadList :: ReadS [ConnectorEntityField]
readsPrec :: Int -> ReadS ConnectorEntityField
$creadsPrec :: Int -> ReadS ConnectorEntityField
Prelude.Read, Int -> ConnectorEntityField -> ShowS
[ConnectorEntityField] -> ShowS
ConnectorEntityField -> String
(Int -> ConnectorEntityField -> ShowS)
-> (ConnectorEntityField -> String)
-> ([ConnectorEntityField] -> ShowS)
-> Show ConnectorEntityField
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectorEntityField] -> ShowS
$cshowList :: [ConnectorEntityField] -> ShowS
show :: ConnectorEntityField -> String
$cshow :: ConnectorEntityField -> String
showsPrec :: Int -> ConnectorEntityField -> ShowS
$cshowsPrec :: Int -> ConnectorEntityField -> ShowS
Prelude.Show, (forall x. ConnectorEntityField -> Rep ConnectorEntityField x)
-> (forall x. Rep ConnectorEntityField x -> ConnectorEntityField)
-> Generic ConnectorEntityField
forall x. Rep ConnectorEntityField x -> ConnectorEntityField
forall x. ConnectorEntityField -> Rep ConnectorEntityField x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConnectorEntityField x -> ConnectorEntityField
$cfrom :: forall x. ConnectorEntityField -> Rep ConnectorEntityField x
Prelude.Generic)
newConnectorEntityField ::
Prelude.Text ->
ConnectorEntityField
newConnectorEntityField :: Text -> ConnectorEntityField
newConnectorEntityField Text
pIdentifier_ =
ConnectorEntityField' :: Maybe SourceFieldProperties
-> Maybe SupportedFieldTypeDetails
-> Maybe DestinationFieldProperties
-> Maybe Text
-> Maybe Text
-> Text
-> ConnectorEntityField
ConnectorEntityField'
{ $sel:sourceProperties:ConnectorEntityField' :: Maybe SourceFieldProperties
sourceProperties =
Maybe SourceFieldProperties
forall a. Maybe a
Prelude.Nothing,
$sel:supportedFieldTypeDetails:ConnectorEntityField' :: Maybe SupportedFieldTypeDetails
supportedFieldTypeDetails = Maybe SupportedFieldTypeDetails
forall a. Maybe a
Prelude.Nothing,
$sel:destinationProperties:ConnectorEntityField' :: Maybe DestinationFieldProperties
destinationProperties = Maybe DestinationFieldProperties
forall a. Maybe a
Prelude.Nothing,
$sel:description:ConnectorEntityField' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:label:ConnectorEntityField' :: Maybe Text
label = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identifier:ConnectorEntityField' :: Text
identifier = Text
pIdentifier_
}
connectorEntityField_sourceProperties :: Lens.Lens' ConnectorEntityField (Prelude.Maybe SourceFieldProperties)
connectorEntityField_sourceProperties :: (Maybe SourceFieldProperties -> f (Maybe SourceFieldProperties))
-> ConnectorEntityField -> f ConnectorEntityField
connectorEntityField_sourceProperties = (ConnectorEntityField -> Maybe SourceFieldProperties)
-> (ConnectorEntityField
-> Maybe SourceFieldProperties -> ConnectorEntityField)
-> Lens
ConnectorEntityField
ConnectorEntityField
(Maybe SourceFieldProperties)
(Maybe SourceFieldProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorEntityField' {Maybe SourceFieldProperties
sourceProperties :: Maybe SourceFieldProperties
$sel:sourceProperties:ConnectorEntityField' :: ConnectorEntityField -> Maybe SourceFieldProperties
sourceProperties} -> Maybe SourceFieldProperties
sourceProperties) (\s :: ConnectorEntityField
s@ConnectorEntityField' {} Maybe SourceFieldProperties
a -> ConnectorEntityField
s {$sel:sourceProperties:ConnectorEntityField' :: Maybe SourceFieldProperties
sourceProperties = Maybe SourceFieldProperties
a} :: ConnectorEntityField)
connectorEntityField_supportedFieldTypeDetails :: Lens.Lens' ConnectorEntityField (Prelude.Maybe SupportedFieldTypeDetails)
connectorEntityField_supportedFieldTypeDetails :: (Maybe SupportedFieldTypeDetails
-> f (Maybe SupportedFieldTypeDetails))
-> ConnectorEntityField -> f ConnectorEntityField
connectorEntityField_supportedFieldTypeDetails = (ConnectorEntityField -> Maybe SupportedFieldTypeDetails)
-> (ConnectorEntityField
-> Maybe SupportedFieldTypeDetails -> ConnectorEntityField)
-> Lens
ConnectorEntityField
ConnectorEntityField
(Maybe SupportedFieldTypeDetails)
(Maybe SupportedFieldTypeDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorEntityField' {Maybe SupportedFieldTypeDetails
supportedFieldTypeDetails :: Maybe SupportedFieldTypeDetails
$sel:supportedFieldTypeDetails:ConnectorEntityField' :: ConnectorEntityField -> Maybe SupportedFieldTypeDetails
supportedFieldTypeDetails} -> Maybe SupportedFieldTypeDetails
supportedFieldTypeDetails) (\s :: ConnectorEntityField
s@ConnectorEntityField' {} Maybe SupportedFieldTypeDetails
a -> ConnectorEntityField
s {$sel:supportedFieldTypeDetails:ConnectorEntityField' :: Maybe SupportedFieldTypeDetails
supportedFieldTypeDetails = Maybe SupportedFieldTypeDetails
a} :: ConnectorEntityField)
connectorEntityField_destinationProperties :: Lens.Lens' ConnectorEntityField (Prelude.Maybe DestinationFieldProperties)
connectorEntityField_destinationProperties :: (Maybe DestinationFieldProperties
-> f (Maybe DestinationFieldProperties))
-> ConnectorEntityField -> f ConnectorEntityField
connectorEntityField_destinationProperties = (ConnectorEntityField -> Maybe DestinationFieldProperties)
-> (ConnectorEntityField
-> Maybe DestinationFieldProperties -> ConnectorEntityField)
-> Lens
ConnectorEntityField
ConnectorEntityField
(Maybe DestinationFieldProperties)
(Maybe DestinationFieldProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorEntityField' {Maybe DestinationFieldProperties
destinationProperties :: Maybe DestinationFieldProperties
$sel:destinationProperties:ConnectorEntityField' :: ConnectorEntityField -> Maybe DestinationFieldProperties
destinationProperties} -> Maybe DestinationFieldProperties
destinationProperties) (\s :: ConnectorEntityField
s@ConnectorEntityField' {} Maybe DestinationFieldProperties
a -> ConnectorEntityField
s {$sel:destinationProperties:ConnectorEntityField' :: Maybe DestinationFieldProperties
destinationProperties = Maybe DestinationFieldProperties
a} :: ConnectorEntityField)
connectorEntityField_description :: Lens.Lens' ConnectorEntityField (Prelude.Maybe Prelude.Text)
connectorEntityField_description :: (Maybe Text -> f (Maybe Text))
-> ConnectorEntityField -> f ConnectorEntityField
connectorEntityField_description = (ConnectorEntityField -> Maybe Text)
-> (ConnectorEntityField -> Maybe Text -> ConnectorEntityField)
-> Lens
ConnectorEntityField ConnectorEntityField (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorEntityField' {Maybe Text
description :: Maybe Text
$sel:description:ConnectorEntityField' :: ConnectorEntityField -> Maybe Text
description} -> Maybe Text
description) (\s :: ConnectorEntityField
s@ConnectorEntityField' {} Maybe Text
a -> ConnectorEntityField
s {$sel:description:ConnectorEntityField' :: Maybe Text
description = Maybe Text
a} :: ConnectorEntityField)
connectorEntityField_label :: Lens.Lens' ConnectorEntityField (Prelude.Maybe Prelude.Text)
connectorEntityField_label :: (Maybe Text -> f (Maybe Text))
-> ConnectorEntityField -> f ConnectorEntityField
connectorEntityField_label = (ConnectorEntityField -> Maybe Text)
-> (ConnectorEntityField -> Maybe Text -> ConnectorEntityField)
-> Lens
ConnectorEntityField ConnectorEntityField (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorEntityField' {Maybe Text
label :: Maybe Text
$sel:label:ConnectorEntityField' :: ConnectorEntityField -> Maybe Text
label} -> Maybe Text
label) (\s :: ConnectorEntityField
s@ConnectorEntityField' {} Maybe Text
a -> ConnectorEntityField
s {$sel:label:ConnectorEntityField' :: Maybe Text
label = Maybe Text
a} :: ConnectorEntityField)
connectorEntityField_identifier :: Lens.Lens' ConnectorEntityField Prelude.Text
connectorEntityField_identifier :: (Text -> f Text) -> ConnectorEntityField -> f ConnectorEntityField
connectorEntityField_identifier = (ConnectorEntityField -> Text)
-> (ConnectorEntityField -> Text -> ConnectorEntityField)
-> Lens ConnectorEntityField ConnectorEntityField Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorEntityField' {Text
identifier :: Text
$sel:identifier:ConnectorEntityField' :: ConnectorEntityField -> Text
identifier} -> Text
identifier) (\s :: ConnectorEntityField
s@ConnectorEntityField' {} Text
a -> ConnectorEntityField
s {$sel:identifier:ConnectorEntityField' :: Text
identifier = Text
a} :: ConnectorEntityField)
instance Core.FromJSON ConnectorEntityField where
parseJSON :: Value -> Parser ConnectorEntityField
parseJSON =
String
-> (Object -> Parser ConnectorEntityField)
-> Value
-> Parser ConnectorEntityField
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConnectorEntityField"
( \Object
x ->
Maybe SourceFieldProperties
-> Maybe SupportedFieldTypeDetails
-> Maybe DestinationFieldProperties
-> Maybe Text
-> Maybe Text
-> Text
-> ConnectorEntityField
ConnectorEntityField'
(Maybe SourceFieldProperties
-> Maybe SupportedFieldTypeDetails
-> Maybe DestinationFieldProperties
-> Maybe Text
-> Maybe Text
-> Text
-> ConnectorEntityField)
-> Parser (Maybe SourceFieldProperties)
-> Parser
(Maybe SupportedFieldTypeDetails
-> Maybe DestinationFieldProperties
-> Maybe Text
-> Maybe Text
-> Text
-> ConnectorEntityField)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SourceFieldProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sourceProperties")
Parser
(Maybe SupportedFieldTypeDetails
-> Maybe DestinationFieldProperties
-> Maybe Text
-> Maybe Text
-> Text
-> ConnectorEntityField)
-> Parser (Maybe SupportedFieldTypeDetails)
-> Parser
(Maybe DestinationFieldProperties
-> Maybe Text -> Maybe Text -> Text -> ConnectorEntityField)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SupportedFieldTypeDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"supportedFieldTypeDetails")
Parser
(Maybe DestinationFieldProperties
-> Maybe Text -> Maybe Text -> Text -> ConnectorEntityField)
-> Parser (Maybe DestinationFieldProperties)
-> Parser
(Maybe Text -> Maybe Text -> Text -> ConnectorEntityField)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DestinationFieldProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destinationProperties")
Parser (Maybe Text -> Maybe Text -> Text -> ConnectorEntityField)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> ConnectorEntityField)
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
"description")
Parser (Maybe Text -> Text -> ConnectorEntityField)
-> Parser (Maybe Text) -> Parser (Text -> ConnectorEntityField)
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 -> ConnectorEntityField)
-> Parser Text -> Parser ConnectorEntityField
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
"identifier")
)
instance Prelude.Hashable ConnectorEntityField
instance Prelude.NFData ConnectorEntityField