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

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

-- |
-- Module      : Amazonka.AlexaBusiness.Types.ConferenceProvider
-- 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)
module Amazonka.AlexaBusiness.Types.ConferenceProvider where

import Amazonka.AlexaBusiness.Types.ConferenceProviderType
import Amazonka.AlexaBusiness.Types.IPDialIn
import Amazonka.AlexaBusiness.Types.MeetingSetting
import Amazonka.AlexaBusiness.Types.PSTNDialIn
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | An entity that provides a conferencing solution. Alexa for Business acts
-- as the voice interface and mediator that connects users to their
-- preferred conference provider. Examples of conference providers include
-- Amazon Chime, Zoom, Cisco, and Polycom.
--
-- /See:/ 'newConferenceProvider' smart constructor.
data ConferenceProvider = ConferenceProvider'
  { -- | The meeting settings for the conference provider.
    ConferenceProvider -> Maybe MeetingSetting
meetingSetting :: Prelude.Maybe MeetingSetting,
    -- | The ARN of the newly created conference provider.
    ConferenceProvider -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The information for PSTN conferencing.
    ConferenceProvider -> Maybe PSTNDialIn
pSTNDialIn :: Prelude.Maybe PSTNDialIn,
    -- | The name of the conference provider.
    ConferenceProvider -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The type of conference providers.
    ConferenceProvider -> Maybe ConferenceProviderType
type' :: Prelude.Maybe ConferenceProviderType,
    -- | The IP endpoint and protocol for calling.
    ConferenceProvider -> Maybe IPDialIn
iPDialIn :: Prelude.Maybe IPDialIn
  }
  deriving (ConferenceProvider -> ConferenceProvider -> Bool
(ConferenceProvider -> ConferenceProvider -> Bool)
-> (ConferenceProvider -> ConferenceProvider -> Bool)
-> Eq ConferenceProvider
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConferenceProvider -> ConferenceProvider -> Bool
$c/= :: ConferenceProvider -> ConferenceProvider -> Bool
== :: ConferenceProvider -> ConferenceProvider -> Bool
$c== :: ConferenceProvider -> ConferenceProvider -> Bool
Prelude.Eq, ReadPrec [ConferenceProvider]
ReadPrec ConferenceProvider
Int -> ReadS ConferenceProvider
ReadS [ConferenceProvider]
(Int -> ReadS ConferenceProvider)
-> ReadS [ConferenceProvider]
-> ReadPrec ConferenceProvider
-> ReadPrec [ConferenceProvider]
-> Read ConferenceProvider
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConferenceProvider]
$creadListPrec :: ReadPrec [ConferenceProvider]
readPrec :: ReadPrec ConferenceProvider
$creadPrec :: ReadPrec ConferenceProvider
readList :: ReadS [ConferenceProvider]
$creadList :: ReadS [ConferenceProvider]
readsPrec :: Int -> ReadS ConferenceProvider
$creadsPrec :: Int -> ReadS ConferenceProvider
Prelude.Read, Int -> ConferenceProvider -> ShowS
[ConferenceProvider] -> ShowS
ConferenceProvider -> String
(Int -> ConferenceProvider -> ShowS)
-> (ConferenceProvider -> String)
-> ([ConferenceProvider] -> ShowS)
-> Show ConferenceProvider
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConferenceProvider] -> ShowS
$cshowList :: [ConferenceProvider] -> ShowS
show :: ConferenceProvider -> String
$cshow :: ConferenceProvider -> String
showsPrec :: Int -> ConferenceProvider -> ShowS
$cshowsPrec :: Int -> ConferenceProvider -> ShowS
Prelude.Show, (forall x. ConferenceProvider -> Rep ConferenceProvider x)
-> (forall x. Rep ConferenceProvider x -> ConferenceProvider)
-> Generic ConferenceProvider
forall x. Rep ConferenceProvider x -> ConferenceProvider
forall x. ConferenceProvider -> Rep ConferenceProvider x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConferenceProvider x -> ConferenceProvider
$cfrom :: forall x. ConferenceProvider -> Rep ConferenceProvider x
Prelude.Generic)

-- |
-- Create a value of 'ConferenceProvider' 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:
--
-- 'meetingSetting', 'conferenceProvider_meetingSetting' - The meeting settings for the conference provider.
--
-- 'arn', 'conferenceProvider_arn' - The ARN of the newly created conference provider.
--
-- 'pSTNDialIn', 'conferenceProvider_pSTNDialIn' - The information for PSTN conferencing.
--
-- 'name', 'conferenceProvider_name' - The name of the conference provider.
--
-- 'type'', 'conferenceProvider_type' - The type of conference providers.
--
-- 'iPDialIn', 'conferenceProvider_iPDialIn' - The IP endpoint and protocol for calling.
newConferenceProvider ::
  ConferenceProvider
newConferenceProvider :: ConferenceProvider
newConferenceProvider =
  ConferenceProvider' :: Maybe MeetingSetting
