{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.QuickSight.CreateIngestion
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates and starts a new SPICE ingestion for a dataset. You can manually
-- refresh datasets in an Enterprise edition account 32 times in a 24-hour
-- period. You can manually refresh datasets in a Standard edition account
-- 8 times in a 24-hour period. Each 24-hour period is measured starting 24
-- hours before the current date and time.
--
-- Any ingestions operating on tagged datasets inherit the same tags
-- automatically for use in access control. For an example, see
-- <http://aws.amazon.com/premiumsupport/knowledge-center/iam-ec2-resource-tags/ How do I create an IAM policy to control access to Amazon EC2 resources using tags?>
-- in the Amazon Web Services Knowledge Center. Tags are visible on the
-- tagged dataset, but not on the ingestion resource.
module Amazonka.QuickSight.CreateIngestion
  ( -- * Creating a Request
    CreateIngestion (..),
    newCreateIngestion,

    -- * Request Lenses
    createIngestion_ingestionType,
    createIngestion_dataSetId,
    createIngestion_ingestionId,
    createIngestion_awsAccountId,

    -- * Destructuring the Response
    CreateIngestionResponse (..),
    newCreateIngestionResponse,

    -- * Response Lenses
    createIngestionResponse_arn,
    createIngestionResponse_ingestionId,
    createIngestionResponse_ingestionStatus,
    createIngestionResponse_requestId,
    createIngestionResponse_status,
  )
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.QuickSight.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateIngestion' smart constructor.
data CreateIngestion = CreateIngestion'
  { -- | The type of ingestion that you want to create.
    CreateIngestion -> Maybe IngestionType
ingestionType :: Prelude.Maybe IngestionType,
    -- | The ID of the dataset used in the ingestion.
    CreateIngestion -> Text
dataSetId :: Prelude.Text,
    -- | An ID for the ingestion.
    CreateIngestion -> Text
ingestionId :: Prelude.Text,
    -- | The Amazon Web Services account ID.
    CreateIngestion -> Text
awsAccountId :: Prelude.Text
  }
  deriving (CreateIngestion -> CreateIngestion -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIngestion -> CreateIngestion -> Bool
$c/= :: CreateIngestion -> CreateIngestion -> Bool
== :: CreateIngestion -> CreateIngestion -> Bool
$c== :: CreateIngestion -> CreateIngestion -> Bool
Prelude.Eq, ReadPrec [CreateIngestion]
ReadPrec CreateIngestion
Int -> ReadS CreateIngestion
ReadS [CreateIngestion]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIngestion]
$creadListPrec :: ReadPrec [CreateIngestion]
readPrec :: ReadPrec CreateIngestion
$creadPrec :: ReadPrec CreateIngestion
readList :: ReadS [CreateIngestion]
$creadList :: ReadS [CreateIngestion]
readsPrec :: Int -> ReadS CreateIngestion
$creadsPrec :: Int -> ReadS CreateIngestion
Prelude.Read, Int -> CreateIngestion -> ShowS
[CreateIngestion] -> ShowS
CreateIngestion -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIngestion] -> ShowS
$cshowList :: [CreateIngestion] -> ShowS
show :: CreateIngestion -> String
$cshow :: CreateIngestion -> String
showsPrec :: Int -> CreateIngestion -> ShowS
$cshowsPrec :: Int -> CreateIngestion -> ShowS
Prelude.Show, forall x. Rep CreateIngestion x -> CreateIngestion
forall x. CreateIngestion -> Rep CreateIngestion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateIngestion x -> CreateIngestion
$cfrom :: forall x. CreateIngestion -> Rep CreateIngestion x
Prelude.Generic)

-- |
-- Create a value of 'CreateIngestion' 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:
--
-- 'ingestionType', 'createIngestion_ingestionType' - The type of ingestion that you want to create.
--
-- 'dataSetId', 'createIngestion_dataSetId' - The ID of the dataset used in the ingestion.
--
-- 'ingestionId', 'createIngestion_ingestionId' - An ID for the ingestion.
--
-- 'awsAccountId', 'createIngestion_awsAccountId' - The Amazon Web Services account ID.
newCreateIngestion ::
  -- | 'dataSetId'
  Prelude.Text ->
  -- | 'ingestionId'
  Prelude.Text ->
  -- | 'awsAccountId'
  Prelude.Text ->
  CreateIngestion
newCreateIngestion :: Text -> Text -> Text -> CreateIngestion
newCreateIngestion
  Text
pDataSetId_
  Text
pIngestionId_
  Text
pAwsAccountId_ =
    CreateIngestion'
      { $sel:ingestionType:CreateIngestion' :: Maybe IngestionType
ingestionType = forall a. Maybe a
Prelude.Nothing,
        $sel:dataSetId:CreateIngestion' :: Text
dataSetId = Text
pDataSetId_,
        $sel:ingestionId:CreateIngestion' :: Text
ingestionId = Text
pIngestionId_,
        $sel:awsAccountId:CreateIngestion' :: Text
awsAccountId = Text
pAwsAccountId_
      }

