{-# 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.SageMakerGeoSpatial.Types.InputConfigInput
-- 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.SageMakerGeoSpatial.Types.InputConfigInput 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
import Amazonka.SageMakerGeoSpatial.Types.EojDataSourceConfigInput
import Amazonka.SageMakerGeoSpatial.Types.RasterDataCollectionQueryInput

-- | Input configuration information.
--
-- /See:/ 'newInputConfigInput' smart constructor.
data InputConfigInput = InputConfigInput'
  { -- | The location of the input data.>
    InputConfigInput -> Maybe EojDataSourceConfigInput
dataSourceConfig :: Prelude.Maybe EojDataSourceConfigInput,
    -- | The Amazon Resource Name (ARN) of the previous Earth Observation job.
    InputConfigInput -> Maybe Text
previousEarthObservationJobArn :: Prelude.Maybe Prelude.Text,
    InputConfigInput -> Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery :: Prelude.Maybe RasterDataCollectionQueryInput
  }
  deriving (InputConfigInput -> InputConfigInput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputConfigInput -> InputConfigInput -> Bool
$c/= :: InputConfigInput -> InputConfigInput -> Bool
== :: InputConfigInput -> InputConfigInput -> Bool
$c== :: InputConfigInput -> InputConfigInput -> Bool
Prelude.Eq, Int -> InputConfigInput -> ShowS
[InputConfigInput] -> ShowS
InputConfigInput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputConfigInput] -> ShowS
$cshowList :: [InputConfigInput] -> ShowS
show :: InputConfigInput -> String
$cshow :: InputConfigInput -> String
showsPrec :: Int -> InputConfigInput -> ShowS
$cshowsPrec :: Int -> InputConfigInput -> ShowS
Prelude.Show, forall x. Rep InputConfigInput x -> InputConfigInput
forall x. InputConfigInput -> Rep InputConfigInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InputConfigInput x -> InputConfigInput
$cfrom :: forall x. InputConfigInput -> Rep InputConfigInput x
Prelude.Generic)

-- |
-- Create a value of 'InputConfigInput' 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:
--
-- 'dataSourceConfig', 'inputConfigInput_dataSourceConfig' - The location of the input data.>
--
-- 'previousEarthObservationJobArn', 'inputConfigInput_previousEarthObservationJobArn' - The Amazon Resource Name (ARN) of the previous Earth Observation job.
--
-- 'rasterDataCollectionQuery', 'inputConfigInput_rasterDataCollectionQuery' -
newInputConfigInput ::
  InputConfigInput
newInputConfigInput :: InputConfigInput
newInputConfigInput =
  InputConfigInput'
    { $sel:dataSourceConfig:InputConfigInput' :: Maybe EojDataSourceConfigInput
dataSourceConfig =
        forall a. Maybe a
Prelude.Nothing,
      $sel:previousEarthObservationJobArn:InputConfigInput' :: Maybe Text
previousEarthObservationJobArn = forall a. Maybe a
Prelude.Nothing,
      $sel:rasterDataCollectionQuery:InputConfigInput' :: Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery = forall a. Maybe a
Prelude.Nothing
    }

-- | The location of the input data.>
inputConfigInput_dataSourceConfig :: Lens.Lens' InputConfigInput (Prelude.Maybe EojDataSourceConfigInput)
inputConfigInput_dataSourceConfig :: Lens' InputConfigInput (Maybe EojDataSourceConfigInput)
inputConfigInput_dataSourceConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputConfigInput' {Maybe EojDataSourceConfigInput
dataSourceConfig :: Maybe EojDataSourceConfigInput
$sel:dataSourceConfig:InputConfigInput' :: InputConfigInput -> Maybe EojDataSourceConfigInput
dataSourceConfig} -> Maybe EojDataSourceConfigInput
dataSourceConfig) (\s :: InputConfigInput
s@InputConfigInput' {} Maybe EojDataSourceConfigInput
a -> InputConfigInput
s {$sel:dataSourceConfig:InputConfigInput' :: Maybe EojDataSourceConfigInput
dataSourceConfig = Maybe EojDataSourceConfigInput
a} :: InputConfigInput)

-- | The Amazon Resource Name (ARN) of the previous Earth Observation job.
inputConfigInput_previousEarthObservationJobArn :: Lens.Lens' InputConfigInput (Prelude.Maybe Prelude.Text)
inputConfigInput_previousEarthObservationJobArn :: Lens' InputConfigInput (Maybe Text)
inputConfigInput_previousEarthObservationJobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputConfigInput' {Maybe Text
previousEarthObservationJobArn :: Maybe Text
$sel:previousEarthObservationJobArn:InputConfigInput' :: InputConfigInput -> Maybe Text
previousEarthObservationJobArn} -> Maybe Text
previousEarthObservationJobArn) (\s :: InputConfigInput
s@InputConfigInput' {} Maybe Text
a -> InputConfigInput
s {$sel:previousEarthObservationJobArn:InputConfigInput' :: Maybe Text
previousEarthObservationJobArn = Maybe Text
a} :: InputConfigInput)

inputConfigInput_rasterDataCollectionQuery :: Lens.Lens' InputConfigInput (Prelude.Maybe RasterDataCollectionQueryInput)
inputConfigInput_rasterDataCollectionQuery :: Lens' InputConfigInput (Maybe RasterDataCollectionQueryInput)
inputConfigInput_rasterDataCollectionQuery = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputConfigInput' {Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery :: Maybe RasterDataCollectionQueryInput
$sel:rasterDataCollectionQuery:InputConfigInput' :: InputConfigInput -> Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery} -> Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery) (\s :: InputConfigInput
s@InputConfigInput' {} Maybe RasterDataCollectionQueryInput
a -> InputConfigInput
s {$sel:rasterDataCollectionQuery:InputConfigInput' :: Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery = Maybe RasterDataCollectionQueryInput
a} :: InputConfigInput)

instance Prelude.Hashable InputConfigInput where
  hashWithSalt :: Int -> InputConfigInput -> Int
hashWithSalt Int
_salt InputConfigInput' {Maybe Text
Maybe EojDataSourceConfigInput
Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery :: Maybe RasterDataCollectionQueryInput
previousEarthObservationJobArn :: Maybe Text
dataSourceConfig :: Maybe EojDataSourceConfigInput
$sel:rasterDataCollectionQuery:InputConfigInput' :: InputConfigInput -> Maybe RasterDataCollectionQueryInput
$sel:previousEarthObservationJobArn:InputConfigInput' :: InputConfigInput -> Maybe Text
$sel:dataSourceConfig:InputConfigInput' :: InputConfigInput -> Maybe EojDataSourceConfigInput
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EojDataSourceConfigInput
dataSourceConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
previousEarthObservationJobArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery

instance Prelude.NFData InputConfigInput where
  rnf :: InputConfigInput -> ()
rnf InputConfigInput' {Maybe Text
Maybe EojDataSourceConfigInput
Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery :: Maybe RasterDataCollectionQueryInput
previousEarthObservationJobArn :: Maybe Text
dataSourceConfig :: Maybe EojDataSourceConfigInput
$sel:rasterDataCollectionQuery:InputConfigInput' :: InputConfigInput -> Maybe RasterDataCollectionQueryInput
$sel:previousEarthObservationJobArn:InputConfigInput' :: InputConfigInput -> Maybe Text
$sel:dataSourceConfig:InputConfigInput' :: InputConfigInput -> Maybe EojDataSourceConfigInput
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe EojDataSourceConfigInput
dataSourceConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
previousEarthObservationJobArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery

instance Data.ToJSON InputConfigInput where
  toJSON :: InputConfigInput -> Value
toJSON InputConfigInput' {Maybe Text
Maybe EojDataSourceConfigInput
Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery :: Maybe RasterDataCollectionQueryInput
previousEarthObservationJobArn :: Maybe Text
dataSourceConfig :: Maybe EojDataSourceConfigInput
$sel:rasterDataCollectionQuery:InputConfigInput' :: InputConfigInput -> Maybe RasterDataCollectionQueryInput
$sel:previousEarthObservationJobArn:InputConfigInput' :: InputConfigInput -> Maybe Text
$sel:dataSourceConfig:InputConfigInput' :: InputConfigInput -> Maybe EojDataSourceConfigInput
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"DataSourceConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EojDataSourceConfigInput
dataSourceConfig,
            (Key
"PreviousEarthObservationJobArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
previousEarthObservationJobArn,
            (Key
"RasterDataCollectionQuery" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RasterDataCollectionQueryInput
rasterDataCollectionQuery
          ]
      )