{-# 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.AlexaBusiness.CreateConferenceProvider
-- 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)
--
-- Adds a new conference provider under the user\'s AWS account.
module Amazonka.AlexaBusiness.CreateConferenceProvider
  ( -- * Creating a Request
    CreateConferenceProvider (..),
    newCreateConferenceProvider,

    -- * Request Lenses
    createConferenceProvider_pSTNDialIn,
    createConferenceProvider_clientRequestToken,
    createConferenceProvider_iPDialIn,
    createConferenceProvider_tags,
    createConferenceProvider_conferenceProviderName,
    createConferenceProvider_conferenceProviderType,
    createConferenceProvider_meetingSetting,

    -- * Destructuring the Response
    CreateConferenceProviderResponse (..),
    newCreateConferenceProviderResponse,

    -- * Response Lenses
    createConferenceProviderResponse_conferenceProviderArn,
    createConferenceProviderResponse_httpStatus,
  )
where

import Amazonka.AlexaBusiness.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:/ 'newCreateConferenceProvider' smart constructor.
data CreateConferenceProvider = CreateConferenceProvider'
  { -- | The information for PSTN conferencing.
    CreateConferenceProvider -> Maybe PSTNDialIn
pSTNDialIn :: Prelude.Maybe PSTNDialIn,
    -- | The request token of the client.
    CreateConferenceProvider -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The IP endpoint and protocol for calling.
    CreateConferenceProvider -> Maybe IPDialIn
iPDialIn :: Prelude.Maybe IPDialIn,
    -- | The tags to be added to the specified resource. Do not provide system
    -- tags.
    CreateConferenceProvider -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the conference provider.
    CreateConferenceProvider -> Text
conferenceProviderName :: Prelude.Text,
    -- | Represents a type within a list of predefined types.
    CreateConferenceProvider -> ConferenceProviderType
conferenceProviderType :: ConferenceProviderType,
    -- | The meeting settings for the conference provider.
    CreateConferenceProvider -> MeetingSetting
meetingSetting :: MeetingSetting
  }
  deriving (CreateConferenceProvider -> CreateConferenceProvider -> Bool
(CreateConferenceProvider -> CreateConferenceProvider -> Bool)
-> (CreateConferenceProvider -> CreateConferenceProvider -> Bool)
-> Eq CreateConferenceProvider
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConferenceProvider -> CreateConferenceProvider -> Bool
$c/= :: CreateConferenceProvider -> CreateConferenceProvider -> Bool
== :: CreateConferenceProvider -> CreateConferenceProvider -> Bool
$c== :: CreateConferenceProvider -> CreateConferenceProvider -> Bool
Prelude.Eq, ReadPrec [CreateConferenceProvider]
ReadPrec CreateConferenceProvider
Int -> ReadS CreateConferenceProvider
ReadS [CreateConferenceProvider]
(Int -> ReadS CreateConferenceProvider)
-> ReadS [CreateConferenceProvider]
-> ReadPrec CreateConferenceProvider
-> ReadPrec [CreateConferenceProvider]
-> Read CreateConferenceProvider
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConferenceProvider]
$creadListPrec :: ReadPrec [CreateConferenceProvider]
readPrec :: ReadPrec CreateConferenceProvider
$creadPrec :: ReadPrec CreateConferenceProvider
readList :: ReadS [CreateConferenceProvider]
$creadList :: ReadS [CreateConferenceProvider]
readsPrec :: Int -> ReadS CreateConferenceProvider
$creadsPrec :: Int -> ReadS CreateConferenceProvider
Prelude.Read, Int -> CreateConferenceProvider -> ShowS
[CreateConferenceProvider] -> ShowS
CreateConferenceProvider -> String
(Int -> CreateConferenceProvider -> ShowS)
-> (CreateConferenceProvider -> String)
-> ([CreateConferenceProvider] -> ShowS)
-> Show CreateConferenceProvider
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConferenceProvider] -> ShowS
$cshowList :: [CreateConferenceProvider] -> ShowS
show :: CreateConferenceProvider -> String
$cshow :: CreateConferenceProvider -> String
showsPrec :: Int -> CreateConferenceProvider -> ShowS
$cshowsPrec :: Int -> CreateConferenceProvider -> ShowS
Prelude.Show, (forall x.
 CreateConferenceProvider -> Rep CreateConferenceProvider x)
