{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Chime.CreateVoiceConnectorGroup
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an Amazon Chime Voice Connector group under the administrator\'s
-- AWS account. You can associate Amazon Chime Voice Connectors with the
-- Amazon Chime Voice Connector group by including @VoiceConnectorItems@ in
-- the request.
--
-- You can include Amazon Chime Voice Connectors from different AWS Regions
-- in your group. This creates a fault tolerant mechanism for fallback in
-- case of availability events.
module Amazonka.Chime.CreateVoiceConnectorGroup
  ( -- * Creating a Request
    CreateVoiceConnectorGroup (..),
    newCreateVoiceConnectorGroup,

    -- * Request Lenses
    createVoiceConnectorGroup_voiceConnectorItems,
    createVoiceConnectorGroup_name,

    -- * Destructuring the Response
    CreateVoiceConnectorGroupResponse (..),
    newCreateVoiceConnectorGroupResponse,

    -- * Response Lenses
    createVoiceConnectorGroupResponse_voiceConnectorGroup,
    createVoiceConnectorGroupResponse_httpStatus,
  )
where

import Amazonka.Chime.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

-- | /See:/ 'newCreateVoiceConnectorGroup' smart constructor.
data CreateVoiceConnectorGroup = CreateVoiceConnectorGroup'
  { -- | The Amazon Chime Voice Connectors to route inbound calls to.
    CreateVoiceConnectorGroup -> Maybe [VoiceConnectorItem]
voiceConnectorItems :: Prelude.Maybe [VoiceConnectorItem],
    -- | The name of the Amazon Chime Voice Connector group.
    CreateVoiceConnectorGroup -> Text
name :: Prelude.Text
  }
  deriving (CreateVoiceConnectorGroup -> CreateVoiceConnectorGroup -> Bool
(CreateVoiceConnectorGroup -> CreateVoiceConnectorGroup -> Bool)
-> (CreateVoiceConnectorGroup -> CreateVoiceConnectorGroup -> Bool)
-> Eq CreateVoiceConnectorGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVoiceConnectorGroup -> CreateVoiceConnectorGroup -> Bool
$c/= :: CreateVoiceConnectorGroup -> CreateVoiceConnectorGroup -> Bool
== :: CreateVoiceConnectorGroup -> CreateVoiceConnectorGroup -> Bool
$c== :: CreateVoiceConnectorGroup -> CreateVoiceConnectorGroup -> Bool
Prelude.Eq, ReadPrec [CreateVoiceConnectorGroup]
ReadPrec CreateVoiceConnectorGroup
Int -> ReadS CreateVoiceConnectorGroup
ReadS [CreateVoiceConnectorGroup]
(Int -> ReadS CreateVoiceConnectorGroup)
-> ReadS [CreateVoiceConnectorGroup]
-> ReadPrec CreateVoiceConnectorGroup
-> ReadPrec [CreateVoiceConnectorGroup]
-> Read CreateVoiceConnectorGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVoiceConnectorGroup]
$creadListPrec :: ReadPrec [CreateVoiceConnectorGroup]
readPrec :: ReadPrec CreateVoiceConnectorGroup
$creadPrec :: ReadPrec CreateVoiceConnectorGroup
readList :: ReadS [CreateVoiceConnectorGroup]
$creadList :: ReadS [CreateVoiceConnectorGroup]
readsPrec :: Int -> ReadS CreateVoiceConnectorGroup
$creadsPrec :: Int -> ReadS CreateVoiceConnectorGroup
Prelude.Read, Int -> CreateVoiceConnectorGroup -> ShowS
[CreateVoiceConnectorGroup] -> ShowS
CreateVoiceConnectorGroup -> String
(Int -> CreateVoiceConnectorGroup -> ShowS)
-> (CreateVoiceConnectorGroup -> String)
-> ([CreateVoiceConnectorGroup] -> ShowS)
-> Show CreateVoiceConnectorGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVoiceConnectorGroup] -> ShowS
$cshowList :: [CreateVoiceConnectorGroup] -> ShowS
show :: CreateVoiceConnectorGroup -> String
$cshow :: CreateVoiceConnectorGroup -> String
showsPrec :: Int -> CreateVoiceConnectorGroup -> ShowS
$cshowsPrec :: Int -> CreateVoiceConnectorGroup -> ShowS
Prelude.Show, (forall x.
 CreateVoiceConnectorGroup -> Rep CreateVoiceConnectorGroup x)
