{-# 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.Chime.Types.AppInstanceAdminSummary
-- 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.Chime.Types.AppInstanceAdminSummary where

import Amazonka.Chime.Types.Identity
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Summary of the details of an @AppInstanceAdmin@.
--
-- /See:/ 'newAppInstanceAdminSummary' smart constructor.
data AppInstanceAdminSummary = AppInstanceAdminSummary'
  { -- | The details of the @AppInstanceAdmin@.
    AppInstanceAdminSummary -> Maybe Identity
admin :: Prelude.Maybe Identity
  }
  deriving (AppInstanceAdminSummary -> AppInstanceAdminSummary -> Bool
(AppInstanceAdminSummary -> AppInstanceAdminSummary -> Bool)
-> (AppInstanceAdminSummary -> AppInstanceAdminSummary -> Bool)
-> Eq AppInstanceAdminSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AppInstanceAdminSummary -> AppInstanceAdminSummary -> Bool
$c/= :: AppInstanceAdminSummary -> AppInstanceAdminSummary -> Bool
== :: AppInstanceAdminSummary -> AppInstanceAdminSummary -> Bool
$c== :: AppInstanceAdminSummary -> AppInstanceAdminSummary -> Bool
Prelude.Eq, Int -> AppInstanceAdminSummary -> ShowS
[AppInstanceAdminSummary] -> ShowS
AppInstanceAdminSummary -> String
(Int -> AppInstanceAdminSummary -> ShowS)
-> (AppInstanceAdminSummary -> String)
-> ([AppInstanceAdminSummary] -> ShowS)
-> Show AppInstanceAdminSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AppInstanceAdminSummary] -> ShowS
$cshowList :: [AppInstanceAdminSummary] -> ShowS
show :: AppInstanceAdminSummary -> String
$cshow :: AppInstanceAdminSummary -> String
showsPrec :: Int -> AppInstanceAdminSummary -> ShowS
$cshowsPrec :: Int -> AppInstanceAdminSummary -> ShowS
Prelude.Show, (forall x.
 AppInstanceAdminSummary -> Rep AppInstanceAdminSummary x)
-> (forall x.
    Rep AppInstanceAdminSummary x -> AppInstanceAdminSummary)
-> Generic AppInstanceAdminSummary
forall x. Rep AppInstanceAdminSummary x -> AppInstanceAdminSummary
forall x. AppInstanceAdminSummary -> Rep AppInstanceAdminSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AppInstanceAdminSummary x -> AppInstanceAdminSummary
$cfrom :: forall x. AppInstanceAdminSummary -> Rep AppInstanceAdminSummary x
Prelude.Generic)

-- |
-- Create a value of 'AppInstanceAdminSummary' 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:
--
-- 'admin', 'appInstanceAdminSummary_admin' - The details of the @AppInstanceAdmin@.
newAppInstanceAdminSummary ::
  AppInstanceAdminSummary
newAppInstanceAdminSummary :: AppInstanceAdminSummary
newAppInstanceAdminSummary =
  AppInstanceAdminSummary' :: Maybe Identity -> AppInstanceAdminSummary
AppInstanceAdminSummary' {$sel:admin:AppInstanceAdminSummary' :: Maybe Identity
admin = Maybe Identity
forall a. Maybe a
Prelude.Nothing}

-- | The details of the @AppInstanceAdmin@.
appInstanceAdminSummary_admin :: Lens.Lens' AppInstanceAdminSummary (Prelude.Maybe Identity)
appInstanceAdminSummary_admin :: (Maybe Identity -> f (Maybe Identity))
-> AppInstanceAdminSummary -> f AppInstanceAdminSummary
appInstanceAdminSummary_admin = (AppInstanceAdminSummary -> Maybe Identity)
-> (AppInstanceAdminSummary
    -> Maybe Identity -> AppInstanceAdminSummary)
-> Lens
     AppInstanceAdminSummary
     AppInstanceAdminSummary
     (Maybe Identity)
     (Maybe Identity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AppInstanceAdminSummary' {Maybe Identity
admin :: Maybe Identity
$sel:admin:AppInstanceAdminSummary' :: AppInstanceAdminSummary -> Maybe Identity
admin} -> Maybe Identity
admin) (\s :: AppInstanceAdminSummary
s@AppInstanceAdminSummary' {} Maybe Identity
a -> AppInstanceAdminSummary
s {$sel:admin:AppInstanceAdminSummary' :: Maybe Identity
admin = Maybe Identity
a} :: AppInstanceAdminSummary)

instance Core.FromJSON AppInstanceAdminSummary where
  parseJSON :: Value -> Parser AppInstanceAdminSummary
parseJSON =
    String
-> (Object -> Parser AppInstanceAdminSummary)
-> Value
-> Parser AppInstanceAdminSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AppInstanceAdminSummary"
      ( \Object
x ->
          Maybe Identity -> AppInstanceAdminSummary
AppInstanceAdminSummary'
            (Maybe Identity -> AppInstanceAdminSummary)
-> Parser (Maybe Identity) -> Parser AppInstanceAdminSummary
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Identity)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Admin")
      )

instance Prelude.Hashable AppInstanceAdminSummary

instance Prelude.NFData AppInstanceAdminSummary