-> (forall x.
    Rep CreateConferenceProvider x -> CreateConferenceProvider)
-> Generic CreateConferenceProvider
forall x.
Rep CreateConferenceProvider x -> CreateConferenceProvider
forall x.
CreateConferenceProvider -> Rep CreateConferenceProvider x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateConferenceProvider x -> CreateConferenceProvider
$cfrom :: forall x.
CreateConferenceProvider -> Rep CreateConferenceProvider x
Prelude.Generic)

-- |
-- Create a value of 'CreateConferenceProvider' 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:
--
-- 'pSTNDialIn', 'createConferenceProvider_pSTNDialIn' - The information for PSTN conferencing.
--
-- 'clientRequestToken', 'createConferenceProvider_clientRequestToken' - The request token of the client.
--
-- 'iPDialIn', 'createConferenceProvider_iPDialIn' - The IP endpoint and protocol for calling.
--
-- 'tags', 'createConferenceProvider_tags' - The tags to be added to the specified resource. Do not provide system
-- tags.
--
-- 'conferenceProviderName', 'createConferenceProvider_conferenceProviderName' - The name of the conference provider.
--
-- 'conferenceProviderType', 'createConferenceProvider_conferenceProviderType' - Represents a type within a list of predefined types.
--
-- 'meetingSetting', 'createConferenceProvider_meetingSetting' - The meeting settings for the conference provider.
newCreateConferenceProvider ::
  -- | 'conferenceProviderName'
  Prelude.Text ->
  -- | 'conferenceProviderType'
  ConferenceProviderType ->
  -- | 'meetingSetting'
  MeetingSetting ->
  CreateConferenceProvider
newCreateConferenceProvider :: Text
-> ConferenceProviderType
-> MeetingSetting
-> CreateConferenceProvider
newCreateConferenceProvider
  Text
pConferenceProviderName_
  ConferenceProviderType
pConferenceProviderType_
  MeetingSetting
pMeetingSetting_ =
    CreateConferenceProvider' :: Maybe PSTNDialIn
-> Maybe Text
-> Maybe IPDialIn
-> Maybe [Tag]
-> Text
-> ConferenceProviderType
-> MeetingSetting
-> CreateConferenceProvider
CreateConferenceProvider'
      { $sel:pSTNDialIn:CreateConferenceProvider' :: Maybe PSTNDialIn
pSTNDialIn =
          Maybe PSTNDialIn
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:CreateConferenceProvider' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:iPDialIn:CreateConferenceProvider' :: Maybe IPDialIn
iPDialIn = Maybe IPDialIn
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateConferenceProvider' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:conferenceProviderName:CreateConferenceProvider' :: Text
conferenceProviderName = Text
pConferenceProviderName_,
        $sel:conferenceProviderType:CreateConferenceProvider' :: ConferenceProviderType
conferenceProviderType = ConferenceProviderType
pConferenceProviderType_,
        $sel:meetingSetting:CreateConferenceProvider' :: MeetingSetting
meetingSetting = MeetingSetting
pMeetingSetting_
      }

-- | The information for PSTN conferencing.
createConferenceProvider_pSTNDialIn :: Lens.Lens' CreateConferenceProvider (Prelude.Maybe PSTNDialIn)
createConferenceProvider_pSTNDialIn :: (Maybe PSTNDialIn -> f (Maybe PSTNDialIn))
-> CreateConferenceProvider -> f CreateConferenceProvider
createConferenceProvider_pSTNDialIn = (CreateConferenceProvider -> Maybe PSTNDialIn)
-> (CreateConferenceProvider
    -> Maybe PSTNDialIn -> CreateConferenceProvider)
-> Lens
     CreateConferenceProvider
     CreateConferenceProvider
     (Maybe PSTNDialIn)
     (Maybe PSTNDialIn)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConferenceProvider' {Maybe PSTNDialIn
