{-# 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.HoneycodeDestinationProperties where
import Amazonka.AppFlow.Types.ErrorHandlingConfig
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 HoneycodeDestinationProperties = HoneycodeDestinationProperties'
{ HoneycodeDestinationProperties -> Maybe ErrorHandlingConfig
errorHandlingConfig :: Prelude.Maybe ErrorHandlingConfig,
HoneycodeDestinationProperties -> Text
object' :: Prelude.Text
}
deriving (HoneycodeDestinationProperties
-> HoneycodeDestinationProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HoneycodeDestinationProperties
-> HoneycodeDestinationProperties -> Bool
$c/= :: HoneycodeDestinationProperties
-> HoneycodeDestinationProperties -> Bool
== :: HoneycodeDestinationProperties
-> HoneycodeDestinationProperties -> Bool
$c== :: HoneycodeDestinationProperties
-> HoneycodeDestinationProperties -> Bool
Prelude.Eq, ReadPrec [HoneycodeDestinationProperties]
ReadPrec HoneycodeDestinationProperties
Int -> ReadS HoneycodeDestinationProperties
ReadS [HoneycodeDestinationProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HoneycodeDestinationProperties]
$creadListPrec :: ReadPrec [HoneycodeDestinationProperties]
readPrec :: ReadPrec HoneycodeDestinationProperties
$creadPrec :: ReadPrec HoneycodeDestinationProperties
readList :: ReadS [HoneycodeDestinationProperties]
$creadList :: ReadS [HoneycodeDestinationProperties]
readsPrec :: Int -> ReadS HoneycodeDestinationProperties
$creadsPrec :: Int -> ReadS HoneycodeDestinationProperties
Prelude.Read, Int -> HoneycodeDestinationProperties -> ShowS
[HoneycodeDestinationProperties] -> ShowS
HoneycodeDestinationProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HoneycodeDestinationProperties] -> ShowS
$cshowList :: [HoneycodeDestinationProperties] -> ShowS
show :: HoneycodeDestinationProperties -> String
$cshow :: HoneycodeDestinationProperties -> String
showsPrec :: Int -> HoneycodeDestinationProperties -> ShowS
$cshowsPrec :: Int -> HoneycodeDestinationProperties -> ShowS
Prelude.Show, forall x.
Rep HoneycodeDestinationProperties x
-> HoneycodeDestinationProperties
forall x.
HoneycodeDestinationProperties
-> Rep HoneycodeDestinationProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HoneycodeDestinationProperties x
-> HoneycodeDestinationProperties
$cfrom :: forall x.
HoneycodeDestinationProperties
-> Rep HoneycodeDestinationProperties x
Prelude.Generic)
newHoneycodeDestinationProperties ::
Prelude.Text ->
HoneycodeDestinationProperties
newHoneycodeDestinationProperties :: Text -> HoneycodeDestinationProperties
newHoneycodeDestinationProperties Text
pObject_ =
HoneycodeDestinationProperties'
{ $sel:errorHandlingConfig:HoneycodeDestinationProperties' :: Maybe ErrorHandlingConfig
errorHandlingConfig =
forall a. Maybe a
Prelude.Nothing,
$sel:object':HoneycodeDestinationProperties' :: Text
object' = Text
pObject_
}
honeycodeDestinationProperties_errorHandlingConfig :: Lens.Lens' HoneycodeDestinationProperties (Prelude.Maybe ErrorHandlingConfig)
honeycodeDestinationProperties_errorHandlingConfig :: Lens' HoneycodeDestinationProperties (Maybe ErrorHandlingConfig)
honeycodeDestinationProperties_errorHandlingConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HoneycodeDestinationProperties' {Maybe ErrorHandlingConfig
errorHandlingConfig :: Maybe ErrorHandlingConfig
$sel:errorHandlingConfig:HoneycodeDestinationProperties' :: HoneycodeDestinationProperties -> Maybe ErrorHandlingConfig
errorHandlingConfig} -> Maybe ErrorHandlingConfig
errorHandlingConfig) (\s :: HoneycodeDestinationProperties
s@HoneycodeDestinationProperties' {} Maybe ErrorHandlingConfig
a -> HoneycodeDestinationProperties
s {$sel:errorHandlingConfig:HoneycodeDestinationProperties' :: Maybe ErrorHandlingConfig
errorHandlingConfig = Maybe ErrorHandlingConfig
a} :: HoneycodeDestinationProperties)
honeycodeDestinationProperties_object :: Lens.Lens' HoneycodeDestinationProperties Prelude.Text
honeycodeDestinationProperties_object :: Lens' HoneycodeDestinationProperties Text
honeycodeDestinationProperties_object = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HoneycodeDestinationProperties' {Text
object' :: Text
$sel:object':HoneycodeDestinationProperties' :: HoneycodeDestinationProperties -> Text
object'} -> Text
object') (\s :: HoneycodeDestinationProperties
s@HoneycodeDestinationProperties' {} Text
a -> HoneycodeDestinationProperties
s {$sel:object':HoneycodeDestinationProperties' :: Text
object' = Text
a} :: HoneycodeDestinationProperties)
instance Data.FromJSON HoneycodeDestinationProperties where
parseJSON :: Value -> Parser HoneycodeDestinationProperties
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HoneycodeDestinationProperties"
( \Object
x ->
Maybe ErrorHandlingConfig -> Text -> HoneycodeDestinationProperties
HoneycodeDestinationProperties'
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
"errorHandlingConfig")
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
"object")
)
instance
Prelude.Hashable
HoneycodeDestinationProperties
where
hashWithSalt :: Int -> HoneycodeDestinationProperties -> Int
hashWithSalt
Int
_salt
HoneycodeDestinationProperties' {Maybe ErrorHandlingConfig
Text
object' :: Text
errorHandlingConfig :: Maybe ErrorHandlingConfig
$sel:object':HoneycodeDestinationProperties' :: HoneycodeDestinationProperties -> Text
$sel:errorHandlingConfig:HoneycodeDestinationProperties' :: HoneycodeDestinationProperties -> Maybe ErrorHandlingConfig
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ErrorHandlingConfig
errorHandlingConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
object'
instance
Prelude.NFData
HoneycodeDestinationProperties
where
rnf :: HoneycodeDestinationProperties -> ()
rnf HoneycodeDestinationProperties' {Maybe ErrorHandlingConfig
Text
object' :: Text
errorHandlingConfig :: Maybe ErrorHandlingConfig
$sel:object':HoneycodeDestinationProperties' :: HoneycodeDestinationProperties -> Text
$sel:errorHandlingConfig:HoneycodeDestinationProperties' :: HoneycodeDestinationProperties -> Maybe ErrorHandlingConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ErrorHandlingConfig
errorHandlingConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
object'
instance Data.ToJSON HoneycodeDestinationProperties where
toJSON :: HoneycodeDestinationProperties -> Value
toJSON HoneycodeDestinationProperties' {Maybe ErrorHandlingConfig
Text
object' :: Text
errorHandlingConfig :: Maybe ErrorHandlingConfig
$sel:object':HoneycodeDestinationProperties' :: HoneycodeDestinationProperties -> Text
$sel:errorHandlingConfig:HoneycodeDestinationProperties' :: HoneycodeDestinationProperties -> Maybe ErrorHandlingConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"errorHandlingConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ErrorHandlingConfig
errorHandlingConfig,
forall a. a -> Maybe a
Prelude.Just (Key
"object" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
object')
]
)