{-# 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.IoTWireless.CreateWirelessGateway
-- 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)
--
-- Provisions a wireless gateway.
module Amazonka.IoTWireless.CreateWirelessGateway
  ( -- * Creating a Request
    CreateWirelessGateway (..),
    newCreateWirelessGateway,

    -- * Request Lenses
    createWirelessGateway_name,
    createWirelessGateway_clientRequestToken,
    createWirelessGateway_description,
    createWirelessGateway_tags,
    createWirelessGateway_loRaWAN,

    -- * Destructuring the Response
    CreateWirelessGatewayResponse (..),
    newCreateWirelessGatewayResponse,

    -- * Response Lenses
    createWirelessGatewayResponse_arn,
    createWirelessGatewayResponse_id,
    createWirelessGatewayResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTWireless.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:/ 'newCreateWirelessGateway' smart constructor.
data CreateWirelessGateway = CreateWirelessGateway'
  { -- | The name of the new resource.
    CreateWirelessGateway -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Each resource must have a unique client request token. If you try to
    -- create a new resource with the same token as a resource that already
    -- exists, an exception occurs. If you omit this value, AWS SDKs will
    -- automatically generate a unique client request.
    CreateWirelessGateway -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The description of the new resource.
    CreateWirelessGateway -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags to attach to the new wireless gateway. Tags are metadata that
    -- you can use to manage a resource.
    CreateWirelessGateway -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The gateway configuration information to use to create the wireless
    -- gateway.
    CreateWirelessGateway -> LoRaWANGateway
loRaWAN :: LoRaWANGateway
  }
  deriving (CreateWirelessGateway -> CreateWirelessGateway -> Bool
(CreateWirelessGateway -> CreateWirelessGateway -> Bool)
-> (CreateWirelessGateway -> CreateWirelessGateway -> Bool)
-> Eq CreateWirelessGateway
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWirelessGateway -> CreateWirelessGateway -> Bool
$c/= :: CreateWirelessGateway -> CreateWirelessGateway -> Bool
== :: CreateWirelessGateway -> CreateWirelessGateway -> Bool
$c== :: CreateWirelessGateway -> CreateWirelessGateway -> Bool
Prelude.Eq, ReadPrec [CreateWirelessGateway]
ReadPrec CreateWirelessGateway
Int -> ReadS CreateWirelessGateway
ReadS [CreateWirelessGateway]
(Int -> ReadS CreateWirelessGateway)
-> ReadS [CreateWirelessGateway]
-> ReadPrec CreateWirelessGateway
-> ReadPrec [CreateWirelessGateway]
-> Read CreateWirelessGateway
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateWirelessGateway]
$creadListPrec :: ReadPrec [CreateWirelessGateway]
readPrec :: ReadPrec CreateWirelessGateway
$creadPrec :: ReadPrec CreateWirelessGateway
readList :: ReadS [CreateWirelessGateway]
$creadList :: ReadS [CreateWirelessGateway]
readsPrec :: Int -> ReadS CreateWirelessGateway
$creadsPrec :: Int -> ReadS CreateWirelessGateway
Prelude.Read, Int -> CreateWirelessGateway -> ShowS
[CreateWirelessGateway] -> ShowS
CreateWirelessGateway -> String
(Int -> CreateWirelessGateway -> ShowS)
-> (CreateWirelessGateway -> String)
-> ([CreateWirelessGateway] -> ShowS)
-> Show CreateWirelessGateway
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWirelessGateway] -> ShowS
$cshowList :: [CreateWirelessGateway] -> ShowS
show :: CreateWirelessGateway -> String
$cshow :: CreateWirelessGateway -> String
showsPrec :: Int -> CreateWirelessGateway -> ShowS
$cshowsPrec :: Int -> CreateWirelessGateway -> ShowS
Prelude.Show, (forall x. CreateWirelessGateway -> Rep CreateWirelessGateway x)
-> (forall x. Rep CreateWirelessGateway x -> CreateWirelessGateway)
-> Generic CreateWirelessGateway
forall x. Rep CreateWirelessGateway x -> CreateWirelessGateway
forall x. CreateWirelessGateway -> Rep CreateWirelessGateway x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateWirelessGateway x -> CreateWirelessGateway
$cfrom :: forall x. CreateWirelessGateway -> Rep CreateWirelessGateway x
Prelude.Generic)