-- | The type of ingestion that you want to create.
createIngestion_ingestionType :: Lens.Lens' CreateIngestion (Prelude.Maybe IngestionType)
createIngestion_ingestionType :: Lens' CreateIngestion (Maybe IngestionType)
createIngestion_ingestionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIngestion' {Maybe IngestionType
ingestionType :: Maybe IngestionType
$sel:ingestionType:CreateIngestion' :: CreateIngestion -> Maybe IngestionType
ingestionType} -> Maybe IngestionType
ingestionType) (\s :: CreateIngestion
s@CreateIngestion' {} Maybe IngestionType
a -> CreateIngestion
s {$sel:ingestionType:CreateIngestion' :: Maybe IngestionType
ingestionType = Maybe IngestionType
a} :: CreateIngestion)

-- | The ID of the dataset used in the ingestion.
createIngestion_dataSetId :: Lens.Lens' CreateIngestion Prelude.Text
createIngestion_dataSetId :: Lens' CreateIngestion Text
createIngestion_dataSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIngestion' {Text
dataSetId :: Text
$sel:dataSetId:CreateIngestion' :: CreateIngestion -> Text
dataSetId} -> Text
dataSetId) (\s :: CreateIngestion
s@CreateIngestion' {} Text
a -> CreateIngestion
s {$sel:dataSetId:CreateIngestion' :: Text
dataSetId = Text
a} :: CreateIngestion)

-- | An ID for the ingestion.
createIngestion_ingestionId :: Lens.Lens' CreateIngestion Prelude.Text
createIngestion_ingestionId :: Lens' CreateIngestion Text
createIngestion_ingestionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIngestion' {Text
ingestionId :: Text
$sel:ingestionId:CreateIngestion' :: CreateIngestion -> Text
ingestionId} -> Text
ingestionId) (\s :: CreateIngestion
s@CreateIngestion' {} Text
a -> CreateIngestion
s {$sel:ingestionId:CreateIngestion' :: Text
ingestionId = Text
a} :: CreateIngestion)

-- | The Amazon Web Services account ID.
createIngestion_awsAccountId :: Lens.Lens' CreateIngestion Prelude.Text
createIngestion_awsAccountId :: Lens' CreateIngestion Text
createIngestion_awsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIngestion' {Text
awsAccountId :: Text
$sel:awsAccountId:CreateIngestion' :: CreateIngestion -> Text
awsAccountId} -> Text
awsAccountId) (\s :: CreateIngestion
s@CreateIngestion' {} Text
a -> CreateIngestion
s {$sel:awsAccountId:CreateIngestion' :: Text
awsAccountId = Text
a} :: CreateIngestion)

instance Core.AWSRequest CreateIngestion where
  type
    AWSResponse CreateIngestion =
      CreateIngestionResponse
  request :: (Service -> Service) -> CreateIngestion -> Request CreateIngestion
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateIngestion
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateIngestion)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe IngestionStatus
-> Maybe Text
-> Int
-> CreateIngestionResponse
CreateIngestionResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"IngestionId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"IngestionStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RequestId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateIngestion where
  hashWithSalt :: Int -> CreateIngestion -> Int
hashWithSalt Int
_salt CreateIngestion' {Maybe IngestionType
Text
awsAccountId :: Text
ingestionId :: Text
dataSetId :: Text
ingestionType :: Maybe IngestionType
$sel:awsAccountId:CreateIngestion' :: CreateIngestion -> Text
$sel:ingestionId:CreateIngestion' :: CreateIngestion -> Text
$sel:dataSetId:CreateIngestion' :: CreateIngestion -> Text
$sel:ingestionType:CreateIngestion' :: CreateIngestion -> Maybe IngestionType
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IngestionType
ingestionType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataSetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ingestionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
awsAccountId

instance Prelude.NFData CreateIngestion where
  rnf :: CreateIngestion -> ()
rnf CreateIngestion' {Maybe IngestionType
Text
awsAccountId :: Text
ingestionId :: Text
dataSetId :: Text
ingestionType :: Maybe IngestionType
$sel:awsAccountId:CreateIngestion' :: CreateIngestion -> Text
$sel:ingestionId:CreateIngestion' :: CreateIngestion -> Text
$sel:dataSetId:CreateIngestion' :: CreateIngestion -> Text
$sel:ingestionType:CreateIngestion' :: CreateIngestion -> Maybe IngestionType
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe IngestionType
ingestionType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dataSetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
ingestionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
awsAccountId

instance Data.ToHeaders CreateIngestion where
  toHeaders :: CreateIngestion -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateIngestion where
  toJSON :: CreateIngestion -> Value
