{-# 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.KinesisVideoSignaling.GetIceServerConfig
-- 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)
--
-- Gets the Interactive Connectivity Establishment (ICE) server
-- configuration information, including URIs, username, and password which
-- can be used to configure the WebRTC connection. The ICE component uses
-- this configuration information to setup the WebRTC connection, including
-- authenticating with the Traversal Using Relays around NAT (TURN) relay
-- server.
--
-- TURN is a protocol that is used to improve the connectivity of
-- peer-to-peer applications. By providing a cloud-based relay service,
-- TURN ensures that a connection can be established even when one or more
-- peers are incapable of a direct peer-to-peer connection. For more
-- information, see
-- <https://tools.ietf.org/html/draft-uberti-rtcweb-turn-rest-00 A REST API For Access To TURN Services>.
--
-- You can invoke this API to establish a fallback mechanism in case either
-- of the peers is unable to establish a direct peer-to-peer connection
-- over a signaling channel. You must specify either a signaling channel
-- ARN or the client ID in order to invoke this API.
module Amazonka.KinesisVideoSignaling.GetIceServerConfig
  ( -- * Creating a Request
    GetIceServerConfig (..),
    newGetIceServerConfig,

    -- * Request Lenses
    getIceServerConfig_clientId,
    getIceServerConfig_service,
    getIceServerConfig_username,
    getIceServerConfig_channelARN,

    -- * Destructuring the Response
    GetIceServerConfigResponse (..),
    newGetIceServerConfigResponse,

    -- * Response Lenses
    getIceServerConfigResponse_iceServerList,
    getIceServerConfigResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KinesisVideoSignaling.Types
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:/ 'newGetIceServerConfig' smart constructor.
data GetIceServerConfig = GetIceServerConfig'
  { -- | Unique identifier for the viewer. Must be unique within the signaling
    -- channel.
    GetIceServerConfig -> Maybe Text
clientId :: Prelude.Maybe Prelude.Text,
    -- | Specifies the desired service. Currently, @TURN@ is the only valid
    -- value.
    GetIceServerConfig -> Maybe Service
service :: Prelude.Maybe Service,
    -- | An optional user ID to be associated with the credentials.
    GetIceServerConfig -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the signaling channel to be used for the peer-to-peer
    -- connection between configured peers.
    GetIceServerConfig -> Text
channelARN :: Prelude.Text
  }
  deriving (GetIceServerConfig -> GetIceServerConfig -> Bool
(GetIceServerConfig -> GetIceServerConfig -> Bool)
-> (GetIceServerConfig -> GetIceServerConfig -> Bool)
-> Eq GetIceServerConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetIceServerConfig -> GetIceServerConfig -> Bool
$c/= :: GetIceServerConfig -> GetIceServerConfig -> Bool
== :: GetIceServerConfig -> GetIceServerConfig -> Bool
$c== :: GetIceServerConfig -> GetIceServerConfig -> Bool
Prelude.Eq, ReadPrec [GetIceServerConfig]
ReadPrec GetIceServerConfig
Int -> ReadS GetIceServerConfig
ReadS [GetIceServerConfig]
(Int -> ReadS GetIceServerConfig)
-> ReadS [GetIceServerConfig]
-> ReadPrec GetIceServerConfig
-> ReadPrec [GetIceServerConfig]
-> Read GetIceServerConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetIceServerConfig]
$creadListPrec :: ReadPrec [GetIceServerConfig]
readPrec :: ReadPrec GetIceServerConfig
$creadPrec :: ReadPrec GetIceServerConfig
readList :: ReadS [GetIceServerConfig]
$creadList :: ReadS [GetIceServerConfig]
readsPrec :: Int -> ReadS GetIceServerConfig
$creadsPrec :: Int -> ReadS GetIceServerConfig
Prelude.Read, Int -> GetIceServerConfig -> ShowS
[GetIceServerConfig] -> ShowS
GetIceServerConfig -> String
(Int -> GetIceServerConfig -> ShowS)
-> (GetIceServerConfig -> String)
-> ([GetIceServerConfig] -> ShowS)
-> Show GetIceServerConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetIceServerConfig] -> ShowS
$cshowList :: [GetIceServerConfig] -> ShowS
show :: GetIceServerConfig -> String
$cshow :: GetIceServerConfig -> String
showsPrec :: Int -> GetIceServerConfig -> ShowS
$cshowsPrec :: Int -> GetIceServerConfig -> ShowS
Prelude.Show, (forall x. GetIceServerConfig -> Rep GetIceServerConfig x)
-> (forall x. Rep GetIceServerConfig x -> GetIceServerConfig)
-> Generic GetIceServerConfig
forall x. Rep GetIceServerConfig x -> GetIceServerConfig
forall x. GetIceServerConfig -> Rep GetIceServerConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetIceServerConfig x -> GetIceServerConfig
$cfrom :: forall x. GetIceServerConfig -> Rep GetIceServerConfig x
Prelude.Generic)

