{-# 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.DMS.Types.CollectorShortInfoResponse
-- 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.DMS.Types.CollectorShortInfoResponse 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

-- | Briefly describes a Fleet Advisor collector.
--
-- /See:/ 'newCollectorShortInfoResponse' smart constructor.
data CollectorShortInfoResponse = CollectorShortInfoResponse'
  { -- | The name of the Fleet Advisor collector.
    CollectorShortInfoResponse -> Maybe Text
collectorName :: Prelude.Maybe Prelude.Text,
    -- | The reference ID of the Fleet Advisor collector.
    CollectorShortInfoResponse -> Maybe Text
collectorReferencedId :: Prelude.Maybe Prelude.Text
  }
  deriving (CollectorShortInfoResponse -> CollectorShortInfoResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CollectorShortInfoResponse -> CollectorShortInfoResponse -> Bool
$c/= :: CollectorShortInfoResponse -> CollectorShortInfoResponse -> Bool
== :: CollectorShortInfoResponse -> CollectorShortInfoResponse -> Bool
$c== :: CollectorShortInfoResponse -> CollectorShortInfoResponse -> Bool
Prelude.Eq, ReadPrec [CollectorShortInfoResponse]
ReadPrec CollectorShortInfoResponse
Int -> ReadS CollectorShortInfoResponse
ReadS [CollectorShortInfoResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CollectorShortInfoResponse]
$creadListPrec :: ReadPrec [CollectorShortInfoResponse]
readPrec :: ReadPrec CollectorShortInfoResponse
$creadPrec :: ReadPrec CollectorShortInfoResponse
readList :: ReadS [CollectorShortInfoResponse]
$creadList :: ReadS [CollectorShortInfoResponse]
readsPrec :: Int -> ReadS CollectorShortInfoResponse
$creadsPrec :: Int -> ReadS CollectorShortInfoResponse
Prelude.Read, Int -> CollectorShortInfoResponse -> ShowS
[CollectorShortInfoResponse] -> ShowS
CollectorShortInfoResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CollectorShortInfoResponse] -> ShowS
$cshowList :: [CollectorShortInfoResponse] -> ShowS
show :: CollectorShortInfoResponse -> String
$cshow :: CollectorShortInfoResponse -> String
showsPrec :: Int -> CollectorShortInfoResponse -> ShowS
$cshowsPrec :: Int -> CollectorShortInfoResponse -> ShowS
Prelude.Show, forall x.
Rep CollectorShortInfoResponse x -> CollectorShortInfoResponse
forall x.
CollectorShortInfoResponse -> Rep CollectorShortInfoResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CollectorShortInfoResponse x -> CollectorShortInfoResponse
$cfrom :: forall x.
CollectorShortInfoResponse -> Rep CollectorShortInfoResponse x
Prelude.Generic)

-- |
-- Create a value of 'CollectorShortInfoResponse' 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:
--
-- 'collectorName', 'collectorShortInfoResponse_collectorName' - The name of the Fleet Advisor collector.
--
-- 'collectorReferencedId', 'collectorShortInfoResponse_collectorReferencedId' - The reference ID of the Fleet Advisor collector.
newCollectorShortInfoResponse ::
  CollectorShortInfoResponse
newCollectorShortInfoResponse :: CollectorShortInfoResponse
newCollectorShortInfoResponse =
  CollectorShortInfoResponse'
    { $sel:collectorName:CollectorShortInfoResponse' :: Maybe Text
collectorName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:collectorReferencedId:CollectorShortInfoResponse' :: Maybe Text
collectorReferencedId = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the Fleet Advisor collector.
collectorShortInfoResponse_collectorName :: Lens.Lens' CollectorShortInfoResponse (Prelude.Maybe Prelude.Text)
collectorShortInfoResponse_collectorName :: Lens' CollectorShortInfoResponse (Maybe Text)
collectorShortInfoResponse_collectorName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CollectorShortInfoResponse' {Maybe Text
collectorName :: Maybe Text
$sel:collectorName:CollectorShortInfoResponse' :: CollectorShortInfoResponse -> Maybe Text
collectorName} -> Maybe Text
collectorName) (\s :: CollectorShortInfoResponse
s@CollectorShortInfoResponse' {} Maybe Text
a -> CollectorShortInfoResponse
s {$sel:collectorName:CollectorShortInfoResponse' :: Maybe Text
collectorName = Maybe Text
a} :: CollectorShortInfoResponse)

-- | The reference ID of the Fleet Advisor collector.
collectorShortInfoResponse_collectorReferencedId :: Lens.Lens' CollectorShortInfoResponse (Prelude.Maybe Prelude.Text)
collectorShortInfoResponse_collectorReferencedId :: Lens' CollectorShortInfoResponse (Maybe Text)
collectorShortInfoResponse_collectorReferencedId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CollectorShortInfoResponse' {Maybe Text
collectorReferencedId :: Maybe Text
$sel:collectorReferencedId:CollectorShortInfoResponse' :: CollectorShortInfoResponse -> Maybe Text
collectorReferencedId} -> Maybe Text
collectorReferencedId) (\s :: CollectorShortInfoResponse
s@CollectorShortInfoResponse' {} Maybe Text
a -> CollectorShortInfoResponse
s {$sel:collectorReferencedId:CollectorShortInfoResponse' :: Maybe Text
collectorReferencedId = Maybe Text
a} :: CollectorShortInfoResponse)

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

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

instance Prelude.NFData CollectorShortInfoResponse where
  rnf :: CollectorShortInfoResponse -> ()
rnf CollectorShortInfoResponse' {Maybe Text
collectorReferencedId :: Maybe Text
collectorName :: Maybe Text
$sel:collectorReferencedId:CollectorShortInfoResponse' :: CollectorShortInfoResponse -> Maybe Text
$sel:collectorName:CollectorShortInfoResponse' :: CollectorShortInfoResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
collectorName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
collectorReferencedId