{-# 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.Chime.Types.ProxySession
-- 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.Chime.Types.ProxySession where

import Amazonka.Chime.Types.Capability
import Amazonka.Chime.Types.GeoMatchLevel
import Amazonka.Chime.Types.GeoMatchParams
import Amazonka.Chime.Types.NumberSelectionBehavior
import Amazonka.Chime.Types.Participant
import Amazonka.Chime.Types.ProxySessionStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The proxy session for an Amazon Chime Voice Connector.
--
-- /See:/ 'newProxySession' smart constructor.
data ProxySession = ProxySession'
  { -- | The status of the proxy session.
    ProxySession -> Maybe ProxySessionStatus
status :: Prelude.Maybe ProxySessionStatus,
    -- | The preference for proxy phone number reuse, or stickiness, between the
    -- same participants across sessions.
    ProxySession -> Maybe NumberSelectionBehavior
numberSelectionBehavior :: Prelude.Maybe NumberSelectionBehavior,
    -- | The country and area code for the proxy phone number.
    ProxySession -> Maybe GeoMatchParams
geoMatchParams :: Prelude.Maybe GeoMatchParams,
    -- | The number of minutes allowed for the proxy session.
    ProxySession -> Maybe Natural
expiryMinutes :: Prelude.Maybe Prelude.Natural,
    -- | The ended time stamp, in ISO 8601 format.
    ProxySession -> Maybe POSIX
endedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The updated time stamp, in ISO 8601 format.
    ProxySession -> Maybe POSIX
updatedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The proxy session participants.
    ProxySession -> Maybe [Participant]
participants :: Prelude.Maybe [Participant],
    -- | The name of the proxy session.
    ProxySession -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The proxy session ID.
    ProxySession -> Maybe Text
proxySessionId :: Prelude.Maybe Prelude.Text,
    -- | The preference for matching the country or area code of the proxy phone
    -- number with that of the first participant.
    ProxySession -> Maybe GeoMatchLevel
geoMatchLevel :: Prelude.Maybe GeoMatchLevel,
    -- | The Amazon Chime voice connector ID.
    ProxySession -> Maybe Text
voiceConnectorId :: Prelude.Maybe Prelude.Text,
    -- | The created time stamp, in ISO 8601 format.
    ProxySession -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The proxy session capabilities.
    ProxySession -> Maybe [Capability]
capabilities :: Prelude.Maybe [Capability]
  }
  deriving (ProxySession -> ProxySession -> Bool
(ProxySession -> ProxySession -> Bool)
-> (ProxySession -> ProxySession -> Bool) -> Eq ProxySession
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProxySession -> ProxySession -> Bool
$c/= :: ProxySession -> ProxySession -> Bool
== :: ProxySession -> ProxySession -> Bool
$c== :: ProxySession -> ProxySession -> Bool
Prelude.Eq, Int -> ProxySession -> ShowS
[ProxySession] -> ShowS
ProxySession -> String
(Int -> ProxySession -> ShowS)
-> (ProxySession -> String)
-> ([ProxySession] -> ShowS)
-> Show ProxySession
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProxySession] -> ShowS
$cshowList :: [ProxySession] -> ShowS
show :: ProxySession -> String
$cshow :: ProxySession -> String
showsPrec :: Int -> ProxySession -> ShowS
$cshowsPrec :: Int -> ProxySession -> ShowS
Prelude.Show, (forall x. ProxySession -> Rep ProxySession x)
-> (forall x. Rep ProxySession x -> ProxySession)
-> Generic ProxySession
forall x. Rep ProxySession x -> ProxySession
forall x. ProxySession -> Rep ProxySession x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProxySession x -> ProxySession
$cfrom :: forall x. ProxySession -> Rep ProxySession x
Prelude.Generic)