-- |
-- Create a value of 'GetIceServerConfig' 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:
--
-- 'clientId', 'getIceServerConfig_clientId' - Unique identifier for the viewer. Must be unique within the signaling
-- channel.
--
-- 'service', 'getIceServerConfig_service' - Specifies the desired service. Currently, @TURN@ is the only valid
-- value.
--
-- 'username', 'getIceServerConfig_username' - An optional user ID to be associated with the credentials.
--
-- 'channelARN', 'getIceServerConfig_channelARN' - The ARN of the signaling channel to be used for the peer-to-peer
-- connection between configured peers.
newGetIceServerConfig ::
  -- | 'channelARN'
  Prelude.Text ->
  GetIceServerConfig
newGetIceServerConfig :: Text -> GetIceServerConfig
newGetIceServerConfig Text
pChannelARN_ =
  GetIceServerConfig' :: Maybe Text
-> Maybe Service -> Maybe Text -> Text -> GetIceServerConfig
GetIceServerConfig'
    { $sel:clientId:GetIceServerConfig' :: Maybe Text
clientId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:service:GetIceServerConfig' :: Maybe Service
service = Maybe Service
forall a. Maybe a
Prelude.Nothing,
      $sel:username:GetIceServerConfig' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:channelARN:GetIceServerConfig' :: Text
channelARN = Text
pChannelARN_
    }

-- | Unique identifier for the viewer. Must be unique within the signaling
-- channel.
getIceServerConfig_clientId :: Lens.Lens' GetIceServerConfig (Prelude.Maybe Prelude.Text)
getIceServerConfig_clientId :: (Maybe Text -> f (Maybe Text))
-> GetIceServerConfig -> f GetIceServerConfig
getIceServerConfig_clientId = (GetIceServerConfig -> Maybe Text)
-> (GetIceServerConfig -> Maybe Text -> GetIceServerConfig)
-> Lens
     GetIceServerConfig GetIceServerConfig (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIceServerConfig' {Maybe Text
clientId :: Maybe Text
$sel:clientId:GetIceServerConfig' :: GetIceServerConfig -> Maybe Text
clientId} -> Maybe Text
clientId) (\s :: GetIceServerConfig
s@GetIceServerConfig' {} Maybe Text
a -> GetIceServerConfig
s {$sel:clientId:GetIceServerConfig' :: Maybe Text
clientId = Maybe Text
a} :: GetIceServerConfig)

-- | Specifies the desired service. Currently, @TURN@ is the only valid
-- value.
getIceServerConfig_service :: Lens.Lens' GetIceServerConfig (Prelude.Maybe Service)
getIceServerConfig_service :: (Maybe Service -> f (Maybe Service))
-> GetIceServerConfig -> f GetIceServerConfig
getIceServerConfig_service = (GetIceServerConfig -> Maybe Service)
-> (GetIceServerConfig -> Maybe Service -> GetIceServerConfig)
-> Lens
     GetIceServerConfig
     GetIceServerConfig
     (Maybe Service)
     (Maybe Service)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIceServerConfig' {Maybe Service
service :: Maybe Service
$sel:service:GetIceServerConfig' :: GetIceServerConfig -> Maybe Service
service} -> Maybe Service
service) (\s :: GetIceServerConfig
s@GetIceServerConfig' {} Maybe Service
a -> GetIceServerConfig
s {$sel:service:GetIceServerConfig' :: Maybe Service
service = Maybe Service
a} :: GetIceServerConfig)

