{-# 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.IVSChat.GetRoom
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets the specified room.
module Amazonka.IVSChat.GetRoom
  ( -- * Creating a Request
    GetRoom (..),
    newGetRoom,

    -- * Request Lenses
    getRoom_identifier,

    -- * Destructuring the Response
    GetRoomResponse (..),
    newGetRoomResponse,

    -- * Response Lenses
    getRoomResponse_arn,
    getRoomResponse_createTime,
    getRoomResponse_id,
    getRoomResponse_loggingConfigurationIdentifiers,
    getRoomResponse_maximumMessageLength,
    getRoomResponse_maximumMessageRatePerSecond,
    getRoomResponse_messageReviewHandler,
    getRoomResponse_name,
    getRoomResponse_tags,
    getRoomResponse_updateTime,
    getRoomResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IVSChat.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetRoom' smart constructor.
data GetRoom = GetRoom'
  { -- | Identifier of the room for which the configuration is to be retrieved.
    -- Currently this must be an ARN.
    GetRoom -> Text
identifier :: Prelude.Text
  }
  deriving (GetRoom -> GetRoom -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRoom -> GetRoom -> Bool
$c/= :: GetRoom -> GetRoom -> Bool
== :: GetRoom -> GetRoom -> Bool
$c== :: GetRoom -> GetRoom -> Bool
Prelude.Eq, ReadPrec [GetRoom]
ReadPrec GetRoom
Int -> ReadS GetRoom
ReadS [GetRoom]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRoom]
$creadListPrec :: ReadPrec [GetRoom]
readPrec :: ReadPrec GetRoom
$creadPrec :: ReadPrec GetRoom
readList :: ReadS [GetRoom]
$creadList :: ReadS [GetRoom]
readsPrec :: Int -> ReadS GetRoom
$creadsPrec :: Int -> ReadS GetRoom
Prelude.Read, Int -> GetRoom -> ShowS
[GetRoom] -> ShowS
GetRoom -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRoom] -> ShowS
$cshowList :: [GetRoom] -> ShowS
show :: GetRoom -> String
$cshow :: GetRoom -> String
showsPrec :: Int -> GetRoom -> ShowS
$cshowsPrec :: Int -> GetRoom -> ShowS
Prelude.Show, forall x. Rep GetRoom x -> GetRoom
forall x. GetRoom -> Rep GetRoom x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRoom x -> GetRoom
$cfrom :: forall x. GetRoom -> Rep GetRoom x
Prelude.Generic)

-- |
-- Create a value of 'GetRoom' 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:
--
-- 'identifier', 'getRoom_identifier' - Identifier of the room for which the configuration is to be retrieved.
-- Currently this must be an ARN.
newGetRoom ::
  -- | 'identifier'
  Prelude.Text ->
  GetRoom
newGetRoom :: Text -> GetRoom
newGetRoom Text
pIdentifier_ =
  GetRoom' {$sel:identifier:GetRoom' :: Text
identifier = Text
pIdentifier_}

-- | Identifier of the room for which the configuration is to be retrieved.
-- Currently this must be an ARN.
getRoom_identifier :: Lens.Lens' GetRoom Prelude.Text
getRoom_identifier :: Lens' GetRoom Text
getRoom_identifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoom' {Text
identifier :: Text
$sel:identifier:GetRoom' :: GetRoom -> Text
identifier} -> Text
identifier) (\s :: GetRoom
s@GetRoom' {} Text
a -> GetRoom
s {$sel:identifier:GetRoom' :: Text
identifier = Text
a} :: GetRoom)

