{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SlackSourceProperties = SlackSourceProperties'
{
SlackSourceProperties -> Text
object' :: Prelude.Text
}
deriving (SlackSourceProperties -> SlackSourceProperties -> Bool
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]
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
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. 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' {$sel:object':SlackSourceProperties' :: Text
object' = Text
pObject_}
slackSourceProperties_object :: Lens.Lens' SlackSourceProperties Prelude.Text
slackSourceProperties_object :: Lens' SlackSourceProperties Text
slackSourceProperties_object = 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 Data.FromJSON SlackSourceProperties where
parseJSON :: Value -> Parser SlackSourceProperties
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SlackSourceProperties"
( \Object
x ->
Text -> SlackSourceProperties
SlackSourceProperties'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"object")
)
instance Prelude.Hashable SlackSourceProperties where
hashWithSalt :: Int -> SlackSourceProperties -> Int
hashWithSalt Int
_salt SlackSourceProperties' {Text
object' :: Text
$sel:object':SlackSourceProperties' :: SlackSourceProperties -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
object'
instance Prelude.NFData SlackSourceProperties where
rnf :: SlackSourceProperties -> ()
rnf SlackSourceProperties' {Text
object' :: Text
$sel:object':SlackSourceProperties' :: SlackSourceProperties -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
object'
instance Data.ToJSON SlackSourceProperties where
toJSON :: SlackSourceProperties -> Value
toJSON SlackSourceProperties' {Text
object' :: Text
$sel:object':SlackSourceProperties' :: SlackSourceProperties -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"object" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
object')]
)