{-# 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.AlexaBusiness.CreateRoom
-- 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)
--
-- Creates a room with the specified details.
module Amazonka.AlexaBusiness.CreateRoom
  ( -- * Creating a Request
    CreateRoom (..),
    newCreateRoom,

    -- * Request Lenses
    createRoom_profileArn,
    createRoom_providerCalendarId,
    createRoom_clientRequestToken,
    createRoom_description,
    createRoom_tags,
    createRoom_roomName,

    -- * Destructuring the Response
    CreateRoomResponse (..),
    newCreateRoomResponse,

    -- * Response Lenses
    createRoomResponse_roomArn,
    createRoomResponse_httpStatus,
  )
where

import Amazonka.AlexaBusiness.Types
import qualified Amazonka.Core as Core
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:/ 'newCreateRoom' smart constructor.
data CreateRoom = CreateRoom'
  { -- | The profile ARN for the room. This is required.
    CreateRoom -> Maybe Text
profileArn :: Prelude.Maybe Prelude.Text,
    -- | The calendar ARN for the room.
    CreateRoom -> Maybe Text
providerCalendarId :: Prelude.Maybe Prelude.Text,
    -- | A unique, user-specified identifier for this request that ensures
    -- idempotency.
    CreateRoom -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The description for the room.
    CreateRoom -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags for the room.
    CreateRoom -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name for the room.
    CreateRoom -> Text
roomName :: Prelude.Text
  }
  deriving (CreateRoom -> CreateRoom -> Bool
(CreateRoom -> CreateRoom -> Bool)
-> (CreateRoom -> CreateRoom -> Bool) -> Eq CreateRoom
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRoom -> CreateRoom -> Bool
$c/= :: CreateRoom -> CreateRoom -> Bool
== :: CreateRoom -> CreateRoom -> Bool
$c== :: CreateRoom -> CreateRoom -> Bool
Prelude.Eq, ReadPrec [CreateRoom]
ReadPrec CreateRoom
Int -> ReadS CreateRoom
ReadS [CreateRoom]
(Int -> ReadS CreateRoom)
-> ReadS [CreateRoom]
-> ReadPrec CreateRoom
-> ReadPrec [CreateRoom]
-> Read CreateRoom
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRoom]
$creadListPrec :: ReadPrec [CreateRoom]
readPrec :: ReadPrec CreateRoom
$creadPrec :: ReadPrec CreateRoom
readList :: ReadS [CreateRoom]
$creadList :: ReadS [CreateRoom]
readsPrec :: Int -> ReadS CreateRoom
$creadsPrec :: Int -> ReadS CreateRoom
Prelude.Read, Int -> CreateRoom -> ShowS
[CreateRoom] -> ShowS
CreateRoom -> String
(Int -> CreateRoom -> ShowS)
-> (CreateRoom -> String)
-> ([CreateRoom] -> ShowS)
-> Show CreateRoom
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRoom] -> ShowS
$cshowList :: [CreateRoom] -> ShowS
show :: CreateRoom -> String
$cshow :: CreateRoom -> String
showsPrec :: Int -> CreateRoom -> ShowS
$cshowsPrec :: Int -> CreateRoom -> ShowS
Prelude.Show, (forall x. CreateRoom -> Rep CreateRoom x)
-> (forall x. Rep CreateRoom x -> CreateRoom) -> Generic CreateRoom
forall x. Rep CreateRoom x -> CreateRoom
forall x. CreateRoom -> Rep CreateRoom x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRoom x -> CreateRoom
$cfrom :: forall x. CreateRoom -> Rep CreateRoom x
Prelude.Generic)

-- |
-- Create a value of 'CreateRoom' 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:
--
-- 'profileArn', 'createRoom_profileArn' - The profile ARN for the room. This is required.
--
-- 'providerCalendarId', 'createRoom_providerCalendarId' - The calendar ARN for the room.
--
-- 'clientRequestToken', 'createRoom_clientRequestToken' - A unique, user-specified identifier for this request that ensures
-- idempotency.
--
-- 'description', 'createRoom_description' - The description for the room.
--
-- 'tags', 'createRoom_tags' - The tags for the room.
--
-- 'roomName', 'createRoom_roomName' - The name for the room.
newCreateRoom ::
  -- | 'roomName'
  Prelude.Text ->
  CreateRoom
newCreateRoom :: Text -> CreateRoom
newCreateRoom Text
pRoomName_ =
  CreateRoom' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> CreateRoom
CreateRoom'
    { $sel:profileArn:CreateRoom' :: Maybe Text
profileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:providerCalendarId:CreateRoom' :: Maybe Text
providerCalendarId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:CreateRoom' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateRoom' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateRoom' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:roomName:CreateRoom' :: Text
roomName = Text
pRoomName_
    }