-- |
-- Create a value of 'ProxySession' 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:
--
-- 'status', 'proxySession_status' - The status of the proxy session.
--
-- 'numberSelectionBehavior', 'proxySession_numberSelectionBehavior' - The preference for proxy phone number reuse, or stickiness, between the
-- same participants across sessions.
--
-- 'geoMatchParams', 'proxySession_geoMatchParams' - The country and area code for the proxy phone number.
--
-- 'expiryMinutes', 'proxySession_expiryMinutes' - The number of minutes allowed for the proxy session.
--
-- 'endedTimestamp', 'proxySession_endedTimestamp' - The ended time stamp, in ISO 8601 format.
--
-- 'updatedTimestamp', 'proxySession_updatedTimestamp' - The updated time stamp, in ISO 8601 format.
--
-- 'participants', 'proxySession_participants' - The proxy session participants.
--
-- 'name', 'proxySession_name' - The name of the proxy session.
--
-- 'proxySessionId', 'proxySession_proxySessionId' - The proxy session ID.
--
-- 'geoMatchLevel', 'proxySession_geoMatchLevel' - The preference for matching the country or area code of the proxy phone
-- number with that of the first participant.
--
-- 'voiceConnectorId', 'proxySession_voiceConnectorId' - The Amazon Chime voice connector ID.
--
-- 'createdTimestamp', 'proxySession_createdTimestamp' - The created time stamp, in ISO 8601 format.
--
-- 'capabilities', 'proxySession_capabilities' - The proxy session capabilities.
newProxySession ::
  ProxySession
newProxySession :: ProxySession
newProxySession =
  ProxySession' :: Maybe ProxySessionStatus
-> Maybe NumberSelectionBehavior
-> Maybe GeoMatchParams
-> Maybe Natural
-> Maybe POSIX
-> Maybe POSIX
-> Maybe [Participant]
-> Maybe Text
-> Maybe Text
-> Maybe GeoMatchLevel
-> Maybe Text
-> Maybe POSIX
-> Maybe [Capability]
-> ProxySession
ProxySession'
    { $sel:status:ProxySession' :: Maybe ProxySessionStatus
status = Maybe ProxySessionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:numberSelectionBehavior:ProxySession' :: Maybe NumberSelectionBehavior
numberSelectionBehavior = Maybe NumberSelectionBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:geoMatchParams:ProxySession' :: Maybe GeoMatchParams
geoMatchParams = Maybe GeoMatchParams
forall a. Maybe a
Prelude.Nothing,
      $sel:expiryMinutes:ProxySession' :: Maybe Natural
expiryMinutes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:endedTimestamp:ProxySession' :: Maybe POSIX
endedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedTimestamp:ProxySession' :: Maybe POSIX
updatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:participants:ProxySession' :: Maybe [Participant]
participants = Maybe [Participant]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ProxySession' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:proxySessionId:ProxySession' :: Maybe Text
proxySessionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:geoMatchLevel:ProxySession' :: Maybe GeoMatchLevel
geoMatchLevel = Maybe GeoMatchLevel
forall a. Maybe a
Prelude.Nothing,
      $sel:voiceConnectorId:ProxySession' :: Maybe Text
voiceConnectorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTimestamp:ProxySession' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:capabilities:ProxySession' :: Maybe [Capability]
capabilities = Maybe [Capability]
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the proxy session.
proxySession_status :: Lens.Lens' ProxySession (Prelude.Maybe ProxySessionStatus)
proxySession_status :: (Maybe ProxySessionStatus -> f (Maybe ProxySessionStatus))
-> ProxySession -> f ProxySession
proxySession_status = (ProxySession -> Maybe ProxySessionStatus)
-> (ProxySession -> Maybe ProxySessionStatus -> ProxySession)
-> Lens
     ProxySession
     ProxySession
     (Maybe ProxySessionStatus)
     (Maybe ProxySessionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe ProxySessionStatus
status :: Maybe ProxySessionStatus
$sel:status:ProxySession' :: ProxySession -> Maybe ProxySessionStatus
status} -> Maybe ProxySessionStatus
status) (\s :: ProxySession
s@ProxySession' {} Maybe ProxySessionStatus
a -> ProxySession
s {$sel:status:ProxySession' :: Maybe ProxySessionStatus
status = Maybe ProxySessionStatus
a} :: ProxySession)

-- | The preference for proxy phone number reuse, or stickiness, between the
-- same participants across sessions.
proxySession_numberSelectionBehavior :: Lens.Lens' ProxySession (Prelude.Maybe NumberSelectionBehavior)
proxySession_numberSelectionBehavior :: (Maybe NumberSelectionBehavior
 -> f (Maybe NumberSelectionBehavior))
