{-# 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.GatewaySummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GatewaySummary = GatewaySummary'
{
GatewaySummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
GatewaySummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
GatewaySummary -> Maybe Text
gatewayGroupArn :: Prelude.Maybe Prelude.Text,
GatewaySummary -> Maybe Text
softwareVersion :: Prelude.Maybe Prelude.Text,
GatewaySummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (GatewaySummary -> GatewaySummary -> Bool
(GatewaySummary -> GatewaySummary -> Bool)
-> (GatewaySummary -> GatewaySummary -> Bool) -> Eq GatewaySummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GatewaySummary -> GatewaySummary -> Bool
$c/= :: GatewaySummary -> GatewaySummary -> Bool
== :: GatewaySummary -> GatewaySummary -> Bool
$c== :: GatewaySummary -> GatewaySummary -> Bool
Prelude.Eq, ReadPrec [GatewaySummary]
ReadPrec GatewaySummary
Int -> ReadS GatewaySummary
ReadS [GatewaySummary]
(Int -> ReadS GatewaySummary)
-> ReadS [GatewaySummary]
-> ReadPrec GatewaySummary
-> ReadPrec [GatewaySummary]
-> Read GatewaySummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GatewaySummary]
$creadListPrec :: ReadPrec [GatewaySummary]
readPrec :: ReadPrec GatewaySummary
$creadPrec :: ReadPrec GatewaySummary
readList :: ReadS [GatewaySummary]
$creadList :: ReadS [GatewaySummary]
readsPrec :: Int -> ReadS GatewaySummary
$creadsPrec :: Int -> ReadS GatewaySummary
Prelude.Read, Int -> GatewaySummary -> ShowS
[GatewaySummary] -> ShowS
GatewaySummary -> String
(Int -> GatewaySummary -> ShowS)
-> (GatewaySummary -> String)
-> ([GatewaySummary] -> ShowS)
-> Show GatewaySummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GatewaySummary] -> ShowS
$cshowList :: [GatewaySummary] -> ShowS
show :: GatewaySummary -> String
$cshow :: GatewaySummary -> String
showsPrec :: Int -> GatewaySummary -> ShowS
$cshowsPrec :: Int -> GatewaySummary -> ShowS
Prelude.Show, (forall x. GatewaySummary -> Rep GatewaySummary x)
-> (forall x. Rep GatewaySummary x -> GatewaySummary)
-> Generic GatewaySummary
forall x. Rep GatewaySummary x -> GatewaySummary
forall x. GatewaySummary -> Rep GatewaySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GatewaySummary x -> GatewaySummary
$cfrom :: forall x. GatewaySummary -> Rep GatewaySummary x
Prelude.Generic)
newGatewaySummary ::
GatewaySummary
newGatewaySummary :: GatewaySummary
newGatewaySummary =
GatewaySummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GatewaySummary
GatewaySummary'
{ $sel:arn:GatewaySummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:GatewaySummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gatewayGroupArn:GatewaySummary' :: Maybe Text
gatewayGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:softwareVersion:GatewaySummary' :: Maybe Text
softwareVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:GatewaySummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
gatewaySummary_arn :: Lens.Lens' GatewaySummary (Prelude.Maybe Prelude.Text)
gatewaySummary_arn :: (Maybe Text -> f (Maybe Text))
-> GatewaySummary -> f GatewaySummary
gatewaySummary_arn = (GatewaySummary -> Maybe Text)
-> (GatewaySummary -> Maybe Text -> GatewaySummary)
-> Lens GatewaySummary GatewaySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewaySummary' {Maybe Text
arn :: Maybe Text
$sel:arn:GatewaySummary' :: GatewaySummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GatewaySummary
s@GatewaySummary' {} Maybe Text
a -> GatewaySummary
s {$sel:arn:GatewaySummary' :: Maybe Text
arn = Maybe Text
a} :: GatewaySummary)
gatewaySummary_name :: Lens.Lens' GatewaySummary (Prelude.Maybe Prelude.Text)
gatewaySummary_name :: (Maybe Text -> f (Maybe Text))
-> GatewaySummary -> f GatewaySummary
gatewaySummary_name = (GatewaySummary -> Maybe Text)
-> (GatewaySummary -> Maybe Text -> GatewaySummary)
-> Lens GatewaySummary GatewaySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewaySummary' {Maybe Text
name :: Maybe Text
$sel:name:GatewaySummary' :: GatewaySummary -> Maybe Text
name} -> Maybe Text
name) (\s :: GatewaySummary
s@GatewaySummary' {} Maybe Text
a -> GatewaySummary
s {$sel:name:GatewaySummary' :: Maybe Text
name = Maybe Text
a} :: GatewaySummary)
gatewaySummary_gatewayGroupArn :: Lens.Lens' GatewaySummary (Prelude.Maybe Prelude.Text)
gatewaySummary_gatewayGroupArn :: (Maybe Text -> f (Maybe Text))
-> GatewaySummary -> f GatewaySummary
gatewaySummary_gatewayGroupArn = (GatewaySummary -> Maybe Text)
-> (GatewaySummary -> Maybe Text -> GatewaySummary)
-> Lens GatewaySummary GatewaySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewaySummary' {Maybe Text
gatewayGroupArn :: Maybe Text
$sel:gatewayGroupArn:GatewaySummary' :: GatewaySummary -> Maybe Text
gatewayGroupArn} -> Maybe Text
gatewayGroupArn) (\s :: GatewaySummary
s@GatewaySummary' {} Maybe Text
a -> GatewaySummary
s {$sel:gatewayGroupArn:GatewaySummary' :: Maybe Text
gatewayGroupArn = Maybe Text
a} :: GatewaySummary)
gatewaySummary_softwareVersion :: Lens.Lens' GatewaySummary (Prelude.Maybe Prelude.Text)
gatewaySummary_softwareVersion :: (Maybe Text -> f (Maybe Text))
-> GatewaySummary -> f GatewaySummary
gatewaySummary_softwareVersion = (GatewaySummary -> Maybe Text)
-> (GatewaySummary -> Maybe Text -> GatewaySummary)
-> Lens GatewaySummary GatewaySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewaySummary' {Maybe Text
softwareVersion :: Maybe Text
$sel:softwareVersion:GatewaySummary' :: GatewaySummary -> Maybe Text
softwareVersion} -> Maybe Text
softwareVersion) (\s :: GatewaySummary
s@GatewaySummary' {} Maybe Text
a -> GatewaySummary
s {$sel:softwareVersion:GatewaySummary' :: Maybe Text
softwareVersion = Maybe Text
a} :: GatewaySummary)
gatewaySummary_description :: Lens.Lens' GatewaySummary (Prelude.Maybe Prelude.Text)
gatewaySummary_description :: (Maybe Text -> f (Maybe Text))
-> GatewaySummary -> f GatewaySummary
gatewaySummary_description = (GatewaySummary -> Maybe Text)
-> (GatewaySummary -> Maybe Text -> GatewaySummary)
-> Lens GatewaySummary GatewaySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewaySummary' {Maybe Text
description :: Maybe Text
$sel:description:GatewaySummary' :: GatewaySummary -> Maybe Text
description} -> Maybe Text
description) (\s :: GatewaySummary
s@GatewaySummary' {} Maybe Text
a -> GatewaySummary
s {$sel:description:GatewaySummary' :: Maybe Text
description = Maybe Text
a} :: GatewaySummary)
instance Core.FromJSON GatewaySummary where
parseJSON :: Value -> Parser GatewaySummary
parseJSON =
String
-> (Object -> Parser GatewaySummary)
-> Value
-> Parser GatewaySummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"GatewaySummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GatewaySummary
GatewaySummary'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GatewaySummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> GatewaySummary)
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 -> GatewaySummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> GatewaySummary)
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 -> GatewaySummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> GatewaySummary)
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 -> GatewaySummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> GatewaySummary)
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 -> GatewaySummary)
-> Parser (Maybe Text) -> Parser GatewaySummary
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 GatewaySummary
instance Prelude.NFData GatewaySummary