-- |
-- Create a value of 'CreateWirelessGateway' 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:
--
-- 'name', 'createWirelessGateway_name' - The name of the new resource.
--
-- 'clientRequestToken', 'createWirelessGateway_clientRequestToken' - Each resource must have a unique client request token. If you try to
-- create a new resource with the same token as a resource that already
-- exists, an exception occurs. If you omit this value, AWS SDKs will
-- automatically generate a unique client request.
--
-- 'description', 'createWirelessGateway_description' - The description of the new resource.
--
-- 'tags', 'createWirelessGateway_tags' - The tags to attach to the new wireless gateway. Tags are metadata that
-- you can use to manage a resource.
--
-- 'loRaWAN', 'createWirelessGateway_loRaWAN' - The gateway configuration information to use to create the wireless
-- gateway.
newCreateWirelessGateway ::
  -- | 'loRaWAN'
  LoRaWANGateway ->
  CreateWirelessGateway
newCreateWirelessGateway :: LoRaWANGateway -> CreateWirelessGateway
newCreateWirelessGateway LoRaWANGateway
pLoRaWAN_ =
  CreateWirelessGateway' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> LoRaWANGateway
-> CreateWirelessGateway
CreateWirelessGateway'
    { $sel:name:CreateWirelessGateway' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:CreateWirelessGateway' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateWirelessGateway' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateWirelessGateway' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:loRaWAN:CreateWirelessGateway' :: LoRaWANGateway
loRaWAN = LoRaWANGateway
pLoRaWAN_
    }

-- | The name of the new resource.
createWirelessGateway_name :: Lens.Lens' CreateWirelessGateway (Prelude.Maybe Prelude.Text)
createWirelessGateway_name :: (Maybe Text -> f (Maybe Text))
-> CreateWirelessGateway -> f CreateWirelessGateway
createWirelessGateway_name = (CreateWirelessGateway -> Maybe Text)
-> (CreateWirelessGateway -> Maybe Text -> CreateWirelessGateway)
-> Lens
     CreateWirelessGateway
     CreateWirelessGateway
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWirelessGateway' {Maybe Text
name :: Maybe Text
$sel:name:CreateWirelessGateway' :: CreateWirelessGateway -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateWirelessGateway
s@CreateWirelessGateway' {} Maybe Text
a -> CreateWirelessGateway
s {$sel:name:CreateWirelessGateway' :: Maybe Text
name = Maybe Text
a} :: CreateWirelessGateway)

-- | Each resource must have a unique client request token. If you try to
-- create a new resource with the same token as a resource that already
-- exists, an exception occurs. If you omit this value, AWS SDKs will
-- automatically generate a unique client request.
createWirelessGateway_clientRequestToken :: Lens.Lens' CreateWirelessGateway (Prelude.Maybe Prelude.Text)
createWirelessGateway_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CreateWirelessGateway -> f CreateWirelessGateway
createWirelessGateway_clientRequestToken = (CreateWirelessGateway -> Maybe Text)
-> (CreateWirelessGateway -> Maybe Text -> CreateWirelessGateway)
-> Lens
     CreateWirelessGateway
     CreateWirelessGateway
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWirelessGateway' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateWirelessGateway' :: CreateWirelessGateway -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateWirelessGateway
s@CreateWirelessGateway' {} Maybe Text
a -> CreateWirelessGateway
s {$sel:clientRequestToken:CreateWirelessGateway' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateWirelessGateway)

-- | The description of the new resource.
createWirelessGateway_description :: Lens.Lens' CreateWirelessGateway (Prelude.Maybe Prelude.Text)
createWirelessGateway_description :: (Maybe Text -> f (Maybe Text))
-> CreateWirelessGateway -> f CreateWirelessGateway
createWirelessGateway_description = (CreateWirelessGateway -> Maybe Text)
-> (CreateWirelessGateway -> Maybe Text -> CreateWirelessGateway)
-> Lens
     CreateWirelessGateway
     CreateWirelessGateway
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWirelessGateway' {Maybe Text
description :: Maybe Text
$sel:description:CreateWirelessGateway' :: CreateWirelessGateway -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateWirelessGateway
s@CreateWirelessGateway' {} Maybe Text
a -> CreateWirelessGateway
s {$sel:description:CreateWirelessGateway' :: Maybe Text
description = Maybe Text
a} :: CreateWirelessGateway)

