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