{-# 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.AppIntegrationS.Types.DataIntegrationSummary
-- 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.AppIntegrationS.Types.DataIntegrationSummary where

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

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

-- |
-- Create a value of 'DataIntegrationSummary' 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', 'dataIntegrationSummary_arn' - The Amazon Resource Name (ARN) of the DataIntegration.
--
-- 'name', 'dataIntegrationSummary_name' - The name of the DataIntegration.
--
-- 'sourceURI', 'dataIntegrationSummary_sourceURI' - The URI of the data source.
newDataIntegrationSummary ::
  DataIntegrationSummary
newDataIntegrationSummary :: DataIntegrationSummary
newDataIntegrationSummary =
  DataIntegrationSummary' :: Maybe Text -> Maybe Text -> Maybe Text -> DataIntegrationSummary
DataIntegrationSummary'
    { $sel:arn:DataIntegrationSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DataIntegrationSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceURI:DataIntegrationSummary' :: Maybe Text
sourceURI = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

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

-- | The URI of the data source.
dataIntegrationSummary_sourceURI :: Lens.Lens' DataIntegrationSummary (Prelude.Maybe Prelude.Text)
dataIntegrationSummary_sourceURI :: (Maybe Text -> f (Maybe Text))
-> DataIntegrationSummary -> f DataIntegrationSummary
dataIntegrationSummary_sourceURI = (DataIntegrationSummary -> Maybe Text)
-> (DataIntegrationSummary -> Maybe Text -> DataIntegrationSummary)
-> Lens
     DataIntegrationSummary
     DataIntegrationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataIntegrationSummary' {Maybe Text
sourceURI :: Maybe Text
$sel:sourceURI:DataIntegrationSummary' :: DataIntegrationSummary -> Maybe Text
sourceURI} -> Maybe Text
sourceURI) (\s :: DataIntegrationSummary
s@DataIntegrationSummary' {} Maybe Text
a -> DataIntegrationSummary
s {$sel:sourceURI:DataIntegrationSummary' :: Maybe Text
sourceURI = Maybe Text
a} :: DataIntegrationSummary)

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

instance Prelude.Hashable DataIntegrationSummary

instance Prelude.NFData DataIntegrationSummary