-> ProxySession -> f ProxySession
proxySession_numberSelectionBehavior = (ProxySession -> Maybe NumberSelectionBehavior)
-> (ProxySession -> Maybe NumberSelectionBehavior -> ProxySession)
-> Lens
     ProxySession
     ProxySession
     (Maybe NumberSelectionBehavior)
     (Maybe NumberSelectionBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe NumberSelectionBehavior
numberSelectionBehavior :: Maybe NumberSelectionBehavior
$sel:numberSelectionBehavior:ProxySession' :: ProxySession -> Maybe NumberSelectionBehavior
numberSelectionBehavior} -> Maybe NumberSelectionBehavior
numberSelectionBehavior) (\s :: ProxySession
s@ProxySession' {} Maybe NumberSelectionBehavior
a -> ProxySession
s {$sel:numberSelectionBehavior:ProxySession' :: Maybe NumberSelectionBehavior
numberSelectionBehavior = Maybe NumberSelectionBehavior
a} :: ProxySession)

-- | The country and area code for the proxy phone number.
proxySession_geoMatchParams :: Lens.Lens' ProxySession (Prelude.Maybe GeoMatchParams)
proxySession_geoMatchParams :: (Maybe GeoMatchParams -> f (Maybe GeoMatchParams))
-> ProxySession -> f ProxySession
proxySession_geoMatchParams = (ProxySession -> Maybe GeoMatchParams)
-> (ProxySession -> Maybe GeoMatchParams -> ProxySession)
-> Lens
     ProxySession
     ProxySession
     (Maybe GeoMatchParams)
     (Maybe GeoMatchParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe GeoMatchParams
geoMatchParams :: Maybe GeoMatchParams
$sel:geoMatchParams:ProxySession' :: ProxySession -> Maybe GeoMatchParams
geoMatchParams} -> Maybe GeoMatchParams
geoMatchParams) (\s :: ProxySession
s@ProxySession' {} Maybe GeoMatchParams
a -> ProxySession
s {$sel:geoMatchParams:ProxySession' :: Maybe GeoMatchParams
geoMatchParams = Maybe GeoMatchParams
a} :: ProxySession)

-- | The number of minutes allowed for the proxy session.
proxySession_expiryMinutes :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.Natural)
proxySession_expiryMinutes :: (Maybe Natural -> f (Maybe Natural))
-> ProxySession -> f ProxySession
proxySession_expiryMinutes = (ProxySession -> Maybe Natural)
-> (ProxySession -> Maybe Natural -> ProxySession)
-> Lens ProxySession ProxySession (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe Natural
expiryMinutes :: Maybe Natural
$sel:expiryMinutes:ProxySession' :: ProxySession -> Maybe Natural
expiryMinutes} -> Maybe Natural
expiryMinutes) (\s :: ProxySession
s@ProxySession' {} Maybe Natural
a -> ProxySession
s {$sel:expiryMinutes:ProxySession' :: Maybe Natural
expiryMinutes = Maybe Natural
a} :: ProxySession)

-- | The ended time stamp, in ISO 8601 format.
proxySession_endedTimestamp :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.UTCTime)
proxySession_endedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProxySession -> f ProxySession
proxySession_endedTimestamp = (ProxySession -> Maybe POSIX)
-> (ProxySession -> Maybe POSIX -> ProxySession)
-> Lens ProxySession ProxySession (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe POSIX
endedTimestamp :: Maybe POSIX
$sel:endedTimestamp:ProxySession' :: ProxySession -> Maybe POSIX
endedTimestamp} -> Maybe POSIX
endedTimestamp) (\s :: ProxySession
s@ProxySession' {} Maybe POSIX
a -> ProxySession
s {$sel:endedTimestamp:ProxySession' :: Maybe POSIX
endedTimestamp = Maybe POSIX
a} :: ProxySession) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProxySession -> f ProxySession)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProxySession
-> f ProxySession
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The updated time stamp, in ISO 8601 format.
proxySession_updatedTimestamp :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.UTCTime)
proxySession_updatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProxySession -> f ProxySession
proxySession_updatedTimestamp = (ProxySession -> Maybe POSIX)
-> (ProxySession -> Maybe POSIX -> ProxySession)
-> Lens ProxySession ProxySession (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe POSIX
updatedTimestamp :: Maybe POSIX
$sel:updatedTimestamp:ProxySession' :: ProxySession -> Maybe POSIX
updatedTimestamp} -> Maybe POSIX
updatedTimestamp) (\s :: ProxySession
s@ProxySession' {} Maybe POSIX
a -> ProxySession
s {$sel:updatedTimestamp:ProxySession' :: Maybe POSIX
updatedTimestamp = Maybe POSIX
a} :: ProxySession) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProxySession -> f ProxySession)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProxySession
-> f ProxySession
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The proxy session participants.
proxySession_participants :: Lens.Lens' ProxySession (Prelude.Maybe [Participant])
proxySession_participants :: (Maybe [Participant] -> f (Maybe [Participant]))
-> ProxySession -> f ProxySession
proxySession_participants = (ProxySession -> Maybe [Participant])
-> (ProxySession -> Maybe [Participant] -> ProxySession)
-> Lens
     ProxySession
     ProxySession
     (Maybe [Participant])
     (Maybe [Participant])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe [Participant]