instance Core.AWSRequest GetRoom where
  type AWSResponse GetRoom = GetRoomResponse
  request :: (Service -> Service) -> GetRoom -> Request GetRoom
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetRoom
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetRoom)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe [Text]
-> Maybe Natural
-> Maybe Natural
-> Maybe MessageReviewHandler
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ISO8601
-> Int
-> GetRoomResponse
GetRoomResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"createTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"loggingConfigurationIdentifiers"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ 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 -> Either String (Maybe a)
Data..?> Key
"maximumMessageLength")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"maximumMessageRatePerSecond")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"messageReviewHandler")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (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 -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ 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 -> Either String (Maybe a)
Data..?> Key
"updateTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetRoom where
  hashWithSalt :: Int -> GetRoom -> Int
hashWithSalt Int
_salt GetRoom' {Text
identifier :: Text
$sel:identifier:GetRoom' :: GetRoom -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
identifier

instance Prelude.NFData GetRoom where
  rnf :: GetRoom -> ()
rnf GetRoom' {Text
identifier :: Text
$sel:identifier:GetRoom' :: GetRoom -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
identifier

instance Data.ToHeaders GetRoom where
  toHeaders :: GetRoom -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON GetRoom where
  toJSON :: GetRoom -> Value
toJSON GetRoom' {Text
identifier :: Text
$sel:identifier:GetRoom' :: GetRoom -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"identifier" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
identifier)]
      )

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

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

-- | /See:/ 'newGetRoomResponse' smart constructor.
data GetRoomResponse = GetRoomResponse'
  { -- | Room ARN, from the request (if @identifier@ was an ARN).
    GetRoomResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Time when the room was created. This is an ISO 8601 timestamp; /note
    -- that this is returned as a string/.
    GetRoomResponse -> Maybe ISO8601
createTime :: Prelude.Maybe Data.ISO8601,
    -- | Room ID, generated by the system. This is a relative identifier, the
    -- part of the ARN that uniquely identifies the room.
    GetRoomResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | Array of logging configurations attached to the room.
    GetRoomResponse -> Maybe [Text]
loggingConfigurationIdentifiers :: Prelude.Maybe [Prelude.Text],
    -- | Maximum number of characters in a single message. Messages are expected
    -- to be UTF-8 encoded and this limit applies specifically to
    -- rune\/code-point count, not number of bytes. Default: 500.
    GetRoomResponse -> Maybe Natural
maximumMessageLength :: Prelude.Maybe Prelude.Natural,
    -- | Maximum number of messages per second that can be sent to the room (by
    -- all clients). Default: 10.
    GetRoomResponse -> Maybe Natural
maximumMessageRatePerSecond :: Prelude.Maybe Prelude.Natural,
    -- | Configuration information for optional review of messages.
    GetRoomResponse -> Maybe MessageReviewHandler
messageReviewHandler :: Prelude.Maybe MessageReviewHandler,
    -- | Room name. The value does not need to be unique.
    GetRoomResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Tags attached to the resource. Array of maps, each of the form
    -- @string:string (key:value)@.
    GetRoomResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Time of the room’s last update. This is an ISO 8601 timestamp; /note
    -- that this is returned as a string/.
    GetRoomResponse -> Maybe ISO8601
updateTime :: Prelude.Maybe Data.ISO8601,
    -- | The response's http status code.
    GetRoomResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetRoomResponse -> GetRoomResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRoomResponse -> GetRoomResponse -> Bool
$c/= :: GetRoomResponse -> GetRoomResponse -> Bool
== :: GetRoomResponse -> GetRoomResponse -> Bool
$c== :: GetRoomResponse -> GetRoomResponse -> Bool
Prelude.Eq, ReadPrec [GetRoomResponse]
ReadPrec GetRoomResponse
Int -> ReadS GetRoomResponse
ReadS [GetRoomResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRoomResponse]
$creadListPrec :: ReadPrec [GetRoomResponse]
readPrec :: ReadPrec GetRoomResponse
$creadPrec :: ReadPrec GetRoomResponse
readList :: ReadS [GetRoomResponse]
$creadList :: ReadS [GetRoomResponse]
readsPrec :: Int -> ReadS GetRoomResponse
$creadsPrec :: Int -> ReadS GetRoomResponse
Prelude.Read, Int -> GetRoomResponse -> ShowS
[GetRoomResponse] -> ShowS
GetRoomResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRoomResponse] -> ShowS
$cshowList :: [GetRoomResponse] -> ShowS
show :: GetRoomResponse -> String
$cshow :: GetRoomResponse -> String
showsPrec :: Int -> GetRoomResponse -> ShowS
$cshowsPrec :: Int -> GetRoomResponse -> ShowS
Prelude.Show, forall x. Rep GetRoomResponse x -> GetRoomResponse
forall x. GetRoomResponse -> Rep GetRoomResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRoomResponse x -> GetRoomResponse
$cfrom :: forall x. GetRoomResponse -> Rep GetRoomResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetRoomResponse' 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:
--
-- 'arn', 'getRoomResponse_arn' - Room ARN, from the request (if @identifier@ was an ARN).
--
-- 'createTime', 'getRoomResponse_createTime' - Time when the room was created. This is an ISO 8601 timestamp; /note
-- that this is returned as a string/.
--
-- 'id', 'getRoomResponse_id' - Room ID, generated by the system. This is a relative identifier, the
-- part of the ARN that uniquely identifies the room.
--
-- 'loggingConfigurationIdentifiers', 'getRoomResponse_loggingConfigurationIdentifiers' - Array of logging configurations attached to the room.
--
-- 'maximumMessageLength', 'getRoomResponse_maximumMessageLength' - Maximum number of characters in a single message. Messages are expected
-- to be UTF-8 encoded and this limit applies specifically to
-- rune\/code-point count, not number of bytes. Default: 500.
--
-- 'maximumMessageRatePerSecond', 'getRoomResponse_maximumMessageRatePerSecond' - Maximum number of messages per second that can be sent to the room (by
-- all clients). Default: 10.
--
-- 'messageReviewHandler', 'getRoomResponse_messageReviewHandler' - Configuration information for optional review of messages.
--
-- 'name', 'getRoomResponse_name' - Room name. The value does not need to be unique.
--
-- 'tags', 'getRoomResponse_tags' - Tags attached to the resource. Array of maps, each of the form
-- @string:string (key:value)@.
--
-- 'updateTime', 'getRoomResponse_updateTime' - Time of the room’s last update. This is an ISO 8601 timestamp; /note
-- that this is returned as a string/.
--
-- 'httpStatus', 'getRoomResponse_httpStatus' - The response's http status code.
newGetRoomResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetRoomResponse
newGetRoomResponse :: Int -> GetRoomResponse
newGetRoomResponse Int
pHttpStatus_ =
  GetRoomResponse'
    { $sel:arn:GetRoomResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:createTime:GetRoomResponse' :: Maybe ISO8601
createTime = forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetRoomResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:loggingConfigurationIdentifiers:GetRoomResponse' :: Maybe [Text]
loggingConfigurationIdentifiers = forall a. Maybe a
Prelude.Nothing,
      $sel:maximumMessageLength:GetRoomResponse' :: Maybe Natural
maximumMessageLength = forall a. Maybe a
Prelude.Nothing,
      $sel:maximumMessageRatePerSecond:GetRoomResponse' :: Maybe Natural
maximumMessageRatePerSecond = forall a. Maybe a
Prelude.Nothing,
      $sel:messageReviewHandler:GetRoomResponse' :: Maybe MessageReviewHandler
messageReviewHandler = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetRoomResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetRoomResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:updateTime:GetRoomResponse' :: Maybe ISO8601
updateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetRoomResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Room ARN, from the request (if @identifier@ was an ARN).
getRoomResponse_arn :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.Text)
getRoomResponse_arn :: Lens' GetRoomResponse (Maybe Text)
getRoomResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:GetRoomResponse' :: GetRoomResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GetRoomResponse
s@GetRoomResponse' {} Maybe Text
a -> GetRoomResponse
s {$sel:arn:GetRoomResponse' :: Maybe Text
arn = Maybe Text
a} :: GetRoomResponse)