toJSON CreateIngestion' {Maybe IngestionType
Text
awsAccountId :: Text
ingestionId :: Text
dataSetId :: Text
ingestionType :: Maybe IngestionType
$sel:awsAccountId:CreateIngestion' :: CreateIngestion -> Text
$sel:ingestionId:CreateIngestion' :: CreateIngestion -> Text
$sel:dataSetId:CreateIngestion' :: CreateIngestion -> Text
$sel:ingestionType:CreateIngestion' :: CreateIngestion -> Maybe IngestionType
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"IngestionType" 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 IngestionType
ingestionType
          ]
      )

instance Data.ToPath CreateIngestion where
  toPath :: CreateIngestion -> ByteString
toPath CreateIngestion' {Maybe IngestionType
Text
awsAccountId :: Text
ingestionId :: Text
dataSetId :: Text
ingestionType :: Maybe IngestionType
$sel:awsAccountId:CreateIngestion' :: CreateIngestion -> Text
$sel:ingestionId:CreateIngestion' :: CreateIngestion -> Text
$sel:dataSetId:CreateIngestion' :: CreateIngestion -> Text
$sel:ingestionType:CreateIngestion' :: CreateIngestion -> Maybe IngestionType
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
awsAccountId,
        ByteString
"/data-sets/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
dataSetId,
        ByteString
"/ingestions/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
ingestionId
      ]

instance Data.ToQuery CreateIngestion where
  toQuery :: CreateIngestion -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateIngestionResponse' smart constructor.
data CreateIngestionResponse = CreateIngestionResponse'
  { -- | The Amazon Resource Name (ARN) for the data ingestion.
    CreateIngestionResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | An ID for the ingestion.
    CreateIngestionResponse -> Maybe Text
ingestionId :: Prelude.Maybe Prelude.Text,
    -- | The ingestion status.
    CreateIngestionResponse -> Maybe IngestionStatus
ingestionStatus :: Prelude.Maybe IngestionStatus,
    -- | The Amazon Web Services request ID for this operation.
    CreateIngestionResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The HTTP status of the request.
    CreateIngestionResponse -> Int
status :: Prelude.Int
  }
  deriving (CreateIngestionResponse -> CreateIngestionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIngestionResponse -> CreateIngestionResponse -> Bool
$c/= :: CreateIngestionResponse -> CreateIngestionResponse -> Bool
== :: CreateIngestionResponse -> CreateIngestionResponse -> Bool
$c== :: CreateIngestionResponse -> CreateIngestionResponse -> Bool
Prelude.Eq, ReadPrec [CreateIngestionResponse]
ReadPrec CreateIngestionResponse
Int -> ReadS CreateIngestionResponse
ReadS [CreateIngestionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIngestionResponse]
$creadListPrec :: ReadPrec [CreateIngestionResponse]
readPrec :: ReadPrec CreateIngestionResponse
$creadPrec :: ReadPrec CreateIngestionResponse
readList :: ReadS [CreateIngestionResponse]
$creadList :: ReadS [CreateIngestionResponse]
readsPrec :: Int -> ReadS CreateIngestionResponse
$creadsPrec :: Int -> ReadS CreateIngestionResponse
Prelude.Read, Int -> CreateIngestionResponse -> ShowS
[CreateIngestionResponse] -> ShowS
CreateIngestionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIngestionResponse] -> ShowS
$cshowList :: [CreateIngestionResponse] -> ShowS
show :: CreateIngestionResponse -> String
$cshow :: CreateIngestionResponse -> String
showsPrec :: Int -> CreateIngestionResponse -> ShowS
$cshowsPrec :: Int -> CreateIngestionResponse -> ShowS
Prelude.Show, forall x. Rep CreateIngestionResponse x -> CreateIngestionResponse
forall x. CreateIngestionResponse -> Rep CreateIngestionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateIngestionResponse x -> CreateIngestionResponse
$cfrom :: forall x. CreateIngestionResponse -> Rep CreateIngestionResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateIngestionResponse' 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:
--
-- 'arn', 'createIngestionResponse_arn' - The Amazon Resource Name (ARN) for the data ingestion.
--
-- 'ingestionId', 'createIngestionResponse_ingestionId' - An ID for the ingestion.
--
-- 'ingestionStatus', 'createIngestionResponse_ingestionStatus' - The ingestion status.
--
-- 'requestId', 'createIngestionResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'status', 'createIngestionResponse_status' - The HTTP status of the request.
newCreateIngestionResponse ::
  -- | 'status'
  Prelude.Int ->
  CreateIngestionResponse
