{-# 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.WellArchitected.Types.LensSummary
-- 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.WellArchitected.Types.LensSummary 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
import Amazonka.WellArchitected.Types.LensStatus
import Amazonka.WellArchitected.Types.LensType

-- | A lens summary of a lens.
--
-- /See:/ 'newLensSummary' smart constructor.
data LensSummary = LensSummary'
  { LensSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    LensSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    LensSummary -> Maybe Text
lensAlias :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the lens.
    LensSummary -> Maybe Text
lensArn :: Prelude.Maybe Prelude.Text,
    LensSummary -> Maybe Text
lensName :: Prelude.Maybe Prelude.Text,
    -- | The status of the lens.
    LensSummary -> Maybe LensStatus
lensStatus :: Prelude.Maybe LensStatus,
    -- | The type of the lens.
    LensSummary -> Maybe LensType
lensType :: Prelude.Maybe LensType,
    -- | The version of the lens.
    LensSummary -> Maybe Text
lensVersion :: Prelude.Maybe Prelude.Text,
    LensSummary -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    LensSummary -> Maybe POSIX
updatedAt :: Prelude.Maybe Data.POSIX
  }
  deriving (LensSummary -> LensSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LensSummary -> LensSummary -> Bool
$c/= :: LensSummary -> LensSummary -> Bool
== :: LensSummary -> LensSummary -> Bool
$c== :: LensSummary -> LensSummary -> Bool
Prelude.Eq, ReadPrec [LensSummary]
ReadPrec LensSummary
Int -> ReadS LensSummary
ReadS [LensSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LensSummary]
$creadListPrec :: ReadPrec [LensSummary]
readPrec :: ReadPrec LensSummary
$creadPrec :: ReadPrec LensSummary
readList :: ReadS [LensSummary]
$creadList :: ReadS [LensSummary]
readsPrec :: Int -> ReadS LensSummary
$creadsPrec :: Int -> ReadS LensSummary
Prelude.Read, Int -> LensSummary -> ShowS
[LensSummary] -> ShowS
LensSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LensSummary] -> ShowS
$cshowList :: [LensSummary] -> ShowS
show :: LensSummary -> String
$cshow :: LensSummary -> String
showsPrec :: Int -> LensSummary -> ShowS
$cshowsPrec :: Int -> LensSummary -> ShowS
Prelude.Show, forall x. Rep LensSummary x -> LensSummary
forall x. LensSummary -> Rep LensSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LensSummary x -> LensSummary
$cfrom :: forall x. LensSummary -> Rep LensSummary x
Prelude.Generic)

-- |
-- Create a value of 'LensSummary' 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:
--
-- 'createdAt', 'lensSummary_createdAt' - Undocumented member.
--
-- 'description', 'lensSummary_description' - Undocumented member.
--
-- 'lensAlias', 'lensSummary_lensAlias' - Undocumented member.
--
-- 'lensArn', 'lensSummary_lensArn' - The ARN of the lens.
--
-- 'lensName', 'lensSummary_lensName' - Undocumented member.
--
-- 'lensStatus', 'lensSummary_lensStatus' - The status of the lens.
--
-- 'lensType', 'lensSummary_lensType' - The type of the lens.
--
-- 'lensVersion', 'lensSummary_lensVersion' - The version of the lens.
--
-- 'owner', 'lensSummary_owner' - Undocumented member.
--
-- 'updatedAt', 'lensSummary_updatedAt' - Undocumented member.
newLensSummary ::
  LensSummary
newLensSummary :: LensSummary
newLensSummary =
  LensSummary'
    { $sel:createdAt:LensSummary' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:description:LensSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:lensAlias:LensSummary' :: Maybe Text
lensAlias = forall a. Maybe a
Prelude.Nothing,
      $sel:lensArn:LensSummary' :: Maybe Text
lensArn = forall a. Maybe a
Prelude.Nothing,
      $sel:lensName:LensSummary' :: Maybe Text
lensName = forall a. Maybe a
Prelude.Nothing,
      $sel:lensStatus:LensSummary' :: Maybe LensStatus
lensStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:lensType:LensSummary' :: Maybe LensType
lensType = forall a. Maybe a
Prelude.Nothing,
      $sel:lensVersion:LensSummary' :: Maybe Text
lensVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:owner:LensSummary' :: Maybe Text
owner = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:LensSummary' :: Maybe POSIX
updatedAt = forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
lensSummary_createdAt :: Lens.Lens' LensSummary (Prelude.Maybe Prelude.UTCTime)
lensSummary_createdAt :: Lens' LensSummary (Maybe UTCTime)
lensSummary_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:LensSummary' :: LensSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: LensSummary
s@LensSummary' {} Maybe POSIX
a -> LensSummary
s {$sel:createdAt:LensSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: LensSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Undocumented member.
lensSummary_description :: Lens.Lens' LensSummary (Prelude.Maybe Prelude.Text)
lensSummary_description :: Lens' LensSummary (Maybe Text)
lensSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensSummary' {Maybe Text
description :: Maybe Text
$sel:description:LensSummary' :: LensSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: LensSummary
s@LensSummary' {} Maybe Text
a -> LensSummary
s {$sel:description:LensSummary' :: Maybe Text
description = Maybe Text
a} :: LensSummary)

-- | Undocumented member.
lensSummary_lensAlias :: Lens.Lens' LensSummary (Prelude.Maybe Prelude.Text)
lensSummary_lensAlias :: Lens' LensSummary (Maybe Text)
lensSummary_lensAlias = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensSummary' {Maybe Text
lensAlias :: Maybe Text
$sel:lensAlias:LensSummary' :: LensSummary -> Maybe Text
lensAlias} -> Maybe Text
lensAlias) (\s :: LensSummary
s@LensSummary' {} Maybe Text
a -> LensSummary
s {$sel:lensAlias:LensSummary' :: Maybe Text
lensAlias = Maybe Text
a} :: LensSummary)

-- | The ARN of the lens.
lensSummary_lensArn :: Lens.Lens' LensSummary (Prelude.Maybe Prelude.Text)
lensSummary_lensArn :: Lens' LensSummary (Maybe Text)
lensSummary_lensArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensSummary' {Maybe Text
lensArn :: Maybe Text
$sel:lensArn:LensSummary' :: LensSummary -> Maybe Text
lensArn} -> Maybe Text
lensArn) (\s :: LensSummary
s@LensSummary' {} Maybe Text
a -> LensSummary
s {$sel:lensArn:LensSummary' :: Maybe Text
lensArn = Maybe Text
a} :: LensSummary)

-- | Undocumented member.
lensSummary_lensName :: Lens.Lens' LensSummary (Prelude.Maybe Prelude.Text)
lensSummary_lensName :: Lens' LensSummary (Maybe Text)
lensSummary_lensName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensSummary' {Maybe Text
lensName :: Maybe Text
$sel:lensName:LensSummary' :: LensSummary -> Maybe Text
lensName} -> Maybe Text
lensName) (\s :: LensSummary
s@LensSummary' {} Maybe Text
a -> LensSummary
s {$sel:lensName:LensSummary' :: Maybe Text
lensName = Maybe Text
a} :: LensSummary)

-- | The status of the lens.
lensSummary_lensStatus :: Lens.Lens' LensSummary (Prelude.Maybe LensStatus)
lensSummary_lensStatus :: Lens' LensSummary (Maybe LensStatus)
lensSummary_lensStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensSummary' {Maybe LensStatus
lensStatus :: Maybe LensStatus
$sel:lensStatus:LensSummary' :: LensSummary -> Maybe LensStatus
lensStatus} -> Maybe LensStatus
lensStatus) (\s :: LensSummary
s@LensSummary' {} Maybe LensStatus
a -> LensSummary
s {$sel:lensStatus:LensSummary' :: Maybe LensStatus
lensStatus = Maybe LensStatus
a} :: LensSummary)

-- | The type of the lens.
lensSummary_lensType :: Lens.Lens' LensSummary (Prelude.Maybe LensType)
lensSummary_lensType :: Lens' LensSummary (Maybe LensType)
lensSummary_lensType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensSummary' {Maybe LensType
lensType :: Maybe LensType
$sel:lensType:LensSummary' :: LensSummary -> Maybe LensType
lensType} -> Maybe LensType
lensType) (\s :: LensSummary
s@LensSummary' {} Maybe LensType
a -> LensSummary
s {$sel:lensType:LensSummary' :: Maybe LensType
lensType = Maybe LensType
a} :: LensSummary)

-- | The version of the lens.
lensSummary_lensVersion :: Lens.Lens' LensSummary (Prelude.Maybe Prelude.Text)
lensSummary_lensVersion :: Lens' LensSummary (Maybe Text)
lensSummary_lensVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensSummary' {Maybe Text
lensVersion :: Maybe Text
$sel:lensVersion:LensSummary' :: LensSummary -> Maybe Text
lensVersion} -> Maybe Text
lensVersion) (\s :: LensSummary
s@LensSummary' {} Maybe Text
a -> LensSummary
s {$sel:lensVersion:LensSummary' :: Maybe Text
lensVersion = Maybe Text
a} :: LensSummary)