-- | The profile ARN for the room. This is required.
createRoom_profileArn :: Lens.Lens' CreateRoom (Prelude.Maybe Prelude.Text)
createRoom_profileArn :: (Maybe Text -> f (Maybe Text)) -> CreateRoom -> f CreateRoom
createRoom_profileArn = (CreateRoom -> Maybe Text)
-> (CreateRoom -> Maybe Text -> CreateRoom)
-> Lens CreateRoom CreateRoom (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoom' {Maybe Text
profileArn :: Maybe Text
$sel:profileArn:CreateRoom' :: CreateRoom -> Maybe Text
profileArn} -> Maybe Text
profileArn) (\s :: CreateRoom
s@CreateRoom' {} Maybe Text
a -> CreateRoom
s {$sel:profileArn:CreateRoom' :: Maybe Text
profileArn = Maybe Text
a} :: CreateRoom)

-- | The calendar ARN for the room.
createRoom_providerCalendarId :: Lens.Lens' CreateRoom (Prelude.Maybe Prelude.Text)
createRoom_providerCalendarId :: (Maybe Text -> f (Maybe Text)) -> CreateRoom -> f CreateRoom
createRoom_providerCalendarId = (CreateRoom -> Maybe Text)
-> (CreateRoom -> Maybe Text -> CreateRoom)
-> Lens CreateRoom CreateRoom (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoom' {Maybe Text
providerCalendarId :: Maybe Text
$sel:providerCalendarId:CreateRoom' :: CreateRoom -> Maybe Text
providerCalendarId} -> Maybe Text
providerCalendarId) (\s :: CreateRoom
s@CreateRoom' {} Maybe Text
a -> CreateRoom
s {$sel:providerCalendarId:CreateRoom' :: Maybe Text
providerCalendarId = Maybe Text
a} :: CreateRoom)