pSTNDialIn :: Maybe PSTNDialIn
$sel:pSTNDialIn:CreateConferenceProvider' :: CreateConferenceProvider -> Maybe PSTNDialIn
pSTNDialIn} -> Maybe PSTNDialIn
pSTNDialIn) (\s :: CreateConferenceProvider
s@CreateConferenceProvider' {} Maybe PSTNDialIn
a -> CreateConferenceProvider
s {$sel:pSTNDialIn:CreateConferenceProvider' :: Maybe PSTNDialIn
pSTNDialIn = Maybe PSTNDialIn
a} :: CreateConferenceProvider)

-- | The request token of the client.
createConferenceProvider_clientRequestToken :: Lens.Lens' CreateConferenceProvider (Prelude.Maybe Prelude.Text)
createConferenceProvider_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CreateConferenceProvider -> f CreateConferenceProvider
createConferenceProvider_clientRequestToken = (CreateConferenceProvider -> Maybe Text)
-> (CreateConferenceProvider
    -> Maybe Text -> CreateConferenceProvider)
-> Lens
     CreateConferenceProvider
     CreateConferenceProvider
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConferenceProvider' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateConferenceProvider' :: CreateConferenceProvider -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateConferenceProvider
s@CreateConferenceProvider' {} Maybe Text
a -> CreateConferenceProvider
s {$sel:clientRequestToken:CreateConferenceProvider' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateConferenceProvider)

-- | The IP endpoint and protocol for calling.
createConferenceProvider_iPDialIn :: Lens.Lens' CreateConferenceProvider (Prelude.Maybe IPDialIn)
createConferenceProvider_iPDialIn :: (Maybe IPDialIn -> f (Maybe IPDialIn))
-> CreateConferenceProvider -> f CreateConferenceProvider
createConferenceProvider_iPDialIn = (CreateConferenceProvider -> Maybe IPDialIn)
-> (CreateConferenceProvider
    -> Maybe IPDialIn -> CreateConferenceProvider)
-> Lens
     CreateConferenceProvider
     CreateConferenceProvider
     (Maybe IPDialIn)
     (Maybe IPDialIn)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConferenceProvider' {Maybe IPDialIn
iPDialIn :: Maybe IPDialIn
$sel:iPDialIn:CreateConferenceProvider' :: CreateConferenceProvider -> Maybe IPDialIn
iPDialIn} -> Maybe IPDialIn
iPDialIn) (\s :: CreateConferenceProvider
s@CreateConferenceProvider' {} Maybe IPDialIn
a -> CreateConferenceProvider
s {$sel:iPDialIn:CreateConferenceProvider' :: Maybe IPDialIn
iPDialIn = Maybe IPDialIn
a} :: CreateConferenceProvider)

-- | The tags to be added to the specified resource. Do not provide system
-- tags.
createConferenceProvider_tags :: Lens.Lens' CreateConferenceProvider (Prelude.Maybe [Tag])
createConferenceProvider_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateConferenceProvider -> f CreateConferenceProvider
createConferenceProvider_tags = (CreateConferenceProvider -> Maybe [Tag])
-> (CreateConferenceProvider
    -> Maybe [Tag] -> CreateConferenceProvider)
-> Lens
     CreateConferenceProvider
     CreateConferenceProvider
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConferenceProvider' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateConferenceProvider' :: CreateConferenceProvider -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateConferenceProvider
s@CreateConferenceProvider' {} Maybe [Tag]
a -> CreateConferenceProvider
s {$sel:tags:CreateConferenceProvider' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateConferenceProvider) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateConferenceProvider -> f CreateConferenceProvider)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateConferenceProvider
-> f CreateConferenceProvider
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the conference provider.
createConferenceProvider_conferenceProviderName :: Lens.Lens' CreateConferenceProvider Prelude.Text
createConferenceProvider_conferenceProviderName :: (Text -> f Text)
-> CreateConferenceProvider -> f CreateConferenceProvider
createConferenceProvider_conferenceProviderName = (CreateConferenceProvider -> Text)
-> (CreateConferenceProvider -> Text -> CreateConferenceProvider)
-> Lens CreateConferenceProvider CreateConferenceProvider Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConferenceProvider' {Text
conferenceProviderName :: Text
$sel:conferenceProviderName:CreateConferenceProvider' :: CreateConferenceProvider -> Text
conferenceProviderName} -> Text
conferenceProviderName) (\s :: CreateConferenceProvider
s@CreateConferenceProvider' {} Text
a -> CreateConferenceProvider
s {$sel:conferenceProviderName:CreateConferenceProvider' :: Text
conferenceProviderName = Text
a} :: CreateConferenceProvider)