-- | Time when the room was created. This is an ISO 8601 timestamp; /note
-- that this is returned as a string/.
getRoomResponse_createTime :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.UTCTime)
getRoomResponse_createTime :: Lens' GetRoomResponse (Maybe UTCTime)
getRoomResponse_createTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Maybe ISO8601
createTime :: Maybe ISO8601
$sel:createTime:GetRoomResponse' :: GetRoomResponse -> Maybe ISO8601
createTime} -> Maybe ISO8601
createTime) (\s :: GetRoomResponse
s@GetRoomResponse' {} Maybe ISO8601
a -> GetRoomResponse
s {$sel:createTime:GetRoomResponse' :: Maybe ISO8601
createTime = Maybe ISO8601
a} :: GetRoomResponse) 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

-- | Room ID, generated by the system. This is a relative identifier, the
-- part of the ARN that uniquely identifies the room.
getRoomResponse_id :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.Text)
getRoomResponse_id :: Lens' GetRoomResponse (Maybe Text)
getRoomResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Maybe Text
id :: Maybe Text
$sel:id:GetRoomResponse' :: GetRoomResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: GetRoomResponse
s@GetRoomResponse' {} Maybe Text
a -> GetRoomResponse
s {$sel:id:GetRoomResponse' :: Maybe Text
id = Maybe Text
a} :: GetRoomResponse)

