{-# 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.DestinationFieldProperties where
import Amazonka.AppFlow.Types.WriteOperationType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DestinationFieldProperties = DestinationFieldProperties'
{
DestinationFieldProperties -> Maybe Bool
isUpdatable :: Prelude.Maybe Prelude.Bool,
DestinationFieldProperties -> Maybe Bool
isNullable :: Prelude.Maybe Prelude.Bool,
DestinationFieldProperties -> Maybe [WriteOperationType]
supportedWriteOperations :: Prelude.Maybe [WriteOperationType],
DestinationFieldProperties -> Maybe Bool
isUpsertable :: Prelude.Maybe Prelude.Bool,
DestinationFieldProperties -> Maybe Bool
isCreatable :: Prelude.Maybe Prelude.Bool
}
deriving (DestinationFieldProperties -> DestinationFieldProperties -> Bool
(DestinationFieldProperties -> DestinationFieldProperties -> Bool)
-> (DestinationFieldProperties
-> DestinationFieldProperties -> Bool)
-> Eq DestinationFieldProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DestinationFieldProperties -> DestinationFieldProperties -> Bool
$c/= :: DestinationFieldProperties -> DestinationFieldProperties -> Bool
== :: DestinationFieldProperties -> DestinationFieldProperties -> Bool
$c== :: DestinationFieldProperties -> DestinationFieldProperties -> Bool
Prelude.Eq, ReadPrec [DestinationFieldProperties]
ReadPrec DestinationFieldProperties
Int -> ReadS DestinationFieldProperties
ReadS [DestinationFieldProperties]
(Int -> ReadS DestinationFieldProperties)
-> ReadS [DestinationFieldProperties]
-> ReadPrec DestinationFieldProperties
-> ReadPrec [DestinationFieldProperties]
-> Read DestinationFieldProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DestinationFieldProperties]
$creadListPrec :: ReadPrec [DestinationFieldProperties]
readPrec :: ReadPrec DestinationFieldProperties
$creadPrec :: ReadPrec DestinationFieldProperties
readList :: ReadS [DestinationFieldProperties]
$creadList :: ReadS [DestinationFieldProperties]
readsPrec :: Int -> ReadS DestinationFieldProperties
$creadsPrec :: Int -> ReadS DestinationFieldProperties
Prelude.Read, Int -> DestinationFieldProperties -> ShowS
[DestinationFieldProperties] -> ShowS
DestinationFieldProperties -> String
(Int -> DestinationFieldProperties -> ShowS)
-> (DestinationFieldProperties -> String)
-> ([DestinationFieldProperties] -> ShowS)
-> Show DestinationFieldProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DestinationFieldProperties] -> ShowS
$cshowList :: [DestinationFieldProperties] -> ShowS
show :: DestinationFieldProperties -> String
$cshow :: DestinationFieldProperties -> String
showsPrec :: Int -> DestinationFieldProperties -> ShowS
$cshowsPrec :: Int -> DestinationFieldProperties -> ShowS
Prelude.Show, (forall x.
DestinationFieldProperties -> Rep DestinationFieldProperties x)
-> (forall x.
Rep DestinationFieldProperties x -> DestinationFieldProperties)
-> Generic DestinationFieldProperties
forall x.
Rep DestinationFieldProperties x -> DestinationFieldProperties
forall x.
DestinationFieldProperties -> Rep DestinationFieldProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DestinationFieldProperties x -> DestinationFieldProperties
$cfrom :: forall x.
DestinationFieldProperties -> Rep DestinationFieldProperties x
Prelude.Generic)
newDestinationFieldProperties ::
DestinationFieldProperties
newDestinationFieldProperties :: DestinationFieldProperties
newDestinationFieldProperties =
DestinationFieldProperties' :: Maybe Bool
-> Maybe Bool
-> Maybe [WriteOperationType]
-> Maybe Bool
-> Maybe Bool
-> DestinationFieldProperties
DestinationFieldProperties'
{ $sel:isUpdatable:DestinationFieldProperties' :: Maybe Bool
isUpdatable =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:isNullable:DestinationFieldProperties' :: Maybe Bool
isNullable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:supportedWriteOperations:DestinationFieldProperties' :: Maybe [WriteOperationType]
supportedWriteOperations = Maybe [WriteOperationType]
forall a. Maybe a
Prelude.Nothing,
$sel:isUpsertable:DestinationFieldProperties' :: Maybe Bool
isUpsertable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:isCreatable:DestinationFieldProperties' :: Maybe Bool
isCreatable = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
destinationFieldProperties_isUpdatable :: Lens.Lens' DestinationFieldProperties (Prelude.Maybe Prelude.Bool)
destinationFieldProperties_isUpdatable :: (Maybe Bool -> f (Maybe Bool))
-> DestinationFieldProperties -> f DestinationFieldProperties
destinationFieldProperties_isUpdatable = (DestinationFieldProperties -> Maybe Bool)
-> (DestinationFieldProperties
-> Maybe Bool -> DestinationFieldProperties)
-> Lens
DestinationFieldProperties
DestinationFieldProperties
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DestinationFieldProperties' {Maybe Bool
isUpdatable :: Maybe Bool
$sel:isUpdatable:DestinationFieldProperties' :: DestinationFieldProperties -> Maybe Bool
isUpdatable} -> Maybe Bool
isUpdatable) (\s :: DestinationFieldProperties
s@DestinationFieldProperties' {} Maybe Bool
a -> DestinationFieldProperties
s {$sel:isUpdatable:DestinationFieldProperties' :: Maybe Bool
isUpdatable = Maybe Bool
a} :: DestinationFieldProperties)
destinationFieldProperties_isNullable :: Lens.Lens' DestinationFieldProperties (Prelude.Maybe Prelude.Bool)
destinationFieldProperties_isNullable :: (Maybe Bool -> f (Maybe Bool))
-> DestinationFieldProperties -> f DestinationFieldProperties
destinationFieldProperties_isNullable = (DestinationFieldProperties -> Maybe Bool)
-> (DestinationFieldProperties
-> Maybe Bool -> DestinationFieldProperties)
-> Lens
DestinationFieldProperties
DestinationFieldProperties
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DestinationFieldProperties' {Maybe Bool
isNullable :: Maybe Bool
$sel:isNullable:DestinationFieldProperties' :: DestinationFieldProperties -> Maybe Bool
isNullable} -> Maybe Bool
isNullable) (\s :: DestinationFieldProperties
s@DestinationFieldProperties' {} Maybe Bool
a -> DestinationFieldProperties
s {$sel:isNullable:DestinationFieldProperties' :: Maybe Bool
isNullable = Maybe Bool
a} :: DestinationFieldProperties)
destinationFieldProperties_supportedWriteOperations :: Lens.Lens' DestinationFieldProperties (Prelude.Maybe [WriteOperationType])
destinationFieldProperties_supportedWriteOperations :: (Maybe [WriteOperationType] -> f (Maybe [WriteOperationType]))
-> DestinationFieldProperties -> f DestinationFieldProperties
destinationFieldProperties_supportedWriteOperations = (DestinationFieldProperties -> Maybe [WriteOperationType])
-> (DestinationFieldProperties
-> Maybe [WriteOperationType] -> DestinationFieldProperties)
-> Lens
DestinationFieldProperties
DestinationFieldProperties
(Maybe [WriteOperationType])
(Maybe [WriteOperationType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DestinationFieldProperties' {Maybe [WriteOperationType]
supportedWriteOperations :: Maybe [WriteOperationType]
$sel:supportedWriteOperations:DestinationFieldProperties' :: DestinationFieldProperties -> Maybe [WriteOperationType]
supportedWriteOperations} -> Maybe [WriteOperationType]
supportedWriteOperations) (\s :: DestinationFieldProperties
s@DestinationFieldProperties' {} Maybe [WriteOperationType]
a -> DestinationFieldProperties
s {$sel:supportedWriteOperations:DestinationFieldProperties' :: Maybe [WriteOperationType]
supportedWriteOperations = Maybe [WriteOperationType]
a} :: DestinationFieldProperties) ((Maybe [WriteOperationType] -> f (Maybe [WriteOperationType]))
-> DestinationFieldProperties -> f DestinationFieldProperties)
-> ((Maybe [WriteOperationType] -> f (Maybe [WriteOperationType]))
-> Maybe [WriteOperationType] -> f (Maybe [WriteOperationType]))
-> (Maybe [WriteOperationType] -> f (Maybe [WriteOperationType]))
-> DestinationFieldProperties
-> f DestinationFieldProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[WriteOperationType]
[WriteOperationType]
[WriteOperationType]
[WriteOperationType]
-> Iso
(Maybe [WriteOperationType])
(Maybe [WriteOperationType])
(Maybe [WriteOperationType])
(Maybe [WriteOperationType])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[WriteOperationType]
[WriteOperationType]
[WriteOperationType]
[WriteOperationType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
destinationFieldProperties_isUpsertable :: Lens.Lens' DestinationFieldProperties (Prelude.Maybe Prelude.Bool)
destinationFieldProperties_isUpsertable :: (Maybe Bool -> f (Maybe Bool))
-> DestinationFieldProperties -> f DestinationFieldProperties
destinationFieldProperties_isUpsertable = (DestinationFieldProperties -> Maybe Bool)
-> (DestinationFieldProperties
-> Maybe Bool -> DestinationFieldProperties)
-> Lens
DestinationFieldProperties
DestinationFieldProperties
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DestinationFieldProperties' {Maybe Bool
isUpsertable :: Maybe Bool
$sel:isUpsertable:DestinationFieldProperties' :: DestinationFieldProperties -> Maybe Bool
isUpsertable} -> Maybe Bool
isUpsertable) (\s :: DestinationFieldProperties
s@DestinationFieldProperties' {} Maybe Bool
a -> DestinationFieldProperties
s {$sel:isUpsertable:DestinationFieldProperties' :: Maybe Bool
isUpsertable = Maybe Bool
a} :: DestinationFieldProperties)
destinationFieldProperties_isCreatable :: Lens.Lens' DestinationFieldProperties (Prelude.Maybe Prelude.Bool)
destinationFieldProperties_isCreatable :: (Maybe Bool -> f (Maybe Bool))
-> DestinationFieldProperties -> f DestinationFieldProperties
destinationFieldProperties_isCreatable = (DestinationFieldProperties -> Maybe Bool)
-> (DestinationFieldProperties
-> Maybe Bool -> DestinationFieldProperties)
-> Lens
DestinationFieldProperties
DestinationFieldProperties
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DestinationFieldProperties' {Maybe Bool
isCreatable :: Maybe Bool
$sel:isCreatable:DestinationFieldProperties' :: DestinationFieldProperties -> Maybe Bool
isCreatable} -> Maybe Bool
isCreatable) (\s :: DestinationFieldProperties
s@DestinationFieldProperties' {} Maybe Bool
a -> DestinationFieldProperties
s {$sel:isCreatable:DestinationFieldProperties' :: Maybe Bool
isCreatable = Maybe Bool
a} :: DestinationFieldProperties)
instance Core.FromJSON DestinationFieldProperties where
parseJSON :: Value -> Parser DestinationFieldProperties
parseJSON =
String
-> (Object -> Parser DestinationFieldProperties)
-> Value
-> Parser DestinationFieldProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DestinationFieldProperties"
( \Object
x ->
Maybe Bool
-> Maybe Bool
-> Maybe [WriteOperationType]
-> Maybe Bool
-> Maybe Bool
-> DestinationFieldProperties
DestinationFieldProperties'
(Maybe Bool
-> Maybe Bool
-> Maybe [WriteOperationType]
-> Maybe Bool
-> Maybe Bool
-> DestinationFieldProperties)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe [WriteOperationType]
-> Maybe Bool
-> Maybe Bool
-> DestinationFieldProperties)
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
"isUpdatable")
Parser
(Maybe Bool
-> Maybe [WriteOperationType]
-> Maybe Bool
-> Maybe Bool
-> DestinationFieldProperties)
-> Parser (Maybe Bool)
-> Parser
(Maybe [WriteOperationType]
-> Maybe Bool -> Maybe Bool -> DestinationFieldProperties)
forall (f :: * -> *) a b. Applicative f => 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
"isNullable")
Parser
(Maybe [WriteOperationType]
-> Maybe Bool -> Maybe Bool -> DestinationFieldProperties)
-> Parser (Maybe [WriteOperationType])
-> Parser (Maybe Bool -> Maybe Bool -> DestinationFieldProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [WriteOperationType]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"supportedWriteOperations"
Parser (Maybe (Maybe [WriteOperationType]))
-> Maybe [WriteOperationType]
-> Parser (Maybe [WriteOperationType])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [WriteOperationType]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Bool -> Maybe Bool -> DestinationFieldProperties)
-> Parser (Maybe Bool)
-> Parser (Maybe Bool -> DestinationFieldProperties)
forall (f :: * -> *) a b. Applicative f => 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
"isUpsertable")
Parser (Maybe Bool -> DestinationFieldProperties)
-> Parser (Maybe Bool) -> Parser DestinationFieldProperties
forall (f :: * -> *) a b. Applicative f => 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
"isCreatable")
)
instance Prelude.Hashable DestinationFieldProperties
instance Prelude.NFData DestinationFieldProperties