{-# 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.MigrationHub.Types.ProgressUpdateStreamSummary
-- 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.MigrationHub.Types.ProgressUpdateStreamSummary 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

-- | Summary of the AWS resource used for access control that is implicitly
-- linked to your AWS account.
--
-- /See:/ 'newProgressUpdateStreamSummary' smart constructor.
data ProgressUpdateStreamSummary = ProgressUpdateStreamSummary'
  { -- | The name of the ProgressUpdateStream. /Do not store personal data in
    -- this field./
    ProgressUpdateStreamSummary -> Maybe Text
progressUpdateStreamName :: Prelude.Maybe Prelude.Text
  }
  deriving (ProgressUpdateStreamSummary -> ProgressUpdateStreamSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProgressUpdateStreamSummary -> ProgressUpdateStreamSummary -> Bool
$c/= :: ProgressUpdateStreamSummary -> ProgressUpdateStreamSummary -> Bool
== :: ProgressUpdateStreamSummary -> ProgressUpdateStreamSummary -> Bool
$c== :: ProgressUpdateStreamSummary -> ProgressUpdateStreamSummary -> Bool
Prelude.Eq, ReadPrec [ProgressUpdateStreamSummary]
ReadPrec ProgressUpdateStreamSummary
Int -> ReadS ProgressUpdateStreamSummary
ReadS [ProgressUpdateStreamSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProgressUpdateStreamSummary]
$creadListPrec :: ReadPrec [ProgressUpdateStreamSummary]
readPrec :: ReadPrec ProgressUpdateStreamSummary
$creadPrec :: ReadPrec ProgressUpdateStreamSummary
readList :: ReadS [ProgressUpdateStreamSummary]
$creadList :: ReadS [ProgressUpdateStreamSummary]
readsPrec :: Int -> ReadS ProgressUpdateStreamSummary
$creadsPrec :: Int -> ReadS ProgressUpdateStreamSummary
Prelude.Read, Int -> ProgressUpdateStreamSummary -> ShowS
[ProgressUpdateStreamSummary] -> ShowS
ProgressUpdateStreamSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProgressUpdateStreamSummary] -> ShowS
$cshowList :: [ProgressUpdateStreamSummary] -> ShowS
show :: ProgressUpdateStreamSummary -> String
$cshow :: ProgressUpdateStreamSummary -> String
showsPrec :: Int -> ProgressUpdateStreamSummary -> ShowS
$cshowsPrec :: Int -> ProgressUpdateStreamSummary -> ShowS
Prelude.Show, forall x.
Rep ProgressUpdateStreamSummary x -> ProgressUpdateStreamSummary
forall x.
ProgressUpdateStreamSummary -> Rep ProgressUpdateStreamSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProgressUpdateStreamSummary x -> ProgressUpdateStreamSummary
$cfrom :: forall x.
ProgressUpdateStreamSummary -> Rep ProgressUpdateStreamSummary x
Prelude.Generic)

-- |
-- Create a value of 'ProgressUpdateStreamSummary' 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:
--
-- 'progressUpdateStreamName', 'progressUpdateStreamSummary_progressUpdateStreamName' - The name of the ProgressUpdateStream. /Do not store personal data in
-- this field./
newProgressUpdateStreamSummary ::
  ProgressUpdateStreamSummary
newProgressUpdateStreamSummary :: ProgressUpdateStreamSummary
newProgressUpdateStreamSummary =
  ProgressUpdateStreamSummary'
    { $sel:progressUpdateStreamName:ProgressUpdateStreamSummary' :: Maybe Text
progressUpdateStreamName =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the ProgressUpdateStream. /Do not store personal data in
-- this field./
progressUpdateStreamSummary_progressUpdateStreamName :: Lens.Lens' ProgressUpdateStreamSummary (Prelude.Maybe Prelude.Text)
progressUpdateStreamSummary_progressUpdateStreamName :: Lens' ProgressUpdateStreamSummary (Maybe Text)
progressUpdateStreamSummary_progressUpdateStreamName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProgressUpdateStreamSummary' {Maybe Text
progressUpdateStreamName :: Maybe Text
$sel:progressUpdateStreamName:ProgressUpdateStreamSummary' :: ProgressUpdateStreamSummary -> Maybe Text
progressUpdateStreamName} -> Maybe Text
progressUpdateStreamName) (\s :: ProgressUpdateStreamSummary
s@ProgressUpdateStreamSummary' {} Maybe Text
a -> ProgressUpdateStreamSummary
s {$sel:progressUpdateStreamName:ProgressUpdateStreamSummary' :: Maybe Text
progressUpdateStreamName = Maybe Text
a} :: ProgressUpdateStreamSummary)

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

instance Prelude.Hashable ProgressUpdateStreamSummary where
  hashWithSalt :: Int -> ProgressUpdateStreamSummary -> Int
hashWithSalt Int
_salt ProgressUpdateStreamSummary' {Maybe Text
progressUpdateStreamName :: Maybe Text
$sel:progressUpdateStreamName:ProgressUpdateStreamSummary' :: ProgressUpdateStreamSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
progressUpdateStreamName

instance Prelude.NFData ProgressUpdateStreamSummary where
  rnf :: ProgressUpdateStreamSummary -> ()
rnf ProgressUpdateStreamSummary' {Maybe Text
progressUpdateStreamName :: Maybe Text
$sel:progressUpdateStreamName:ProgressUpdateStreamSummary' :: ProgressUpdateStreamSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
progressUpdateStreamName