{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SupportApp.CreateSlackChannelConfiguration
(
CreateSlackChannelConfiguration (..),
newCreateSlackChannelConfiguration,
createSlackChannelConfiguration_channelName,
createSlackChannelConfiguration_notifyOnAddCorrespondenceToCase,
createSlackChannelConfiguration_notifyOnCreateOrReopenCase,
createSlackChannelConfiguration_notifyOnResolveCase,
createSlackChannelConfiguration_channelId,
createSlackChannelConfiguration_channelRoleArn,
createSlackChannelConfiguration_notifyOnCaseSeverity,
createSlackChannelConfiguration_teamId,
CreateSlackChannelConfigurationResponse (..),
newCreateSlackChannelConfigurationResponse,
createSlackChannelConfigurationResponse_httpStatus,
)
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SupportApp.Types
data CreateSlackChannelConfiguration = CreateSlackChannelConfiguration'
{
CreateSlackChannelConfiguration -> Maybe Text
channelName :: Prelude.Maybe Prelude.Text,
CreateSlackChannelConfiguration -> Maybe Bool
notifyOnAddCorrespondenceToCase :: Prelude.Maybe Prelude.Bool,
CreateSlackChannelConfiguration -> Maybe Bool
notifyOnCreateOrReopenCase :: Prelude.Maybe Prelude.Bool,
CreateSlackChannelConfiguration -> Maybe Bool
notifyOnResolveCase :: Prelude.Maybe Prelude.Bool,
CreateSlackChannelConfiguration -> Text
channelId :: Prelude.Text,
CreateSlackChannelConfiguration -> Text
channelRoleArn :: Prelude.Text,
CreateSlackChannelConfiguration -> NotificationSeverityLevel
notifyOnCaseSeverity :: NotificationSeverityLevel,
CreateSlackChannelConfiguration -> Text
teamId :: Prelude.Text
}
deriving (CreateSlackChannelConfiguration
-> CreateSlackChannelConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSlackChannelConfiguration
-> CreateSlackChannelConfiguration -> Bool
$c/= :: CreateSlackChannelConfiguration
-> CreateSlackChannelConfiguration -> Bool
== :: CreateSlackChannelConfiguration
-> CreateSlackChannelConfiguration -> Bool
$c== :: CreateSlackChannelConfiguration
-> CreateSlackChannelConfiguration -> Bool
Prelude.Eq, ReadPrec [CreateSlackChannelConfiguration]
ReadPrec CreateSlackChannelConfiguration
Int -> ReadS CreateSlackChannelConfiguration
ReadS [CreateSlackChannelConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSlackChannelConfiguration]
$creadListPrec :: ReadPrec [CreateSlackChannelConfiguration]
readPrec :: ReadPrec CreateSlackChannelConfiguration
$creadPrec :: ReadPrec CreateSlackChannelConfiguration
readList :: ReadS [CreateSlackChannelConfiguration]
$creadList :: ReadS [CreateSlackChannelConfiguration]
readsPrec :: Int -> ReadS CreateSlackChannelConfiguration
$creadsPrec :: Int -> ReadS CreateSlackChannelConfiguration
Prelude.Read, Int -> CreateSlackChannelConfiguration -> ShowS
[CreateSlackChannelConfiguration] -> ShowS
CreateSlackChannelConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSlackChannelConfiguration] -> ShowS
$cshowList :: [CreateSlackChannelConfiguration] -> ShowS
show :: CreateSlackChannelConfiguration -> String
$cshow :: CreateSlackChannelConfiguration -> String
showsPrec :: Int -> CreateSlackChannelConfiguration -> ShowS
$cshowsPrec :: Int -> CreateSlackChannelConfiguration -> ShowS
Prelude.Show, forall x.
Rep CreateSlackChannelConfiguration x
-> CreateSlackChannelConfiguration
forall x.
CreateSlackChannelConfiguration
-> Rep CreateSlackChannelConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateSlackChannelConfiguration x
-> CreateSlackChannelConfiguration
$cfrom :: forall x.
CreateSlackChannelConfiguration
-> Rep CreateSlackChannelConfiguration x
Prelude.Generic)
newCreateSlackChannelConfiguration ::
Prelude.Text ->
Prelude.Text ->
NotificationSeverityLevel ->
Prelude.Text ->
CreateSlackChannelConfiguration
newCreateSlackChannelConfiguration :: Text
-> Text
-> NotificationSeverityLevel
-> Text
-> CreateSlackChannelConfiguration
newCreateSlackChannelConfiguration
Text
pChannelId_
Text
pChannelRoleArn_
NotificationSeverityLevel
pNotifyOnCaseSeverity_
Text
pTeamId_ =
CreateSlackChannelConfiguration'
{ $sel:channelName:CreateSlackChannelConfiguration' :: Maybe Text
channelName =
forall a. Maybe a
Prelude.Nothing,
$sel:notifyOnAddCorrespondenceToCase:CreateSlackChannelConfiguration' :: Maybe Bool
notifyOnAddCorrespondenceToCase =
forall a. Maybe a
Prelude.Nothing,
$sel:notifyOnCreateOrReopenCase:CreateSlackChannelConfiguration' :: Maybe Bool
notifyOnCreateOrReopenCase =
forall a. Maybe a
Prelude.Nothing,
$sel:notifyOnResolveCase:CreateSlackChannelConfiguration' :: Maybe Bool
notifyOnResolveCase = forall a. Maybe a
Prelude.Nothing,
$sel:channelId:CreateSlackChannelConfiguration' :: Text
channelId = Text
pChannelId_,
$sel:channelRoleArn:CreateSlackChannelConfiguration' :: Text
channelRoleArn = Text
pChannelRoleArn_,
$sel:notifyOnCaseSeverity:CreateSlackChannelConfiguration' :: NotificationSeverityLevel
notifyOnCaseSeverity =
NotificationSeverityLevel
pNotifyOnCaseSeverity_,
$sel:teamId:CreateSlackChannelConfiguration' :: Text
teamId = Text
pTeamId_
}
createSlackChannelConfiguration_channelName :: Lens.Lens' CreateSlackChannelConfiguration (Prelude.Maybe Prelude.Text)
createSlackChannelConfiguration_channelName :: Lens' CreateSlackChannelConfiguration (Maybe Text)
createSlackChannelConfiguration_channelName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlackChannelConfiguration' {Maybe Text
channelName :: Maybe Text
$sel:channelName:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Text
channelName} -> Maybe Text
channelName) (\s :: CreateSlackChannelConfiguration
s@CreateSlackChannelConfiguration' {} Maybe Text
a -> CreateSlackChannelConfiguration
s {$sel:channelName:CreateSlackChannelConfiguration' :: Maybe Text
channelName = Maybe Text
a} :: CreateSlackChannelConfiguration)
createSlackChannelConfiguration_notifyOnAddCorrespondenceToCase :: Lens.Lens' CreateSlackChannelConfiguration (Prelude.Maybe Prelude.Bool)
createSlackChannelConfiguration_notifyOnAddCorrespondenceToCase :: Lens' CreateSlackChannelConfiguration (Maybe Bool)
createSlackChannelConfiguration_notifyOnAddCorrespondenceToCase = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlackChannelConfiguration' {Maybe Bool
notifyOnAddCorrespondenceToCase :: Maybe Bool
$sel:notifyOnAddCorrespondenceToCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
notifyOnAddCorrespondenceToCase} -> Maybe Bool
notifyOnAddCorrespondenceToCase) (\s :: CreateSlackChannelConfiguration
s@CreateSlackChannelConfiguration' {} Maybe Bool
a -> CreateSlackChannelConfiguration
s {$sel:notifyOnAddCorrespondenceToCase:CreateSlackChannelConfiguration' :: Maybe Bool
notifyOnAddCorrespondenceToCase = Maybe Bool
a} :: CreateSlackChannelConfiguration)
createSlackChannelConfiguration_notifyOnCreateOrReopenCase :: Lens.Lens' CreateSlackChannelConfiguration (Prelude.Maybe Prelude.Bool)
createSlackChannelConfiguration_notifyOnCreateOrReopenCase :: Lens' CreateSlackChannelConfiguration (Maybe Bool)
createSlackChannelConfiguration_notifyOnCreateOrReopenCase = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlackChannelConfiguration' {Maybe Bool
notifyOnCreateOrReopenCase :: Maybe Bool
$sel:notifyOnCreateOrReopenCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
notifyOnCreateOrReopenCase} -> Maybe Bool
notifyOnCreateOrReopenCase) (\s :: CreateSlackChannelConfiguration
s@CreateSlackChannelConfiguration' {} Maybe Bool
a -> CreateSlackChannelConfiguration
s {$sel:notifyOnCreateOrReopenCase:CreateSlackChannelConfiguration' :: Maybe Bool
notifyOnCreateOrReopenCase = Maybe Bool
a} :: CreateSlackChannelConfiguration)
createSlackChannelConfiguration_notifyOnResolveCase :: Lens.Lens' CreateSlackChannelConfiguration (Prelude.Maybe Prelude.Bool)
createSlackChannelConfiguration_notifyOnResolveCase :: Lens' CreateSlackChannelConfiguration (Maybe Bool)
createSlackChannelConfiguration_notifyOnResolveCase = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlackChannelConfiguration' {Maybe Bool
notifyOnResolveCase :: Maybe Bool
$sel:notifyOnResolveCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
notifyOnResolveCase} -> Maybe Bool
notifyOnResolveCase) (\s :: CreateSlackChannelConfiguration
s@CreateSlackChannelConfiguration' {} Maybe Bool
a -> CreateSlackChannelConfiguration
s {$sel:notifyOnResolveCase:CreateSlackChannelConfiguration' :: Maybe Bool
notifyOnResolveCase = Maybe Bool
a} :: CreateSlackChannelConfiguration)
createSlackChannelConfiguration_channelId :: Lens.Lens' CreateSlackChannelConfiguration Prelude.Text
createSlackChannelConfiguration_channelId :: Lens' CreateSlackChannelConfiguration Text
createSlackChannelConfiguration_channelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlackChannelConfiguration' {Text
channelId :: Text
$sel:channelId:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
channelId} -> Text
channelId) (\s :: CreateSlackChannelConfiguration
s@CreateSlackChannelConfiguration' {} Text
a -> CreateSlackChannelConfiguration
s {$sel:channelId:CreateSlackChannelConfiguration' :: Text
channelId = Text
a} :: CreateSlackChannelConfiguration)
createSlackChannelConfiguration_channelRoleArn :: Lens.Lens' CreateSlackChannelConfiguration Prelude.Text
createSlackChannelConfiguration_channelRoleArn :: Lens' CreateSlackChannelConfiguration Text
createSlackChannelConfiguration_channelRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlackChannelConfiguration' {Text
channelRoleArn :: Text
$sel:channelRoleArn:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
channelRoleArn} -> Text
channelRoleArn) (\s :: CreateSlackChannelConfiguration
s@CreateSlackChannelConfiguration' {} Text
a -> CreateSlackChannelConfiguration
s {$sel:channelRoleArn:CreateSlackChannelConfiguration' :: Text
channelRoleArn = Text
a} :: CreateSlackChannelConfiguration)
createSlackChannelConfiguration_notifyOnCaseSeverity :: Lens.Lens' CreateSlackChannelConfiguration NotificationSeverityLevel
createSlackChannelConfiguration_notifyOnCaseSeverity :: Lens' CreateSlackChannelConfiguration NotificationSeverityLevel
createSlackChannelConfiguration_notifyOnCaseSeverity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlackChannelConfiguration' {NotificationSeverityLevel
notifyOnCaseSeverity :: NotificationSeverityLevel
$sel:notifyOnCaseSeverity:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> NotificationSeverityLevel
notifyOnCaseSeverity} -> NotificationSeverityLevel
notifyOnCaseSeverity) (\s :: CreateSlackChannelConfiguration
s@CreateSlackChannelConfiguration' {} NotificationSeverityLevel
a -> CreateSlackChannelConfiguration
s {$sel:notifyOnCaseSeverity:CreateSlackChannelConfiguration' :: NotificationSeverityLevel
notifyOnCaseSeverity = NotificationSeverityLevel
a} :: CreateSlackChannelConfiguration)
createSlackChannelConfiguration_teamId :: Lens.Lens' CreateSlackChannelConfiguration Prelude.Text
createSlackChannelConfiguration_teamId :: Lens' CreateSlackChannelConfiguration Text
createSlackChannelConfiguration_teamId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlackChannelConfiguration' {Text
teamId :: Text
$sel:teamId:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
teamId} -> Text
teamId) (\s :: CreateSlackChannelConfiguration
s@CreateSlackChannelConfiguration' {} Text
a -> CreateSlackChannelConfiguration
s {$sel:teamId:CreateSlackChannelConfiguration' :: Text
teamId = Text
a} :: CreateSlackChannelConfiguration)
instance
Core.AWSRequest
CreateSlackChannelConfiguration
where
type
AWSResponse CreateSlackChannelConfiguration =
CreateSlackChannelConfigurationResponse
request :: (Service -> Service)
-> CreateSlackChannelConfiguration
-> Request CreateSlackChannelConfiguration
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateSlackChannelConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse CreateSlackChannelConfiguration)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> CreateSlackChannelConfigurationResponse
CreateSlackChannelConfigurationResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
CreateSlackChannelConfiguration
where
hashWithSalt :: Int -> CreateSlackChannelConfiguration -> Int
hashWithSalt
Int
_salt
CreateSlackChannelConfiguration' {Maybe Bool
Maybe Text
Text
NotificationSeverityLevel
teamId :: Text
notifyOnCaseSeverity :: NotificationSeverityLevel
channelRoleArn :: Text
channelId :: Text
notifyOnResolveCase :: Maybe Bool
notifyOnCreateOrReopenCase :: Maybe Bool
notifyOnAddCorrespondenceToCase :: Maybe Bool
channelName :: Maybe Text
$sel:teamId:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
$sel:notifyOnCaseSeverity:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> NotificationSeverityLevel
$sel:channelRoleArn:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
$sel:channelId:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
$sel:notifyOnResolveCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
$sel:notifyOnCreateOrReopenCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
$sel:notifyOnAddCorrespondenceToCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
$sel:channelName:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
channelName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
notifyOnAddCorrespondenceToCase
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
notifyOnCreateOrReopenCase
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
notifyOnResolveCase
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
channelId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
channelRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NotificationSeverityLevel
notifyOnCaseSeverity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
teamId
instance
Prelude.NFData
CreateSlackChannelConfiguration
where
rnf :: CreateSlackChannelConfiguration -> ()
rnf CreateSlackChannelConfiguration' {Maybe Bool
Maybe Text
Text
NotificationSeverityLevel
teamId :: Text
notifyOnCaseSeverity :: NotificationSeverityLevel
channelRoleArn :: Text
channelId :: Text
notifyOnResolveCase :: Maybe Bool
notifyOnCreateOrReopenCase :: Maybe Bool
notifyOnAddCorrespondenceToCase :: Maybe Bool
channelName :: Maybe Text
$sel:teamId:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
$sel:notifyOnCaseSeverity:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> NotificationSeverityLevel
$sel:channelRoleArn:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
$sel:channelId:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
$sel:notifyOnResolveCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
$sel:notifyOnCreateOrReopenCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
$sel:notifyOnAddCorrespondenceToCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
$sel:channelName:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
channelName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
notifyOnAddCorrespondenceToCase
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
notifyOnCreateOrReopenCase
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
notifyOnResolveCase
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
channelId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
channelRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NotificationSeverityLevel
notifyOnCaseSeverity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
teamId
instance
Data.ToHeaders
CreateSlackChannelConfiguration
where
toHeaders :: CreateSlackChannelConfiguration -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateSlackChannelConfiguration where
toJSON :: CreateSlackChannelConfiguration -> Value
toJSON CreateSlackChannelConfiguration' {Maybe Bool
Maybe Text
Text
NotificationSeverityLevel
teamId :: Text
notifyOnCaseSeverity :: NotificationSeverityLevel
channelRoleArn :: Text
channelId :: Text
notifyOnResolveCase :: Maybe Bool
notifyOnCreateOrReopenCase :: Maybe Bool
notifyOnAddCorrespondenceToCase :: Maybe Bool
channelName :: Maybe Text
$sel:teamId:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
$sel:notifyOnCaseSeverity:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> NotificationSeverityLevel
$sel:channelRoleArn:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
$sel:channelId:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Text
$sel:notifyOnResolveCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
$sel:notifyOnCreateOrReopenCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
$sel:notifyOnAddCorrespondenceToCase:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Bool
$sel:channelName:CreateSlackChannelConfiguration' :: CreateSlackChannelConfiguration -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"channelName" 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 Text
channelName,
(Key
"notifyOnAddCorrespondenceToCase" 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 Bool
notifyOnAddCorrespondenceToCase,
(Key
"notifyOnCreateOrReopenCase" 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 Bool
notifyOnCreateOrReopenCase,
(Key
"notifyOnResolveCase" 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 Bool
notifyOnResolveCase,
forall a. a -> Maybe a
Prelude.Just (Key
"channelId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
channelId),
forall a. a -> Maybe a
Prelude.Just
(Key
"channelRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
channelRoleArn),
forall a. a -> Maybe a
Prelude.Just
( Key
"notifyOnCaseSeverity"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NotificationSeverityLevel
notifyOnCaseSeverity
),
forall a. a -> Maybe a
Prelude.Just (Key
"teamId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
teamId)
]
)
instance Data.ToPath CreateSlackChannelConfiguration where
toPath :: CreateSlackChannelConfiguration -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const
ByteString
"/control/create-slack-channel-configuration"
instance Data.ToQuery CreateSlackChannelConfiguration where
toQuery :: CreateSlackChannelConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateSlackChannelConfigurationResponse = CreateSlackChannelConfigurationResponse'
{
CreateSlackChannelConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateSlackChannelConfigurationResponse
-> CreateSlackChannelConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSlackChannelConfigurationResponse
-> CreateSlackChannelConfigurationResponse -> Bool
$c/= :: CreateSlackChannelConfigurationResponse
-> CreateSlackChannelConfigurationResponse -> Bool
== :: CreateSlackChannelConfigurationResponse
-> CreateSlackChannelConfigurationResponse -> Bool
$c== :: CreateSlackChannelConfigurationResponse
-> CreateSlackChannelConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [CreateSlackChannelConfigurationResponse]
ReadPrec CreateSlackChannelConfigurationResponse
Int -> ReadS CreateSlackChannelConfigurationResponse
ReadS [CreateSlackChannelConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSlackChannelConfigurationResponse]
$creadListPrec :: ReadPrec [CreateSlackChannelConfigurationResponse]
readPrec :: ReadPrec CreateSlackChannelConfigurationResponse
$creadPrec :: ReadPrec CreateSlackChannelConfigurationResponse
readList :: ReadS [CreateSlackChannelConfigurationResponse]
$creadList :: ReadS [CreateSlackChannelConfigurationResponse]
readsPrec :: Int -> ReadS CreateSlackChannelConfigurationResponse
$creadsPrec :: Int -> ReadS CreateSlackChannelConfigurationResponse
Prelude.Read, Int -> CreateSlackChannelConfigurationResponse -> ShowS
[CreateSlackChannelConfigurationResponse] -> ShowS
CreateSlackChannelConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSlackChannelConfigurationResponse] -> ShowS
$cshowList :: [CreateSlackChannelConfigurationResponse] -> ShowS
show :: CreateSlackChannelConfigurationResponse -> String
$cshow :: CreateSlackChannelConfigurationResponse -> String
showsPrec :: Int -> CreateSlackChannelConfigurationResponse -> ShowS
$cshowsPrec :: Int -> CreateSlackChannelConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep CreateSlackChannelConfigurationResponse x
-> CreateSlackChannelConfigurationResponse
forall x.
CreateSlackChannelConfigurationResponse
-> Rep CreateSlackChannelConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateSlackChannelConfigurationResponse x
-> CreateSlackChannelConfigurationResponse
$cfrom :: forall x.
CreateSlackChannelConfigurationResponse
-> Rep CreateSlackChannelConfigurationResponse x
Prelude.Generic)
newCreateSlackChannelConfigurationResponse ::
Prelude.Int ->
CreateSlackChannelConfigurationResponse
newCreateSlackChannelConfigurationResponse :: Int -> CreateSlackChannelConfigurationResponse
newCreateSlackChannelConfigurationResponse
Int
pHttpStatus_ =
CreateSlackChannelConfigurationResponse'
{ $sel:httpStatus:CreateSlackChannelConfigurationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
createSlackChannelConfigurationResponse_httpStatus :: Lens.Lens' CreateSlackChannelConfigurationResponse Prelude.Int
createSlackChannelConfigurationResponse_httpStatus :: Lens' CreateSlackChannelConfigurationResponse Int
createSlackChannelConfigurationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSlackChannelConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateSlackChannelConfigurationResponse' :: CreateSlackChannelConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateSlackChannelConfigurationResponse
s@CreateSlackChannelConfigurationResponse' {} Int
a -> CreateSlackChannelConfigurationResponse
s {$sel:httpStatus:CreateSlackChannelConfigurationResponse' :: Int
httpStatus = Int
a} :: CreateSlackChannelConfigurationResponse)
instance
Prelude.NFData
CreateSlackChannelConfigurationResponse
where
rnf :: CreateSlackChannelConfigurationResponse -> ()
rnf CreateSlackChannelConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateSlackChannelConfigurationResponse' :: CreateSlackChannelConfigurationResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus