{-# 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.GatewayGroup 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 GatewayGroup = GatewayGroup'
{
GatewayGroup -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
GatewayGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
GatewayGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (GatewayGroup -> GatewayGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GatewayGroup -> GatewayGroup -> Bool
$c/= :: GatewayGroup -> GatewayGroup -> Bool
== :: GatewayGroup -> GatewayGroup -> Bool
$c== :: GatewayGroup -> GatewayGroup -> Bool
Prelude.Eq, ReadPrec [GatewayGroup]
ReadPrec GatewayGroup
Int -> ReadS GatewayGroup
ReadS [GatewayGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GatewayGroup]
$creadListPrec :: ReadPrec [GatewayGroup]
readPrec :: ReadPrec GatewayGroup
$creadPrec :: ReadPrec GatewayGroup
readList :: ReadS [GatewayGroup]
$creadList :: ReadS [GatewayGroup]
readsPrec :: Int -> ReadS GatewayGroup
$creadsPrec :: Int -> ReadS GatewayGroup
Prelude.Read, Int -> GatewayGroup -> ShowS
[GatewayGroup] -> ShowS
GatewayGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GatewayGroup] -> ShowS
$cshowList :: [GatewayGroup] -> ShowS
show :: GatewayGroup -> String
$cshow :: GatewayGroup -> String
showsPrec :: Int -> GatewayGroup -> ShowS
$cshowsPrec :: Int -> GatewayGroup -> ShowS
Prelude.Show, forall x. Rep GatewayGroup x -> GatewayGroup
forall x. GatewayGroup -> Rep GatewayGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GatewayGroup x -> GatewayGroup
$cfrom :: forall x. GatewayGroup -> Rep GatewayGroup x
Prelude.Generic)
newGatewayGroup ::
GatewayGroup
newGatewayGroup :: GatewayGroup
newGatewayGroup =
GatewayGroup'
{ $sel:arn:GatewayGroup' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:description:GatewayGroup' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:name:GatewayGroup' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
}
gatewayGroup_arn :: Lens.Lens' GatewayGroup (Prelude.Maybe Prelude.Text)
gatewayGroup_arn :: Lens' GatewayGroup (Maybe Text)
gatewayGroup_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayGroup' {Maybe Text
arn :: Maybe Text
$sel:arn:GatewayGroup' :: GatewayGroup -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GatewayGroup
s@GatewayGroup' {} Maybe Text
a -> GatewayGroup
s {$sel:arn:GatewayGroup' :: Maybe Text
arn = Maybe Text
a} :: GatewayGroup)
gatewayGroup_description :: Lens.Lens' GatewayGroup (Prelude.Maybe Prelude.Text)
gatewayGroup_description :: Lens' GatewayGroup (Maybe Text)
gatewayGroup_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayGroup' {Maybe Text
description :: Maybe Text
$sel:description:GatewayGroup' :: GatewayGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: GatewayGroup
s@GatewayGroup' {} Maybe Text
a -> GatewayGroup
s {$sel:description:GatewayGroup' :: Maybe Text
description = Maybe Text
a} :: GatewayGroup)
gatewayGroup_name :: Lens.Lens' GatewayGroup (Prelude.Maybe Prelude.Text)
gatewayGroup_name :: Lens' GatewayGroup (Maybe Text)
gatewayGroup_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayGroup' {Maybe Text
name :: Maybe Text
$sel:name:GatewayGroup' :: GatewayGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: GatewayGroup
s@GatewayGroup' {} Maybe Text
a -> GatewayGroup
s {$sel:name:GatewayGroup' :: Maybe Text
name = Maybe Text
a} :: GatewayGroup)
instance Data.FromJSON GatewayGroup where
parseJSON :: Value -> Parser GatewayGroup
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"GatewayGroup"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> GatewayGroup
GatewayGroup'
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
"Name")
)
instance Prelude.Hashable GatewayGroup where
hashWithSalt :: Int -> GatewayGroup -> Int
hashWithSalt Int
_salt GatewayGroup' {Maybe Text
name :: Maybe Text
description :: Maybe Text
arn :: Maybe Text
$sel:name:GatewayGroup' :: GatewayGroup -> Maybe Text
$sel:description:GatewayGroup' :: GatewayGroup -> Maybe Text
$sel:arn:GatewayGroup' :: GatewayGroup -> 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
name
instance Prelude.NFData GatewayGroup where
rnf :: GatewayGroup -> ()
rnf GatewayGroup' {Maybe Text
name :: Maybe Text
description :: Maybe Text
arn :: Maybe Text
$sel:name:GatewayGroup' :: GatewayGroup -> Maybe Text
$sel:description:GatewayGroup' :: GatewayGroup -> Maybe Text
$sel:arn:GatewayGroup' :: GatewayGroup -> 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
name