-- | An optional user ID to be associated with the credentials.
getIceServerConfig_username :: Lens.Lens' GetIceServerConfig (Prelude.Maybe Prelude.Text)
getIceServerConfig_username :: (Maybe Text -> f (Maybe Text))
-> GetIceServerConfig -> f GetIceServerConfig
getIceServerConfig_username = (GetIceServerConfig -> Maybe Text)
-> (GetIceServerConfig -> Maybe Text -> GetIceServerConfig)
-> Lens
     GetIceServerConfig GetIceServerConfig (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIceServerConfig' {Maybe Text
username :: Maybe Text
$sel:username:GetIceServerConfig' :: GetIceServerConfig -> Maybe Text
username} -> Maybe Text
username) (\s :: GetIceServerConfig
s@GetIceServerConfig' {} Maybe Text
a -> GetIceServerConfig
s {$sel:username:GetIceServerConfig' :: Maybe Text
username = Maybe Text
a} :: GetIceServerConfig)

-- | The ARN of the signaling channel to be used for the peer-to-peer
-- connection between configured peers.
getIceServerConfig_channelARN :: Lens.Lens' GetIceServerConfig Prelude.Text
getIceServerConfig_channelARN :: (Text -> f Text) -> GetIceServerConfig -> f GetIceServerConfig
getIceServerConfig_channelARN = (GetIceServerConfig -> Text)
-> (GetIceServerConfig -> Text -> GetIceServerConfig)
-> Lens GetIceServerConfig GetIceServerConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIceServerConfig' {Text
channelARN :: Text
$sel:channelARN:GetIceServerConfig' :: GetIceServerConfig -> Text
channelARN} -> Text
channelARN) (\s :: GetIceServerConfig
s@GetIceServerConfig' {} Text
a -> GetIceServerConfig
s {$sel:channelARN:GetIceServerConfig' :: Text
channelARN = Text
a} :: GetIceServerConfig)

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

instance Prelude.NFData GetIceServerConfig

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

instance Core.ToJSON GetIceServerConfig where
  toJSON :: GetIceServerConfig -> Value
toJSON GetIceServerConfig' {Maybe Text
Maybe Service
Text
channelARN :: Text
username :: Maybe Text
service :: Maybe Service
clientId :: Maybe Text
$sel:channelARN:GetIceServerConfig' :: GetIceServerConfig -> Text
$sel:username:GetIceServerConfig' :: GetIceServerConfig -> Maybe Text
$sel:service:GetIceServerConfig' :: GetIceServerConfig -> Maybe Service
$sel:clientId:GetIceServerConfig' :: GetIceServerConfig -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ClientId" 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
clientId,
            (Text
"Service" Text -> Service -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Service -> Pair) -> Maybe Service -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Service
service,
            (Text
"Username" 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
username,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ChannelARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
channelARN)
          ]
      )

instance Core.ToPath GetIceServerConfig where
  toPath :: GetIceServerConfig -> ByteString
toPath = ByteString -> GetIceServerConfig -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/get-ice-server-config"

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

-- | /See:/ 'newGetIceServerConfigResponse' smart constructor.
data GetIceServerConfigResponse = GetIceServerConfigResponse'
  { -- | The list of ICE server information objects.
    GetIceServerConfigResponse -> Maybe [IceServer]
iceServerList :: Prelude.Maybe [IceServer],
    -- | The response's http status code.
    GetIceServerConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetIceServerConfigResponse -> GetIceServerConfigResponse -> Bool
(GetIceServerConfigResponse -> GetIceServerConfigResponse -> Bool)
-> (GetIceServerConfigResponse
    -> GetIceServerConfigResponse -> Bool)
-> Eq GetIceServerConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetIceServerConfigResponse -> GetIceServerConfigResponse -> Bool
$c/= :: GetIceServerConfigResponse -> GetIceServerConfigResponse -> Bool
== :: GetIceServerConfigResponse -> GetIceServerConfigResponse -> Bool
$c== :: GetIceServerConfigResponse -> GetIceServerConfigResponse -> Bool
Prelude.Eq, ReadPrec [GetIceServerConfigResponse]
ReadPrec GetIceServerConfigResponse
Int -> ReadS GetIceServerConfigResponse
ReadS [GetIceServerConfigResponse]
(Int -> ReadS GetIceServerConfigResponse)
-> ReadS [GetIceServerConfigResponse]
-> ReadPrec GetIceServerConfigResponse
-> ReadPrec [GetIceServerConfigResponse]
-> Read GetIceServerConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetIceServerConfigResponse]
$creadListPrec :: ReadPrec [GetIceServerConfigResponse]
readPrec :: ReadPrec GetIceServerConfigResponse
$creadPrec :: ReadPrec GetIceServerConfigResponse
readList :: ReadS [GetIceServerConfigResponse]
$creadList :: ReadS [GetIceServerConfigResponse]
readsPrec :: Int -> ReadS GetIceServerConfigResponse
$creadsPrec :: Int -> ReadS GetIceServerConfigResponse
Prelude.Read, Int -> GetIceServerConfigResponse -> ShowS
[GetIceServerConfigResponse] -> ShowS
GetIceServerConfigResponse -> String
(Int -> GetIceServerConfigResponse -> ShowS)
-> (GetIceServerConfigResponse -> String)
-> ([GetIceServerConfigResponse] -> ShowS)
-> Show GetIceServerConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetIceServerConfigResponse] -> ShowS
$cshowList :: [GetIceServerConfigResponse] -> ShowS
show :: GetIceServerConfigResponse -> String
$cshow :: GetIceServerConfigResponse -> String
showsPrec :: Int -> GetIceServerConfigResponse -> ShowS
$cshowsPrec :: Int -> GetIceServerConfigResponse -> ShowS
Prelude.Show, (forall x.
 GetIceServerConfigResponse -> Rep GetIceServerConfigResponse x)
