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

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

-- | The connector-specific profile properties required by Infor Nexus.
--
-- /See:/ 'newInforNexusConnectorProfileProperties' smart constructor.
data InforNexusConnectorProfileProperties = InforNexusConnectorProfileProperties'
  { -- | The location of the Infor Nexus resource.
    InforNexusConnectorProfileProperties -> Text
instanceUrl :: Prelude.Text
  }
  deriving (InforNexusConnectorProfileProperties
-> InforNexusConnectorProfileProperties -> Bool
(InforNexusConnectorProfileProperties
 -> InforNexusConnectorProfileProperties -> Bool)
-> (InforNexusConnectorProfileProperties
    -> InforNexusConnectorProfileProperties -> Bool)
-> Eq InforNexusConnectorProfileProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InforNexusConnectorProfileProperties
-> InforNexusConnectorProfileProperties -> Bool
$c/= :: InforNexusConnectorProfileProperties
-> InforNexusConnectorProfileProperties -> Bool
== :: InforNexusConnectorProfileProperties
-> InforNexusConnectorProfileProperties -> Bool
$c== :: InforNexusConnectorProfileProperties
-> InforNexusConnectorProfileProperties -> Bool
Prelude.Eq, ReadPrec [InforNexusConnectorProfileProperties]
ReadPrec InforNexusConnectorProfileProperties
Int -> ReadS InforNexusConnectorProfileProperties
ReadS [InforNexusConnectorProfileProperties]
(Int -> ReadS InforNexusConnectorProfileProperties)
-> ReadS [InforNexusConnectorProfileProperties]
-> ReadPrec InforNexusConnectorProfileProperties
-> ReadPrec [InforNexusConnectorProfileProperties]
-> Read InforNexusConnectorProfileProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InforNexusConnectorProfileProperties]
$creadListPrec :: ReadPrec [InforNexusConnectorProfileProperties]
readPrec :: ReadPrec InforNexusConnectorProfileProperties
$creadPrec :: ReadPrec InforNexusConnectorProfileProperties
readList :: ReadS [InforNexusConnectorProfileProperties]
$creadList :: ReadS [InforNexusConnectorProfileProperties]
readsPrec :: Int -> ReadS InforNexusConnectorProfileProperties
$creadsPrec :: Int -> ReadS InforNexusConnectorProfileProperties
Prelude.Read, Int -> InforNexusConnectorProfileProperties -> ShowS
[InforNexusConnectorProfileProperties] -> ShowS
InforNexusConnectorProfileProperties -> String
(Int -> InforNexusConnectorProfileProperties -> ShowS)
-> (InforNexusConnectorProfileProperties -> String)
-> ([InforNexusConnectorProfileProperties] -> ShowS)
-> Show InforNexusConnectorProfileProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InforNexusConnectorProfileProperties] -> ShowS
$cshowList :: [InforNexusConnectorProfileProperties] -> ShowS
show :: InforNexusConnectorProfileProperties -> String
$cshow :: InforNexusConnectorProfileProperties -> String
showsPrec :: Int -> InforNexusConnectorProfileProperties -> ShowS
$cshowsPrec :: Int -> InforNexusConnectorProfileProperties -> ShowS
Prelude.Show, (forall x.
 InforNexusConnectorProfileProperties
 -> Rep InforNexusConnectorProfileProperties x)
-> (forall x.
    Rep InforNexusConnectorProfileProperties x
    -> InforNexusConnectorProfileProperties)
-> Generic InforNexusConnectorProfileProperties
forall x.
Rep InforNexusConnectorProfileProperties x
-> InforNexusConnectorProfileProperties
forall x.
InforNexusConnectorProfileProperties
-> Rep InforNexusConnectorProfileProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InforNexusConnectorProfileProperties x
-> InforNexusConnectorProfileProperties
$cfrom :: forall x.
InforNexusConnectorProfileProperties
-> Rep InforNexusConnectorProfileProperties x
Prelude.Generic)

-- |
-- Create a value of 'InforNexusConnectorProfileProperties' 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:
--
-- 'instanceUrl', 'inforNexusConnectorProfileProperties_instanceUrl' - The location of the Infor Nexus resource.
newInforNexusConnectorProfileProperties ::
  -- | 'instanceUrl'
  Prelude.Text ->
  InforNexusConnectorProfileProperties
newInforNexusConnectorProfileProperties :: Text -> InforNexusConnectorProfileProperties
newInforNexusConnectorProfileProperties Text
pInstanceUrl_ =
  InforNexusConnectorProfileProperties' :: Text -> InforNexusConnectorProfileProperties
InforNexusConnectorProfileProperties'
    { $sel:instanceUrl:InforNexusConnectorProfileProperties' :: Text
instanceUrl =
        Text
pInstanceUrl_
    }

-- | The location of the Infor Nexus resource.
inforNexusConnectorProfileProperties_instanceUrl :: Lens.Lens' InforNexusConnectorProfileProperties Prelude.Text
inforNexusConnectorProfileProperties_instanceUrl :: (Text -> f Text)
-> InforNexusConnectorProfileProperties
-> f InforNexusConnectorProfileProperties
inforNexusConnectorProfileProperties_instanceUrl = (InforNexusConnectorProfileProperties -> Text)
-> (InforNexusConnectorProfileProperties
    -> Text -> InforNexusConnectorProfileProperties)
-> Lens
     InforNexusConnectorProfileProperties
     InforNexusConnectorProfileProperties
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InforNexusConnectorProfileProperties' {Text
instanceUrl :: Text
$sel:instanceUrl:InforNexusConnectorProfileProperties' :: InforNexusConnectorProfileProperties -> Text
instanceUrl} -> Text
instanceUrl) (\s :: InforNexusConnectorProfileProperties
s@InforNexusConnectorProfileProperties' {} Text
a -> InforNexusConnectorProfileProperties
s {$sel:instanceUrl:InforNexusConnectorProfileProperties' :: Text
instanceUrl = Text
a} :: InforNexusConnectorProfileProperties)

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

instance
  Prelude.Hashable
    InforNexusConnectorProfileProperties

instance
  Prelude.NFData
    InforNexusConnectorProfileProperties

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