-> (forall x.
    Rep CreateVoiceConnectorGroup x -> CreateVoiceConnectorGroup)
-> Generic CreateVoiceConnectorGroup
forall x.
Rep CreateVoiceConnectorGroup x -> CreateVoiceConnectorGroup
forall x.
CreateVoiceConnectorGroup -> Rep CreateVoiceConnectorGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVoiceConnectorGroup x -> CreateVoiceConnectorGroup
$cfrom :: forall x.
CreateVoiceConnectorGroup -> Rep CreateVoiceConnectorGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateVoiceConnectorGroup' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'voiceConnectorItems', 'createVoiceConnectorGroup_voiceConnectorItems' - The Amazon Chime Voice Connectors to route inbound calls to.
--
-- 'name', 'createVoiceConnectorGroup_name' - The name of the Amazon Chime Voice Connector group.
newCreateVoiceConnectorGroup ::
  -- | 'name'
  Prelude.Text ->
  CreateVoiceConnectorGroup
newCreateVoiceConnectorGroup :: Text -> CreateVoiceConnectorGroup
newCreateVoiceConnectorGroup Text
pName_ =
  CreateVoiceConnectorGroup' :: Maybe [VoiceConnectorItem] -> Text -> CreateVoiceConnectorGroup
CreateVoiceConnectorGroup'
    { $sel:voiceConnectorItems:CreateVoiceConnectorGroup' :: Maybe [VoiceConnectorItem]
voiceConnectorItems =
        Maybe [VoiceConnectorItem]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateVoiceConnectorGroup' :: Text
name = Text
pName_
    }

-- | The Amazon Chime Voice Connectors to route inbound calls to.
createVoiceConnectorGroup_voiceConnectorItems :: Lens.Lens' CreateVoiceConnectorGroup (Prelude.Maybe [VoiceConnectorItem])
createVoiceConnectorGroup_voiceConnectorItems :: (Maybe [VoiceConnectorItem] -> f (Maybe [VoiceConnectorItem]))
-> CreateVoiceConnectorGroup -> f CreateVoiceConnectorGroup
createVoiceConnectorGroup_voiceConnectorItems = (CreateVoiceConnectorGroup -> Maybe [VoiceConnectorItem])
-> (CreateVoiceConnectorGroup
    -> Maybe [VoiceConnectorItem] -> CreateVoiceConnectorGroup)
-> Lens
     CreateVoiceConnectorGroup
     CreateVoiceConnectorGroup
     (Maybe [VoiceConnectorItem])
     (Maybe [VoiceConnectorItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVoiceConnectorGroup' {Maybe [VoiceConnectorItem]
voiceConnectorItems :: Maybe [VoiceConnectorItem]
$sel:voiceConnectorItems:CreateVoiceConnectorGroup' :: CreateVoiceConnectorGroup -> Maybe [VoiceConnectorItem]
voiceConnectorItems} -> Maybe [VoiceConnectorItem]
voiceConnectorItems) (\s :: CreateVoiceConnectorGroup
s@CreateVoiceConnectorGroup' {} Maybe [VoiceConnectorItem]
a -> CreateVoiceConnectorGroup
s {$sel:voiceConnectorItems:CreateVoiceConnectorGroup' :: Maybe [VoiceConnectorItem]
voiceConnectorItems = Maybe [VoiceConnectorItem]
a} :: CreateVoiceConnectorGroup) ((Maybe [VoiceConnectorItem] -> f (Maybe [VoiceConnectorItem]))
 -> CreateVoiceConnectorGroup -> f CreateVoiceConnectorGroup)
-> ((Maybe [VoiceConnectorItem] -> f (Maybe [VoiceConnectorItem]))
    -> Maybe [VoiceConnectorItem] -> f (Maybe [VoiceConnectorItem]))
