{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AlexaBusiness.Types.GatewayGroupSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 name of the gateway group.
    GatewayGroupSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The description of the gateway group.
    GatewayGroupSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (GatewayGroupSummary -> GatewayGroupSummary -> Bool
(GatewayGroupSummary -> GatewayGroupSummary -> Bool)
-> (GatewayGroupSummary -> GatewayGroupSummary -> Bool)
-> Eq GatewayGroupSummary
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]
(Int -> ReadS GatewayGroupSummary)
-> ReadS [GatewayGroupSummary]
-> ReadPrec GatewayGroupSummary
-> ReadPrec [GatewayGroupSummary]
-> Read 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
(Int -> GatewayGroupSummary -> ShowS)
-> (GatewayGroupSummary -> String)
-> ([GatewayGroupSummary] -> ShowS)
-> Show GatewayGroupSummary
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. GatewayGroupSummary -> Rep GatewayGroupSummary x)
-> (forall x. Rep GatewayGroupSummary x -> GatewayGroupSummary)
-> Generic GatewayGroupSummary
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.
--
-- 'name', 'gatewayGroupSummary_name' - The name of the gateway group.
--
-- 'description', 'gatewayGroupSummary_description' - The description of the gateway group.
newGatewayGroupSummary ::
  GatewayGroupSummary
newGatewayGroupSummary :: GatewayGroupSummary
newGatewayGroupSummary =
  GatewayGroupSummary' :: Maybe Text -> Maybe Text -> Maybe Text -> GatewayGroupSummary
GatewayGroupSummary'
    { $sel:arn:GatewayGroupSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GatewayGroupSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GatewayGroupSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the gateway group.
gatewayGroupSummary_arn :: Lens.Lens' GatewayGroupSummary (Prelude.Maybe Prelude.Text)
gatewayGroupSummary_arn :: (Maybe Text -> f (Maybe Text))
-> GatewayGroupSummary -> f GatewayGroupSummary
gatewayGroupSummary_arn = (GatewayGroupSummary -> Maybe Text)
-> (GatewayGroupSummary -> Maybe Text -> GatewayGroupSummary)
-> Lens
     GatewayGroupSummary GatewayGroupSummary (Maybe Text) (Maybe Text)
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 name of the gateway group.
gatewayGroupSummary_name :: Lens.Lens' GatewayGroupSummary (Prelude.Maybe Prelude.Text)
gatewayGroupSummary_name :: (Maybe Text -> f (Maybe Text))
-> GatewayGroupSummary -> f GatewayGroupSummary
gatewayGroupSummary_name = (GatewayGroupSummary -> Maybe Text)
-> (GatewayGroupSummary -> Maybe Text -> GatewayGroupSummary)
-> Lens
     GatewayGroupSummary GatewayGroupSummary (Maybe Text) (Maybe Text)
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)

-- | The description of the gateway group.
gatewayGroupSummary_description :: Lens.Lens' GatewayGroupSummary (Prelude.Maybe Prelude.Text)
gatewayGroupSummary_description :: (Maybe Text -> f (Maybe Text))
-> GatewayGroupSummary -> f GatewayGroupSummary
gatewayGroupSummary_description = (GatewayGroupSummary -> Maybe Text)
-> (GatewayGroupSummary -> Maybe Text -> GatewayGroupSummary)
-> Lens
     GatewayGroupSummary GatewayGroupSummary (Maybe Text) (Maybe Text)
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)

instance Core.FromJSON GatewayGroupSummary where
  parseJSON :: Value -> Parser GatewayGroupSummary
parseJSON =
    String
-> (Object -> Parser GatewayGroupSummary)
-> Value
-> Parser GatewayGroupSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"GatewayGroupSummary"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> Maybe Text -> GatewayGroupSummary
GatewayGroupSummary'
            (Maybe Text -> Maybe Text -> Maybe Text -> GatewayGroupSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> GatewayGroupSummary)
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 -> GatewayGroupSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> GatewayGroupSummary)
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 -> GatewayGroupSummary)
-> Parser (Maybe Text) -> Parser GatewayGroupSummary
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 GatewayGroupSummary

instance Prelude.NFData GatewayGroupSummary