-- | Undocumented member.
lensSummary_owner :: Lens.Lens' LensSummary (Prelude.Maybe Prelude.Text)
lensSummary_owner :: Lens' LensSummary (Maybe Text)
lensSummary_owner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensSummary' {Maybe Text
owner :: Maybe Text
$sel:owner:LensSummary' :: LensSummary -> Maybe Text
owner} -> Maybe Text
owner) (\s :: LensSummary
s@LensSummary' {} Maybe Text
a -> LensSummary
s {$sel:owner:LensSummary' :: Maybe Text
owner = Maybe Text
a} :: LensSummary)

-- | Undocumented member.
lensSummary_updatedAt :: Lens.Lens' LensSummary (Prelude.Maybe Prelude.UTCTime)
lensSummary_updatedAt :: Lens' LensSummary (Maybe UTCTime)
lensSummary_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensSummary' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:LensSummary' :: LensSummary -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: LensSummary
s@LensSummary' {} Maybe POSIX
a -> LensSummary
s {$sel:updatedAt:LensSummary' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: LensSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Data.FromJSON LensSummary where
  parseJSON :: Value -> Parser LensSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"LensSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LensStatus
-> Maybe LensType
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> LensSummary
LensSummary'
            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
"CreatedAt")
            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
"LensAlias")
            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
"LensArn")
            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
"LensName")
            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
"LensStatus")
            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
"LensType")
            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
"LensVersion")
            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
"Owner")
            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
"UpdatedAt")
      )

instance Prelude.Hashable LensSummary where
  hashWithSalt :: Int -> LensSummary -> Int
hashWithSalt Int
_salt LensSummary' {Maybe Text
Maybe POSIX
Maybe LensStatus
Maybe LensType
updatedAt :: Maybe POSIX
owner :: Maybe Text
lensVersion :: Maybe Text
lensType :: Maybe LensType
lensStatus :: Maybe LensStatus
lensName :: Maybe Text
lensArn :: Maybe Text
lensAlias :: Maybe Text
description :: Maybe Text
createdAt :: Maybe POSIX
$sel:updatedAt:LensSummary' :: LensSummary -> Maybe POSIX
$sel:owner:LensSummary' :: LensSummary -> Maybe Text
$sel:lensVersion:LensSummary' :: LensSummary -> Maybe Text
$sel:lensType:LensSummary' :: LensSummary -> Maybe LensType
$sel:lensStatus:LensSummary' :: LensSummary -> Maybe LensStatus
$sel:lensName:LensSummary' :: LensSummary -> Maybe Text
$sel:lensArn:LensSummary' :: LensSummary -> Maybe Text
$sel:lensAlias:LensSummary' :: LensSummary -> Maybe Text
$sel:description:LensSummary' :: LensSummary -> Maybe Text
$sel:createdAt:LensSummary' :: LensSummary -> Maybe POSIX
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lensAlias
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lensArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lensName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LensStatus
lensStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LensType
lensType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lensVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
owner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
updatedAt

instance Prelude.NFData LensSummary where
  rnf :: LensSummary -> ()
rnf LensSummary' {Maybe Text
Maybe POSIX
Maybe LensStatus
Maybe LensType
updatedAt :: Maybe POSIX
owner :: Maybe Text
lensVersion :: Maybe Text
lensType :: Maybe LensType
lensStatus :: Maybe LensStatus
lensName :: Maybe Text
lensArn :: Maybe Text
lensAlias :: Maybe Text
description :: Maybe Text
createdAt :: Maybe POSIX
$sel:updatedAt:LensSummary' :: LensSummary -> Maybe POSIX
$sel:owner:LensSummary' :: LensSummary -> Maybe Text
$sel:lensVersion:LensSummary' :: LensSummary -> Maybe Text
$sel:lensType:LensSummary' :: LensSummary -> Maybe LensType
$sel:lensStatus:LensSummary' :: LensSummary -> Maybe LensStatus
$sel:lensName:LensSummary' :: LensSummary -> Maybe Text
$sel:lensArn:LensSummary' :: LensSummary -> Maybe Text
$sel:lensAlias:LensSummary' :: LensSummary -> Maybe Text
$sel:description:LensSummary' :: LensSummary -> Maybe Text
$sel:createdAt:LensSummary' :: LensSummary -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
      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
lensAlias
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lensArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lensName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LensStatus
lensStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LensType
lensType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lensVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
owner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
updatedAt