-- | A unique, user-specified identifier for this request that ensures
-- idempotency.
createRoom_clientRequestToken :: Lens.Lens' CreateRoom (Prelude.Maybe Prelude.Text)
createRoom_clientRequestToken :: (Maybe Text -> f (Maybe Text)) -> CreateRoom -> f CreateRoom
createRoom_clientRequestToken = (CreateRoom -> Maybe Text)
-> (CreateRoom -> Maybe Text -> CreateRoom)
-> Lens CreateRoom CreateRoom (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoom' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateRoom' :: CreateRoom -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateRoom
s@CreateRoom' {} Maybe Text
a -> CreateRoom
s {$sel:clientRequestToken:CreateRoom' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateRoom)

-- | The description for the room.
createRoom_description :: Lens.Lens' CreateRoom (Prelude.Maybe Prelude.Text)
createRoom_description :: (Maybe Text -> f (Maybe Text)) -> CreateRoom -> f CreateRoom
createRoom_description = (CreateRoom -> Maybe Text)
-> (CreateRoom -> Maybe Text -> CreateRoom)
-> Lens CreateRoom CreateRoom (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoom' {Maybe Text
description :: Maybe Text
$sel:description:CreateRoom' :: CreateRoom -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateRoom
s@CreateRoom' {} Maybe Text
a -> CreateRoom
s {$sel:description:CreateRoom' :: Maybe Text
description = Maybe Text
a} :: CreateRoom)

-- | The tags for the room.
createRoom_tags :: Lens.Lens' CreateRoom (Prelude.Maybe [Tag])
createRoom_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> CreateRoom -> f CreateRoom
createRoom_tags = (CreateRoom -> Maybe [Tag])
-> (CreateRoom -> Maybe [Tag] -> CreateRoom)
-> Lens CreateRoom CreateRoom (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoom' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateRoom' :: CreateRoom -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateRoom
s@CreateRoom' {} Maybe [Tag]
a -> CreateRoom
s {$sel:tags:CreateRoom' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateRoom) ((Maybe [Tag] -> f (Maybe [Tag])) -> CreateRoom -> f CreateRoom)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateRoom
-> f CreateRoom
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name for the room.
createRoom_roomName :: Lens.Lens' CreateRoom Prelude.Text
createRoom_roomName :: (Text -> f Text) -> CreateRoom -> f CreateRoom
createRoom_roomName = (CreateRoom -> Text)
-> (CreateRoom -> Text -> CreateRoom)
-> Lens CreateRoom CreateRoom Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoom' {Text
roomName :: Text
$sel:roomName:CreateRoom' :: CreateRoom -> Text
roomName} -> Text
roomName) (\s :: CreateRoom
s@CreateRoom' {} Text
a -> CreateRoom
s {$sel:roomName:CreateRoom' :: Text
roomName = Text
a} :: CreateRoom)

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

instance Prelude.NFData CreateRoom

instance Core.ToHeaders CreateRoom where
  toHeaders :: CreateRoom -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateRoom -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AlexaForBusiness.CreateRoom" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateRoom where
  toJSON :: CreateRoom -> Value
toJSON CreateRoom' {Maybe [Tag]
Maybe Text
Text
roomName :: Text
tags :: Maybe [Tag]
description :: Maybe Text
clientRequestToken :: Maybe Text
providerCalendarId :: Maybe Text
profileArn :: Maybe Text
$sel:roomName:CreateRoom' :: CreateRoom -> Text
$sel:tags:CreateRoom' :: CreateRoom -> Maybe [Tag]
$sel:description:CreateRoom' :: CreateRoom -> Maybe Text
$sel:clientRequestToken:CreateRoom' :: CreateRoom -> Maybe Text
$sel:providerCalendarId:CreateRoom' :: CreateRoom -> Maybe Text
$sel:profileArn:CreateRoom' :: CreateRoom -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ProfileArn" 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
profileArn,
            (Text
"ProviderCalendarId" 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
providerCalendarId,
            (Text
"ClientRequestToken" 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
clientRequestToken,
            (Text
"Description" 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
description,
            (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoomName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roomName)
          ]
      )

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

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

-- | /See:/ 'newCreateRoomResponse' smart constructor.
data CreateRoomResponse = CreateRoomResponse'
  { -- | The ARN of the newly created room in the response.
    CreateRoomResponse -> Maybe Text
roomArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateRoomResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateRoomResponse -> CreateRoomResponse -> Bool
(CreateRoomResponse -> CreateRoomResponse -> Bool)
-> (CreateRoomResponse -> CreateRoomResponse -> Bool)
-> Eq CreateRoomResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRoomResponse -> CreateRoomResponse -> Bool
$c/= :: CreateRoomResponse -> CreateRoomResponse -> Bool
== :: CreateRoomResponse -> CreateRoomResponse -> Bool
$c== :: CreateRoomResponse -> CreateRoomResponse -> Bool
Prelude.Eq, ReadPrec [CreateRoomResponse]
ReadPrec CreateRoomResponse
Int -> ReadS CreateRoomResponse
ReadS [CreateRoomResponse]
(Int -> ReadS CreateRoomResponse)
-> ReadS [CreateRoomResponse]
-> ReadPrec CreateRoomResponse
-> ReadPrec [CreateRoomResponse]
-> Read CreateRoomResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRoomResponse]
$creadListPrec :: ReadPrec [CreateRoomResponse]
readPrec :: ReadPrec CreateRoomResponse
$creadPrec :: ReadPrec CreateRoomResponse
readList :: ReadS [CreateRoomResponse]
$creadList :: ReadS [CreateRoomResponse]
readsPrec :: Int -> ReadS CreateRoomResponse
$creadsPrec :: Int -> ReadS CreateRoomResponse
Prelude.Read, Int -> CreateRoomResponse -> ShowS
[CreateRoomResponse] -> ShowS
CreateRoomResponse -> String
(Int -> CreateRoomResponse -> ShowS)
-> (CreateRoomResponse -> String)
-> ([CreateRoomResponse] -> ShowS)
-> Show CreateRoomResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRoomResponse] -> ShowS
$cshowList :: [CreateRoomResponse] -> ShowS
show :: CreateRoomResponse -> String
$cshow :: CreateRoomResponse -> String
showsPrec :: Int -> CreateRoomResponse -> ShowS
$cshowsPrec :: Int -> CreateRoomResponse -> ShowS
Prelude.Show, (forall x. CreateRoomResponse -> Rep CreateRoomResponse x)
-> (forall x. Rep CreateRoomResponse x -> CreateRoomResponse)
-> Generic CreateRoomResponse
forall x. Rep CreateRoomResponse x -> CreateRoomResponse
forall x. CreateRoomResponse -> Rep CreateRoomResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRoomResponse x -> CreateRoomResponse
$cfrom :: forall x. CreateRoomResponse -> Rep CreateRoomResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateRoomResponse' 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:
--
-- 'roomArn', 'createRoomResponse_roomArn' - The ARN of the newly created room in the response.
--
-- 'httpStatus', 'createRoomResponse_httpStatus' - The response's http status code.
newCreateRoomResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateRoomResponse
newCreateRoomResponse :: Int -> CreateRoomResponse
newCreateRoomResponse Int
pHttpStatus_ =
  CreateRoomResponse' :: Maybe Text -> Int -> CreateRoomResponse
CreateRoomResponse'
    { $sel:roomArn:CreateRoomResponse' :: Maybe Text
roomArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRoomResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the newly created room in the response.
createRoomResponse_roomArn :: Lens.Lens' CreateRoomResponse (Prelude.Maybe Prelude.Text)
createRoomResponse_roomArn :: (Maybe Text -> f (Maybe Text))
-> CreateRoomResponse -> f CreateRoomResponse
createRoomResponse_roomArn = (CreateRoomResponse -> Maybe Text)
-> (CreateRoomResponse -> Maybe Text -> CreateRoomResponse)
-> Lens
     CreateRoomResponse CreateRoomResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRoomResponse' {Maybe Text
roomArn :: Maybe Text
$sel:roomArn:CreateRoomResponse' :: CreateRoomResponse -> Maybe Text
roomArn} -> Maybe Text
roomArn) (\s :: CreateRoomResponse
s@CreateRoomResponse' {} Maybe Text
a -> CreateRoomResponse
s {$sel:roomArn:CreateRoomResponse' :: Maybe Text
roomArn = Maybe Text
a} :: CreateRoomResponse)

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

instance Prelude.NFData CreateRoomResponse