-- | Array of logging configurations attached to the room.
getRoomResponse_loggingConfigurationIdentifiers :: Lens.Lens' GetRoomResponse (Prelude.Maybe [Prelude.Text])
getRoomResponse_loggingConfigurationIdentifiers :: Lens' GetRoomResponse (Maybe [Text])
getRoomResponse_loggingConfigurationIdentifiers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Maybe [Text]
loggingConfigurationIdentifiers :: Maybe [Text]
$sel:loggingConfigurationIdentifiers:GetRoomResponse' :: GetRoomResponse -> Maybe [Text]
loggingConfigurationIdentifiers} -> Maybe [Text]
loggingConfigurationIdentifiers) (\s :: GetRoomResponse
s@GetRoomResponse' {} Maybe [Text]
a -> GetRoomResponse
s {$sel:loggingConfigurationIdentifiers:GetRoomResponse' :: Maybe [Text]
loggingConfigurationIdentifiers = Maybe [Text]
a} :: GetRoomResponse) 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

-- | Maximum number of characters in a single message. Messages are expected
-- to be UTF-8 encoded and this limit applies specifically to
-- rune\/code-point count, not number of bytes. Default: 500.
getRoomResponse_maximumMessageLength :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.Natural)
getRoomResponse_maximumMessageLength :: Lens' GetRoomResponse (Maybe Natural)
getRoomResponse_maximumMessageLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Maybe Natural
maximumMessageLength :: Maybe Natural
$sel:maximumMessageLength:GetRoomResponse' :: GetRoomResponse -> Maybe Natural
maximumMessageLength} -> Maybe Natural
maximumMessageLength) (\s :: GetRoomResponse
s@GetRoomResponse' {} Maybe Natural
a -> GetRoomResponse
s {$sel:maximumMessageLength:GetRoomResponse' :: Maybe Natural
maximumMessageLength = Maybe Natural
a} :: GetRoomResponse)

-- | Maximum number of messages per second that can be sent to the room (by
-- all clients). Default: 10.
getRoomResponse_maximumMessageRatePerSecond :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.Natural)
getRoomResponse_maximumMessageRatePerSecond :: Lens' GetRoomResponse (Maybe Natural)
getRoomResponse_maximumMessageRatePerSecond = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Maybe Natural
maximumMessageRatePerSecond :: Maybe Natural
$sel:maximumMessageRatePerSecond:GetRoomResponse' :: GetRoomResponse -> Maybe Natural
maximumMessageRatePerSecond} -> Maybe Natural
maximumMessageRatePerSecond) (\s :: GetRoomResponse
s@GetRoomResponse' {} Maybe Natural
a -> GetRoomResponse
s {$sel:maximumMessageRatePerSecond:GetRoomResponse' :: Maybe Natural
maximumMessageRatePerSecond = Maybe Natural
a} :: GetRoomResponse)

-- | Configuration information for optional review of messages.
getRoomResponse_messageReviewHandler :: Lens.Lens' GetRoomResponse (Prelude.Maybe MessageReviewHandler)
getRoomResponse_messageReviewHandler :: Lens' GetRoomResponse (Maybe MessageReviewHandler)
getRoomResponse_messageReviewHandler = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Maybe MessageReviewHandler
messageReviewHandler :: Maybe MessageReviewHandler
$sel:messageReviewHandler:GetRoomResponse' :: GetRoomResponse -> Maybe MessageReviewHandler
messageReviewHandler} -> Maybe MessageReviewHandler
messageReviewHandler) (\s :: GetRoomResponse
s@GetRoomResponse' {} Maybe MessageReviewHandler
a -> GetRoomResponse
s {$sel:messageReviewHandler:GetRoomResponse' :: Maybe MessageReviewHandler
messageReviewHandler = Maybe MessageReviewHandler
a} :: GetRoomResponse)