-- | The tags to attach to the new wireless gateway. Tags are metadata that
-- you can use to manage a resource.
createWirelessGateway_tags :: Lens.Lens' CreateWirelessGateway (Prelude.Maybe [Tag])
createWirelessGateway_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateWirelessGateway -> f CreateWirelessGateway
createWirelessGateway_tags = (CreateWirelessGateway -> Maybe [Tag])
-> (CreateWirelessGateway -> Maybe [Tag] -> CreateWirelessGateway)
-> Lens
     CreateWirelessGateway
     CreateWirelessGateway
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWirelessGateway' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateWirelessGateway' :: CreateWirelessGateway -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateWirelessGateway
s@CreateWirelessGateway' {} Maybe [Tag]
a -> CreateWirelessGateway
s {$sel:tags:CreateWirelessGateway' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateWirelessGateway) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateWirelessGateway -> f CreateWirelessGateway)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateWirelessGateway
-> f CreateWirelessGateway
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 gateway configuration information to use to create the wireless
-- gateway.
createWirelessGateway_loRaWAN :: Lens.Lens' CreateWirelessGateway LoRaWANGateway
createWirelessGateway_loRaWAN :: (LoRaWANGateway -> f LoRaWANGateway)
-> CreateWirelessGateway -> f CreateWirelessGateway
createWirelessGateway_loRaWAN = (CreateWirelessGateway -> LoRaWANGateway)
-> (CreateWirelessGateway
    -> LoRaWANGateway -> CreateWirelessGateway)
-> Lens
     CreateWirelessGateway
     CreateWirelessGateway
     LoRaWANGateway
     LoRaWANGateway
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWirelessGateway' {LoRaWANGateway
loRaWAN :: LoRaWANGateway
$sel:loRaWAN:CreateWirelessGateway' :: CreateWirelessGateway -> LoRaWANGateway
loRaWAN} -> LoRaWANGateway
loRaWAN) (\s :: CreateWirelessGateway
s@CreateWirelessGateway' {} LoRaWANGateway
a -> CreateWirelessGateway
s {$sel:loRaWAN:CreateWirelessGateway' :: LoRaWANGateway
loRaWAN = LoRaWANGateway
a} :: CreateWirelessGateway)

instance Core.AWSRequest CreateWirelessGateway where
  type
    AWSResponse CreateWirelessGateway =
      CreateWirelessGatewayResponse
  request :: CreateWirelessGateway -> Request CreateWirelessGateway