-> (Maybe [VoiceConnectorItem] -> f (Maybe [VoiceConnectorItem]))
-> CreateVoiceConnectorGroup
-> f CreateVoiceConnectorGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [VoiceConnectorItem]
  [VoiceConnectorItem]
  [VoiceConnectorItem]
  [VoiceConnectorItem]
-> Iso
     (Maybe [VoiceConnectorItem])
     (Maybe [VoiceConnectorItem])
     (Maybe [VoiceConnectorItem])
     (Maybe [VoiceConnectorItem])
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
  [VoiceConnectorItem]
  [VoiceConnectorItem]
  [VoiceConnectorItem]
  [VoiceConnectorItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the Amazon Chime Voice Connector group.
createVoiceConnectorGroup_name :: Lens.Lens' CreateVoiceConnectorGroup Prelude.Text
createVoiceConnectorGroup_name :: (Text -> f Text)
-> CreateVoiceConnectorGroup -> f CreateVoiceConnectorGroup
createVoiceConnectorGroup_name = (CreateVoiceConnectorGroup -> Text)
-> (CreateVoiceConnectorGroup -> Text -> CreateVoiceConnectorGroup)
-> Lens
     CreateVoiceConnectorGroup CreateVoiceConnectorGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVoiceConnectorGroup' {Text
name :: Text
$sel:name:CreateVoiceConnectorGroup' :: CreateVoiceConnectorGroup -> Text
name} -> Text
name) (\s :: CreateVoiceConnectorGroup
s@CreateVoiceConnectorGroup' {} Text
a -> CreateVoiceConnectorGroup
s {$sel:name:CreateVoiceConnectorGroup' :: Text
name = Text
a} :: CreateVoiceConnectorGroup)

instance Core.AWSRequest CreateVoiceConnectorGroup where
  type
    AWSResponse CreateVoiceConnectorGroup =
      CreateVoiceConnectorGroupResponse
  request :: CreateVoiceConnectorGroup -> Request CreateVoiceConnectorGroup
request = Service
-> CreateVoiceConnectorGroup -> Request CreateVoiceConnectorGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateVoiceConnectorGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateVoiceConnectorGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateVoiceConnectorGroup))
-> Logger
-> Service
-> Proxy CreateVoiceConnectorGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateVoiceConnectorGroup)))
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 VoiceConnectorGroup
-> Int -> CreateVoiceConnectorGroupResponse
CreateVoiceConnectorGroupResponse'
            (Maybe VoiceConnectorGroup
 -> Int -> CreateVoiceConnectorGroupResponse)
-> Either String (Maybe VoiceConnectorGroup)
-> Either String (Int -> CreateVoiceConnectorGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe VoiceConnectorGroup)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VoiceConnectorGroup")
            Either String (Int -> CreateVoiceConnectorGroupResponse)
-> Either String Int
-> Either String CreateVoiceConnectorGroupResponse
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 CreateVoiceConnectorGroup

instance Prelude.NFData CreateVoiceConnectorGroup

instance Core.ToHeaders CreateVoiceConnectorGroup where
  toHeaders :: CreateVoiceConnectorGroup -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateVoiceConnectorGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON CreateVoiceConnectorGroup where
  toJSON :: CreateVoiceConnectorGroup -> Value
toJSON CreateVoiceConnectorGroup' {Maybe [VoiceConnectorItem]
Text
name :: Text
voiceConnectorItems :: Maybe [VoiceConnectorItem]
$sel:name:CreateVoiceConnectorGroup' :: CreateVoiceConnectorGroup -> Text
$sel:voiceConnectorItems:CreateVoiceConnectorGroup' :: CreateVoiceConnectorGroup -> Maybe [VoiceConnectorItem]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"VoiceConnectorItems" Text -> [VoiceConnectorItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([VoiceConnectorItem] -> Pair)
-> Maybe [VoiceConnectorItem] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [VoiceConnectorItem]
voiceConnectorItems,
            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)
          ]
      )

instance Core.ToPath CreateVoiceConnectorGroup where
  toPath :: CreateVoiceConnectorGroup -> ByteString
toPath = ByteString -> CreateVoiceConnectorGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/voice-connector-groups"

