{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AlexaBusiness.Types.GatewayGroupSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AlexaBusiness.Types.GatewayGroupSummary 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

-- | The summary of a gateway group.
--
-- /See:/ 'newGatewayGroupSummary' smart constructor.
data GatewayGroupSummary = GatewayGroupSummary'
  { -- | The ARN of the gateway group.
    GatewayGroupSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The description of the gateway group.
    GatewayGroupSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name of the gateway group.
    GatewayGroupSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text
  }
  deriving (GatewayGroupSummary -> GatewayGroupSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GatewayGroupSummary -> GatewayGroupSummary -> Bool
$c/= :: GatewayGroupSummary -> GatewayGroupSummary -> Bool
== :: GatewayGroupSummary -> GatewayGroupSummary -> Bool
$c== :: GatewayGroupSummary -> GatewayGroupSummary -> Bool
Prelude.Eq, ReadPrec [GatewayGroupSummary]
ReadPrec GatewayGroupSummary
Int -> ReadS GatewayGroupSummary
ReadS [GatewayGroupSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GatewayGroupSummary]
$creadListPrec :: ReadPrec [GatewayGroupSummary]
readPrec :: ReadPrec GatewayGroupSummary
$creadPrec :: ReadPrec GatewayGroupSummary
readList :: ReadS [GatewayGroupSummary]
$creadList :: ReadS [GatewayGroupSummary]
readsPrec :: Int -> ReadS GatewayGroupSummary
$creadsPrec :: Int -> ReadS GatewayGroupSummary
Prelude.Read, Int -> GatewayGroupSummary -> ShowS
[GatewayGroupSummary] -> ShowS
GatewayGroupSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GatewayGroupSummary] -> ShowS
$cshowList :: [GatewayGroupSummary] -> ShowS
show :: GatewayGroupSummary -> String
$cshow :: GatewayGroupSummary -> String
showsPrec :: Int -> GatewayGroupSummary -> ShowS
$cshowsPrec :: Int -> GatewayGroupSummary -> ShowS
Prelude.Show, forall x. Rep GatewayGroupSummary x -> GatewayGroupSummary
forall x. GatewayGroupSummary -> Rep GatewayGroupSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GatewayGroupSummary x -> GatewayGroupSummary
$cfrom :: forall x. GatewayGroupSummary -> Rep GatewayGroupSummary x
Prelude.Generic)

-- |
-- Create a value of 'GatewayGroupSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'gatewayGroupSummary_arn' - The ARN of the gateway group.
--
-- 'description', 'gatewayGroupSummary_description' - The description of the gateway group.
--
-- 'name', 'gatewayGroupSummary_name' - The name of the gateway group.
newGatewayGroupSummary ::
  GatewayGroupSummary
newGatewayGroupSummary :: GatewayGroupSummary
newGatewayGroupSummary =
  GatewayGroupSummary'
    { $sel:arn:GatewayGroupSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:description:GatewayGroupSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GatewayGroupSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the gateway group.
gatewayGroupSummary_arn :: Lens.Lens' GatewayGroupSummary (Prelude.Maybe Prelude.Text)
gatewayGroupSummary_arn :: Lens' GatewayGroupSummary (Maybe Text)
gatewayGroupSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayGroupSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:GatewayGroupSummary' :: GatewayGroupSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GatewayGroupSummary
s@GatewayGroupSummary' {} Maybe Text
a -> GatewayGroupSummary
s {$sel:arn:GatewayGroupSummary' :: Maybe Text
arn = Maybe Text
a} :: GatewayGroupSummary)

-- | The description of the gateway group.
gatewayGroupSummary_description :: Lens.Lens' GatewayGroupSummary (Prelude.Maybe Prelude.Text)
gatewayGroupSummary_description :: Lens' GatewayGroupSummary (Maybe Text)
gatewayGroupSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayGroupSummary' {Maybe Text
description :: Maybe Text
$sel:description:GatewayGroupSummary' :: GatewayGroupSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: GatewayGroupSummary
s@GatewayGroupSummary' {} Maybe Text
a -> GatewayGroupSummary
s {$sel:description:GatewayGroupSummary' :: Maybe Text
description = Maybe Text
a} :: GatewayGroupSummary)

-- | The name of the gateway group.
gatewayGroupSummary_name :: Lens.Lens' GatewayGroupSummary (Prelude.Maybe Prelude.Text)
gatewayGroupSummary_name :: Lens' GatewayGroupSummary (Maybe Text)
gatewayGroupSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayGroupSummary' {Maybe Text
name :: Maybe Text
$sel:name:GatewayGroupSummary' :: GatewayGroupSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: GatewayGroupSummary
s@GatewayGroupSummary' {} Maybe Text
a -> GatewayGroupSummary
s {$sel:name:GatewayGroupSummary' :: Maybe Text
name = Maybe Text
a} :: GatewayGroupSummary)

instance Data.FromJSON GatewayGroupSummary where
  parseJSON :: Value -> Parser GatewayGroupSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"GatewayGroupSummary"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> Maybe Text -> GatewayGroupSummary
GatewayGroupSummary'
            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 GatewayGroupSummary where
  hashWithSalt :: Int -> GatewayGroupSummary -> Int
hashWithSalt Int
_salt GatewayGroupSummary' {Maybe Text
name :: Maybe Text
description :: Maybe Text
arn :: Maybe Text
$sel:name:GatewayGroupSummary' :: GatewayGroupSummary -> Maybe Text
$sel:description:GatewayGroupSummary' :: GatewayGroupSummary -> Maybe Text
$sel:arn:GatewayGroupSummary' :: GatewayGroupSummary -> 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 GatewayGroupSummary where
  rnf :: GatewayGroupSummary -> ()
rnf GatewayGroupSummary' {Maybe Text
name :: Maybe Text
description :: Maybe Text
arn :: Maybe Text
$sel:name:GatewayGroupSummary' :: GatewayGroupSummary -> Maybe Text
$sel:description:GatewayGroupSummary' :: GatewayGroupSummary -> Maybe Text
$sel:arn:GatewayGroupSummary' :: GatewayGroupSummary -> 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