{-# 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.Connect.Types.SecurityProfileSummary
-- 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.Connect.Types.SecurityProfileSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains information about a security profile.
--
-- /See:/ 'newSecurityProfileSummary' smart constructor.
data SecurityProfileSummary = SecurityProfileSummary'
  { -- | The Amazon Resource Name (ARN) of the security profile.
    SecurityProfileSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The name of the security profile.
    SecurityProfileSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the security profile.
    SecurityProfileSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text
  }
  deriving (SecurityProfileSummary -> SecurityProfileSummary -> Bool
(SecurityProfileSummary -> SecurityProfileSummary -> Bool)
-> (SecurityProfileSummary -> SecurityProfileSummary -> Bool)
-> Eq SecurityProfileSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SecurityProfileSummary -> SecurityProfileSummary -> Bool
$c/= :: SecurityProfileSummary -> SecurityProfileSummary -> Bool
== :: SecurityProfileSummary -> SecurityProfileSummary -> Bool
$c== :: SecurityProfileSummary -> SecurityProfileSummary -> Bool
Prelude.Eq, ReadPrec [SecurityProfileSummary]
ReadPrec SecurityProfileSummary
Int -> ReadS SecurityProfileSummary
ReadS [SecurityProfileSummary]
(Int -> ReadS SecurityProfileSummary)
-> ReadS [SecurityProfileSummary]
-> ReadPrec SecurityProfileSummary
-> ReadPrec [SecurityProfileSummary]
-> Read SecurityProfileSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SecurityProfileSummary]
$creadListPrec :: ReadPrec [SecurityProfileSummary]
readPrec :: ReadPrec SecurityProfileSummary
$creadPrec :: ReadPrec SecurityProfileSummary
readList :: ReadS [SecurityProfileSummary]
$creadList :: ReadS [SecurityProfileSummary]
readsPrec :: Int -> ReadS SecurityProfileSummary
$creadsPrec :: Int -> ReadS SecurityProfileSummary
Prelude.Read, Int -> SecurityProfileSummary -> ShowS
[SecurityProfileSummary] -> ShowS
SecurityProfileSummary -> String
(Int -> SecurityProfileSummary -> ShowS)
-> (SecurityProfileSummary -> String)
-> ([SecurityProfileSummary] -> ShowS)
-> Show SecurityProfileSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SecurityProfileSummary] -> ShowS
$cshowList :: [SecurityProfileSummary] -> ShowS
show :: SecurityProfileSummary -> String
$cshow :: SecurityProfileSummary -> String
showsPrec :: Int -> SecurityProfileSummary -> ShowS
$cshowsPrec :: Int -> SecurityProfileSummary -> ShowS
Prelude.Show, (forall x. SecurityProfileSummary -> Rep SecurityProfileSummary x)
-> (forall x.
    Rep SecurityProfileSummary x -> SecurityProfileSummary)
-> Generic SecurityProfileSummary
forall x. Rep SecurityProfileSummary x -> SecurityProfileSummary
forall x. SecurityProfileSummary -> Rep SecurityProfileSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SecurityProfileSummary x -> SecurityProfileSummary
$cfrom :: forall x. SecurityProfileSummary -> Rep SecurityProfileSummary x
Prelude.Generic)

-- |
-- Create a value of 'SecurityProfileSummary' 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', 'securityProfileSummary_arn' - The Amazon Resource Name (ARN) of the security profile.
--
-- 'name', 'securityProfileSummary_name' - The name of the security profile.
--
-- 'id', 'securityProfileSummary_id' - The identifier of the security profile.
newSecurityProfileSummary ::
  SecurityProfileSummary
newSecurityProfileSummary :: SecurityProfileSummary
newSecurityProfileSummary =
  SecurityProfileSummary' :: Maybe Text -> Maybe Text -> Maybe Text -> SecurityProfileSummary
SecurityProfileSummary'
    { $sel:arn:SecurityProfileSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:SecurityProfileSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:SecurityProfileSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the security profile.
securityProfileSummary_arn :: Lens.Lens' SecurityProfileSummary (Prelude.Maybe Prelude.Text)
securityProfileSummary_arn :: (Maybe Text -> f (Maybe Text))
-> SecurityProfileSummary -> f SecurityProfileSummary
securityProfileSummary_arn = (SecurityProfileSummary -> Maybe Text)
-> (SecurityProfileSummary -> Maybe Text -> SecurityProfileSummary)
-> Lens
     SecurityProfileSummary
     SecurityProfileSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SecurityProfileSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:SecurityProfileSummary' :: SecurityProfileSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: SecurityProfileSummary
s@SecurityProfileSummary' {} Maybe Text
a -> SecurityProfileSummary
s {$sel:arn:SecurityProfileSummary' :: Maybe Text
arn = Maybe Text
a} :: SecurityProfileSummary)

-- | The name of the security profile.
securityProfileSummary_name :: Lens.Lens' SecurityProfileSummary (Prelude.Maybe Prelude.Text)
securityProfileSummary_name :: (Maybe Text -> f (Maybe Text))
-> SecurityProfileSummary -> f SecurityProfileSummary
securityProfileSummary_name = (SecurityProfileSummary -> Maybe Text)
-> (SecurityProfileSummary -> Maybe Text -> SecurityProfileSummary)
-> Lens
     SecurityProfileSummary
     SecurityProfileSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SecurityProfileSummary' {Maybe Text
name :: Maybe Text
$sel:name:SecurityProfileSummary' :: SecurityProfileSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: SecurityProfileSummary
s@SecurityProfileSummary' {} Maybe Text
a -> SecurityProfileSummary
s {$sel:name:SecurityProfileSummary' :: Maybe Text
name = Maybe Text
a} :: SecurityProfileSummary)

-- | The identifier of the security profile.
securityProfileSummary_id :: Lens.Lens' SecurityProfileSummary (Prelude.Maybe Prelude.Text)
securityProfileSummary_id :: (Maybe Text -> f (Maybe Text))
-> SecurityProfileSummary -> f SecurityProfileSummary
securityProfileSummary_id = (SecurityProfileSummary -> Maybe Text)
-> (SecurityProfileSummary -> Maybe Text -> SecurityProfileSummary)
-> Lens
     SecurityProfileSummary
     SecurityProfileSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SecurityProfileSummary' {Maybe Text
id :: Maybe Text
$sel:id:SecurityProfileSummary' :: SecurityProfileSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: SecurityProfileSummary
s@SecurityProfileSummary' {} Maybe Text
a -> SecurityProfileSummary
s {$sel:id:SecurityProfileSummary' :: Maybe Text
id = Maybe Text
a} :: SecurityProfileSummary)

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

instance Prelude.Hashable SecurityProfileSummary

instance Prelude.NFData SecurityProfileSummary