newCreateIngestionResponse :: Int -> CreateIngestionResponse
newCreateIngestionResponse Int
pStatus_ =
  CreateIngestionResponse'
    { $sel:arn:CreateIngestionResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:ingestionId:CreateIngestionResponse' :: Maybe Text
ingestionId = forall a. Maybe a
Prelude.Nothing,
      $sel:ingestionStatus:CreateIngestionResponse' :: Maybe IngestionStatus
ingestionStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:CreateIngestionResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:status:CreateIngestionResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon Resource Name (ARN) for the data ingestion.
createIngestionResponse_arn :: Lens.Lens' CreateIngestionResponse (Prelude.Maybe Prelude.Text)
createIngestionResponse_arn :: Lens' CreateIngestionResponse (Maybe Text)
createIngestionResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIngestionResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateIngestionResponse' :: CreateIngestionResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateIngestionResponse
s@CreateIngestionResponse' {} Maybe Text
a -> CreateIngestionResponse
s {$sel:arn:CreateIngestionResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateIngestionResponse)

-- | An ID for the ingestion.
createIngestionResponse_ingestionId :: Lens.Lens' CreateIngestionResponse (Prelude.Maybe Prelude.Text)
createIngestionResponse_ingestionId :: Lens' CreateIngestionResponse (Maybe Text)
createIngestionResponse_ingestionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIngestionResponse' {Maybe Text
ingestionId :: Maybe Text
$sel:ingestionId:CreateIngestionResponse' :: CreateIngestionResponse -> Maybe Text
ingestionId} -> Maybe Text
ingestionId) (\s :: CreateIngestionResponse
s@CreateIngestionResponse' {} Maybe Text
a -> CreateIngestionResponse
s {$sel:ingestionId:CreateIngestionResponse' :: Maybe Text
ingestionId = Maybe Text
a} :: CreateIngestionResponse)

-- | The ingestion status.
createIngestionResponse_ingestionStatus :: Lens.Lens' CreateIngestionResponse (Prelude.Maybe IngestionStatus)
createIngestionResponse_ingestionStatus :: Lens' CreateIngestionResponse (Maybe IngestionStatus)
createIngestionResponse_ingestionStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIngestionResponse' {Maybe IngestionStatus
ingestionStatus :: Maybe IngestionStatus
$sel:ingestionStatus:CreateIngestionResponse' :: CreateIngestionResponse -> Maybe IngestionStatus
ingestionStatus} -> Maybe IngestionStatus
ingestionStatus) (\s :: CreateIngestionResponse
s@CreateIngestionResponse' {} Maybe IngestionStatus
a -> CreateIngestionResponse
s {$sel:ingestionStatus:CreateIngestionResponse' :: Maybe IngestionStatus
ingestionStatus = Maybe IngestionStatus
a} :: CreateIngestionResponse)

-- | The Amazon Web Services request ID for this operation.
createIngestionResponse_requestId :: Lens.Lens' CreateIngestionResponse (Prelude.Maybe Prelude.Text)
createIngestionResponse_requestId :: Lens' CreateIngestionResponse (Maybe Text)
createIngestionResponse_requestId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIngestionResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:CreateIngestionResponse' :: CreateIngestionResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: CreateIngestionResponse
s@CreateIngestionResponse' {} Maybe Text
a -> CreateIngestionResponse
s {$sel:requestId:CreateIngestionResponse' :: Maybe Text
requestId = Maybe Text
a} :: CreateIngestionResponse)

-- | The HTTP status of the request.
createIngestionResponse_status :: Lens.Lens' CreateIngestionResponse Prelude.Int
createIngestionResponse_status :: Lens' CreateIngestionResponse Int
createIngestionResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIngestionResponse' {Int
status :: Int
$sel:status:CreateIngestionResponse' :: CreateIngestionResponse -> Int
status} -> Int
status) (\s :: CreateIngestionResponse
s@CreateIngestionResponse' {} Int
a -> CreateIngestionResponse
s {$sel:status:CreateIngestionResponse' :: Int
status = Int
a} :: CreateIngestionResponse)

instance Prelude.NFData CreateIngestionResponse where
  rnf :: CreateIngestionResponse -> ()
rnf CreateIngestionResponse' {Int
Maybe Text
Maybe IngestionStatus
status :: Int
requestId :: Maybe Text
ingestionStatus :: Maybe IngestionStatus
ingestionId :: Maybe Text
arn :: Maybe Text
$sel:status:CreateIngestionResponse' :: CreateIngestionResponse -> Int
$sel:requestId:CreateIngestionResponse' :: CreateIngestionResponse -> Maybe Text
$sel:ingestionStatus:CreateIngestionResponse' :: CreateIngestionResponse -> Maybe IngestionStatus
$sel:ingestionId:CreateIngestionResponse' :: CreateIngestionResponse -> Maybe Text
$sel:arn:CreateIngestionResponse' :: CreateIngestionResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ingestionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IngestionStatus
ingestionStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requestId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
status