-- | Represents a type within a list of predefined types.
createConferenceProvider_conferenceProviderType :: Lens.Lens' CreateConferenceProvider ConferenceProviderType
createConferenceProvider_conferenceProviderType :: (ConferenceProviderType -> f ConferenceProviderType)
-> CreateConferenceProvider -> f CreateConferenceProvider
createConferenceProvider_conferenceProviderType = (CreateConferenceProvider -> ConferenceProviderType)
-> (CreateConferenceProvider
    -> ConferenceProviderType -> CreateConferenceProvider)
-> Lens
     CreateConferenceProvider
     CreateConferenceProvider
     ConferenceProviderType
     ConferenceProviderType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConferenceProvider' {ConferenceProviderType
conferenceProviderType :: ConferenceProviderType
$sel:conferenceProviderType:CreateConferenceProvider' :: CreateConferenceProvider -> ConferenceProviderType
conferenceProviderType} -> ConferenceProviderType
conferenceProviderType) (\s :: CreateConferenceProvider
s@CreateConferenceProvider' {} ConferenceProviderType
a -> CreateConferenceProvider
s {$sel:conferenceProviderType:CreateConferenceProvider' :: ConferenceProviderType
conferenceProviderType = ConferenceProviderType
a} :: CreateConferenceProvider)

-- | The meeting settings for the conference provider.
createConferenceProvider_meetingSetting :: Lens.Lens' CreateConferenceProvider MeetingSetting
createConferenceProvider_meetingSetting :: (MeetingSetting -> f MeetingSetting)
-> CreateConferenceProvider -> f CreateConferenceProvider
createConferenceProvider_meetingSetting = (CreateConferenceProvider -> MeetingSetting)
-> (CreateConferenceProvider
    -> MeetingSetting -> CreateConferenceProvider)
-> Lens
     CreateConferenceProvider
     CreateConferenceProvider
     MeetingSetting
     MeetingSetting
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConferenceProvider' {MeetingSetting
meetingSetting :: MeetingSetting
$sel:meetingSetting:CreateConferenceProvider' :: CreateConferenceProvider -> MeetingSetting
meetingSetting} -> MeetingSetting
meetingSetting) (\s :: CreateConferenceProvider
s@CreateConferenceProvider' {} MeetingSetting
a -> CreateConferenceProvider
s {$sel:meetingSetting:CreateConferenceProvider' :: MeetingSetting
meetingSetting = MeetingSetting
a} :: CreateConferenceProvider)

instance Core.AWSRequest CreateConferenceProvider where
  type
    AWSResponse CreateConferenceProvider =
      CreateConferenceProviderResponse
  request :: CreateConferenceProvider -> Request CreateConferenceProvider
request = Service
-> CreateConferenceProvider -> Request CreateConferenceProvider
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateConferenceProvider
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateConferenceProvider)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateConferenceProvider))
-> Logger
-> Service
-> Proxy CreateConferenceProvider
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateConferenceProvider)))
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 -> Int -> CreateConferenceProviderResponse
CreateConferenceProviderResponse'
            (Maybe Text -> Int -> CreateConferenceProviderResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateConferenceProviderResponse)
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
"ConferenceProviderArn")
            Either String (Int -> CreateConferenceProviderResponse)
-> Either String Int
-> Either String CreateConferenceProviderResponse
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 CreateConferenceProvider

instance Prelude.NFData CreateConferenceProvider