participants :: Maybe [Participant]
$sel:participants:ProxySession' :: ProxySession -> Maybe [Participant]
participants} -> Maybe [Participant]
participants) (\s :: ProxySession
s@ProxySession' {} Maybe [Participant]
a -> ProxySession
s {$sel:participants:ProxySession' :: Maybe [Participant]
participants = Maybe [Participant]
a} :: ProxySession) ((Maybe [Participant] -> f (Maybe [Participant]))
 -> ProxySession -> f ProxySession)
-> ((Maybe [Participant] -> f (Maybe [Participant]))
    -> Maybe [Participant] -> f (Maybe [Participant]))
-> (Maybe [Participant] -> f (Maybe [Participant]))
-> ProxySession
-> f ProxySession
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Participant] [Participant] [Participant] [Participant]
-> Iso
     (Maybe [Participant])
     (Maybe [Participant])
     (Maybe [Participant])
     (Maybe [Participant])
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 [Participant] [Participant] [Participant] [Participant]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the proxy session.
proxySession_name :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.Text)
proxySession_name :: (Maybe Text -> f (Maybe Text)) -> ProxySession -> f ProxySession
proxySession_name = (ProxySession -> Maybe Text)
-> (ProxySession -> Maybe Text -> ProxySession)
-> Lens ProxySession ProxySession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe Text
name :: Maybe Text
$sel:name:ProxySession' :: ProxySession -> Maybe Text
name} -> Maybe Text
name) (\s :: ProxySession
s@ProxySession' {} Maybe Text
a -> ProxySession
s {$sel:name:ProxySession' :: Maybe Text
name = Maybe Text
a} :: ProxySession)

-- | The proxy session ID.
proxySession_proxySessionId :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.Text)
proxySession_proxySessionId :: (Maybe Text -> f (Maybe Text)) -> ProxySession -> f ProxySession
proxySession_proxySessionId = (ProxySession -> Maybe Text)
-> (ProxySession -> Maybe Text -> ProxySession)
-> Lens ProxySession ProxySession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe Text
proxySessionId :: Maybe Text
$sel:proxySessionId:ProxySession' :: ProxySession -> Maybe Text
proxySessionId} -> Maybe Text
proxySessionId) (\s :: ProxySession
s@ProxySession' {} Maybe Text
a -> ProxySession
s {$sel:proxySessionId:ProxySession' :: Maybe Text
proxySessionId = Maybe Text
a} :: ProxySession)

-- | The preference for matching the country or area code of the proxy phone
-- number with that of the first participant.
proxySession_geoMatchLevel :: Lens.Lens' ProxySession (Prelude.Maybe GeoMatchLevel)
proxySession_geoMatchLevel :: (Maybe GeoMatchLevel -> f (Maybe GeoMatchLevel))
-> ProxySession -> f ProxySession
proxySession_geoMatchLevel = (ProxySession -> Maybe GeoMatchLevel)
-> (ProxySession -> Maybe GeoMatchLevel -> ProxySession)
-> Lens
     ProxySession
     ProxySession
     (Maybe GeoMatchLevel)
     (Maybe GeoMatchLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe GeoMatchLevel
geoMatchLevel :: Maybe GeoMatchLevel
$sel:geoMatchLevel:ProxySession' :: ProxySession -> Maybe GeoMatchLevel
geoMatchLevel} -> Maybe GeoMatchLevel
geoMatchLevel) (\s :: ProxySession
s@ProxySession' {} Maybe GeoMatchLevel
a -> ProxySession
s {$sel:geoMatchLevel:ProxySession' :: Maybe GeoMatchLevel
geoMatchLevel = Maybe GeoMatchLevel
a} :: ProxySession)