instance Core.ToQuery CreateVoiceConnectorGroup where
  toQuery :: CreateVoiceConnectorGroup -> QueryString
toQuery = QueryString -> CreateVoiceConnectorGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateVoiceConnectorGroupResponse' smart constructor.
data CreateVoiceConnectorGroupResponse = CreateVoiceConnectorGroupResponse'
  { -- | The Amazon Chime Voice Connector group details.
    CreateVoiceConnectorGroupResponse -> Maybe VoiceConnectorGroup
voiceConnectorGroup :: Prelude.Maybe VoiceConnectorGroup,
    -- | The response's http status code.
    CreateVoiceConnectorGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateVoiceConnectorGroupResponse
-> CreateVoiceConnectorGroupResponse -> Bool
(CreateVoiceConnectorGroupResponse
 -> CreateVoiceConnectorGroupResponse -> Bool)
-> (CreateVoiceConnectorGroupResponse
    -> CreateVoiceConnectorGroupResponse -> Bool)
-> Eq CreateVoiceConnectorGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVoiceConnectorGroupResponse
-> CreateVoiceConnectorGroupResponse -> Bool
$c/= :: CreateVoiceConnectorGroupResponse
-> CreateVoiceConnectorGroupResponse -> Bool
== :: CreateVoiceConnectorGroupResponse
-> CreateVoiceConnectorGroupResponse -> Bool
$c== :: CreateVoiceConnectorGroupResponse
-> CreateVoiceConnectorGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateVoiceConnectorGroupResponse]
ReadPrec CreateVoiceConnectorGroupResponse
Int -> ReadS CreateVoiceConnectorGroupResponse
ReadS [CreateVoiceConnectorGroupResponse]
(Int -> ReadS CreateVoiceConnectorGroupResponse)
-> ReadS [CreateVoiceConnectorGroupResponse]
-> ReadPrec CreateVoiceConnectorGroupResponse
-> ReadPrec [CreateVoiceConnectorGroupResponse]
-> Read CreateVoiceConnectorGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVoiceConnectorGroupResponse]
$creadListPrec :: ReadPrec [CreateVoiceConnectorGroupResponse]
readPrec :: ReadPrec CreateVoiceConnectorGroupResponse
$creadPrec :: ReadPrec CreateVoiceConnectorGroupResponse
readList :: ReadS [CreateVoiceConnectorGroupResponse]
$creadList :: ReadS [CreateVoiceConnectorGroupResponse]
readsPrec :: Int -> ReadS CreateVoiceConnectorGroupResponse
$creadsPrec :: Int -> ReadS CreateVoiceConnectorGroupResponse
Prelude.Read, Int -> CreateVoiceConnectorGroupResponse -> ShowS
[CreateVoiceConnectorGroupResponse] -> ShowS
CreateVoiceConnectorGroupResponse -> String
(Int -> CreateVoiceConnectorGroupResponse -> ShowS)
-> (CreateVoiceConnectorGroupResponse -> String)
-> ([CreateVoiceConnectorGroupResponse] -> ShowS)
-> Show CreateVoiceConnectorGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVoiceConnectorGroupResponse] -> ShowS
$cshowList :: [CreateVoiceConnectorGroupResponse] -> ShowS
show :: CreateVoiceConnectorGroupResponse -> String
$cshow :: CreateVoiceConnectorGroupResponse -> String
showsPrec :: Int -> CreateVoiceConnectorGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateVoiceConnectorGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateVoiceConnectorGroupResponse
 -> Rep CreateVoiceConnectorGroupResponse x)
-> (forall x.
    Rep CreateVoiceConnectorGroupResponse x
    -> CreateVoiceConnectorGroupResponse)
