{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates and starts a new SPICE ingestion on a dataset
--
-- 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_requestId,
    createIngestionResponse_arn,
    createIngestionResponse_ingestionId,
    createIngestionResponse_ingestionStatus,
    createIngestionResponse_status,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(CreateIngestion -> CreateIngestion -> Bool)
-> (CreateIngestion -> CreateIngestion -> Bool)
-> Eq CreateIngestion
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]
(Int -> ReadS CreateIngestion)
-> ReadS [CreateIngestion]
-> ReadPrec CreateIngestion
-> ReadPrec [CreateIngestion]
-> Read 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
(Int -> CreateIngestion -> ShowS)
-> (CreateIngestion -> String)
-> ([CreateIngestion] -> ShowS)
-> Show CreateIngestion
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. CreateIngestion -> Rep CreateIngestion x)
-> (forall x. Rep CreateIngestion x -> CreateIngestion)
-> Generic CreateIngestion
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' :: Maybe IngestionType -> Text -> Text -> Text -> CreateIngestion
CreateIngestion'
      { $sel:ingestionType:CreateIngestion' :: Maybe IngestionType
ingestionType = Maybe 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 :: (Maybe IngestionType -> f (Maybe IngestionType))
-> CreateIngestion -> f CreateIngestion
createIngestion_ingestionType = (CreateIngestion -> Maybe IngestionType)
-> (CreateIngestion -> Maybe IngestionType -> CreateIngestion)
-> Lens
     CreateIngestion
     CreateIngestion
     (Maybe IngestionType)
     (Maybe 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 :: (Text -> f Text) -> CreateIngestion -> f CreateIngestion
createIngestion_dataSetId = (CreateIngestion -> Text)
-> (CreateIngestion -> Text -> CreateIngestion)
-> Lens CreateIngestion CreateIngestion Text Text
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 :: (Text -> f Text) -> CreateIngestion -> f CreateIngestion
createIngestion_ingestionId = (CreateIngestion -> Text)
-> (CreateIngestion -> Text -> CreateIngestion)
-> Lens CreateIngestion CreateIngestion Text Text
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 :: (Text -> f Text) -> CreateIngestion -> f CreateIngestion
createIngestion_awsAccountId = (CreateIngestion -> Text)
-> (CreateIngestion -> Text -> CreateIngestion)
-> Lens CreateIngestion CreateIngestion Text Text
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 :: CreateIngestion -> Request CreateIngestion
request = Service -> CreateIngestion -> Request CreateIngestion
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateIngestion
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateIngestion)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateIngestion))
-> Logger
-> Service
-> Proxy CreateIngestion
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateIngestion)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe IngestionStatus
-> Int
-> CreateIngestionResponse
CreateIngestionResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe IngestionStatus
 -> Int
 -> CreateIngestionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe IngestionStatus
      -> Int
      -> CreateIngestionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RequestId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe IngestionStatus
   -> Int
   -> CreateIngestionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe IngestionStatus -> Int -> CreateIngestionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Arn")
            Either
  String
  (Maybe Text
   -> Maybe IngestionStatus -> Int -> CreateIngestionResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe IngestionStatus -> Int -> CreateIngestionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IngestionId")
            Either
  String (Maybe IngestionStatus -> Int -> CreateIngestionResponse)
-> Either String (Maybe IngestionStatus)
-> Either String (Int -> CreateIngestionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe IngestionStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IngestionStatus")
            Either String (Int -> CreateIngestionResponse)
-> Either String Int -> Either String CreateIngestionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateIngestion

instance Prelude.NFData CreateIngestion

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

instance Core.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
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"IngestionType" Text -> IngestionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (IngestionType -> Pair) -> Maybe IngestionType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IngestionType
ingestionType
          ]
      )

instance Core.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
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
        ByteString
"/data-sets/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
dataSetId,
        ByteString
"/ingestions/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
ingestionId
      ]

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