-> (forall x.
    Rep GetIceServerConfigResponse x -> GetIceServerConfigResponse)
-> Generic GetIceServerConfigResponse
forall x.
Rep GetIceServerConfigResponse x -> GetIceServerConfigResponse
forall x.
GetIceServerConfigResponse -> Rep GetIceServerConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetIceServerConfigResponse x -> GetIceServerConfigResponse
$cfrom :: forall x.
GetIceServerConfigResponse -> Rep GetIceServerConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetIceServerConfigResponse' 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:
--
-- 'iceServerList', 'getIceServerConfigResponse_iceServerList' - The list of ICE server information objects.
--
-- 'httpStatus', 'getIceServerConfigResponse_httpStatus' - The response's http status code.
newGetIceServerConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetIceServerConfigResponse
newGetIceServerConfigResponse :: Int -> GetIceServerConfigResponse
newGetIceServerConfigResponse Int
pHttpStatus_ =
  GetIceServerConfigResponse' :: Maybe [IceServer] -> Int -> GetIceServerConfigResponse
GetIceServerConfigResponse'
    { $sel:iceServerList:GetIceServerConfigResponse' :: Maybe [IceServer]
iceServerList =
        Maybe [IceServer]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetIceServerConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of ICE server information objects.
getIceServerConfigResponse_iceServerList :: Lens.Lens' GetIceServerConfigResponse (Prelude.Maybe [IceServer])
getIceServerConfigResponse_iceServerList :: (Maybe [IceServer] -> f (Maybe [IceServer]))
-> GetIceServerConfigResponse -> f GetIceServerConfigResponse
getIceServerConfigResponse_iceServerList = (GetIceServerConfigResponse -> Maybe [IceServer])
-> (GetIceServerConfigResponse
    -> Maybe [IceServer] -> GetIceServerConfigResponse)
-> Lens
     GetIceServerConfigResponse
     GetIceServerConfigResponse
     (Maybe [IceServer])
     (Maybe [IceServer])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIceServerConfigResponse' {Maybe [IceServer]
iceServerList :: Maybe [IceServer]
$sel:iceServerList:GetIceServerConfigResponse' :: GetIceServerConfigResponse -> Maybe [IceServer]
iceServerList} -> Maybe [IceServer]
iceServerList) (\s :: GetIceServerConfigResponse
s@GetIceServerConfigResponse' {} Maybe [IceServer]
a -> GetIceServerConfigResponse
s {$sel:iceServerList:GetIceServerConfigResponse' :: Maybe [IceServer]
iceServerList = Maybe [IceServer]
a} :: GetIceServerConfigResponse) ((Maybe [IceServer] -> f (Maybe [IceServer]))
 -> GetIceServerConfigResponse -> f GetIceServerConfigResponse)
-> ((Maybe [IceServer] -> f (Maybe [IceServer]))
    -> Maybe [IceServer] -> f (Maybe [IceServer]))
-> (Maybe [IceServer] -> f (Maybe [IceServer]))
-> GetIceServerConfigResponse
-> f GetIceServerConfigResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [IceServer] [IceServer] [IceServer] [IceServer]
-> Iso
     (Maybe [IceServer])
     (Maybe [IceServer])
     (Maybe [IceServer])
     (Maybe [IceServer])
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 [IceServer] [IceServer] [IceServer] [IceServer]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetIceServerConfigResponse