{-# 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.AppFlow.Types.InforNexusSourceProperties
-- 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.AppFlow.Types.InforNexusSourceProperties 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

-- | The properties that are applied when Infor Nexus is being used as a
-- source.
--
-- /See:/ 'newInforNexusSourceProperties' smart constructor.
data InforNexusSourceProperties = InforNexusSourceProperties'
  { -- | The object specified in the Infor Nexus flow source.
    InforNexusSourceProperties -> Text
object' :: Prelude.Text
  }
  deriving (InforNexusSourceProperties -> InforNexusSourceProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InforNexusSourceProperties -> InforNexusSourceProperties -> Bool
$c/= :: InforNexusSourceProperties -> InforNexusSourceProperties -> Bool
== :: InforNexusSourceProperties -> InforNexusSourceProperties -> Bool
$c== :: InforNexusSourceProperties -> InforNexusSourceProperties -> Bool
Prelude.Eq, ReadPrec [InforNexusSourceProperties]
ReadPrec InforNexusSourceProperties
Int -> ReadS InforNexusSourceProperties
ReadS [InforNexusSourceProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InforNexusSourceProperties]
$creadListPrec :: ReadPrec [InforNexusSourceProperties]
readPrec :: ReadPrec InforNexusSourceProperties
$creadPrec :: ReadPrec InforNexusSourceProperties
readList :: ReadS [InforNexusSourceProperties]
$creadList :: ReadS [InforNexusSourceProperties]
readsPrec :: Int -> ReadS InforNexusSourceProperties
$creadsPrec :: Int -> ReadS InforNexusSourceProperties
Prelude.Read, Int -> InforNexusSourceProperties -> ShowS
[InforNexusSourceProperties] -> ShowS
InforNexusSourceProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InforNexusSourceProperties] -> ShowS
$cshowList :: [InforNexusSourceProperties] -> ShowS
show :: InforNexusSourceProperties -> String
$cshow :: InforNexusSourceProperties -> String
showsPrec :: Int -> InforNexusSourceProperties -> ShowS
$cshowsPrec :: Int -> InforNexusSourceProperties -> ShowS
Prelude.Show, forall x.
Rep InforNexusSourceProperties x -> InforNexusSourceProperties
forall x.
InforNexusSourceProperties -> Rep InforNexusSourceProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InforNexusSourceProperties x -> InforNexusSourceProperties
$cfrom :: forall x.
InforNexusSourceProperties -> Rep InforNexusSourceProperties x
Prelude.Generic)

-- |
-- Create a value of 'InforNexusSourceProperties' 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:
--
-- 'object'', 'inforNexusSourceProperties_object' - The object specified in the Infor Nexus flow source.
newInforNexusSourceProperties ::
  -- | 'object''
  Prelude.Text ->
  InforNexusSourceProperties
newInforNexusSourceProperties :: Text -> InforNexusSourceProperties
newInforNexusSourceProperties Text
pObject_ =
  InforNexusSourceProperties' {$sel:object':InforNexusSourceProperties' :: Text
object' = Text
pObject_}

-- | The object specified in the Infor Nexus flow source.
inforNexusSourceProperties_object :: Lens.Lens' InforNexusSourceProperties Prelude.Text
inforNexusSourceProperties_object :: Lens' InforNexusSourceProperties Text
inforNexusSourceProperties_object = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InforNexusSourceProperties' {Text
object' :: Text
$sel:object':InforNexusSourceProperties' :: InforNexusSourceProperties -> Text
object'} -> Text
object') (\s :: InforNexusSourceProperties
s@InforNexusSourceProperties' {} Text
a -> InforNexusSourceProperties
s {$sel:object':InforNexusSourceProperties' :: Text
object' = Text
a} :: InforNexusSourceProperties)

instance Data.FromJSON InforNexusSourceProperties where
  parseJSON :: Value -> Parser InforNexusSourceProperties
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"InforNexusSourceProperties"
      ( \Object
x ->
          Text -> InforNexusSourceProperties
InforNexusSourceProperties'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"object")
      )

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

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

instance Data.ToJSON InforNexusSourceProperties where
  toJSON :: InforNexusSourceProperties -> Value
toJSON InforNexusSourceProperties' {Text
object' :: Text
$sel:object':InforNexusSourceProperties' :: InforNexusSourceProperties -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"object" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
object')]
      )