{-# 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.SageMaker.Types.DataQualityJobInput
-- 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.SageMaker.Types.DataQualityJobInput where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.EndpointInput

-- | The input for the data quality monitoring job. Currently endpoints are
-- supported for input.
--
-- /See:/ 'newDataQualityJobInput' smart constructor.
data DataQualityJobInput = DataQualityJobInput'
  { DataQualityJobInput -> EndpointInput
endpointInput :: EndpointInput
  }
  deriving (DataQualityJobInput -> DataQualityJobInput -> Bool
(DataQualityJobInput -> DataQualityJobInput -> Bool)
-> (DataQualityJobInput -> DataQualityJobInput -> Bool)
-> Eq DataQualityJobInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataQualityJobInput -> DataQualityJobInput -> Bool
$c/= :: DataQualityJobInput -> DataQualityJobInput -> Bool
== :: DataQualityJobInput -> DataQualityJobInput -> Bool
$c== :: DataQualityJobInput -> DataQualityJobInput -> Bool
Prelude.Eq, ReadPrec [DataQualityJobInput]
ReadPrec DataQualityJobInput
Int -> ReadS DataQualityJobInput
ReadS [DataQualityJobInput]
(Int -> ReadS DataQualityJobInput)
-> ReadS [DataQualityJobInput]
-> ReadPrec DataQualityJobInput
-> ReadPrec [DataQualityJobInput]
-> Read DataQualityJobInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataQualityJobInput]
$creadListPrec :: ReadPrec [DataQualityJobInput]
readPrec :: ReadPrec DataQualityJobInput
$creadPrec :: ReadPrec DataQualityJobInput
readList :: ReadS [DataQualityJobInput]
$creadList :: ReadS [DataQualityJobInput]
readsPrec :: Int -> ReadS DataQualityJobInput
$creadsPrec :: Int -> ReadS DataQualityJobInput
Prelude.Read, Int -> DataQualityJobInput -> ShowS
[DataQualityJobInput] -> ShowS
DataQualityJobInput -> String
(Int -> DataQualityJobInput -> ShowS)
-> (DataQualityJobInput -> String)
-> ([DataQualityJobInput] -> ShowS)
-> Show DataQualityJobInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataQualityJobInput] -> ShowS
$cshowList :: [DataQualityJobInput] -> ShowS
show :: DataQualityJobInput -> String
$cshow :: DataQualityJobInput -> String
showsPrec :: Int -> DataQualityJobInput -> ShowS
$cshowsPrec :: Int -> DataQualityJobInput -> ShowS
Prelude.Show, (forall x. DataQualityJobInput -> Rep DataQualityJobInput x)
-> (forall x. Rep DataQualityJobInput x -> DataQualityJobInput)
-> Generic DataQualityJobInput
forall x. Rep DataQualityJobInput x -> DataQualityJobInput
forall x. DataQualityJobInput -> Rep DataQualityJobInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataQualityJobInput x -> DataQualityJobInput
$cfrom :: forall x. DataQualityJobInput -> Rep DataQualityJobInput x
Prelude.Generic)

-- |
-- Create a value of 'DataQualityJobInput' 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:
--
-- 'endpointInput', 'dataQualityJobInput_endpointInput' - Undocumented member.
newDataQualityJobInput ::
  -- | 'endpointInput'
  EndpointInput ->
  DataQualityJobInput
newDataQualityJobInput :: EndpointInput -> DataQualityJobInput
newDataQualityJobInput EndpointInput
pEndpointInput_ =
  DataQualityJobInput' :: EndpointInput -> DataQualityJobInput
DataQualityJobInput'
    { $sel:endpointInput:DataQualityJobInput' :: EndpointInput
endpointInput =
        EndpointInput
pEndpointInput_
    }

-- | Undocumented member.
dataQualityJobInput_endpointInput :: Lens.Lens' DataQualityJobInput EndpointInput
dataQualityJobInput_endpointInput :: (EndpointInput -> f EndpointInput)
-> DataQualityJobInput -> f DataQualityJobInput
dataQualityJobInput_endpointInput = (DataQualityJobInput -> EndpointInput)
-> (DataQualityJobInput -> EndpointInput -> DataQualityJobInput)
-> Lens
     DataQualityJobInput DataQualityJobInput EndpointInput EndpointInput
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataQualityJobInput' {EndpointInput
endpointInput :: EndpointInput
$sel:endpointInput:DataQualityJobInput' :: DataQualityJobInput -> EndpointInput
endpointInput} -> EndpointInput
endpointInput) (\s :: DataQualityJobInput
s@DataQualityJobInput' {} EndpointInput
a -> DataQualityJobInput
s {$sel:endpointInput:DataQualityJobInput' :: EndpointInput
endpointInput = EndpointInput
a} :: DataQualityJobInput)

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

instance Prelude.Hashable DataQualityJobInput

instance Prelude.NFData DataQualityJobInput

instance Core.ToJSON DataQualityJobInput where
  toJSON :: DataQualityJobInput -> Value
toJSON DataQualityJobInput' {EndpointInput
endpointInput :: EndpointInput
$sel:endpointInput:DataQualityJobInput' :: DataQualityJobInput -> EndpointInput
..} =
    [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
"EndpointInput" Text -> EndpointInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= EndpointInput
endpointInput)
          ]
      )