{-# 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.Omics.Types.AnnotationImportItemSource
-- 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.Omics.Types.AnnotationImportItemSource 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

-- | A source for an annotation import job.
--
-- /See:/ 'newAnnotationImportItemSource' smart constructor.
data AnnotationImportItemSource = AnnotationImportItemSource'
  { -- | The source file\'s location in Amazon S3.
    AnnotationImportItemSource -> Text
source :: Prelude.Text
  }
  deriving (AnnotationImportItemSource -> AnnotationImportItemSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnnotationImportItemSource -> AnnotationImportItemSource -> Bool
$c/= :: AnnotationImportItemSource -> AnnotationImportItemSource -> Bool
== :: AnnotationImportItemSource -> AnnotationImportItemSource -> Bool
$c== :: AnnotationImportItemSource -> AnnotationImportItemSource -> Bool
Prelude.Eq, ReadPrec [AnnotationImportItemSource]
ReadPrec AnnotationImportItemSource
Int -> ReadS AnnotationImportItemSource
ReadS [AnnotationImportItemSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnnotationImportItemSource]
$creadListPrec :: ReadPrec [AnnotationImportItemSource]
readPrec :: ReadPrec AnnotationImportItemSource
$creadPrec :: ReadPrec AnnotationImportItemSource
readList :: ReadS [AnnotationImportItemSource]
$creadList :: ReadS [AnnotationImportItemSource]
readsPrec :: Int -> ReadS AnnotationImportItemSource
$creadsPrec :: Int -> ReadS AnnotationImportItemSource
Prelude.Read, Int -> AnnotationImportItemSource -> ShowS
[AnnotationImportItemSource] -> ShowS
AnnotationImportItemSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnnotationImportItemSource] -> ShowS
$cshowList :: [AnnotationImportItemSource] -> ShowS
show :: AnnotationImportItemSource -> String
$cshow :: AnnotationImportItemSource -> String
showsPrec :: Int -> AnnotationImportItemSource -> ShowS
$cshowsPrec :: Int -> AnnotationImportItemSource -> ShowS
Prelude.Show, forall x.
Rep AnnotationImportItemSource x -> AnnotationImportItemSource
forall x.
AnnotationImportItemSource -> Rep AnnotationImportItemSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AnnotationImportItemSource x -> AnnotationImportItemSource
$cfrom :: forall x.
AnnotationImportItemSource -> Rep AnnotationImportItemSource x
Prelude.Generic)

-- |
-- Create a value of 'AnnotationImportItemSource' 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:
--
-- 'source', 'annotationImportItemSource_source' - The source file\'s location in Amazon S3.
newAnnotationImportItemSource ::
  -- | 'source'
  Prelude.Text ->
  AnnotationImportItemSource
newAnnotationImportItemSource :: Text -> AnnotationImportItemSource
newAnnotationImportItemSource Text
pSource_ =
  AnnotationImportItemSource' {$sel:source:AnnotationImportItemSource' :: Text
source = Text
pSource_}

-- | The source file\'s location in Amazon S3.
annotationImportItemSource_source :: Lens.Lens' AnnotationImportItemSource Prelude.Text
annotationImportItemSource_source :: Lens' AnnotationImportItemSource Text
annotationImportItemSource_source = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnnotationImportItemSource' {Text
source :: Text
$sel:source:AnnotationImportItemSource' :: AnnotationImportItemSource -> Text
source} -> Text
source) (\s :: AnnotationImportItemSource
s@AnnotationImportItemSource' {} Text
a -> AnnotationImportItemSource
s {$sel:source:AnnotationImportItemSource' :: Text
source = Text
a} :: AnnotationImportItemSource)

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

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

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