-- | /See:/ 'newCreateIngestionResponse' smart constructor.
data CreateIngestionResponse = CreateIngestionResponse'
  { -- | The Amazon Web Services request ID for this operation.
    CreateIngestionResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | 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 HTTP status of the request.
    CreateIngestionResponse -> Int
status :: Prelude.Int
  }
  deriving (CreateIngestionResponse -> CreateIngestionResponse -> Bool
(CreateIngestionResponse -> CreateIngestionResponse -> Bool)
-> (CreateIngestionResponse -> CreateIngestionResponse -> Bool)
-> Eq CreateIngestionResponse
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]
(Int -> ReadS CreateIngestionResponse)
-> ReadS [CreateIngestionResponse]
-> ReadPrec CreateIngestionResponse
-> ReadPrec [CreateIngestionResponse]
-> Read 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
(Int -> CreateIngestionResponse -> ShowS)
-> (CreateIngestionResponse -> String)
-> ([CreateIngestionResponse] -> ShowS)
-> Show CreateIngestionResponse
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.
 CreateIngestionResponse -> Rep CreateIngestionResponse x)
-> (forall x.
    Rep CreateIngestionResponse x -> CreateIngestionResponse)
-> Generic CreateIngestionResponse
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:
--
-- 'requestId', 'createIngestionResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- '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.
--
-- 'status', 'createIngestionResponse_status' - The HTTP status of the request.
newCreateIngestionResponse ::
  -- | 'status'
  Prelude.Int ->
  CreateIngestionResponse
newCreateIngestionResponse :: Int -> CreateIngestionResponse
newCreateIngestionResponse Int
pStatus_ =
  CreateIngestionResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe IngestionStatus
-> Int
-> CreateIngestionResponse
CreateIngestionResponse'
    { $sel:requestId:CreateIngestionResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CreateIngestionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ingestionId:CreateIngestionResponse' :: Maybe Text
ingestionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ingestionStatus:CreateIngestionResponse' :: Maybe IngestionStatus
ingestionStatus = Maybe IngestionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:status:CreateIngestionResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon Web Services request ID for this operation.
createIngestionResponse_requestId :: Lens.Lens' CreateIngestionResponse (Prelude.Maybe Prelude.Text)
createIngestionResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> CreateIngestionResponse -> f CreateIngestionResponse
createIngestionResponse_requestId = (CreateIngestionResponse -> Maybe Text)
-> (CreateIngestionResponse
    -> Maybe Text -> CreateIngestionResponse)
-> Lens
     CreateIngestionResponse
     CreateIngestionResponse
     (Maybe Text)
     (Maybe Text)
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 Amazon Resource Name (ARN) for the data ingestion.
createIngestionResponse_arn :: Lens.Lens' CreateIngestionResponse (Prelude.Maybe Prelude.Text)
createIngestionResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateIngestionResponse -> f CreateIngestionResponse
createIngestionResponse_arn = (CreateIngestionResponse -> Maybe Text)
-> (CreateIngestionResponse
    -> Maybe Text -> CreateIngestionResponse)
-> Lens
     CreateIngestionResponse
     CreateIngestionResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> CreateIngestionResponse -> f CreateIngestionResponse
createIngestionResponse_ingestionId = (CreateIngestionResponse -> Maybe Text)
-> (CreateIngestionResponse
    -> Maybe Text -> CreateIngestionResponse)
-> Lens
     CreateIngestionResponse
     CreateIngestionResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe IngestionStatus -> f (Maybe IngestionStatus))
-> CreateIngestionResponse -> f CreateIngestionResponse
createIngestionResponse_ingestionStatus = (CreateIngestionResponse -> Maybe IngestionStatus)
-> (CreateIngestionResponse
    -> Maybe IngestionStatus -> CreateIngestionResponse)
-> Lens
     CreateIngestionResponse
     CreateIngestionResponse
     (Maybe IngestionStatus)
     (Maybe 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 HTTP status of the request.
createIngestionResponse_status :: Lens.Lens' CreateIngestionResponse Prelude.Int
createIngestionResponse_status :: (Int -> f Int)
-> CreateIngestionResponse -> f CreateIngestionResponse
createIngestionResponse_status = (CreateIngestionResponse -> Int)
-> (CreateIngestionResponse -> Int -> CreateIngestionResponse)
-> Lens CreateIngestionResponse CreateIngestionResponse Int Int
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