{-# 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.ChimeSdkVoice.ListVoiceConnectorGroups
(
ListVoiceConnectorGroups (..),
newListVoiceConnectorGroups,
listVoiceConnectorGroups_maxResults,
listVoiceConnectorGroups_nextToken,
ListVoiceConnectorGroupsResponse (..),
newListVoiceConnectorGroupsResponse,
listVoiceConnectorGroupsResponse_nextToken,
listVoiceConnectorGroupsResponse_voiceConnectorGroups,
listVoiceConnectorGroupsResponse_httpStatus,
)
where
import Amazonka.ChimeSdkVoice.Types
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
data ListVoiceConnectorGroups = ListVoiceConnectorGroups'
{ ListVoiceConnectorGroups -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListVoiceConnectorGroups -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (ListVoiceConnectorGroups -> ListVoiceConnectorGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListVoiceConnectorGroups -> ListVoiceConnectorGroups -> Bool
$c/= :: ListVoiceConnectorGroups -> ListVoiceConnectorGroups -> Bool
== :: ListVoiceConnectorGroups -> ListVoiceConnectorGroups -> Bool
$c== :: ListVoiceConnectorGroups -> ListVoiceConnectorGroups -> Bool
Prelude.Eq, ReadPrec [ListVoiceConnectorGroups]
ReadPrec ListVoiceConnectorGroups
Int -> ReadS ListVoiceConnectorGroups
ReadS [ListVoiceConnectorGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListVoiceConnectorGroups]
$creadListPrec :: ReadPrec [ListVoiceConnectorGroups]
readPrec :: ReadPrec ListVoiceConnectorGroups
$creadPrec :: ReadPrec ListVoiceConnectorGroups
readList :: ReadS [ListVoiceConnectorGroups]
$creadList :: ReadS [ListVoiceConnectorGroups]
readsPrec :: Int -> ReadS ListVoiceConnectorGroups
$creadsPrec :: Int -> ReadS ListVoiceConnectorGroups
Prelude.Read, Int -> ListVoiceConnectorGroups -> ShowS
[ListVoiceConnectorGroups] -> ShowS
ListVoiceConnectorGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListVoiceConnectorGroups] -> ShowS
$cshowList :: [ListVoiceConnectorGroups] -> ShowS
show :: ListVoiceConnectorGroups -> String
$cshow :: ListVoiceConnectorGroups -> String
showsPrec :: Int -> ListVoiceConnectorGroups -> ShowS
$cshowsPrec :: Int -> ListVoiceConnectorGroups -> ShowS
Prelude.Show, forall x.
Rep ListVoiceConnectorGroups x -> ListVoiceConnectorGroups
forall x.
ListVoiceConnectorGroups -> Rep ListVoiceConnectorGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListVoiceConnectorGroups x -> ListVoiceConnectorGroups
$cfrom :: forall x.
ListVoiceConnectorGroups -> Rep ListVoiceConnectorGroups x
Prelude.Generic)
newListVoiceConnectorGroups ::
ListVoiceConnectorGroups
newListVoiceConnectorGroups :: ListVoiceConnectorGroups
newListVoiceConnectorGroups =
ListVoiceConnectorGroups'
{ $sel:maxResults:ListVoiceConnectorGroups' :: Maybe Natural
maxResults =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListVoiceConnectorGroups' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
}
listVoiceConnectorGroups_maxResults :: Lens.Lens' ListVoiceConnectorGroups (Prelude.Maybe Prelude.Natural)
listVoiceConnectorGroups_maxResults :: Lens' ListVoiceConnectorGroups (Maybe Natural)
listVoiceConnectorGroups_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVoiceConnectorGroups' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListVoiceConnectorGroups' :: ListVoiceConnectorGroups -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListVoiceConnectorGroups
s@ListVoiceConnectorGroups' {} Maybe Natural
a -> ListVoiceConnectorGroups
s {$sel:maxResults:ListVoiceConnectorGroups' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListVoiceConnectorGroups)
listVoiceConnectorGroups_nextToken :: Lens.Lens' ListVoiceConnectorGroups (Prelude.Maybe Prelude.Text)
listVoiceConnectorGroups_nextToken :: Lens' ListVoiceConnectorGroups (Maybe Text)
listVoiceConnectorGroups_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVoiceConnectorGroups' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListVoiceConnectorGroups' :: ListVoiceConnectorGroups -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListVoiceConnectorGroups
s@ListVoiceConnectorGroups' {} Maybe Text
a -> ListVoiceConnectorGroups
s {$sel:nextToken:ListVoiceConnectorGroups' :: Maybe Text
nextToken = Maybe Text
a} :: ListVoiceConnectorGroups)
instance Core.AWSRequest ListVoiceConnectorGroups where
type
AWSResponse ListVoiceConnectorGroups =
ListVoiceConnectorGroupsResponse
request :: (Service -> Service)
-> ListVoiceConnectorGroups -> Request ListVoiceConnectorGroups
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListVoiceConnectorGroups
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListVoiceConnectorGroups)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe [VoiceConnectorGroup]
-> Int
-> ListVoiceConnectorGroupsResponse
ListVoiceConnectorGroupsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VoiceConnectorGroups"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => 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 ListVoiceConnectorGroups where
hashWithSalt :: Int -> ListVoiceConnectorGroups -> Int
hashWithSalt Int
_salt ListVoiceConnectorGroups' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListVoiceConnectorGroups' :: ListVoiceConnectorGroups -> Maybe Text
$sel:maxResults:ListVoiceConnectorGroups' :: ListVoiceConnectorGroups -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
instance Prelude.NFData ListVoiceConnectorGroups where
rnf :: ListVoiceConnectorGroups -> ()
rnf ListVoiceConnectorGroups' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListVoiceConnectorGroups' :: ListVoiceConnectorGroups -> Maybe Text
$sel:maxResults:ListVoiceConnectorGroups' :: ListVoiceConnectorGroups -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
instance Data.ToHeaders ListVoiceConnectorGroups where
toHeaders :: ListVoiceConnectorGroups -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ListVoiceConnectorGroups where
toPath :: ListVoiceConnectorGroups -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/voice-connector-groups"
instance Data.ToQuery ListVoiceConnectorGroups where
toQuery :: ListVoiceConnectorGroups -> QueryString
toQuery ListVoiceConnectorGroups' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListVoiceConnectorGroups' :: ListVoiceConnectorGroups -> Maybe Text
$sel:maxResults:ListVoiceConnectorGroups' :: ListVoiceConnectorGroups -> Maybe Natural
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"max-results" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
ByteString
"next-token" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
]
data ListVoiceConnectorGroupsResponse = ListVoiceConnectorGroupsResponse'
{ ListVoiceConnectorGroupsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListVoiceConnectorGroupsResponse -> Maybe [VoiceConnectorGroup]
voiceConnectorGroups :: Prelude.Maybe [VoiceConnectorGroup],
ListVoiceConnectorGroupsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListVoiceConnectorGroupsResponse
-> ListVoiceConnectorGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListVoiceConnectorGroupsResponse
-> ListVoiceConnectorGroupsResponse -> Bool
$c/= :: ListVoiceConnectorGroupsResponse
-> ListVoiceConnectorGroupsResponse -> Bool
== :: ListVoiceConnectorGroupsResponse
-> ListVoiceConnectorGroupsResponse -> Bool
$c== :: ListVoiceConnectorGroupsResponse
-> ListVoiceConnectorGroupsResponse -> Bool
Prelude.Eq, ReadPrec [ListVoiceConnectorGroupsResponse]
ReadPrec ListVoiceConnectorGroupsResponse
Int -> ReadS ListVoiceConnectorGroupsResponse
ReadS [ListVoiceConnectorGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListVoiceConnectorGroupsResponse]
$creadListPrec :: ReadPrec [ListVoiceConnectorGroupsResponse]
readPrec :: ReadPrec ListVoiceConnectorGroupsResponse
$creadPrec :: ReadPrec ListVoiceConnectorGroupsResponse
readList :: ReadS [ListVoiceConnectorGroupsResponse]
$creadList :: ReadS [ListVoiceConnectorGroupsResponse]
readsPrec :: Int -> ReadS ListVoiceConnectorGroupsResponse
$creadsPrec :: Int -> ReadS ListVoiceConnectorGroupsResponse
Prelude.Read, Int -> ListVoiceConnectorGroupsResponse -> ShowS
[ListVoiceConnectorGroupsResponse] -> ShowS
ListVoiceConnectorGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListVoiceConnectorGroupsResponse] -> ShowS
$cshowList :: [ListVoiceConnectorGroupsResponse] -> ShowS
show :: ListVoiceConnectorGroupsResponse -> String
$cshow :: ListVoiceConnectorGroupsResponse -> String
showsPrec :: Int -> ListVoiceConnectorGroupsResponse -> ShowS
$cshowsPrec :: Int -> ListVoiceConnectorGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep ListVoiceConnectorGroupsResponse x
-> ListVoiceConnectorGroupsResponse
forall x.
ListVoiceConnectorGroupsResponse
-> Rep ListVoiceConnectorGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListVoiceConnectorGroupsResponse x
-> ListVoiceConnectorGroupsResponse
$cfrom :: forall x.
ListVoiceConnectorGroupsResponse
-> Rep ListVoiceConnectorGroupsResponse x
Prelude.Generic)
newListVoiceConnectorGroupsResponse ::
Prelude.Int ->
ListVoiceConnectorGroupsResponse
newListVoiceConnectorGroupsResponse :: Int -> ListVoiceConnectorGroupsResponse
newListVoiceConnectorGroupsResponse Int
pHttpStatus_ =
ListVoiceConnectorGroupsResponse'
{ $sel:nextToken:ListVoiceConnectorGroupsResponse' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:voiceConnectorGroups:ListVoiceConnectorGroupsResponse' :: Maybe [VoiceConnectorGroup]
voiceConnectorGroups = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListVoiceConnectorGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listVoiceConnectorGroupsResponse_nextToken :: Lens.Lens' ListVoiceConnectorGroupsResponse (Prelude.Maybe Prelude.Text)
listVoiceConnectorGroupsResponse_nextToken :: Lens' ListVoiceConnectorGroupsResponse (Maybe Text)
listVoiceConnectorGroupsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVoiceConnectorGroupsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListVoiceConnectorGroupsResponse' :: ListVoiceConnectorGroupsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListVoiceConnectorGroupsResponse
s@ListVoiceConnectorGroupsResponse' {} Maybe Text
a -> ListVoiceConnectorGroupsResponse
s {$sel:nextToken:ListVoiceConnectorGroupsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListVoiceConnectorGroupsResponse)
listVoiceConnectorGroupsResponse_voiceConnectorGroups :: Lens.Lens' ListVoiceConnectorGroupsResponse (Prelude.Maybe [VoiceConnectorGroup])
listVoiceConnectorGroupsResponse_voiceConnectorGroups :: Lens'
ListVoiceConnectorGroupsResponse (Maybe [VoiceConnectorGroup])
listVoiceConnectorGroupsResponse_voiceConnectorGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVoiceConnectorGroupsResponse' {Maybe [VoiceConnectorGroup]
voiceConnectorGroups :: Maybe [VoiceConnectorGroup]
$sel:voiceConnectorGroups:ListVoiceConnectorGroupsResponse' :: ListVoiceConnectorGroupsResponse -> Maybe [VoiceConnectorGroup]
voiceConnectorGroups} -> Maybe [VoiceConnectorGroup]
voiceConnectorGroups) (\s :: ListVoiceConnectorGroupsResponse
s@ListVoiceConnectorGroupsResponse' {} Maybe [VoiceConnectorGroup]
a -> ListVoiceConnectorGroupsResponse
s {$sel:voiceConnectorGroups:ListVoiceConnectorGroupsResponse' :: Maybe [VoiceConnectorGroup]
voiceConnectorGroups = Maybe [VoiceConnectorGroup]
a} :: ListVoiceConnectorGroupsResponse) 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
listVoiceConnectorGroupsResponse_httpStatus :: Lens.Lens' ListVoiceConnectorGroupsResponse Prelude.Int
listVoiceConnectorGroupsResponse_httpStatus :: Lens' ListVoiceConnectorGroupsResponse Int
listVoiceConnectorGroupsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVoiceConnectorGroupsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListVoiceConnectorGroupsResponse' :: ListVoiceConnectorGroupsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListVoiceConnectorGroupsResponse
s@ListVoiceConnectorGroupsResponse' {} Int
a -> ListVoiceConnectorGroupsResponse
s {$sel:httpStatus:ListVoiceConnectorGroupsResponse' :: Int
httpStatus = Int
a} :: ListVoiceConnectorGroupsResponse)
instance
Prelude.NFData
ListVoiceConnectorGroupsResponse
where
rnf :: ListVoiceConnectorGroupsResponse -> ()
rnf ListVoiceConnectorGroupsResponse' {Int
Maybe [VoiceConnectorGroup]
Maybe Text
httpStatus :: Int
voiceConnectorGroups :: Maybe [VoiceConnectorGroup]
nextToken :: Maybe Text
$sel:httpStatus:ListVoiceConnectorGroupsResponse' :: ListVoiceConnectorGroupsResponse -> Int
$sel:voiceConnectorGroups:ListVoiceConnectorGroupsResponse' :: ListVoiceConnectorGroupsResponse -> Maybe [VoiceConnectorGroup]
$sel:nextToken:ListVoiceConnectorGroupsResponse' :: ListVoiceConnectorGroupsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [VoiceConnectorGroup]
voiceConnectorGroups
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus