{-# 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.Glue.Types.ImportLabelsTaskRunProperties
-- 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.Glue.Types.ImportLabelsTaskRunProperties 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

-- | Specifies configuration properties for an importing labels task run.
--
-- /See:/ 'newImportLabelsTaskRunProperties' smart constructor.
data ImportLabelsTaskRunProperties = ImportLabelsTaskRunProperties'
  { -- | The Amazon Simple Storage Service (Amazon S3) path from where you will
    -- import the labels.
    ImportLabelsTaskRunProperties -> Maybe Text
inputS3Path :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether to overwrite your existing labels.
    ImportLabelsTaskRunProperties -> Maybe Bool
replace :: Prelude.Maybe Prelude.Bool
  }
  deriving (ImportLabelsTaskRunProperties
-> ImportLabelsTaskRunProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportLabelsTaskRunProperties
-> ImportLabelsTaskRunProperties -> Bool
$c/= :: ImportLabelsTaskRunProperties
-> ImportLabelsTaskRunProperties -> Bool
== :: ImportLabelsTaskRunProperties
-> ImportLabelsTaskRunProperties -> Bool
$c== :: ImportLabelsTaskRunProperties
-> ImportLabelsTaskRunProperties -> Bool
Prelude.Eq, ReadPrec [ImportLabelsTaskRunProperties]
ReadPrec ImportLabelsTaskRunProperties
Int -> ReadS ImportLabelsTaskRunProperties
ReadS [ImportLabelsTaskRunProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportLabelsTaskRunProperties]
$creadListPrec :: ReadPrec [ImportLabelsTaskRunProperties]
readPrec :: ReadPrec ImportLabelsTaskRunProperties
$creadPrec :: ReadPrec ImportLabelsTaskRunProperties
readList :: ReadS [ImportLabelsTaskRunProperties]
$creadList :: ReadS [ImportLabelsTaskRunProperties]
readsPrec :: Int -> ReadS ImportLabelsTaskRunProperties
$creadsPrec :: Int -> ReadS ImportLabelsTaskRunProperties
Prelude.Read, Int -> ImportLabelsTaskRunProperties -> ShowS
[ImportLabelsTaskRunProperties] -> ShowS
ImportLabelsTaskRunProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportLabelsTaskRunProperties] -> ShowS
$cshowList :: [ImportLabelsTaskRunProperties] -> ShowS
show :: ImportLabelsTaskRunProperties -> String
$cshow :: ImportLabelsTaskRunProperties -> String
showsPrec :: Int -> ImportLabelsTaskRunProperties -> ShowS
$cshowsPrec :: Int -> ImportLabelsTaskRunProperties -> ShowS
Prelude.Show, forall x.
Rep ImportLabelsTaskRunProperties x
-> ImportLabelsTaskRunProperties
forall x.
ImportLabelsTaskRunProperties
-> Rep ImportLabelsTaskRunProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ImportLabelsTaskRunProperties x
-> ImportLabelsTaskRunProperties
$cfrom :: forall x.
ImportLabelsTaskRunProperties
-> Rep ImportLabelsTaskRunProperties x
Prelude.Generic)

-- |
-- Create a value of 'ImportLabelsTaskRunProperties' 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:
--
-- 'inputS3Path', 'importLabelsTaskRunProperties_inputS3Path' - The Amazon Simple Storage Service (Amazon S3) path from where you will
-- import the labels.
--
-- 'replace', 'importLabelsTaskRunProperties_replace' - Indicates whether to overwrite your existing labels.
newImportLabelsTaskRunProperties ::
  ImportLabelsTaskRunProperties
newImportLabelsTaskRunProperties :: ImportLabelsTaskRunProperties
newImportLabelsTaskRunProperties =
  ImportLabelsTaskRunProperties'
    { $sel:inputS3Path:ImportLabelsTaskRunProperties' :: Maybe Text
inputS3Path =
        forall a. Maybe a
Prelude.Nothing,
      $sel:replace:ImportLabelsTaskRunProperties' :: Maybe Bool
replace = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Simple Storage Service (Amazon S3) path from where you will
-- import the labels.
importLabelsTaskRunProperties_inputS3Path :: Lens.Lens' ImportLabelsTaskRunProperties (Prelude.Maybe Prelude.Text)
importLabelsTaskRunProperties_inputS3Path :: Lens' ImportLabelsTaskRunProperties (Maybe Text)
importLabelsTaskRunProperties_inputS3Path = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportLabelsTaskRunProperties' {Maybe Text
inputS3Path :: Maybe Text
$sel:inputS3Path:ImportLabelsTaskRunProperties' :: ImportLabelsTaskRunProperties -> Maybe Text
inputS3Path} -> Maybe Text
inputS3Path) (\s :: ImportLabelsTaskRunProperties
s@ImportLabelsTaskRunProperties' {} Maybe Text
a -> ImportLabelsTaskRunProperties
s {$sel:inputS3Path:ImportLabelsTaskRunProperties' :: Maybe Text
inputS3Path = Maybe Text
a} :: ImportLabelsTaskRunProperties)

-- | Indicates whether to overwrite your existing labels.
importLabelsTaskRunProperties_replace :: Lens.Lens' ImportLabelsTaskRunProperties (Prelude.Maybe Prelude.Bool)
importLabelsTaskRunProperties_replace :: Lens' ImportLabelsTaskRunProperties (Maybe Bool)
importLabelsTaskRunProperties_replace = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportLabelsTaskRunProperties' {Maybe Bool
replace :: Maybe Bool
$sel:replace:ImportLabelsTaskRunProperties' :: ImportLabelsTaskRunProperties -> Maybe Bool
replace} -> Maybe Bool
replace) (\s :: ImportLabelsTaskRunProperties
s@ImportLabelsTaskRunProperties' {} Maybe Bool
a -> ImportLabelsTaskRunProperties
s {$sel:replace:ImportLabelsTaskRunProperties' :: Maybe Bool
replace = Maybe Bool
a} :: ImportLabelsTaskRunProperties)

instance Data.FromJSON ImportLabelsTaskRunProperties where
  parseJSON :: Value -> Parser ImportLabelsTaskRunProperties
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ImportLabelsTaskRunProperties"
      ( \Object
x ->
          Maybe Text -> Maybe Bool -> ImportLabelsTaskRunProperties
ImportLabelsTaskRunProperties'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InputS3Path")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Replace")
      )

instance
  Prelude.Hashable
    ImportLabelsTaskRunProperties
  where
  hashWithSalt :: Int -> ImportLabelsTaskRunProperties -> Int
hashWithSalt Int
_salt ImportLabelsTaskRunProperties' {Maybe Bool
Maybe Text
replace :: Maybe Bool
inputS3Path :: Maybe Text
$sel:replace:ImportLabelsTaskRunProperties' :: ImportLabelsTaskRunProperties -> Maybe Bool
$sel:inputS3Path:ImportLabelsTaskRunProperties' :: ImportLabelsTaskRunProperties -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
inputS3Path
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
replace

instance Prelude.NFData ImportLabelsTaskRunProperties where
  rnf :: ImportLabelsTaskRunProperties -> ()
rnf ImportLabelsTaskRunProperties' {Maybe Bool
Maybe Text
replace :: Maybe Bool
inputS3Path :: Maybe Text
$sel:replace:ImportLabelsTaskRunProperties' :: ImportLabelsTaskRunProperties -> Maybe Bool
$sel:inputS3Path:ImportLabelsTaskRunProperties' :: ImportLabelsTaskRunProperties -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
inputS3Path
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
replace