{-# 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.Connect.CreateRoutingProfile
(
CreateRoutingProfile (..),
newCreateRoutingProfile,
createRoutingProfile_queueConfigs,
createRoutingProfile_tags,
createRoutingProfile_instanceId,
createRoutingProfile_name,
createRoutingProfile_description,
createRoutingProfile_defaultOutboundQueueId,
createRoutingProfile_mediaConcurrencies,
CreateRoutingProfileResponse (..),
newCreateRoutingProfileResponse,
createRoutingProfileResponse_routingProfileArn,
createRoutingProfileResponse_routingProfileId,
createRoutingProfileResponse_httpStatus,
)
where
import Amazonka.Connect.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateRoutingProfile = CreateRoutingProfile'
{
CreateRoutingProfile -> Maybe (NonEmpty RoutingProfileQueueConfig)
queueConfigs :: Prelude.Maybe (Prelude.NonEmpty RoutingProfileQueueConfig),
CreateRoutingProfile -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateRoutingProfile -> Text
instanceId :: Prelude.Text,
CreateRoutingProfile -> Text
name :: Prelude.Text,
CreateRoutingProfile -> Text
description :: Prelude.Text,
CreateRoutingProfile -> Text
defaultOutboundQueueId :: Prelude.Text,
CreateRoutingProfile -> [MediaConcurrency]
mediaConcurrencies :: [MediaConcurrency]
}
deriving (CreateRoutingProfile -> CreateRoutingProfile -> Bool
(CreateRoutingProfile -> CreateRoutingProfile -> Bool)
-> (CreateRoutingProfile -> CreateRoutingProfile -> Bool)
-> Eq CreateRoutingProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRoutingProfile -> CreateRoutingProfile -> Bool
$c/= :: CreateRoutingProfile -> CreateRoutingProfile -> Bool
== :: CreateRoutingProfile -> CreateRoutingProfile -> Bool
$c== :: CreateRoutingProfile -> CreateRoutingProfile -> Bool
Prelude.Eq, ReadPrec [CreateRoutingProfile]
ReadPrec CreateRoutingProfile
Int -> ReadS CreateRoutingProfile
ReadS [CreateRoutingProfile]
(Int -> ReadS CreateRoutingProfile)
-> ReadS [CreateRoutingProfile]
-> ReadPrec CreateRoutingProfile
-> ReadPrec [CreateRoutingProfile]
-> Read CreateRoutingProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRoutingProfile]
$creadListPrec :: ReadPrec [CreateRoutingProfile]
readPrec :: ReadPrec CreateRoutingProfile
$creadPrec :: ReadPrec CreateRoutingProfile
readList :: ReadS [CreateRoutingProfile]
$creadList :: ReadS [CreateRoutingProfile]
readsPrec :: Int -> ReadS CreateRoutingProfile
$creadsPrec :: Int -> ReadS CreateRoutingProfile
Prelude.Read, Int -> CreateRoutingProfile -> ShowS
[CreateRoutingProfile] -> ShowS
CreateRoutingProfile -> String
(Int -> CreateRoutingProfile -> ShowS)
-> (CreateRoutingProfile -> String)
-> ([CreateRoutingProfile] -> ShowS)
-> Show CreateRoutingProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRoutingProfile] -> ShowS
$cshowList :: [CreateRoutingProfile] -> ShowS
show :: CreateRoutingProfile -> String
$cshow :: CreateRoutingProfile -> String
showsPrec :: Int -> CreateRoutingProfile -> ShowS
$cshowsPrec :: Int -> CreateRoutingProfile -> ShowS
Prelude.Show, (forall x. CreateRoutingProfile -> Rep CreateRoutingProfile x)
-> (forall x. Rep CreateRoutingProfile x -> CreateRoutingProfile)
-> Generic CreateRoutingProfile
forall x. Rep CreateRoutingProfile x -> CreateRoutingProfile
forall x. CreateRoutingProfile -> Rep CreateRoutingProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRoutingProfile x -> CreateRoutingProfile
$cfrom :: forall x. CreateRoutingProfile -> Rep CreateRoutingProfile x
Prelude.Generic)
newCreateRoutingProfile ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateRoutingProfile
newCreateRoutingProfile :: Text -> Text -> Text -> Text -> CreateRoutingProfile
newCreateRoutingProfile
Text
pInstanceId_
Text
pName_
Text
pDescription_
Text
pDefaultOutboundQueueId_ =
CreateRoutingProfile' :: Maybe (NonEmpty RoutingProfileQueueConfig)
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> [MediaConcurrency]
-> CreateRoutingProfile
CreateRoutingProfile'
{ $sel:queueConfigs:CreateRoutingProfile' :: Maybe (NonEmpty RoutingProfileQueueConfig)
queueConfigs =
Maybe (NonEmpty RoutingProfileQueueConfig)
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateRoutingProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:CreateRoutingProfile' :: Text
instanceId = Text
pInstanceId_,
$sel:name:CreateRoutingProfile' :: Text
name = Text
pName_,
$sel:description:CreateRoutingProfile' :: Text
description = Text
pDescription_,
$sel:defaultOutboundQueueId:CreateRoutingProfile' :: Text
defaultOutboundQueueId = Text
pDefaultOutboundQueueId_,
$sel:mediaConcurrencies:CreateRoutingProfile' :: [MediaConcurrency]
mediaConcurrencies = [MediaConcurrency]
forall a. Monoid a => a
Prelude.mempty
}
createRoutingProfile_queueConfigs :: Lens.Lens' CreateRoutingProfile (Prelude.Maybe (Prelude.NonEmpty RoutingProfileQueueConfig))
createRoutingProfile_queueConfigs :: (Maybe (NonEmpty RoutingProfileQueueConfig)
-> f (Maybe (NonEmpty RoutingProfileQueueConfig)))
-> CreateRoutingProfile -> f CreateRoutingProfile
createRoutingProfile_queueConfigs = (CreateRoutingProfile
-> Maybe (NonEmpty RoutingProfileQueueConfig))
-> (CreateRoutingProfile
-> Maybe (NonEmpty RoutingProfileQueueConfig)
-> CreateRoutingProfile)
-> Lens
CreateRoutingProfile
CreateRoutingProfile
(Maybe (NonEmpty RoutingProfileQueueConfig))
(Maybe (NonEmpty RoutingProfileQueueConfig))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoutingProfile' {Maybe (NonEmpty RoutingProfileQueueConfig)
queueConfigs :: Maybe (NonEmpty RoutingProfileQueueConfig)
$sel:queueConfigs:CreateRoutingProfile' :: CreateRoutingProfile -> Maybe (NonEmpty RoutingProfileQueueConfig)
queueConfigs} -> Maybe (NonEmpty RoutingProfileQueueConfig)
queueConfigs) (\s :: CreateRoutingProfile
s@CreateRoutingProfile' {} Maybe (NonEmpty RoutingProfileQueueConfig)
a -> CreateRoutingProfile
s {$sel:queueConfigs:CreateRoutingProfile' :: Maybe (NonEmpty RoutingProfileQueueConfig)
queueConfigs = Maybe (NonEmpty RoutingProfileQueueConfig)
a} :: CreateRoutingProfile) ((Maybe (NonEmpty RoutingProfileQueueConfig)
-> f (Maybe (NonEmpty RoutingProfileQueueConfig)))
-> CreateRoutingProfile -> f CreateRoutingProfile)
-> ((Maybe (NonEmpty RoutingProfileQueueConfig)
-> f (Maybe (NonEmpty RoutingProfileQueueConfig)))
-> Maybe (NonEmpty RoutingProfileQueueConfig)
-> f (Maybe (NonEmpty RoutingProfileQueueConfig)))
-> (Maybe (NonEmpty RoutingProfileQueueConfig)
-> f (Maybe (NonEmpty RoutingProfileQueueConfig)))
-> CreateRoutingProfile
-> f CreateRoutingProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty RoutingProfileQueueConfig)
(NonEmpty RoutingProfileQueueConfig)
(NonEmpty RoutingProfileQueueConfig)
(NonEmpty RoutingProfileQueueConfig)
-> Iso
(Maybe (NonEmpty RoutingProfileQueueConfig))
(Maybe (NonEmpty RoutingProfileQueueConfig))
(Maybe (NonEmpty RoutingProfileQueueConfig))
(Maybe (NonEmpty RoutingProfileQueueConfig))
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
(NonEmpty RoutingProfileQueueConfig)
(NonEmpty RoutingProfileQueueConfig)
(NonEmpty RoutingProfileQueueConfig)
(NonEmpty RoutingProfileQueueConfig)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createRoutingProfile_tags :: Lens.Lens' CreateRoutingProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRoutingProfile_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRoutingProfile -> f CreateRoutingProfile
createRoutingProfile_tags = (CreateRoutingProfile -> Maybe (HashMap Text Text))
-> (CreateRoutingProfile
-> Maybe (HashMap Text Text) -> CreateRoutingProfile)
-> Lens
CreateRoutingProfile
CreateRoutingProfile
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoutingProfile' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRoutingProfile' :: CreateRoutingProfile -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRoutingProfile
s@CreateRoutingProfile' {} Maybe (HashMap Text Text)
a -> CreateRoutingProfile
s {$sel:tags:CreateRoutingProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRoutingProfile) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRoutingProfile -> f CreateRoutingProfile)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRoutingProfile
-> f CreateRoutingProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createRoutingProfile_instanceId :: Lens.Lens' CreateRoutingProfile Prelude.Text
createRoutingProfile_instanceId :: (Text -> f Text) -> CreateRoutingProfile -> f CreateRoutingProfile
createRoutingProfile_instanceId = (CreateRoutingProfile -> Text)
-> (CreateRoutingProfile -> Text -> CreateRoutingProfile)
-> Lens CreateRoutingProfile CreateRoutingProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoutingProfile' {Text
instanceId :: Text
$sel:instanceId:CreateRoutingProfile' :: CreateRoutingProfile -> Text
instanceId} -> Text
instanceId) (\s :: CreateRoutingProfile
s@CreateRoutingProfile' {} Text
a -> CreateRoutingProfile
s {$sel:instanceId:CreateRoutingProfile' :: Text
instanceId = Text
a} :: CreateRoutingProfile)
createRoutingProfile_name :: Lens.Lens' CreateRoutingProfile Prelude.Text
createRoutingProfile_name :: (Text -> f Text) -> CreateRoutingProfile -> f CreateRoutingProfile
createRoutingProfile_name = (CreateRoutingProfile -> Text)
-> (CreateRoutingProfile -> Text -> CreateRoutingProfile)
-> Lens CreateRoutingProfile CreateRoutingProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoutingProfile' {Text
name :: Text
$sel:name:CreateRoutingProfile' :: CreateRoutingProfile -> Text
name} -> Text
name) (\s :: CreateRoutingProfile
s@CreateRoutingProfile' {} Text
a -> CreateRoutingProfile
s {$sel:name:CreateRoutingProfile' :: Text
name = Text
a} :: CreateRoutingProfile)
createRoutingProfile_description :: Lens.Lens' CreateRoutingProfile Prelude.Text
createRoutingProfile_description :: (Text -> f Text) -> CreateRoutingProfile -> f CreateRoutingProfile
createRoutingProfile_description = (CreateRoutingProfile -> Text)
-> (CreateRoutingProfile -> Text -> CreateRoutingProfile)
-> Lens CreateRoutingProfile CreateRoutingProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoutingProfile' {Text
description :: Text
$sel:description:CreateRoutingProfile' :: CreateRoutingProfile -> Text
description} -> Text
description) (\s :: CreateRoutingProfile
s@CreateRoutingProfile' {} Text
a -> CreateRoutingProfile
s {$sel:description:CreateRoutingProfile' :: Text
description = Text
a} :: CreateRoutingProfile)
createRoutingProfile_defaultOutboundQueueId :: Lens.Lens' CreateRoutingProfile Prelude.Text
createRoutingProfile_defaultOutboundQueueId :: (Text -> f Text) -> CreateRoutingProfile -> f CreateRoutingProfile
createRoutingProfile_defaultOutboundQueueId = (CreateRoutingProfile -> Text)
-> (CreateRoutingProfile -> Text -> CreateRoutingProfile)
-> Lens CreateRoutingProfile CreateRoutingProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoutingProfile' {Text
defaultOutboundQueueId :: Text
$sel:defaultOutboundQueueId:CreateRoutingProfile' :: CreateRoutingProfile -> Text
defaultOutboundQueueId} -> Text
defaultOutboundQueueId) (\s :: CreateRoutingProfile
s@CreateRoutingProfile' {} Text
a -> CreateRoutingProfile
s {$sel:defaultOutboundQueueId:CreateRoutingProfile' :: Text
defaultOutboundQueueId = Text
a} :: CreateRoutingProfile)
createRoutingProfile_mediaConcurrencies :: Lens.Lens' CreateRoutingProfile [MediaConcurrency]
createRoutingProfile_mediaConcurrencies :: ([MediaConcurrency] -> f [MediaConcurrency])
-> CreateRoutingProfile -> f CreateRoutingProfile
createRoutingProfile_mediaConcurrencies = (CreateRoutingProfile -> [MediaConcurrency])
-> (CreateRoutingProfile
-> [MediaConcurrency] -> CreateRoutingProfile)
-> Lens
CreateRoutingProfile
CreateRoutingProfile
[MediaConcurrency]
[MediaConcurrency]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoutingProfile' {[MediaConcurrency]
mediaConcurrencies :: [MediaConcurrency]
$sel:mediaConcurrencies:CreateRoutingProfile' :: CreateRoutingProfile -> [MediaConcurrency]
mediaConcurrencies} -> [MediaConcurrency]
mediaConcurrencies) (\s :: CreateRoutingProfile
s@CreateRoutingProfile' {} [MediaConcurrency]
a -> CreateRoutingProfile
s {$sel:mediaConcurrencies:CreateRoutingProfile' :: [MediaConcurrency]
mediaConcurrencies = [MediaConcurrency]
a} :: CreateRoutingProfile) (([MediaConcurrency] -> f [MediaConcurrency])
-> CreateRoutingProfile -> f CreateRoutingProfile)
-> (([MediaConcurrency] -> f [MediaConcurrency])
-> [MediaConcurrency] -> f [MediaConcurrency])
-> ([MediaConcurrency] -> f [MediaConcurrency])
-> CreateRoutingProfile
-> f CreateRoutingProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MediaConcurrency] -> f [MediaConcurrency])
-> [MediaConcurrency] -> f [MediaConcurrency]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest CreateRoutingProfile where
type
AWSResponse CreateRoutingProfile =
CreateRoutingProfileResponse
request :: CreateRoutingProfile -> Request CreateRoutingProfile
request = Service -> CreateRoutingProfile -> Request CreateRoutingProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateRoutingProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateRoutingProfile)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateRoutingProfile))
-> Logger
-> Service
-> Proxy CreateRoutingProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateRoutingProfile)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Maybe Text -> Int -> CreateRoutingProfileResponse
CreateRoutingProfileResponse'
(Maybe Text -> Maybe Text -> Int -> CreateRoutingProfileResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> CreateRoutingProfileResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RoutingProfileArn")
Either String (Maybe Text -> Int -> CreateRoutingProfileResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateRoutingProfileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RoutingProfileId")
Either String (Int -> CreateRoutingProfileResponse)
-> Either String Int -> Either String CreateRoutingProfileResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateRoutingProfile
instance Prelude.NFData CreateRoutingProfile
instance Core.ToHeaders CreateRoutingProfile where
toHeaders :: CreateRoutingProfile -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateRoutingProfile -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateRoutingProfile where
toJSON :: CreateRoutingProfile -> Value
toJSON CreateRoutingProfile' {[MediaConcurrency]
Maybe (NonEmpty RoutingProfileQueueConfig)
Maybe (HashMap Text Text)
Text
mediaConcurrencies :: [MediaConcurrency]
defaultOutboundQueueId :: Text
description :: Text
name :: Text
instanceId :: Text
tags :: Maybe (HashMap Text Text)
queueConfigs :: Maybe (NonEmpty RoutingProfileQueueConfig)
$sel:mediaConcurrencies:CreateRoutingProfile' :: CreateRoutingProfile -> [MediaConcurrency]
$sel:defaultOutboundQueueId:CreateRoutingProfile' :: CreateRoutingProfile -> Text
$sel:description:CreateRoutingProfile' :: CreateRoutingProfile -> Text
$sel:name:CreateRoutingProfile' :: CreateRoutingProfile -> Text
$sel:instanceId:CreateRoutingProfile' :: CreateRoutingProfile -> Text
$sel:tags:CreateRoutingProfile' :: CreateRoutingProfile -> Maybe (HashMap Text Text)
$sel:queueConfigs:CreateRoutingProfile' :: CreateRoutingProfile -> Maybe (NonEmpty RoutingProfileQueueConfig)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"QueueConfigs" Text -> NonEmpty RoutingProfileQueueConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty RoutingProfileQueueConfig -> Pair)
-> Maybe (NonEmpty RoutingProfileQueueConfig) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty RoutingProfileQueueConfig)
queueConfigs,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
description),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"DefaultOutboundQueueId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
defaultOutboundQueueId
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"MediaConcurrencies" Text -> [MediaConcurrency] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [MediaConcurrency]
mediaConcurrencies)
]
)
instance Core.ToPath CreateRoutingProfile where
toPath :: CreateRoutingProfile -> ByteString
toPath CreateRoutingProfile' {[MediaConcurrency]
Maybe (NonEmpty RoutingProfileQueueConfig)
Maybe (HashMap Text Text)
Text
mediaConcurrencies :: [MediaConcurrency]
defaultOutboundQueueId :: Text
description :: Text
name :: Text
instanceId :: Text
tags :: Maybe (HashMap Text Text)
queueConfigs :: Maybe (NonEmpty RoutingProfileQueueConfig)
$sel:mediaConcurrencies:CreateRoutingProfile' :: CreateRoutingProfile -> [MediaConcurrency]
$sel:defaultOutboundQueueId:CreateRoutingProfile' :: CreateRoutingProfile -> Text
$sel:description:CreateRoutingProfile' :: CreateRoutingProfile -> Text
$sel:name:CreateRoutingProfile' :: CreateRoutingProfile -> Text
$sel:instanceId:CreateRoutingProfile' :: CreateRoutingProfile -> Text
$sel:tags:CreateRoutingProfile' :: CreateRoutingProfile -> Maybe (HashMap Text Text)
$sel:queueConfigs:CreateRoutingProfile' :: CreateRoutingProfile -> Maybe (NonEmpty RoutingProfileQueueConfig)
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/routing-profiles/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId]
instance Core.ToQuery CreateRoutingProfile where
toQuery :: CreateRoutingProfile -> QueryString
toQuery = QueryString -> CreateRoutingProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateRoutingProfileResponse = CreateRoutingProfileResponse'
{
CreateRoutingProfileResponse -> Maybe Text
routingProfileArn :: Prelude.Maybe Prelude.Text,
CreateRoutingProfileResponse -> Maybe Text
routingProfileId :: Prelude.Maybe Prelude.Text,
CreateRoutingProfileResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateRoutingProfileResponse
-> CreateRoutingProfileResponse -> Bool
(CreateRoutingProfileResponse
-> CreateRoutingProfileResponse -> Bool)
-> (CreateRoutingProfileResponse
-> CreateRoutingProfileResponse -> Bool)
-> Eq CreateRoutingProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRoutingProfileResponse
-> CreateRoutingProfileResponse -> Bool
$c/= :: CreateRoutingProfileResponse
-> CreateRoutingProfileResponse -> Bool
== :: CreateRoutingProfileResponse
-> CreateRoutingProfileResponse -> Bool
$c== :: CreateRoutingProfileResponse
-> CreateRoutingProfileResponse -> Bool
Prelude.Eq, ReadPrec [CreateRoutingProfileResponse]
ReadPrec CreateRoutingProfileResponse
Int -> ReadS CreateRoutingProfileResponse
ReadS [CreateRoutingProfileResponse]
(Int -> ReadS CreateRoutingProfileResponse)
-> ReadS [CreateRoutingProfileResponse]
-> ReadPrec CreateRoutingProfileResponse
-> ReadPrec [CreateRoutingProfileResponse]
-> Read CreateRoutingProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRoutingProfileResponse]
$creadListPrec :: ReadPrec [CreateRoutingProfileResponse]
readPrec :: ReadPrec CreateRoutingProfileResponse
$creadPrec :: ReadPrec CreateRoutingProfileResponse
readList :: ReadS [CreateRoutingProfileResponse]
$creadList :: ReadS [CreateRoutingProfileResponse]
readsPrec :: Int -> ReadS CreateRoutingProfileResponse
$creadsPrec :: Int -> ReadS CreateRoutingProfileResponse
Prelude.Read, Int -> CreateRoutingProfileResponse -> ShowS
[CreateRoutingProfileResponse] -> ShowS
CreateRoutingProfileResponse -> String
(Int -> CreateRoutingProfileResponse -> ShowS)
-> (CreateRoutingProfileResponse -> String)
-> ([CreateRoutingProfileResponse] -> ShowS)
-> Show CreateRoutingProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRoutingProfileResponse] -> ShowS
$cshowList :: [CreateRoutingProfileResponse] -> ShowS
show :: CreateRoutingProfileResponse -> String
$cshow :: CreateRoutingProfileResponse -> String
showsPrec :: Int -> CreateRoutingProfileResponse -> ShowS
$cshowsPrec :: Int -> CreateRoutingProfileResponse -> ShowS
Prelude.Show, (forall x.
CreateRoutingProfileResponse -> Rep CreateRoutingProfileResponse x)
-> (forall x.
Rep CreateRoutingProfileResponse x -> CreateRoutingProfileResponse)
-> Generic CreateRoutingProfileResponse
forall x.
Rep CreateRoutingProfileResponse x -> CreateRoutingProfileResponse
forall x.
CreateRoutingProfileResponse -> Rep CreateRoutingProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRoutingProfileResponse x -> CreateRoutingProfileResponse
$cfrom :: forall x.
CreateRoutingProfileResponse -> Rep CreateRoutingProfileResponse x
Prelude.Generic)
newCreateRoutingProfileResponse ::
Prelude.Int ->
CreateRoutingProfileResponse
newCreateRoutingProfileResponse :: Int -> CreateRoutingProfileResponse
newCreateRoutingProfileResponse Int
pHttpStatus_ =
CreateRoutingProfileResponse' :: Maybe Text -> Maybe Text -> Int -> CreateRoutingProfileResponse
CreateRoutingProfileResponse'
{ $sel:routingProfileArn:CreateRoutingProfileResponse' :: Maybe Text
routingProfileArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:routingProfileId:CreateRoutingProfileResponse' :: Maybe Text
routingProfileId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateRoutingProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createRoutingProfileResponse_routingProfileArn :: Lens.Lens' CreateRoutingProfileResponse (Prelude.Maybe Prelude.Text)
createRoutingProfileResponse_routingProfileArn :: (Maybe Text -> f (Maybe Text))
-> CreateRoutingProfileResponse -> f CreateRoutingProfileResponse
createRoutingProfileResponse_routingProfileArn = (CreateRoutingProfileResponse -> Maybe Text)
-> (CreateRoutingProfileResponse
-> Maybe Text -> CreateRoutingProfileResponse)
-> Lens
CreateRoutingProfileResponse
CreateRoutingProfileResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoutingProfileResponse' {Maybe Text
routingProfileArn :: Maybe Text
$sel:routingProfileArn:CreateRoutingProfileResponse' :: CreateRoutingProfileResponse -> Maybe Text
routingProfileArn} -> Maybe Text
routingProfileArn) (\s :: CreateRoutingProfileResponse
s@CreateRoutingProfileResponse' {} Maybe Text
a -> CreateRoutingProfileResponse
s {$sel:routingProfileArn:CreateRoutingProfileResponse' :: Maybe Text
routingProfileArn = Maybe Text
a} :: CreateRoutingProfileResponse)
createRoutingProfileResponse_routingProfileId :: Lens.Lens' CreateRoutingProfileResponse (Prelude.Maybe Prelude.Text)
createRoutingProfileResponse_routingProfileId :: (Maybe Text -> f (Maybe Text))
-> CreateRoutingProfileResponse -> f CreateRoutingProfileResponse
createRoutingProfileResponse_routingProfileId = (CreateRoutingProfileResponse -> Maybe Text)
-> (CreateRoutingProfileResponse
-> Maybe Text -> CreateRoutingProfileResponse)
-> Lens
CreateRoutingProfileResponse
CreateRoutingProfileResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoutingProfileResponse' {Maybe Text
routingProfileId :: Maybe Text
$sel:routingProfileId:CreateRoutingProfileResponse' :: CreateRoutingProfileResponse -> Maybe Text
routingProfileId} -> Maybe Text
routingProfileId) (\s :: CreateRoutingProfileResponse
s@CreateRoutingProfileResponse' {} Maybe Text
a -> CreateRoutingProfileResponse
s {$sel:routingProfileId:CreateRoutingProfileResponse' :: Maybe Text
routingProfileId = Maybe Text
a} :: CreateRoutingProfileResponse)
createRoutingProfileResponse_httpStatus :: Lens.Lens' CreateRoutingProfileResponse Prelude.Int
createRoutingProfileResponse_httpStatus :: (Int -> f Int)
-> CreateRoutingProfileResponse -> f CreateRoutingProfileResponse
createRoutingProfileResponse_httpStatus = (CreateRoutingProfileResponse -> Int)
-> (CreateRoutingProfileResponse
-> Int -> CreateRoutingProfileResponse)
-> Lens
CreateRoutingProfileResponse CreateRoutingProfileResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoutingProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateRoutingProfileResponse' :: CreateRoutingProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateRoutingProfileResponse
s@CreateRoutingProfileResponse' {} Int
a -> CreateRoutingProfileResponse
s {$sel:httpStatus:CreateRoutingProfileResponse' :: Int
httpStatus = Int
a} :: CreateRoutingProfileResponse)
instance Prelude.NFData CreateRoutingProfileResponse