-> Generic CreateVoiceConnectorGroupResponse
forall x.
Rep CreateVoiceConnectorGroupResponse x
-> CreateVoiceConnectorGroupResponse
forall x.
CreateVoiceConnectorGroupResponse
-> Rep CreateVoiceConnectorGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVoiceConnectorGroupResponse x
-> CreateVoiceConnectorGroupResponse
$cfrom :: forall x.
CreateVoiceConnectorGroupResponse
-> Rep CreateVoiceConnectorGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateVoiceConnectorGroupResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'voiceConnectorGroup', 'createVoiceConnectorGroupResponse_voiceConnectorGroup' - The Amazon Chime Voice Connector group details.
--
-- 'httpStatus', 'createVoiceConnectorGroupResponse_httpStatus' - The response's http status code.
newCreateVoiceConnectorGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateVoiceConnectorGroupResponse
newCreateVoiceConnectorGroupResponse :: Int -> CreateVoiceConnectorGroupResponse
newCreateVoiceConnectorGroupResponse Int
pHttpStatus_ =
  CreateVoiceConnectorGroupResponse' :: Maybe VoiceConnectorGroup
-> Int -> CreateVoiceConnectorGroupResponse
CreateVoiceConnectorGroupResponse'
    { $sel:voiceConnectorGroup:CreateVoiceConnectorGroupResponse' :: Maybe VoiceConnectorGroup
voiceConnectorGroup =
        Maybe VoiceConnectorGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateVoiceConnectorGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Chime Voice Connector group details.
createVoiceConnectorGroupResponse_voiceConnectorGroup :: Lens.Lens' CreateVoiceConnectorGroupResponse (Prelude.Maybe VoiceConnectorGroup)
createVoiceConnectorGroupResponse_voiceConnectorGroup :: (Maybe VoiceConnectorGroup -> f (Maybe VoiceConnectorGroup))
-> CreateVoiceConnectorGroupResponse
-> f CreateVoiceConnectorGroupResponse
createVoiceConnectorGroupResponse_voiceConnectorGroup = (CreateVoiceConnectorGroupResponse -> Maybe VoiceConnectorGroup)
-> (CreateVoiceConnectorGroupResponse
    -> Maybe VoiceConnectorGroup -> CreateVoiceConnectorGroupResponse)
-> Lens
     CreateVoiceConnectorGroupResponse
     CreateVoiceConnectorGroupResponse
     (Maybe VoiceConnectorGroup)
     (Maybe VoiceConnectorGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVoiceConnectorGroupResponse' {Maybe VoiceConnectorGroup
voiceConnectorGroup :: Maybe VoiceConnectorGroup
$sel:voiceConnectorGroup:CreateVoiceConnectorGroupResponse' :: CreateVoiceConnectorGroupResponse -> Maybe VoiceConnectorGroup
voiceConnectorGroup} -> Maybe VoiceConnectorGroup
voiceConnectorGroup) (\s :: CreateVoiceConnectorGroupResponse
s@CreateVoiceConnectorGroupResponse' {} Maybe VoiceConnectorGroup
a -> CreateVoiceConnectorGroupResponse
s {$sel:voiceConnectorGroup:CreateVoiceConnectorGroupResponse' :: Maybe VoiceConnectorGroup
voiceConnectorGroup = Maybe VoiceConnectorGroup
a} :: CreateVoiceConnectorGroupResponse)

-- | The response's http status code.
createVoiceConnectorGroupResponse_httpStatus :: Lens.Lens' CreateVoiceConnectorGroupResponse Prelude.Int
createVoiceConnectorGroupResponse_httpStatus :: (Int -> f Int)
-> CreateVoiceConnectorGroupResponse
-> f CreateVoiceConnectorGroupResponse
createVoiceConnectorGroupResponse_httpStatus = (CreateVoiceConnectorGroupResponse -> Int)
-> (CreateVoiceConnectorGroupResponse
    -> Int -> CreateVoiceConnectorGroupResponse)
-> Lens
     CreateVoiceConnectorGroupResponse
     CreateVoiceConnectorGroupResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVoiceConnectorGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateVoiceConnectorGroupResponse' :: CreateVoiceConnectorGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateVoiceConnectorGroupResponse
s@CreateVoiceConnectorGroupResponse' {} Int
a -> CreateVoiceConnectorGroupResponse
s {$sel:httpStatus:CreateVoiceConnectorGroupResponse' :: Int
httpStatus = Int
a} :: CreateVoiceConnectorGroupResponse)

instance
  Prelude.NFData
    CreateVoiceConnectorGroupResponse