-- | The Amazon Chime voice connector ID.
proxySession_voiceConnectorId :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.Text)
proxySession_voiceConnectorId :: (Maybe Text -> f (Maybe Text)) -> ProxySession -> f ProxySession
proxySession_voiceConnectorId = (ProxySession -> Maybe Text)
-> (ProxySession -> Maybe Text -> ProxySession)
-> Lens ProxySession ProxySession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe Text
voiceConnectorId :: Maybe Text
$sel:voiceConnectorId:ProxySession' :: ProxySession -> Maybe Text
voiceConnectorId} -> Maybe Text
voiceConnectorId) (\s :: ProxySession
s@ProxySession' {} Maybe Text
a -> ProxySession
s {$sel:voiceConnectorId:ProxySession' :: Maybe Text
voiceConnectorId = Maybe Text
a} :: ProxySession)

-- | The created time stamp, in ISO 8601 format.
proxySession_createdTimestamp :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.UTCTime)
proxySession_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProxySession -> f ProxySession
proxySession_createdTimestamp = (ProxySession -> Maybe POSIX)
-> (ProxySession -> Maybe POSIX -> ProxySession)
-> Lens ProxySession ProxySession (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:ProxySession' :: ProxySession -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: ProxySession
s@ProxySession' {} Maybe POSIX
a -> ProxySession
s {$sel:createdTimestamp:ProxySession' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: ProxySession) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProxySession -> f ProxySession)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProxySession
-> f ProxySession
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The proxy session capabilities.
proxySession_capabilities :: Lens.Lens' ProxySession (Prelude.Maybe [Capability])
proxySession_capabilities :: (Maybe [Capability] -> f (Maybe [Capability]))
-> ProxySession -> f ProxySession
proxySession_capabilities = (ProxySession -> Maybe [Capability])
-> (ProxySession -> Maybe [Capability] -> ProxySession)
-> Lens
     ProxySession ProxySession (Maybe [Capability]) (Maybe [Capability])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe [Capability]
capabilities :: Maybe [Capability]
$sel:capabilities:ProxySession' :: ProxySession -> Maybe [Capability]
capabilities} -> Maybe [Capability]
capabilities) (\s :: ProxySession
s@ProxySession' {} Maybe [Capability]
a -> ProxySession
s {$sel:capabilities:ProxySession' :: Maybe [Capability]
capabilities = Maybe [Capability]
a} :: ProxySession) ((Maybe [Capability] -> f (Maybe [Capability]))
 -> ProxySession -> f ProxySession)
-> ((Maybe [Capability] -> f (Maybe [Capability]))
    -> Maybe [Capability] -> f (Maybe [Capability]))
-> (Maybe [Capability] -> f (Maybe [Capability]))
-> ProxySession
-> f ProxySession
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Capability] [Capability] [Capability] [Capability]
-> Iso
     (Maybe [Capability])
     (Maybe [Capability])
     (Maybe [Capability])
     (Maybe [Capability])
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 [Capability] [Capability] [Capability] [Capability]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON ProxySession where
  parseJSON :: Value -> Parser ProxySession
parseJSON =
    String
-> (Object -> Parser ProxySession) -> Value -> Parser ProxySession
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ProxySession"
      ( \Object
x ->
          Maybe ProxySessionStatus
-> Maybe NumberSelectionBehavior
-> Maybe GeoMatchParams
-> Maybe Natural
-> Maybe POSIX
-> Maybe POSIX
-> Maybe [Participant]
-> Maybe Text
-> Maybe Text
-> Maybe GeoMatchLevel
-> Maybe Text
-> Maybe POSIX
-> Maybe [Capability]
-> ProxySession
ProxySession'
            (Maybe ProxySessionStatus
 -> Maybe NumberSelectionBehavior
 -> Maybe GeoMatchParams
 -> Maybe Natural
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe [Participant]
 -> Maybe Text
 -> Maybe Text
 -> Maybe GeoMatchLevel
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe [Capability]
 -> ProxySession)
-> Parser (Maybe ProxySessionStatus)
-> Parser
     (Maybe NumberSelectionBehavior
      -> Maybe GeoMatchParams
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe [Participant]
      -> Maybe Text
      -> Maybe Text
      -> Maybe GeoMatchLevel
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Capability]
      -> ProxySession)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ProxySessionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe NumberSelectionBehavior
   -> Maybe GeoMatchParams
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe [Participant]
   -> Maybe Text
   -> Maybe Text
   -> Maybe GeoMatchLevel
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Capability]
   -> ProxySession)
