{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GatewayGroup = GatewayGroup'
{
GatewayGroup -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
GatewayGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
GatewayGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (GatewayGroup -> GatewayGroup -> Bool
(GatewayGroup -> GatewayGroup -> Bool)
-> (GatewayGroup -> GatewayGroup -> Bool) -> Eq GatewayGroup
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]
(Int -> ReadS GatewayGroup)
-> ReadS [GatewayGroup]
-> ReadPrec GatewayGroup
-> ReadPrec [GatewayGroup]
-> Read 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
(Int -> GatewayGroup -> ShowS)
-> (GatewayGroup -> String)
-> ([GatewayGroup] -> ShowS)
-> Show GatewayGroup
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. GatewayGroup -> Rep GatewayGroup x)
-> (forall x. Rep GatewayGroup x -> GatewayGroup)
-> Generic GatewayGroup
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' :: Maybe Text -> Maybe Text -> Maybe Text -> GatewayGroup
GatewayGroup'
{ $sel:arn:GatewayGroup' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:GatewayGroup' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:GatewayGroup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
gatewayGroup_arn :: Lens.Lens' GatewayGroup (Prelude.Maybe Prelude.Text)
gatewayGroup_arn :: (Maybe Text -> f (Maybe Text)) -> GatewayGroup -> f GatewayGroup
gatewayGroup_arn = (GatewayGroup -> Maybe Text)
-> (GatewayGroup -> Maybe Text -> GatewayGroup)
-> Lens GatewayGroup GatewayGroup (Maybe Text) (Maybe Text)
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_name :: Lens.Lens' GatewayGroup (Prelude.Maybe Prelude.Text)
gatewayGroup_name :: (Maybe Text -> f (Maybe Text)) -> GatewayGroup -> f GatewayGroup
gatewayGroup_name = (GatewayGroup -> Maybe Text)
-> (GatewayGroup -> Maybe Text -> GatewayGroup)
-> Lens GatewayGroup GatewayGroup (Maybe Text) (Maybe Text)
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)
gatewayGroup_description :: Lens.Lens' GatewayGroup (Prelude.Maybe Prelude.Text)
gatewayGroup_description :: (Maybe Text -> f (Maybe Text)) -> GatewayGroup -> f GatewayGroup
gatewayGroup_description = (GatewayGroup -> Maybe Text)
-> (GatewayGroup -> Maybe Text -> GatewayGroup)
-> Lens GatewayGroup GatewayGroup (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON GatewayGroup where
parseJSON :: Value -> Parser GatewayGroup
parseJSON =
String
-> (Object -> Parser GatewayGroup) -> Value -> Parser GatewayGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"GatewayGroup"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> GatewayGroup
GatewayGroup'
(Maybe Text -> Maybe Text -> Maybe Text -> GatewayGroup)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> GatewayGroup)
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 -> GatewayGroup)
-> Parser (Maybe Text) -> Parser (Maybe Text -> GatewayGroup)
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 -> GatewayGroup)
-> Parser (Maybe Text) -> Parser GatewayGroup
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 GatewayGroup
instance Prelude.NFData GatewayGroup