request = Service -> CreateWirelessGateway -> Request CreateWirelessGateway
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateWirelessGateway
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateWirelessGateway)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateWirelessGateway))
-> Logger
-> Service
-> Proxy CreateWirelessGateway
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateWirelessGateway)))
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 -> Maybe Text -> Int -> CreateWirelessGatewayResponse
CreateWirelessGatewayResponse'
            (Maybe Text -> Maybe Text -> Int -> CreateWirelessGatewayResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> CreateWirelessGatewayResponse)
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
"Arn")
            Either String (Maybe Text -> Int -> CreateWirelessGatewayResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateWirelessGatewayResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Id")
            Either String (Int -> CreateWirelessGatewayResponse)
-> Either String Int -> Either String CreateWirelessGatewayResponse
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 CreateWirelessGateway

instance Prelude.NFData CreateWirelessGateway

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

instance Core.ToJSON CreateWirelessGateway where
  toJSON :: CreateWirelessGateway -> Value
toJSON CreateWirelessGateway' {Maybe [Tag]
Maybe Text
LoRaWANGateway
loRaWAN :: LoRaWANGateway
tags :: Maybe [Tag]
description :: Maybe Text
clientRequestToken :: Maybe Text
name :: Maybe Text
$sel:loRaWAN:CreateWirelessGateway' :: CreateWirelessGateway -> LoRaWANGateway
$sel:tags:CreateWirelessGateway' :: CreateWirelessGateway -> Maybe [Tag]
$sel:description:CreateWirelessGateway' :: CreateWirelessGateway -> Maybe Text
$sel:clientRequestToken:CreateWirelessGateway' :: CreateWirelessGateway -> Maybe Text
$sel:name:CreateWirelessGateway' :: CreateWirelessGateway -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Name" 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
name,
            (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
"LoRaWAN" Text -> LoRaWANGateway -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LoRaWANGateway
loRaWAN)
          ]
      )

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

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

-- | /See:/ 'newCreateWirelessGatewayResponse' smart constructor.
data CreateWirelessGatewayResponse = CreateWirelessGatewayResponse'
  { -- | The Amazon Resource Name of the new resource.
    CreateWirelessGatewayResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the new wireless gateway.
    CreateWirelessGatewayResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateWirelessGatewayResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateWirelessGatewayResponse
-> CreateWirelessGatewayResponse -> Bool
(CreateWirelessGatewayResponse
 -> CreateWirelessGatewayResponse -> Bool)
-> (CreateWirelessGatewayResponse
    -> CreateWirelessGatewayResponse -> Bool)
-> Eq CreateWirelessGatewayResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWirelessGatewayResponse
-> CreateWirelessGatewayResponse -> Bool
$c/= :: CreateWirelessGatewayResponse
-> CreateWirelessGatewayResponse -> Bool
== :: CreateWirelessGatewayResponse
-> CreateWirelessGatewayResponse -> Bool
$c== :: CreateWirelessGatewayResponse
-> CreateWirelessGatewayResponse -> Bool
Prelude.Eq, ReadPrec [CreateWirelessGatewayResponse]
ReadPrec CreateWirelessGatewayResponse
Int -> ReadS CreateWirelessGatewayResponse
ReadS [CreateWirelessGatewayResponse]
(Int -> ReadS CreateWirelessGatewayResponse)
-> ReadS [CreateWirelessGatewayResponse]
-> ReadPrec CreateWirelessGatewayResponse
-> ReadPrec [CreateWirelessGatewayResponse]
-> Read CreateWirelessGatewayResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateWirelessGatewayResponse]
$creadListPrec :: ReadPrec [CreateWirelessGatewayResponse]
readPrec :: ReadPrec CreateWirelessGatewayResponse
$creadPrec :: ReadPrec CreateWirelessGatewayResponse
readList :: ReadS [CreateWirelessGatewayResponse]
$creadList :: ReadS [CreateWirelessGatewayResponse]
readsPrec :: Int -> ReadS CreateWirelessGatewayResponse
$creadsPrec :: Int -> ReadS CreateWirelessGatewayResponse
Prelude.Read, Int -> CreateWirelessGatewayResponse -> ShowS
[CreateWirelessGatewayResponse] -> ShowS
CreateWirelessGatewayResponse -> String
(Int -> CreateWirelessGatewayResponse -> ShowS)
-> (CreateWirelessGatewayResponse -> String)
-> ([CreateWirelessGatewayResponse] -> ShowS)
-> Show CreateWirelessGatewayResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWirelessGatewayResponse] -> ShowS
$cshowList :: [CreateWirelessGatewayResponse] -> ShowS
show :: CreateWirelessGatewayResponse -> String
$cshow :: CreateWirelessGatewayResponse -> String
showsPrec :: Int -> CreateWirelessGatewayResponse -> ShowS
$cshowsPrec :: Int -> CreateWirelessGatewayResponse -> ShowS
Prelude.Show, (forall x.
 CreateWirelessGatewayResponse
 -> Rep CreateWirelessGatewayResponse x)
-> (forall x.
    Rep CreateWirelessGatewayResponse x
    -> CreateWirelessGatewayResponse)
-> Generic CreateWirelessGatewayResponse
forall x.
Rep CreateWirelessGatewayResponse x
-> CreateWirelessGatewayResponse
forall x.
CreateWirelessGatewayResponse
-> Rep CreateWirelessGatewayResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateWirelessGatewayResponse x
-> CreateWirelessGatewayResponse
$cfrom :: forall x.
CreateWirelessGatewayResponse
-> Rep CreateWirelessGatewayResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateWirelessGatewayResponse' 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', 'createWirelessGatewayResponse_arn' - The Amazon Resource Name of the new resource.
--
-- 'id', 'createWirelessGatewayResponse_id' - The ID of the new wireless gateway.
--
-- 'httpStatus', 'createWirelessGatewayResponse_httpStatus' - The response's http status code.
newCreateWirelessGatewayResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateWirelessGatewayResponse
newCreateWirelessGatewayResponse :: Int -> CreateWirelessGatewayResponse
newCreateWirelessGatewayResponse Int
pHttpStatus_ =
  CreateWirelessGatewayResponse' :: Maybe Text -> Maybe Text -> Int -> CreateWirelessGatewayResponse
CreateWirelessGatewayResponse'
    { $sel:arn:CreateWirelessGatewayResponse' :: Maybe Text
arn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreateWirelessGatewayResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateWirelessGatewayResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name of the new resource.
createWirelessGatewayResponse_arn :: Lens.Lens' CreateWirelessGatewayResponse (Prelude.Maybe Prelude.Text)
createWirelessGatewayResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateWirelessGatewayResponse -> f CreateWirelessGatewayResponse
createWirelessGatewayResponse_arn = (CreateWirelessGatewayResponse -> Maybe Text)
-> (CreateWirelessGatewayResponse
    -> Maybe Text -> CreateWirelessGatewayResponse)
-> Lens
     CreateWirelessGatewayResponse
     CreateWirelessGatewayResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWirelessGatewayResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateWirelessGatewayResponse' :: CreateWirelessGatewayResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateWirelessGatewayResponse
s@CreateWirelessGatewayResponse' {} Maybe Text
a -> CreateWirelessGatewayResponse
s {$sel:arn:CreateWirelessGatewayResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateWirelessGatewayResponse)

-- | The ID of the new wireless gateway.
createWirelessGatewayResponse_id :: Lens.Lens' CreateWirelessGatewayResponse (Prelude.Maybe Prelude.Text)
createWirelessGatewayResponse_id :: (Maybe Text -> f (Maybe Text))
-> CreateWirelessGatewayResponse -> f CreateWirelessGatewayResponse
createWirelessGatewayResponse_id = (CreateWirelessGatewayResponse -> Maybe Text)
-> (CreateWirelessGatewayResponse
    -> Maybe Text -> CreateWirelessGatewayResponse)
-> Lens
     CreateWirelessGatewayResponse
     CreateWirelessGatewayResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWirelessGatewayResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateWirelessGatewayResponse' :: CreateWirelessGatewayResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateWirelessGatewayResponse
s@CreateWirelessGatewayResponse' {} Maybe Text
a -> CreateWirelessGatewayResponse
s {$sel:id:CreateWirelessGatewayResponse' :: Maybe Text
id = Maybe Text
a} :: CreateWirelessGatewayResponse)

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

instance Prelude.NFData CreateWirelessGatewayResponse