{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Gateway = Gateway'
{
Gateway -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Gateway -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Gateway -> Maybe Text
gatewayGroupArn :: Prelude.Maybe Prelude.Text,
Gateway -> Maybe Text
softwareVersion :: Prelude.Maybe Prelude.Text,
Gateway -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (Gateway -> Gateway -> Bool
(Gateway -> Gateway -> Bool)
-> (Gateway -> Gateway -> Bool) -> Eq Gateway
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]
(Int -> ReadS Gateway)
-> ReadS [Gateway]
-> ReadPrec Gateway
-> ReadPrec [Gateway]
-> Read 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
(Int -> Gateway -> ShowS)
-> (Gateway -> String) -> ([Gateway] -> ShowS) -> Show Gateway
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. Gateway -> Rep Gateway x)
-> (forall x. Rep Gateway x -> Gateway) -> Generic Gateway
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' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Gateway
Gateway'
{ $sel:arn:Gateway' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:Gateway' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gatewayGroupArn:Gateway' :: Maybe Text
gatewayGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:softwareVersion:Gateway' :: Maybe Text
softwareVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Gateway' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
gateway_arn :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)
gateway_arn :: (Maybe Text -> f (Maybe Text)) -> Gateway -> f Gateway
gateway_arn = (Gateway -> Maybe Text)
-> (Gateway -> Maybe Text -> Gateway)
-> Lens Gateway Gateway (Maybe Text) (Maybe Text)
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_name :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)
gateway_name :: (Maybe Text -> f (Maybe Text)) -> Gateway -> f Gateway
gateway_name = (Gateway -> Maybe Text)
-> (Gateway -> Maybe Text -> Gateway)
-> Lens Gateway Gateway (Maybe Text) (Maybe Text)
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_gatewayGroupArn :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)
gateway_gatewayGroupArn :: (Maybe Text -> f (Maybe Text)) -> Gateway -> f Gateway
gateway_gatewayGroupArn = (Gateway -> Maybe Text)
-> (Gateway -> Maybe Text -> Gateway)
-> Lens Gateway Gateway (Maybe Text) (Maybe Text)
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_softwareVersion :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)
gateway_softwareVersion :: (Maybe Text -> f (Maybe Text)) -> Gateway -> f Gateway
gateway_softwareVersion = (Gateway -> Maybe Text)
-> (Gateway -> Maybe Text -> Gateway)
-> Lens Gateway Gateway (Maybe Text) (Maybe Text)
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)
gateway_description :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)
gateway_description :: (Maybe Text -> f (Maybe Text)) -> Gateway -> f Gateway
gateway_description = (Gateway -> Maybe Text)
-> (Gateway -> Maybe Text -> Gateway)
-> Lens Gateway Gateway (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON Gateway where
parseJSON :: Value -> Parser Gateway
parseJSON =
String -> (Object -> Parser Gateway) -> Value -> Parser Gateway
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Gateway"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Gateway
Gateway'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Gateway)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Gateway)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Gateway)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Gateway)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> Gateway)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Gateway)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GatewayGroupArn")
Parser (Maybe Text -> Maybe Text -> Gateway)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Gateway)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SoftwareVersion")
Parser (Maybe Text -> Gateway)
-> Parser (Maybe Text) -> Parser Gateway
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
)
instance Prelude.Hashable Gateway
instance Prelude.NFData Gateway