-- | Room name. The value does not need to be unique.
getRoomResponse_name :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.Text)
getRoomResponse_name :: Lens' GetRoomResponse (Maybe Text)
getRoomResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetRoomResponse' :: GetRoomResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetRoomResponse
s@GetRoomResponse' {} Maybe Text
a -> GetRoomResponse
s {$sel:name:GetRoomResponse' :: Maybe Text
name = Maybe Text
a} :: GetRoomResponse)

-- | Tags attached to the resource. Array of maps, each of the form
-- @string:string (key:value)@.
getRoomResponse_tags :: Lens.Lens' GetRoomResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getRoomResponse_tags :: Lens' GetRoomResponse (Maybe (HashMap Text Text))
getRoomResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetRoomResponse' :: GetRoomResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetRoomResponse
s@GetRoomResponse' {} Maybe (HashMap Text Text)
a -> GetRoomResponse
s {$sel:tags:GetRoomResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetRoomResponse) 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

-- | Time of the room’s last update. This is an ISO 8601 timestamp; /note
-- that this is returned as a string/.
getRoomResponse_updateTime :: Lens.Lens' GetRoomResponse (Prelude.Maybe Prelude.UTCTime)
getRoomResponse_updateTime :: Lens' GetRoomResponse (Maybe UTCTime)
getRoomResponse_updateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Maybe ISO8601
updateTime :: Maybe ISO8601
$sel:updateTime:GetRoomResponse' :: GetRoomResponse -> Maybe ISO8601
updateTime} -> Maybe ISO8601
updateTime) (\s :: GetRoomResponse
s@GetRoomResponse' {} Maybe ISO8601
a -> GetRoomResponse
s {$sel:updateTime:GetRoomResponse' :: Maybe ISO8601
updateTime = Maybe ISO8601
a} :: GetRoomResponse) 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 response's http status code.
getRoomResponse_httpStatus :: Lens.Lens' GetRoomResponse Prelude.Int
getRoomResponse_httpStatus :: Lens' GetRoomResponse Int
getRoomResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRoomResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetRoomResponse' :: GetRoomResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetRoomResponse
s@GetRoomResponse' {} Int
a -> GetRoomResponse
s {$sel:httpStatus:GetRoomResponse' :: Int
httpStatus = Int
a} :: GetRoomResponse)

instance Prelude.NFData GetRoomResponse where
  rnf :: GetRoomResponse -> ()
rnf GetRoomResponse' {Int
Maybe Natural
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe MessageReviewHandler
httpStatus :: Int
updateTime :: Maybe ISO8601
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
messageReviewHandler :: Maybe MessageReviewHandler
maximumMessageRatePerSecond :: Maybe Natural
maximumMessageLength :: Maybe Natural
loggingConfigurationIdentifiers :: Maybe [Text]
id :: Maybe Text
createTime :: Maybe ISO8601
arn :: Maybe Text
$sel:httpStatus:GetRoomResponse' :: GetRoomResponse -> Int
$sel:updateTime:GetRoomResponse' :: GetRoomResponse -> Maybe ISO8601
$sel:tags:GetRoomResponse' :: GetRoomResponse -> Maybe (HashMap Text Text)
$sel:name:GetRoomResponse' :: GetRoomResponse -> Maybe Text
$sel:messageReviewHandler:GetRoomResponse' :: GetRoomResponse -> Maybe MessageReviewHandler
$sel:maximumMessageRatePerSecond:GetRoomResponse' :: GetRoomResponse -> Maybe Natural
$sel:maximumMessageLength:GetRoomResponse' :: GetRoomResponse -> Maybe Natural
$sel:loggingConfigurationIdentifiers:GetRoomResponse' :: GetRoomResponse -> Maybe [Text]
$sel:id:GetRoomResponse' :: GetRoomResponse -> Maybe Text
$sel:createTime:GetRoomResponse' :: GetRoomResponse -> Maybe ISO8601
$sel:arn:GetRoomResponse' :: GetRoomResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
loggingConfigurationIdentifiers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maximumMessageLength
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maximumMessageRatePerSecond
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MessageReviewHandler
messageReviewHandler
      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 (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
updateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus