{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

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

-- | The proxy session capabilities.
proxySession_capabilities :: Lens.Lens' ProxySession (Prelude.Maybe [Capability])
proxySession_capabilities :: Lens' ProxySession (Maybe [Capability])
proxySession_capabilities = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The created time stamp, in ISO 8601 format.
proxySession_createdTimestamp :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.UTCTime)
proxySession_createdTimestamp :: Lens' ProxySession (Maybe UTCTime)
proxySession_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe ISO8601
createdTimestamp :: Maybe ISO8601
$sel:createdTimestamp:ProxySession' :: ProxySession -> Maybe ISO8601
createdTimestamp} -> Maybe ISO8601
createdTimestamp) (\s :: ProxySession
s@ProxySession' {} Maybe ISO8601
a -> ProxySession
s {$sel:createdTimestamp:ProxySession' :: Maybe ISO8601
createdTimestamp = Maybe ISO8601
a} :: ProxySession) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The ended time stamp, in ISO 8601 format.
proxySession_endedTimestamp :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.UTCTime)
proxySession_endedTimestamp :: Lens' ProxySession (Maybe UTCTime)
proxySession_endedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe ISO8601
endedTimestamp :: Maybe ISO8601
$sel:endedTimestamp:ProxySession' :: ProxySession -> Maybe ISO8601
endedTimestamp} -> Maybe ISO8601
endedTimestamp) (\s :: ProxySession
s@ProxySession' {} Maybe ISO8601
a -> ProxySession
s {$sel:endedTimestamp:ProxySession' :: Maybe ISO8601
endedTimestamp = Maybe ISO8601
a} :: ProxySession) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The number of minutes allowed for the proxy session.
proxySession_expiryMinutes :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.Natural)
proxySession_expiryMinutes :: Lens' ProxySession (Maybe Natural)
proxySession_expiryMinutes = 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 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 :: Lens' ProxySession (Maybe GeoMatchLevel)
proxySession_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 country and area code for the proxy phone number.
proxySession_geoMatchParams :: Lens.Lens' ProxySession (Prelude.Maybe GeoMatchParams)
proxySession_geoMatchParams :: Lens' ProxySession (Maybe GeoMatchParams)
proxySession_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 name of the proxy session.
proxySession_name :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.Text)
proxySession_name :: Lens' ProxySession (Maybe Text)
proxySession_name = 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 preference for proxy phone number reuse, or stickiness, between the
-- same participants across sessions.
proxySession_numberSelectionBehavior :: Lens.Lens' ProxySession (Prelude.Maybe NumberSelectionBehavior)
proxySession_numberSelectionBehavior :: Lens' ProxySession (Maybe NumberSelectionBehavior)
proxySession_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 proxy session participants.
proxySession_participants :: Lens.Lens' ProxySession (Prelude.Maybe [Participant])
proxySession_participants :: Lens' ProxySession (Maybe [Participant])
proxySession_participants = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The proxy session ID.
proxySession_proxySessionId :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.Text)
proxySession_proxySessionId :: Lens' ProxySession (Maybe Text)
proxySession_proxySessionId = 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 status of the proxy session.
proxySession_status :: Lens.Lens' ProxySession (Prelude.Maybe ProxySessionStatus)
proxySession_status :: Lens' ProxySession (Maybe ProxySessionStatus)
proxySession_status = 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 updated time stamp, in ISO 8601 format.
proxySession_updatedTimestamp :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.UTCTime)
proxySession_updatedTimestamp :: Lens' ProxySession (Maybe UTCTime)
proxySession_updatedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProxySession' {Maybe ISO8601
updatedTimestamp :: Maybe ISO8601
$sel:updatedTimestamp:ProxySession' :: ProxySession -> Maybe ISO8601
updatedTimestamp} -> Maybe ISO8601
updatedTimestamp) (\s :: ProxySession
s@ProxySession' {} Maybe ISO8601
a -> ProxySession
s {$sel:updatedTimestamp:ProxySession' :: Maybe ISO8601
updatedTimestamp = Maybe ISO8601
a} :: ProxySession) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The Amazon Chime voice connector ID.
proxySession_voiceConnectorId :: Lens.Lens' ProxySession (Prelude.Maybe Prelude.Text)
proxySession_voiceConnectorId :: Lens' ProxySession (Maybe Text)
proxySession_voiceConnectorId = 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)

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

instance Prelude.Hashable ProxySession where
  hashWithSalt :: Int -> ProxySession -> Int
