{-# 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.SlackSourceProperties where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SlackSourceProperties = SlackSourceProperties'
{
SlackSourceProperties -> Text
object' :: Prelude.Text
}
deriving (SlackSourceProperties -> SlackSourceProperties -> Bool
(SlackSourceProperties -> SlackSourceProperties -> Bool)
-> (SlackSourceProperties -> SlackSourceProperties -> Bool)
-> Eq SlackSourceProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SlackSourceProperties -> SlackSourceProperties -> Bool
$c/= :: SlackSourceProperties -> SlackSourceProperties -> Bool
== :: SlackSourceProperties -> SlackSourceProperties -> Bool
$c== :: SlackSourceProperties -> SlackSourceProperties -> Bool
Prelude.Eq, ReadPrec [SlackSourceProperties]
ReadPrec SlackSourceProperties
Int -> ReadS SlackSourceProperties
ReadS [SlackSourceProperties]
(Int -> ReadS SlackSourceProperties)
-> ReadS [SlackSourceProperties]
-> ReadPrec SlackSourceProperties
-> ReadPrec [SlackSourceProperties]
-> Read SlackSourceProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SlackSourceProperties]
$creadListPrec :: ReadPrec [SlackSourceProperties]
readPrec :: ReadPrec SlackSourceProperties
$creadPrec :: ReadPrec SlackSourceProperties
readList :: ReadS [SlackSourceProperties]
$creadList :: ReadS [SlackSourceProperties]
readsPrec :: Int -> ReadS SlackSourceProperties
$creadsPrec :: Int -> ReadS SlackSourceProperties
Prelude.Read, Int -> SlackSourceProperties -> ShowS
[SlackSourceProperties] -> ShowS
SlackSourceProperties -> String
(Int -> SlackSourceProperties -> ShowS)
-> (SlackSourceProperties -> String)
-> ([SlackSourceProperties] -> ShowS)
-> Show SlackSourceProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SlackSourceProperties] -> ShowS
$cshowList :: [SlackSourceProperties] -> ShowS
show :: SlackSourceProperties -> String
$cshow :: SlackSourceProperties -> String
showsPrec :: Int -> SlackSourceProperties -> ShowS
$cshowsPrec :: Int -> SlackSourceProperties -> ShowS
Prelude.Show, (forall x. SlackSourceProperties -> Rep SlackSourceProperties x)
-> (forall x. Rep SlackSourceProperties x -> SlackSourceProperties)
-> Generic SlackSourceProperties
forall x. Rep SlackSourceProperties x -> SlackSourceProperties
forall x. SlackSourceProperties -> Rep SlackSourceProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SlackSourceProperties x -> SlackSourceProperties
$cfrom :: forall x. SlackSourceProperties -> Rep SlackSourceProperties x
Prelude.Generic)
newSlackSourceProperties ::
Prelude.Text ->
SlackSourceProperties
newSlackSourceProperties :: Text -> SlackSourceProperties
newSlackSourceProperties Text
pObject_ =
SlackSourceProperties' :: Text -> SlackSourceProperties
SlackSourceProperties' {$sel:object':SlackSourceProperties' :: Text
object' = Text
pObject_}
slackSourceProperties_object :: Lens.Lens' SlackSourceProperties Prelude.Text
slackSourceProperties_object :: (Text -> f Text)
-> SlackSourceProperties -> f SlackSourceProperties
slackSourceProperties_object = (SlackSourceProperties -> Text)
-> (SlackSourceProperties -> Text -> SlackSourceProperties)
-> Lens SlackSourceProperties SlackSourceProperties Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlackSourceProperties' {Text
object' :: Text
$sel:object':SlackSourceProperties' :: SlackSourceProperties -> Text
object'} -> Text
object') (\s :: SlackSourceProperties
s@SlackSourceProperties' {} Text
a -> SlackSourceProperties
s {$sel:object':SlackSourceProperties' :: Text
object' = Text
a} :: SlackSourceProperties)
instance Core.FromJSON SlackSourceProperties where
parseJSON :: Value -> Parser SlackSourceProperties
parseJSON =
String
-> (Object -> Parser SlackSourceProperties)
-> Value
-> Parser SlackSourceProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SlackSourceProperties"
( \Object
x ->
Text -> SlackSourceProperties
SlackSourceProperties'
(Text -> SlackSourceProperties)
-> Parser Text -> Parser SlackSourceProperties
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"object")
)
instance Prelude.Hashable SlackSourceProperties
instance Prelude.NFData SlackSourceProperties
instance Core.ToJSON SlackSourceProperties where
toJSON :: SlackSourceProperties -> Value
toJSON SlackSourceProperties' {Text
object' :: Text
$sel:object':SlackSourceProperties' :: SlackSourceProperties -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"object" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
object')]
)