{-# 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.CustomerProfiles.Types.ExportingLocation
-- 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.CustomerProfiles.Types.ExportingLocation where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.CustomerProfiles.Types.S3ExportingLocation
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | The S3 location where Identity Resolution Jobs write result files.
--
-- /See:/ 'newExportingLocation' smart constructor.
data ExportingLocation = ExportingLocation'
  { -- | Information about the S3 location where Identity Resolution Jobs write
    -- result files.
    ExportingLocation -> Maybe S3ExportingLocation
s3Exporting :: Prelude.Maybe S3ExportingLocation
  }
  deriving (ExportingLocation -> ExportingLocation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportingLocation -> ExportingLocation -> Bool
$c/= :: ExportingLocation -> ExportingLocation -> Bool
== :: ExportingLocation -> ExportingLocation -> Bool
$c== :: ExportingLocation -> ExportingLocation -> Bool
Prelude.Eq, ReadPrec [ExportingLocation]
ReadPrec ExportingLocation
Int -> ReadS ExportingLocation
ReadS [ExportingLocation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportingLocation]
$creadListPrec :: ReadPrec [ExportingLocation]
readPrec :: ReadPrec ExportingLocation
$creadPrec :: ReadPrec ExportingLocation
readList :: ReadS [ExportingLocation]
$creadList :: ReadS [ExportingLocation]
readsPrec :: Int -> ReadS ExportingLocation
$creadsPrec :: Int -> ReadS ExportingLocation
Prelude.Read, Int -> ExportingLocation -> ShowS
[ExportingLocation] -> ShowS
ExportingLocation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportingLocation] -> ShowS
$cshowList :: [ExportingLocation] -> ShowS
show :: ExportingLocation -> String
$cshow :: ExportingLocation -> String
showsPrec :: Int -> ExportingLocation -> ShowS
$cshowsPrec :: Int -> ExportingLocation -> ShowS
Prelude.Show, forall x. Rep ExportingLocation x -> ExportingLocation
forall x. ExportingLocation -> Rep ExportingLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExportingLocation x -> ExportingLocation
$cfrom :: forall x. ExportingLocation -> Rep ExportingLocation x
Prelude.Generic)

-- |
-- Create a value of 'ExportingLocation' 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:
--
-- 's3Exporting', 'exportingLocation_s3Exporting' - Information about the S3 location where Identity Resolution Jobs write
-- result files.
newExportingLocation ::
  ExportingLocation
newExportingLocation :: ExportingLocation
newExportingLocation =
  ExportingLocation' {$sel:s3Exporting:ExportingLocation' :: Maybe S3ExportingLocation
s3Exporting = forall a. Maybe a
Prelude.Nothing}

-- | Information about the S3 location where Identity Resolution Jobs write
-- result files.
exportingLocation_s3Exporting :: Lens.Lens' ExportingLocation (Prelude.Maybe S3ExportingLocation)
exportingLocation_s3Exporting :: Lens' ExportingLocation (Maybe S3ExportingLocation)
exportingLocation_s3Exporting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportingLocation' {Maybe S3ExportingLocation
s3Exporting :: Maybe S3ExportingLocation
$sel:s3Exporting:ExportingLocation' :: ExportingLocation -> Maybe S3ExportingLocation
s3Exporting} -> Maybe S3ExportingLocation
s3Exporting) (\s :: ExportingLocation
s@ExportingLocation' {} Maybe S3ExportingLocation
a -> ExportingLocation
s {$sel:s3Exporting:ExportingLocation' :: Maybe S3ExportingLocation
s3Exporting = Maybe S3ExportingLocation
a} :: ExportingLocation)

instance Data.FromJSON ExportingLocation where
  parseJSON :: Value -> Parser ExportingLocation
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ExportingLocation"
      ( \Object
x ->
          Maybe S3ExportingLocation -> ExportingLocation
ExportingLocation'
            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
"S3Exporting")
      )

instance Prelude.Hashable ExportingLocation where
  hashWithSalt :: Int -> ExportingLocation -> Int
hashWithSalt Int
_salt ExportingLocation' {Maybe S3ExportingLocation
s3Exporting :: Maybe S3ExportingLocation
$sel:s3Exporting:ExportingLocation' :: ExportingLocation -> Maybe S3ExportingLocation
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3ExportingLocation
s3Exporting

instance Prelude.NFData ExportingLocation where
  rnf :: ExportingLocation -> ()
rnf ExportingLocation' {Maybe S3ExportingLocation
s3Exporting :: Maybe S3ExportingLocation
$sel:s3Exporting:ExportingLocation' :: ExportingLocation -> Maybe S3ExportingLocation
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe S3ExportingLocation
s3Exporting