hashWithSalt Int
_salt ProxySession' {Maybe Natural
Maybe [Capability]
Maybe [Participant]
Maybe Text
Maybe ISO8601
Maybe GeoMatchLevel
Maybe GeoMatchParams
Maybe NumberSelectionBehavior
Maybe ProxySessionStatus
voiceConnectorId :: Maybe Text
updatedTimestamp :: Maybe ISO8601
status :: Maybe ProxySessionStatus
proxySessionId :: Maybe Text
participants :: Maybe [Participant]
numberSelectionBehavior :: Maybe NumberSelectionBehavior
name :: Maybe Text
geoMatchParams :: Maybe GeoMatchParams
geoMatchLevel :: Maybe GeoMatchLevel
expiryMinutes :: Maybe Natural
endedTimestamp :: Maybe ISO8601
createdTimestamp :: Maybe ISO8601
capabilities :: Maybe [Capability]
$sel:voiceConnectorId:ProxySession' :: ProxySession -> Maybe Text
$sel:updatedTimestamp:ProxySession' :: ProxySession -> Maybe ISO8601
$sel:status:ProxySession' :: ProxySession -> Maybe ProxySessionStatus
$sel:proxySessionId:ProxySession' :: ProxySession -> Maybe Text
$sel:participants:ProxySession' :: ProxySession -> Maybe [Participant]
$sel:numberSelectionBehavior:ProxySession' :: ProxySession -> Maybe NumberSelectionBehavior
$sel:name:ProxySession' :: ProxySession -> Maybe Text
$sel:geoMatchParams:ProxySession' :: ProxySession -> Maybe GeoMatchParams
$sel:geoMatchLevel:ProxySession' :: ProxySession -> Maybe GeoMatchLevel
$sel:expiryMinutes:ProxySession' :: ProxySession -> Maybe Natural
$sel:endedTimestamp:ProxySession' :: ProxySession -> Maybe ISO8601
$sel:createdTimestamp:ProxySession' :: ProxySession -> Maybe ISO8601
$sel:capabilities:ProxySession' :: ProxySession -> Maybe [Capability]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Capability]
capabilities
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdTimestamp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
endedTimestamp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
expiryMinutes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GeoMatchLevel
geoMatchLevel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GeoMatchParams
geoMatchParams
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NumberSelectionBehavior
numberSelectionBehavior
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Participant]
participants
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
proxySessionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProxySessionStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
updatedTimestamp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
voiceConnectorId

instance Prelude.NFData ProxySession where
  rnf :: ProxySession -> ()
rnf ProxySession' {Maybe Natural
Maybe [Capability]
Maybe [Participant]
Maybe Text
Maybe ISO8601
Maybe GeoMatchLevel
Maybe GeoMatchParams
Maybe NumberSelectionBehavior
Maybe ProxySessionStatus
voiceConnectorId :: Maybe Text
updatedTimestamp :: Maybe ISO8601
status :: Maybe ProxySessionStatus
proxySessionId :: Maybe Text
participants :: Maybe [Participant]
numberSelectionBehavior :: Maybe NumberSelectionBehavior
name :: Maybe Text
geoMatchParams :: Maybe GeoMatchParams
geoMatchLevel :: Maybe GeoMatchLevel
expiryMinutes :: Maybe Natural
endedTimestamp :: Maybe ISO8601
createdTimestamp :: Maybe ISO8601
capabilities :: Maybe [Capability]
$sel:voiceConnectorId:ProxySession' :: ProxySession -> Maybe Text
$sel:updatedTimestamp:ProxySession' :: ProxySession -> Maybe ISO8601
$sel:status:ProxySession' :: ProxySession -> Maybe ProxySessionStatus
$sel:proxySessionId:ProxySession' :: ProxySession -> Maybe Text
$sel:participants:ProxySession' :: ProxySession -> Maybe [Participant]
$sel:numberSelectionBehavior:ProxySession' :: ProxySession -> Maybe NumberSelectionBehavior
$sel:name:ProxySession' :: ProxySession -> Maybe Text
$sel:geoMatchParams:ProxySession' :: ProxySession -> Maybe GeoMatchParams
$sel:geoMatchLevel:ProxySession' :: ProxySession -> Maybe GeoMatchLevel
$sel:expiryMinutes:ProxySession' :: ProxySession -> Maybe Natural
$sel:endedTimestamp:ProxySession' :: ProxySession -> Maybe ISO8601
$sel:createdTimestamp:ProxySession' :: ProxySession -> Maybe ISO8601
$sel:capabilities:ProxySession' :: ProxySession -> Maybe [Capability]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Capability]
capabilities
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
endedTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
expiryMinutes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe GeoMatchLevel
geoMatchLevel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe GeoMatchParams
geoMatchParams
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NumberSelectionBehavior
numberSelectionBehavior
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Participant]
participants
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
proxySessionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProxySessionStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
updatedTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
voiceConnectorId