instance Core.ToHeaders CreateConferenceProvider where
  toHeaders :: CreateConferenceProvider -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateConferenceProvider -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AlexaForBusiness.CreateConferenceProvider" ::
                          Prelude.ByteString
                      ),
            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 CreateConferenceProvider where
  toJSON :: CreateConferenceProvider -> Value
toJSON CreateConferenceProvider' {Maybe [Tag]
Maybe Text
Maybe IPDialIn
Maybe PSTNDialIn
Text
ConferenceProviderType
MeetingSetting
meetingSetting :: MeetingSetting
conferenceProviderType :: ConferenceProviderType
conferenceProviderName :: Text
tags :: Maybe [Tag]
iPDialIn :: Maybe IPDialIn
clientRequestToken :: Maybe Text
pSTNDialIn :: Maybe PSTNDialIn
$sel:meetingSetting:CreateConferenceProvider' :: CreateConferenceProvider -> MeetingSetting
$sel:conferenceProviderType:CreateConferenceProvider' :: CreateConferenceProvider -> ConferenceProviderType
$sel:conferenceProviderName:CreateConferenceProvider' :: CreateConferenceProvider -> Text
$sel:tags:CreateConferenceProvider' :: CreateConferenceProvider -> Maybe [Tag]
$sel:iPDialIn:CreateConferenceProvider' :: CreateConferenceProvider -> Maybe IPDialIn
$sel:clientRequestToken:CreateConferenceProvider' :: CreateConferenceProvider -> Maybe Text
$sel:pSTNDialIn:CreateConferenceProvider' :: CreateConferenceProvider -> Maybe PSTNDialIn
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"PSTNDialIn" Text -> PSTNDialIn -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PSTNDialIn -> Pair) -> Maybe PSTNDialIn -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PSTNDialIn
pSTNDialIn,
            (Text
"ClientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
            (Text
"IPDialIn" Text -> IPDialIn -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (IPDialIn -> Pair) -> Maybe IPDialIn -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IPDialIn
iPDialIn,
            (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ConferenceProviderName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
conferenceProviderName
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ConferenceProviderType"
                  Text -> ConferenceProviderType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ConferenceProviderType
conferenceProviderType
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"MeetingSetting" Text -> MeetingSetting -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MeetingSetting
meetingSetting)
          ]
      )

instance Core.ToPath CreateConferenceProvider where
  toPath :: CreateConferenceProvider -> ByteString
toPath = ByteString -> CreateConferenceProvider -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newCreateConferenceProviderResponse' smart constructor.
data CreateConferenceProviderResponse = CreateConferenceProviderResponse'
  { -- | The ARN of the newly-created conference provider.
    CreateConferenceProviderResponse -> Maybe Text
conferenceProviderArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateConferenceProviderResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateConferenceProviderResponse
-> CreateConferenceProviderResponse -> Bool
(CreateConferenceProviderResponse
 -> CreateConferenceProviderResponse -> Bool)
-> (CreateConferenceProviderResponse
    -> CreateConferenceProviderResponse -> Bool)
-> Eq CreateConferenceProviderResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConferenceProviderResponse
-> CreateConferenceProviderResponse -> Bool
$c/= :: CreateConferenceProviderResponse
-> CreateConferenceProviderResponse -> Bool
== :: CreateConferenceProviderResponse
-> CreateConferenceProviderResponse -> Bool
$c== :: CreateConferenceProviderResponse
-> CreateConferenceProviderResponse -> Bool
Prelude.Eq, ReadPrec [CreateConferenceProviderResponse]
ReadPrec CreateConferenceProviderResponse
Int -> ReadS CreateConferenceProviderResponse
ReadS [CreateConferenceProviderResponse]
(Int -> ReadS CreateConferenceProviderResponse)
-> ReadS [CreateConferenceProviderResponse]
-> ReadPrec CreateConferenceProviderResponse
-> ReadPrec [CreateConferenceProviderResponse]
-> Read CreateConferenceProviderResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConferenceProviderResponse]
$creadListPrec :: ReadPrec [CreateConferenceProviderResponse]
readPrec :: ReadPrec CreateConferenceProviderResponse
$creadPrec :: ReadPrec CreateConferenceProviderResponse
readList :: ReadS [CreateConferenceProviderResponse]
$creadList :: ReadS [CreateConferenceProviderResponse]
readsPrec :: Int -> ReadS CreateConferenceProviderResponse
$creadsPrec :: Int -> ReadS CreateConferenceProviderResponse
Prelude.Read, Int -> CreateConferenceProviderResponse -> ShowS
[CreateConferenceProviderResponse] -> ShowS
CreateConferenceProviderResponse -> String
(Int -> CreateConferenceProviderResponse -> ShowS)
-> (CreateConferenceProviderResponse -> String)
-> ([CreateConferenceProviderResponse] -> ShowS)
-> Show CreateConferenceProviderResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConferenceProviderResponse] -> ShowS
$cshowList :: [CreateConferenceProviderResponse] -> ShowS
show :: CreateConferenceProviderResponse -> String
$cshow :: CreateConferenceProviderResponse -> String
showsPrec :: Int -> CreateConferenceProviderResponse -> ShowS
$cshowsPrec :: Int -> CreateConferenceProviderResponse -> ShowS
Prelude.Show, (forall x.
 CreateConferenceProviderResponse
 -> Rep CreateConferenceProviderResponse x)
-> (forall x.
    Rep CreateConferenceProviderResponse x
    -> CreateConferenceProviderResponse)
-> Generic CreateConferenceProviderResponse
forall x.
Rep CreateConferenceProviderResponse x
-> CreateConferenceProviderResponse
forall x.
CreateConferenceProviderResponse
-> Rep CreateConferenceProviderResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateConferenceProviderResponse x
-> CreateConferenceProviderResponse
$cfrom :: forall x.
CreateConferenceProviderResponse
-> Rep CreateConferenceProviderResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateConferenceProviderResponse' 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:
--
-- 'conferenceProviderArn', 'createConferenceProviderResponse_conferenceProviderArn' - The ARN of the newly-created conference provider.
--
-- 'httpStatus', 'createConferenceProviderResponse_httpStatus' - The response's http status code.
newCreateConferenceProviderResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateConferenceProviderResponse
newCreateConferenceProviderResponse :: Int -> CreateConferenceProviderResponse
newCreateConferenceProviderResponse Int
pHttpStatus_ =
  CreateConferenceProviderResponse' :: Maybe Text -> Int -> CreateConferenceProviderResponse
CreateConferenceProviderResponse'
    { $sel:conferenceProviderArn:CreateConferenceProviderResponse' :: Maybe Text
conferenceProviderArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateConferenceProviderResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the newly-created conference provider.
createConferenceProviderResponse_conferenceProviderArn :: Lens.Lens' CreateConferenceProviderResponse (Prelude.Maybe Prelude.Text)
createConferenceProviderResponse_conferenceProviderArn :: (Maybe Text -> f (Maybe Text))
-> CreateConferenceProviderResponse
-> f CreateConferenceProviderResponse
createConferenceProviderResponse_conferenceProviderArn = (CreateConferenceProviderResponse -> Maybe Text)
-> (CreateConferenceProviderResponse
    -> Maybe Text -> CreateConferenceProviderResponse)
-> Lens
     CreateConferenceProviderResponse
     CreateConferenceProviderResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConferenceProviderResponse' {Maybe Text
conferenceProviderArn :: Maybe Text
$sel:conferenceProviderArn:CreateConferenceProviderResponse' :: CreateConferenceProviderResponse -> Maybe Text
conferenceProviderArn} -> Maybe Text
conferenceProviderArn) (\s :: CreateConferenceProviderResponse
s@CreateConferenceProviderResponse' {} Maybe Text
a -> CreateConferenceProviderResponse
s {$sel:conferenceProviderArn:CreateConferenceProviderResponse' :: Maybe Text
conferenceProviderArn = Maybe Text
a} :: CreateConferenceProviderResponse)

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

instance
  Prelude.NFData
    CreateConferenceProviderResponse