-> Maybe Text
-> Maybe PSTNDialIn
-> Maybe Text
-> Maybe ConferenceProviderType
-> Maybe IPDialIn
-> ConferenceProvider
ConferenceProvider'
    { $sel:meetingSetting:ConferenceProvider' :: Maybe MeetingSetting
meetingSetting =
        Maybe MeetingSetting
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ConferenceProvider' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pSTNDialIn:ConferenceProvider' :: Maybe PSTNDialIn
pSTNDialIn = Maybe PSTNDialIn
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ConferenceProvider' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ConferenceProvider' :: Maybe ConferenceProviderType
type' = Maybe ConferenceProviderType
forall a. Maybe a
Prelude.Nothing,
      $sel:iPDialIn:ConferenceProvider' :: Maybe IPDialIn
iPDialIn = Maybe IPDialIn
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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

-- | The type of conference providers.
conferenceProvider_type :: Lens.Lens' ConferenceProvider (Prelude.Maybe ConferenceProviderType)
conferenceProvider_type :: (Maybe ConferenceProviderType -> f (Maybe ConferenceProviderType))
-> ConferenceProvider -> f ConferenceProvider
conferenceProvider_type = (ConferenceProvider -> Maybe ConferenceProviderType)
-> (ConferenceProvider
    -> Maybe ConferenceProviderType -> ConferenceProvider)
-> Lens
     ConferenceProvider
     ConferenceProvider
     (Maybe ConferenceProviderType)
     (Maybe ConferenceProviderType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConferenceProvider' {Maybe ConferenceProviderType
type' :: Maybe ConferenceProviderType
$sel:type':ConferenceProvider' :: ConferenceProvider -> Maybe ConferenceProviderType
type'} -> Maybe ConferenceProviderType
type') (\s :: ConferenceProvider
s@ConferenceProvider' {} Maybe ConferenceProviderType
a -> ConferenceProvider
s {$sel:type':ConferenceProvider' :: Maybe ConferenceProviderType
type' = Maybe ConferenceProviderType
a} :: ConferenceProvider)

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

instance Core.FromJSON ConferenceProvider where
  parseJSON :: Value -> Parser ConferenceProvider
parseJSON =
    String
-> (Object -> Parser ConferenceProvider)
-> Value
-> Parser ConferenceProvider
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ConferenceProvider"
      ( \Object
x ->
          Maybe MeetingSetting
-> Maybe Text
-> Maybe PSTNDialIn
-> Maybe Text
-> Maybe ConferenceProviderType
-> Maybe IPDialIn
-> ConferenceProvider
ConferenceProvider'
            (Maybe MeetingSetting
 -> Maybe Text
 -> Maybe PSTNDialIn
 -> Maybe Text
 -> Maybe ConferenceProviderType
 -> Maybe IPDialIn
 -> ConferenceProvider)
-> Parser (Maybe MeetingSetting)
-> Parser
     (Maybe Text
      -> Maybe PSTNDialIn
      -> Maybe Text
      -> Maybe ConferenceProviderType
      -> Maybe IPDialIn
      -> ConferenceProvider)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MeetingSetting)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MeetingSetting")
            Parser
  (Maybe Text
   -> Maybe PSTNDialIn
   -> Maybe Text
   -> Maybe ConferenceProviderType
   -> Maybe IPDialIn
   -> ConferenceProvider)
-> Parser (Maybe Text)
-> Parser
     (Maybe PSTNDialIn
      -> Maybe Text
      -> Maybe ConferenceProviderType
      -> Maybe IPDialIn
      -> ConferenceProvider)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
            Parser
  (Maybe PSTNDialIn
   -> Maybe Text
   -> Maybe ConferenceProviderType
   -> Maybe IPDialIn
   -> ConferenceProvider)
-> Parser (Maybe PSTNDialIn)
-> Parser
     (Maybe Text
      -> Maybe ConferenceProviderType
      -> Maybe IPDialIn
      -> ConferenceProvider)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PSTNDialIn)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PSTNDialIn")
            Parser
  (Maybe Text
   -> Maybe ConferenceProviderType
   -> Maybe IPDialIn
   -> ConferenceProvider)
-> Parser (Maybe Text)
-> Parser
     (Maybe ConferenceProviderType
      -> Maybe IPDialIn -> ConferenceProvider)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser
  (Maybe ConferenceProviderType
   -> Maybe IPDialIn -> ConferenceProvider)
-> Parser (Maybe ConferenceProviderType)
-> Parser (Maybe IPDialIn -> ConferenceProvider)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConferenceProviderType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser (Maybe IPDialIn -> ConferenceProvider)
-> Parser (Maybe IPDialIn) -> Parser ConferenceProvider
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IPDialIn)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IPDialIn")
      )

instance Prelude.Hashable ConferenceProvider

instance Prelude.NFData ConferenceProvider