-> Parser (Maybe NumberSelectionBehavior)
-> Parser
     (Maybe GeoMatchParams
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe [Participant]
      -> Maybe Text
      -> Maybe Text
      -> Maybe GeoMatchLevel
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Capability]
      -> ProxySession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NumberSelectionBehavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberSelectionBehavior")
            Parser
  (Maybe GeoMatchParams
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe [Participant]
   -> Maybe Text
   -> Maybe Text
   -> Maybe GeoMatchLevel
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Capability]
   -> ProxySession)
-> Parser (Maybe GeoMatchParams)
-> Parser
     (Maybe Natural
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe [Participant]
      -> Maybe Text
      -> Maybe Text
      -> Maybe GeoMatchLevel
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Capability]
      -> ProxySession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe GeoMatchParams)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GeoMatchParams")
            Parser
  (Maybe Natural
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe [Participant]
   -> Maybe Text
   -> Maybe Text
   -> Maybe GeoMatchLevel
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Capability]
   -> ProxySession)
-> Parser (Maybe Natural)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe [Participant]
      -> Maybe Text
      -> Maybe Text
      -> Maybe GeoMatchLevel
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Capability]
      -> ProxySession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExpiryMinutes")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe [Participant]
   -> Maybe Text
   -> Maybe Text
   -> Maybe GeoMatchLevel
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Capability]
   -> ProxySession)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe [Participant]
      -> Maybe Text
      -> Maybe Text
      -> Maybe GeoMatchLevel
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Capability]
      -> ProxySession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndedTimestamp")
            Parser
  (Maybe POSIX
   -> Maybe [Participant]
   -> Maybe Text
   -> Maybe Text
   -> Maybe GeoMatchLevel
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Capability]
   -> ProxySession)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [Participant]
      -> Maybe Text
      -> Maybe Text
      -> Maybe GeoMatchLevel
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Capability]
      -> ProxySession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UpdatedTimestamp")
            Parser
  (Maybe [Participant]
   -> Maybe Text
   -> Maybe Text
   -> Maybe GeoMatchLevel
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Capability]
   -> ProxySession)
-> Parser (Maybe [Participant])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe GeoMatchLevel
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Capability]
      -> ProxySession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Participant]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Participants" Parser (Maybe (Maybe [Participant]))
-> Maybe [Participant] -> Parser (Maybe [Participant])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Participant]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe GeoMatchLevel
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Capability]
   -> ProxySession)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe GeoMatchLevel
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [Capability]
      -> ProxySession)
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 Text
   -> Maybe GeoMatchLevel
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [Capability]
   -> ProxySession)
-> Parser (Maybe Text)
-> Parser
     (Maybe GeoMatchLevel
      -> Maybe Text -> Maybe POSIX -> Maybe [Capability] -> ProxySession)
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
"ProxySessionId")
            Parser
  (Maybe GeoMatchLevel
   -> Maybe Text -> Maybe POSIX -> Maybe [Capability] -> ProxySession)
-> Parser (Maybe GeoMatchLevel)
-> Parser
     (Maybe Text -> Maybe POSIX -> Maybe [Capability] -> ProxySession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe GeoMatchLevel)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GeoMatchLevel")
            Parser
  (Maybe Text -> Maybe POSIX -> Maybe [Capability] -> ProxySession)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe [Capability] -> ProxySession)
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
"VoiceConnectorId")
            Parser (Maybe POSIX -> Maybe [Capability] -> ProxySession)
-> Parser (Maybe POSIX)
-> Parser (Maybe [Capability] -> ProxySession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTimestamp")
            Parser (Maybe [Capability] -> ProxySession)
-> Parser (Maybe [Capability]) -> Parser ProxySession
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Capability]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Capabilities" Parser (Maybe (Maybe [Capability]))
-> Maybe [Capability] -> Parser (Maybe [Capability])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Capability]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ProxySession

instance Prelude.NFData ProxySession