{-# 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.Connect.Types.RoutingProfile where
import Amazonka.Connect.Types.MediaConcurrency
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 RoutingProfile = RoutingProfile'
{
RoutingProfile -> Maybe Text
defaultOutboundQueueId :: Prelude.Maybe Prelude.Text,
RoutingProfile -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
RoutingProfile -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
RoutingProfile -> Maybe [MediaConcurrency]
mediaConcurrencies :: Prelude.Maybe [MediaConcurrency],
RoutingProfile -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
RoutingProfile -> Maybe Integer
numberOfAssociatedQueues :: Prelude.Maybe Prelude.Integer,
RoutingProfile -> Maybe Integer
numberOfAssociatedUsers :: Prelude.Maybe Prelude.Integer,
RoutingProfile -> Maybe Text
routingProfileArn :: Prelude.Maybe Prelude.Text,
RoutingProfile -> Maybe Text
routingProfileId :: Prelude.Maybe Prelude.Text,
RoutingProfile -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (RoutingProfile -> RoutingProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RoutingProfile -> RoutingProfile -> Bool
$c/= :: RoutingProfile -> RoutingProfile -> Bool
== :: RoutingProfile -> RoutingProfile -> Bool
$c== :: RoutingProfile -> RoutingProfile -> Bool
Prelude.Eq, ReadPrec [RoutingProfile]
ReadPrec RoutingProfile
Int -> ReadS RoutingProfile
ReadS [RoutingProfile]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RoutingProfile]
$creadListPrec :: ReadPrec [RoutingProfile]
readPrec :: ReadPrec RoutingProfile
$creadPrec :: ReadPrec RoutingProfile
readList :: ReadS [RoutingProfile]
$creadList :: ReadS [RoutingProfile]
readsPrec :: Int -> ReadS RoutingProfile
$creadsPrec :: Int -> ReadS RoutingProfile
Prelude.Read, Int -> RoutingProfile -> ShowS
[RoutingProfile] -> ShowS
RoutingProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RoutingProfile] -> ShowS
$cshowList :: [RoutingProfile] -> ShowS
show :: RoutingProfile -> String
$cshow :: RoutingProfile -> String
showsPrec :: Int -> RoutingProfile -> ShowS
$cshowsPrec :: Int -> RoutingProfile -> ShowS
Prelude.Show, forall x. Rep RoutingProfile x -> RoutingProfile
forall x. RoutingProfile -> Rep RoutingProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RoutingProfile x -> RoutingProfile
$cfrom :: forall x. RoutingProfile -> Rep RoutingProfile x
Prelude.Generic)
newRoutingProfile ::
RoutingProfile
newRoutingProfile :: RoutingProfile
newRoutingProfile =
RoutingProfile'
{ $sel:defaultOutboundQueueId:RoutingProfile' :: Maybe Text
defaultOutboundQueueId =
forall a. Maybe a
Prelude.Nothing,
$sel:description:RoutingProfile' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:RoutingProfile' :: Maybe Text
instanceId = forall a. Maybe a
Prelude.Nothing,
$sel:mediaConcurrencies:RoutingProfile' :: Maybe [MediaConcurrency]
mediaConcurrencies = forall a. Maybe a
Prelude.Nothing,
$sel:name:RoutingProfile' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:numberOfAssociatedQueues:RoutingProfile' :: Maybe Integer
numberOfAssociatedQueues = forall a. Maybe a
Prelude.Nothing,
$sel:numberOfAssociatedUsers:RoutingProfile' :: Maybe Integer
numberOfAssociatedUsers = forall a. Maybe a
Prelude.Nothing,
$sel:routingProfileArn:RoutingProfile' :: Maybe Text
routingProfileArn = forall a. Maybe a
Prelude.Nothing,
$sel:routingProfileId:RoutingProfile' :: Maybe Text
routingProfileId = forall a. Maybe a
Prelude.Nothing,
$sel:tags:RoutingProfile' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
routingProfile_defaultOutboundQueueId :: Lens.Lens' RoutingProfile (Prelude.Maybe Prelude.Text)
routingProfile_defaultOutboundQueueId :: Lens' RoutingProfile (Maybe Text)
routingProfile_defaultOutboundQueueId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfile' {Maybe Text
defaultOutboundQueueId :: Maybe Text
$sel:defaultOutboundQueueId:RoutingProfile' :: RoutingProfile -> Maybe Text
defaultOutboundQueueId} -> Maybe Text
defaultOutboundQueueId) (\s :: RoutingProfile
s@RoutingProfile' {} Maybe Text
a -> RoutingProfile
s {$sel:defaultOutboundQueueId:RoutingProfile' :: Maybe Text
defaultOutboundQueueId = Maybe Text
a} :: RoutingProfile)
routingProfile_description :: Lens.Lens' RoutingProfile (Prelude.Maybe Prelude.Text)
routingProfile_description :: Lens' RoutingProfile (Maybe Text)
routingProfile_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfile' {Maybe Text
description :: Maybe Text
$sel:description:RoutingProfile' :: RoutingProfile -> Maybe Text
description} -> Maybe Text
description) (\s :: RoutingProfile
s@RoutingProfile' {} Maybe Text
a -> RoutingProfile
s {$sel:description:RoutingProfile' :: Maybe Text
description = Maybe Text
a} :: RoutingProfile)
routingProfile_instanceId :: Lens.Lens' RoutingProfile (Prelude.Maybe Prelude.Text)
routingProfile_instanceId :: Lens' RoutingProfile (Maybe Text)
routingProfile_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfile' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:RoutingProfile' :: RoutingProfile -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: RoutingProfile
s@RoutingProfile' {} Maybe Text
a -> RoutingProfile
s {$sel:instanceId:RoutingProfile' :: Maybe Text
instanceId = Maybe Text
a} :: RoutingProfile)
routingProfile_mediaConcurrencies :: Lens.Lens' RoutingProfile (Prelude.Maybe [MediaConcurrency])
routingProfile_mediaConcurrencies :: Lens' RoutingProfile (Maybe [MediaConcurrency])
routingProfile_mediaConcurrencies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfile' {Maybe [MediaConcurrency]
mediaConcurrencies :: Maybe [MediaConcurrency]
$sel:mediaConcurrencies:RoutingProfile' :: RoutingProfile -> Maybe [MediaConcurrency]
mediaConcurrencies} -> Maybe [MediaConcurrency]
mediaConcurrencies) (\s :: RoutingProfile
s@RoutingProfile' {} Maybe [MediaConcurrency]
a -> RoutingProfile
s {$sel:mediaConcurrencies:RoutingProfile' :: Maybe [MediaConcurrency]
mediaConcurrencies = Maybe [MediaConcurrency]
a} :: RoutingProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
routingProfile_name :: Lens.Lens' RoutingProfile (Prelude.Maybe Prelude.Text)
routingProfile_name :: Lens' RoutingProfile (Maybe Text)
routingProfile_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfile' {Maybe Text
name :: Maybe Text
$sel:name:RoutingProfile' :: RoutingProfile -> Maybe Text
name} -> Maybe Text
name) (\s :: RoutingProfile
s@RoutingProfile' {} Maybe Text
a -> RoutingProfile
s {$sel:name:RoutingProfile' :: Maybe Text
name = Maybe Text
a} :: RoutingProfile)
routingProfile_numberOfAssociatedQueues :: Lens.Lens' RoutingProfile (Prelude.Maybe Prelude.Integer)
routingProfile_numberOfAssociatedQueues :: Lens' RoutingProfile (Maybe Integer)
routingProfile_numberOfAssociatedQueues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfile' {Maybe Integer
numberOfAssociatedQueues :: Maybe Integer
$sel:numberOfAssociatedQueues:RoutingProfile' :: RoutingProfile -> Maybe Integer
numberOfAssociatedQueues} -> Maybe Integer
numberOfAssociatedQueues) (\s :: RoutingProfile
s@RoutingProfile' {} Maybe Integer
a -> RoutingProfile
s {$sel:numberOfAssociatedQueues:RoutingProfile' :: Maybe Integer
numberOfAssociatedQueues = Maybe Integer
a} :: RoutingProfile)
routingProfile_numberOfAssociatedUsers :: Lens.Lens' RoutingProfile (Prelude.Maybe Prelude.Integer)
routingProfile_numberOfAssociatedUsers :: Lens' RoutingProfile (Maybe Integer)
routingProfile_numberOfAssociatedUsers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfile' {Maybe Integer
numberOfAssociatedUsers :: Maybe Integer
$sel:numberOfAssociatedUsers:RoutingProfile' :: RoutingProfile -> Maybe Integer
numberOfAssociatedUsers} -> Maybe Integer
numberOfAssociatedUsers) (\s :: RoutingProfile
s@RoutingProfile' {} Maybe Integer
a -> RoutingProfile
s {$sel:numberOfAssociatedUsers:RoutingProfile' :: Maybe Integer
numberOfAssociatedUsers = Maybe Integer
a} :: RoutingProfile)
routingProfile_routingProfileArn :: Lens.Lens' RoutingProfile (Prelude.Maybe Prelude.Text)
routingProfile_routingProfileArn :: Lens' RoutingProfile (Maybe Text)
routingProfile_routingProfileArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfile' {Maybe Text
routingProfileArn :: Maybe Text
$sel:routingProfileArn:RoutingProfile' :: RoutingProfile -> Maybe Text
routingProfileArn} -> Maybe Text
routingProfileArn) (\s :: RoutingProfile
s@RoutingProfile' {} Maybe Text
a -> RoutingProfile
s {$sel:routingProfileArn:RoutingProfile' :: Maybe Text
routingProfileArn = Maybe Text
a} :: RoutingProfile)
routingProfile_routingProfileId :: Lens.Lens' RoutingProfile (Prelude.Maybe Prelude.Text)
routingProfile_routingProfileId :: Lens' RoutingProfile (Maybe Text)
routingProfile_routingProfileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfile' {Maybe Text
routingProfileId :: Maybe Text
$sel:routingProfileId:RoutingProfile' :: RoutingProfile -> Maybe Text
routingProfileId} -> Maybe Text
routingProfileId) (\s :: RoutingProfile
s@RoutingProfile' {} Maybe Text
a -> RoutingProfile
s {$sel:routingProfileId:RoutingProfile' :: Maybe Text
routingProfileId = Maybe Text
a} :: RoutingProfile)
routingProfile_tags :: Lens.Lens' RoutingProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
routingProfile_tags :: Lens' RoutingProfile (Maybe (HashMap Text Text))
routingProfile_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfile' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:RoutingProfile' :: RoutingProfile -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: RoutingProfile
s@RoutingProfile' {} Maybe (HashMap Text Text)
a -> RoutingProfile
s {$sel:tags:RoutingProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: RoutingProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON RoutingProfile where
parseJSON :: Value -> Parser RoutingProfile
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RoutingProfile"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [MediaConcurrency]
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> RoutingProfile
RoutingProfile'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DefaultOutboundQueueId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InstanceId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MediaConcurrencies"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NumberOfAssociatedQueues")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NumberOfAssociatedUsers")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RoutingProfileArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RoutingProfileId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable RoutingProfile where
hashWithSalt :: Int -> RoutingProfile -> Int
hashWithSalt Int
_salt RoutingProfile' {Maybe Integer
Maybe [MediaConcurrency]
Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
routingProfileId :: Maybe Text
routingProfileArn :: Maybe Text
numberOfAssociatedUsers :: Maybe Integer
numberOfAssociatedQueues :: Maybe Integer
name :: Maybe Text
mediaConcurrencies :: Maybe [MediaConcurrency]
instanceId :: Maybe Text
description :: Maybe Text
defaultOutboundQueueId :: Maybe Text
$sel:tags:RoutingProfile' :: RoutingProfile -> Maybe (HashMap Text Text)
$sel:routingProfileId:RoutingProfile' :: RoutingProfile -> Maybe Text
$sel:routingProfileArn:RoutingProfile' :: RoutingProfile -> Maybe Text
$sel:numberOfAssociatedUsers:RoutingProfile' :: RoutingProfile -> Maybe Integer
$sel:numberOfAssociatedQueues:RoutingProfile' :: RoutingProfile -> Maybe Integer
$sel:name:RoutingProfile' :: RoutingProfile -> Maybe Text
$sel:mediaConcurrencies:RoutingProfile' :: RoutingProfile -> Maybe [MediaConcurrency]
$sel:instanceId:RoutingProfile' :: RoutingProfile -> Maybe Text
$sel:description:RoutingProfile' :: RoutingProfile -> Maybe Text
$sel:defaultOutboundQueueId:RoutingProfile' :: RoutingProfile -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultOutboundQueueId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [MediaConcurrency]
mediaConcurrencies
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
numberOfAssociatedQueues
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
numberOfAssociatedUsers
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
routingProfileArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
routingProfileId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData RoutingProfile where
rnf :: RoutingProfile -> ()
rnf RoutingProfile' {Maybe Integer
Maybe [MediaConcurrency]
Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
routingProfileId :: Maybe Text
routingProfileArn :: Maybe Text
numberOfAssociatedUsers :: Maybe Integer
numberOfAssociatedQueues :: Maybe Integer
name :: Maybe Text
mediaConcurrencies :: Maybe [MediaConcurrency]
instanceId :: Maybe Text
description :: Maybe Text
defaultOutboundQueueId :: Maybe Text
$sel:tags:RoutingProfile' :: RoutingProfile -> Maybe (HashMap Text Text)
$sel:routingProfileId:RoutingProfile' :: RoutingProfile -> Maybe Text
$sel:routingProfileArn:RoutingProfile' :: RoutingProfile -> Maybe Text
$sel:numberOfAssociatedUsers:RoutingProfile' :: RoutingProfile -> Maybe Integer
$sel:numberOfAssociatedQueues:RoutingProfile' :: RoutingProfile -> Maybe Integer
$sel:name:RoutingProfile' :: RoutingProfile -> Maybe Text
$sel:mediaConcurrencies:RoutingProfile' :: RoutingProfile -> Maybe [MediaConcurrency]
$sel:instanceId:RoutingProfile' :: RoutingProfile -> Maybe Text
$sel:description:RoutingProfile' :: RoutingProfile -> Maybe Text
$sel:defaultOutboundQueueId:RoutingProfile' :: RoutingProfile -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultOutboundQueueId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MediaConcurrency]
mediaConcurrencies
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
numberOfAssociatedQueues
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
numberOfAssociatedUsers
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routingProfileArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routingProfileId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags