{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AlexaBusiness.Types.Gateway where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Gateway = Gateway'
{
Gateway -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Gateway -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Gateway -> Maybe Text
gatewayGroupArn :: Prelude.Maybe Prelude.Text,
Gateway -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Gateway -> Maybe Text
softwareVersion :: Prelude.Maybe Prelude.Text
}
deriving (Gateway -> Gateway -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Gateway -> Gateway -> Bool
$c/= :: Gateway -> Gateway -> Bool
== :: Gateway -> Gateway -> Bool
$c== :: Gateway -> Gateway -> Bool
Prelude.Eq, ReadPrec [Gateway]
ReadPrec Gateway
Int -> ReadS Gateway
ReadS [Gateway]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Gateway]
$creadListPrec :: ReadPrec [Gateway]
readPrec :: ReadPrec Gateway
$creadPrec :: ReadPrec Gateway
readList :: ReadS [Gateway]
$creadList :: ReadS [Gateway]
readsPrec :: Int -> ReadS Gateway
$creadsPrec :: Int -> ReadS Gateway
Prelude.Read, Int -> Gateway -> ShowS
[Gateway] -> ShowS
Gateway -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Gateway] -> ShowS
$cshowList :: [Gateway] -> ShowS
show :: Gateway -> String
$cshow :: Gateway -> String
showsPrec :: Int -> Gateway -> ShowS
$cshowsPrec :: Int -> Gateway -> ShowS
Prelude.Show, forall x. Rep Gateway x -> Gateway
forall x. Gateway -> Rep Gateway x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Gateway x -> Gateway
$cfrom :: forall x. Gateway -> Rep Gateway x
Prelude.Generic)
newGateway ::
Gateway
newGateway :: Gateway
newGateway =
Gateway'
{ $sel:arn:Gateway' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:description:Gateway' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:gatewayGroupArn:Gateway' :: Maybe Text
gatewayGroupArn = forall a. Maybe a
Prelude.Nothing,
$sel:name:Gateway' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:softwareVersion:Gateway' :: Maybe Text
softwareVersion = forall a. Maybe a
Prelude.Nothing
}
gateway_arn :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)
gateway_arn :: Lens' Gateway (Maybe Text)
gateway_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Gateway' {Maybe Text
arn :: Maybe Text
$sel:arn:Gateway' :: Gateway -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Gateway
s@Gateway' {} Maybe Text
a -> Gateway
s {$sel:arn:Gateway' :: Maybe Text
arn = Maybe Text
a} :: Gateway)
gateway_description :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)
gateway_description :: Lens' Gateway (Maybe Text)
gateway_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Gateway' {Maybe Text
description :: Maybe Text
$sel:description:Gateway' :: Gateway -> Maybe Text
description} -> Maybe Text
description) (\s :: Gateway
s@Gateway' {} Maybe Text
a -> Gateway
s {$sel:description:Gateway' :: Maybe Text
description = Maybe Text
a} :: Gateway)
gateway_gatewayGroupArn :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)
gateway_gatewayGroupArn :: Lens' Gateway (Maybe Text)
gateway_gatewayGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Gateway' {Maybe Text
gatewayGroupArn :: Maybe Text
$sel:gatewayGroupArn:Gateway' :: Gateway -> Maybe Text
gatewayGroupArn} -> Maybe Text
gatewayGroupArn) (\s :: Gateway
s@Gateway' {} Maybe Text
a -> Gateway
s {$sel:gatewayGroupArn:Gateway' :: Maybe Text
gatewayGroupArn = Maybe Text
a} :: Gateway)
gateway_name :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)
gateway_name :: Lens' Gateway (Maybe Text)
gateway_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Gateway' {Maybe Text
name :: Maybe Text
$sel:name:Gateway' :: Gateway -> Maybe Text
name} -> Maybe Text
name) (\s :: Gateway
s@Gateway' {} Maybe Text
a -> Gateway
s {$sel:name:Gateway' :: Maybe Text
name = Maybe Text
a} :: Gateway)
gateway_softwareVersion :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)
gateway_softwareVersion :: Lens' Gateway (Maybe Text)
gateway_softwareVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Gateway' {Maybe Text
softwareVersion :: Maybe Text
$sel:softwareVersion:Gateway' :: Gateway -> Maybe Text
softwareVersion} -> Maybe Text
softwareVersion) (\s :: Gateway
s@Gateway' {} Maybe Text
a -> Gateway
s {$sel:softwareVersion:Gateway' :: Maybe Text
softwareVersion = Maybe Text
a} :: Gateway)
instance Data.FromJSON Gateway where
parseJSON :: Value -> Parser Gateway
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Gateway"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Gateway
Gateway'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GatewayGroupArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SoftwareVersion")
)
instance Prelude.Hashable Gateway where
hashWithSalt :: Int -> Gateway -> Int
hashWithSalt Int
_salt Gateway' {Maybe Text
softwareVersion :: Maybe Text
name :: Maybe Text
gatewayGroupArn :: Maybe Text
description :: Maybe Text
arn :: Maybe Text
$sel:softwareVersion:Gateway' :: Gateway -> Maybe Text
$sel:name:Gateway' :: Gateway -> Maybe Text
$sel:gatewayGroupArn:Gateway' :: Gateway -> Maybe Text
$sel:description:Gateway' :: Gateway -> Maybe Text
$sel:arn:Gateway' :: Gateway -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gatewayGroupArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
softwareVersion
instance Prelude.NFData Gateway where
rnf :: Gateway -> ()
rnf Gateway' {Maybe Text
softwareVersion :: Maybe Text
name :: Maybe Text
gatewayGroupArn :: Maybe Text
description :: Maybe Text
arn :: Maybe Text
$sel:softwareVersion:Gateway' :: Gateway -> Maybe Text
$sel:name:Gateway' :: Gateway -> Maybe Text
$sel:gatewayGroupArn:Gateway' :: Gateway -> Maybe Text
$sel:description:Gateway' :: Gateway -> Maybe Text
$sel:arn:Gateway' :: Gateway -> 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 Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gatewayGroupArn
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 Text
softwareVersion