{-# 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.MediaPackage.DescribeHarvestJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets details about an existing HarvestJob.
module Amazonka.MediaPackage.DescribeHarvestJob
  ( -- * Creating a Request
    DescribeHarvestJob (..),
    newDescribeHarvestJob,

    -- * Request Lenses
    describeHarvestJob_id,

    -- * Destructuring the Response
    DescribeHarvestJobResponse (..),
    newDescribeHarvestJobResponse,

    -- * Response Lenses
    describeHarvestJobResponse_arn,
    describeHarvestJobResponse_channelId,
    describeHarvestJobResponse_createdAt,
    describeHarvestJobResponse_endTime,
    describeHarvestJobResponse_id,
    describeHarvestJobResponse_originEndpointId,
    describeHarvestJobResponse_s3Destination,
    describeHarvestJobResponse_startTime,
    describeHarvestJobResponse_status,
    describeHarvestJobResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaPackage.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeHarvestJob' smart constructor.
data DescribeHarvestJob = DescribeHarvestJob'
  { -- | The ID of the HarvestJob.
    DescribeHarvestJob -> Text
id :: Prelude.Text
  }
  deriving (DescribeHarvestJob -> DescribeHarvestJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeHarvestJob -> DescribeHarvestJob -> Bool
$c/= :: DescribeHarvestJob -> DescribeHarvestJob -> Bool
== :: DescribeHarvestJob -> DescribeHarvestJob -> Bool
$c== :: DescribeHarvestJob -> DescribeHarvestJob -> Bool
Prelude.Eq, ReadPrec [DescribeHarvestJob]
ReadPrec DescribeHarvestJob
Int -> ReadS DescribeHarvestJob
ReadS [DescribeHarvestJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeHarvestJob]
$creadListPrec :: ReadPrec [DescribeHarvestJob]
readPrec :: ReadPrec DescribeHarvestJob
$creadPrec :: ReadPrec DescribeHarvestJob
readList :: ReadS [DescribeHarvestJob]
$creadList :: ReadS [DescribeHarvestJob]
readsPrec :: Int -> ReadS DescribeHarvestJob
$creadsPrec :: Int -> ReadS DescribeHarvestJob
Prelude.Read, Int -> DescribeHarvestJob -> ShowS
[DescribeHarvestJob] -> ShowS
DescribeHarvestJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeHarvestJob] -> ShowS
$cshowList :: [DescribeHarvestJob] -> ShowS
show :: DescribeHarvestJob -> String
$cshow :: DescribeHarvestJob -> String
showsPrec :: Int -> DescribeHarvestJob -> ShowS
$cshowsPrec :: Int -> DescribeHarvestJob -> ShowS
Prelude.Show, forall x. Rep DescribeHarvestJob x -> DescribeHarvestJob
forall x. DescribeHarvestJob -> Rep DescribeHarvestJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeHarvestJob x -> DescribeHarvestJob
$cfrom :: forall x. DescribeHarvestJob -> Rep DescribeHarvestJob x
Prelude.Generic)

-- |
-- Create a value of 'DescribeHarvestJob' 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:
--
-- 'id', 'describeHarvestJob_id' - The ID of the HarvestJob.
newDescribeHarvestJob ::
  -- | 'id'
  Prelude.Text ->
  DescribeHarvestJob
newDescribeHarvestJob :: Text -> DescribeHarvestJob
newDescribeHarvestJob Text
pId_ =
  DescribeHarvestJob' {$sel:id:DescribeHarvestJob' :: Text
id = Text
pId_}

-- | The ID of the HarvestJob.
describeHarvestJob_id :: Lens.Lens' DescribeHarvestJob Prelude.Text
describeHarvestJob_id :: Lens' DescribeHarvestJob Text
describeHarvestJob_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJob' {Text
id :: Text
$sel:id:DescribeHarvestJob' :: DescribeHarvestJob -> Text
id} -> Text
id) (\s :: DescribeHarvestJob
s@DescribeHarvestJob' {} Text
a -> DescribeHarvestJob
s {$sel:id:DescribeHarvestJob' :: Text
id = Text
a} :: DescribeHarvestJob)

instance Core.AWSRequest DescribeHarvestJob where
  type
    AWSResponse DescribeHarvestJob =
      DescribeHarvestJobResponse
  request :: (Service -> Service)
-> DescribeHarvestJob -> Request DescribeHarvestJob
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeHarvestJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeHarvestJob)))
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Status
-> Int
-> DescribeHarvestJobResponse
DescribeHarvestJobResponse'
            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
"channelId")
            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
"createdAt")
            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
"endTime")
            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
"id")
            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
"originEndpointId")
            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
"s3Destination")
            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
"startTime")
            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
"status")
            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 DescribeHarvestJob where
  hashWithSalt :: Int -> DescribeHarvestJob -> Int
hashWithSalt Int
_salt DescribeHarvestJob' {Text
id :: Text
$sel:id:DescribeHarvestJob' :: DescribeHarvestJob -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id

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

instance Data.ToHeaders DescribeHarvestJob where
  toHeaders :: DescribeHarvestJob -> 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.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath DescribeHarvestJob where
  toPath :: DescribeHarvestJob -> ByteString
toPath DescribeHarvestJob' {Text
id :: Text
$sel:id:DescribeHarvestJob' :: DescribeHarvestJob -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/harvest_jobs/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
id]

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

-- | /See:/ 'newDescribeHarvestJobResponse' smart constructor.
data DescribeHarvestJobResponse = DescribeHarvestJobResponse'
  { -- | The Amazon Resource Name (ARN) assigned to the HarvestJob.
    DescribeHarvestJobResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Channel that the HarvestJob will harvest from.
    DescribeHarvestJobResponse -> Maybe Text
channelId :: Prelude.Maybe Prelude.Text,
    -- | The time the HarvestJob was submitted
    DescribeHarvestJobResponse -> Maybe Text
createdAt :: Prelude.Maybe Prelude.Text,
    -- | The end of the time-window which will be harvested.
    DescribeHarvestJobResponse -> Maybe Text
endTime :: Prelude.Maybe Prelude.Text,
    -- | The ID of the HarvestJob. The ID must be unique within the region and it
    -- cannot be changed after the HarvestJob is submitted.
    DescribeHarvestJobResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The ID of the OriginEndpoint that the HarvestJob will harvest from. This
    -- cannot be changed after the HarvestJob is submitted.
    DescribeHarvestJobResponse -> Maybe Text
originEndpointId :: Prelude.Maybe Prelude.Text,
    DescribeHarvestJobResponse -> Maybe S3Destination
s3Destination :: Prelude.Maybe S3Destination,
    -- | The start of the time-window which will be harvested.
    DescribeHarvestJobResponse -> Maybe Text
startTime :: Prelude.Maybe Prelude.Text,
    -- | The current status of the HarvestJob. Consider setting up a CloudWatch
    -- Event to listen for HarvestJobs as they succeed or fail. In the event of
    -- failure, the CloudWatch Event will include an explanation of why the
    -- HarvestJob failed.
    DescribeHarvestJobResponse -> Maybe Status
status :: Prelude.Maybe Status,
    -- | The response's http status code.
    DescribeHarvestJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeHarvestJobResponse -> DescribeHarvestJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeHarvestJobResponse -> DescribeHarvestJobResponse -> Bool
$c/= :: DescribeHarvestJobResponse -> DescribeHarvestJobResponse -> Bool
== :: DescribeHarvestJobResponse -> DescribeHarvestJobResponse -> Bool
$c== :: DescribeHarvestJobResponse -> DescribeHarvestJobResponse -> Bool
Prelude.Eq, ReadPrec [DescribeHarvestJobResponse]
ReadPrec DescribeHarvestJobResponse
Int -> ReadS DescribeHarvestJobResponse
ReadS [DescribeHarvestJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeHarvestJobResponse]
$creadListPrec :: ReadPrec [DescribeHarvestJobResponse]
readPrec :: ReadPrec DescribeHarvestJobResponse
$creadPrec :: ReadPrec DescribeHarvestJobResponse
readList :: ReadS [DescribeHarvestJobResponse]
$creadList :: ReadS [DescribeHarvestJobResponse]
readsPrec :: Int -> ReadS DescribeHarvestJobResponse
$creadsPrec :: Int -> ReadS DescribeHarvestJobResponse
Prelude.Read, Int -> DescribeHarvestJobResponse -> ShowS
[DescribeHarvestJobResponse] -> ShowS
DescribeHarvestJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeHarvestJobResponse] -> ShowS
$cshowList :: [DescribeHarvestJobResponse] -> ShowS
show :: DescribeHarvestJobResponse -> String
$cshow :: DescribeHarvestJobResponse -> String
showsPrec :: Int -> DescribeHarvestJobResponse -> ShowS
$cshowsPrec :: Int -> DescribeHarvestJobResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeHarvestJobResponse x -> DescribeHarvestJobResponse
forall x.
DescribeHarvestJobResponse -> Rep DescribeHarvestJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeHarvestJobResponse x -> DescribeHarvestJobResponse
$cfrom :: forall x.
DescribeHarvestJobResponse -> Rep DescribeHarvestJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeHarvestJobResponse' 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', 'describeHarvestJobResponse_arn' - The Amazon Resource Name (ARN) assigned to the HarvestJob.
--
-- 'channelId', 'describeHarvestJobResponse_channelId' - The ID of the Channel that the HarvestJob will harvest from.
--
-- 'createdAt', 'describeHarvestJobResponse_createdAt' - The time the HarvestJob was submitted
--
-- 'endTime', 'describeHarvestJobResponse_endTime' - The end of the time-window which will be harvested.
--
-- 'id', 'describeHarvestJobResponse_id' - The ID of the HarvestJob. The ID must be unique within the region and it
-- cannot be changed after the HarvestJob is submitted.
--
-- 'originEndpointId', 'describeHarvestJobResponse_originEndpointId' - The ID of the OriginEndpoint that the HarvestJob will harvest from. This
-- cannot be changed after the HarvestJob is submitted.
--
-- 's3Destination', 'describeHarvestJobResponse_s3Destination' - Undocumented member.
--
-- 'startTime', 'describeHarvestJobResponse_startTime' - The start of the time-window which will be harvested.
--
-- 'status', 'describeHarvestJobResponse_status' - The current status of the HarvestJob. Consider setting up a CloudWatch
-- Event to listen for HarvestJobs as they succeed or fail. In the event of
-- failure, the CloudWatch Event will include an explanation of why the
-- HarvestJob failed.
--
-- 'httpStatus', 'describeHarvestJobResponse_httpStatus' - The response's http status code.
newDescribeHarvestJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeHarvestJobResponse
newDescribeHarvestJobResponse :: Int -> DescribeHarvestJobResponse
newDescribeHarvestJobResponse Int
pHttpStatus_ =
  DescribeHarvestJobResponse'
    { $sel:arn:DescribeHarvestJobResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:channelId:DescribeHarvestJobResponse' :: Maybe Text
channelId = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:DescribeHarvestJobResponse' :: Maybe Text
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:DescribeHarvestJobResponse' :: Maybe Text
endTime = forall a. Maybe a
Prelude.Nothing,
      $sel:id:DescribeHarvestJobResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:originEndpointId:DescribeHarvestJobResponse' :: Maybe Text
originEndpointId = forall a. Maybe a
Prelude.Nothing,
      $sel:s3Destination:DescribeHarvestJobResponse' :: Maybe S3Destination
s3Destination = forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:DescribeHarvestJobResponse' :: Maybe Text
startTime = forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeHarvestJobResponse' :: Maybe Status
status = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeHarvestJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) assigned to the HarvestJob.
describeHarvestJobResponse_arn :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_arn :: Lens' DescribeHarvestJobResponse (Maybe Text)
describeHarvestJobResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJobResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeHarvestJobResponse
s@DescribeHarvestJobResponse' {} Maybe Text
a -> DescribeHarvestJobResponse
s {$sel:arn:DescribeHarvestJobResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeHarvestJobResponse)

-- | The ID of the Channel that the HarvestJob will harvest from.
describeHarvestJobResponse_channelId :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_channelId :: Lens' DescribeHarvestJobResponse (Maybe Text)
describeHarvestJobResponse_channelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJobResponse' {Maybe Text
channelId :: Maybe Text
$sel:channelId:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
channelId} -> Maybe Text
channelId) (\s :: DescribeHarvestJobResponse
s@DescribeHarvestJobResponse' {} Maybe Text
a -> DescribeHarvestJobResponse
s {$sel:channelId:DescribeHarvestJobResponse' :: Maybe Text
channelId = Maybe Text
a} :: DescribeHarvestJobResponse)

-- | The time the HarvestJob was submitted
describeHarvestJobResponse_createdAt :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_createdAt :: Lens' DescribeHarvestJobResponse (Maybe Text)
describeHarvestJobResponse_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJobResponse' {Maybe Text
createdAt :: Maybe Text
$sel:createdAt:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
createdAt} -> Maybe Text
createdAt) (\s :: DescribeHarvestJobResponse
s@DescribeHarvestJobResponse' {} Maybe Text
a -> DescribeHarvestJobResponse
s {$sel:createdAt:DescribeHarvestJobResponse' :: Maybe Text
createdAt = Maybe Text
a} :: DescribeHarvestJobResponse)

-- | The end of the time-window which will be harvested.
describeHarvestJobResponse_endTime :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_endTime :: Lens' DescribeHarvestJobResponse (Maybe Text)
describeHarvestJobResponse_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJobResponse' {Maybe Text
endTime :: Maybe Text
$sel:endTime:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
endTime} -> Maybe Text
endTime) (\s :: DescribeHarvestJobResponse
s@DescribeHarvestJobResponse' {} Maybe Text
a -> DescribeHarvestJobResponse
s {$sel:endTime:DescribeHarvestJobResponse' :: Maybe Text
endTime = Maybe Text
a} :: DescribeHarvestJobResponse)

-- | The ID of the HarvestJob. The ID must be unique within the region and it
-- cannot be changed after the HarvestJob is submitted.
describeHarvestJobResponse_id :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_id :: Lens' DescribeHarvestJobResponse (Maybe Text)
describeHarvestJobResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJobResponse' {Maybe Text
id :: Maybe Text
$sel:id:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: DescribeHarvestJobResponse
s@DescribeHarvestJobResponse' {} Maybe Text
a -> DescribeHarvestJobResponse
s {$sel:id:DescribeHarvestJobResponse' :: Maybe Text
id = Maybe Text
a} :: DescribeHarvestJobResponse)

-- | The ID of the OriginEndpoint that the HarvestJob will harvest from. This
-- cannot be changed after the HarvestJob is submitted.
describeHarvestJobResponse_originEndpointId :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_originEndpointId :: Lens' DescribeHarvestJobResponse (Maybe Text)
describeHarvestJobResponse_originEndpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJobResponse' {Maybe Text
originEndpointId :: Maybe Text
$sel:originEndpointId:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
originEndpointId} -> Maybe Text
originEndpointId) (\s :: DescribeHarvestJobResponse
s@DescribeHarvestJobResponse' {} Maybe Text
a -> DescribeHarvestJobResponse
s {$sel:originEndpointId:DescribeHarvestJobResponse' :: Maybe Text
originEndpointId = Maybe Text
a} :: DescribeHarvestJobResponse)

-- | Undocumented member.
describeHarvestJobResponse_s3Destination :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe S3Destination)
describeHarvestJobResponse_s3Destination :: Lens' DescribeHarvestJobResponse (Maybe S3Destination)
describeHarvestJobResponse_s3Destination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJobResponse' {Maybe S3Destination
s3Destination :: Maybe S3Destination
$sel:s3Destination:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe S3Destination
s3Destination} -> Maybe S3Destination
s3Destination) (\s :: DescribeHarvestJobResponse
s@DescribeHarvestJobResponse' {} Maybe S3Destination
a -> DescribeHarvestJobResponse
s {$sel:s3Destination:DescribeHarvestJobResponse' :: Maybe S3Destination
s3Destination = Maybe S3Destination
a} :: DescribeHarvestJobResponse)

-- | The start of the time-window which will be harvested.
describeHarvestJobResponse_startTime :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_startTime :: Lens' DescribeHarvestJobResponse (Maybe Text)
describeHarvestJobResponse_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJobResponse' {Maybe Text
startTime :: Maybe Text
$sel:startTime:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
startTime} -> Maybe Text
startTime) (\s :: DescribeHarvestJobResponse
s@DescribeHarvestJobResponse' {} Maybe Text
a -> DescribeHarvestJobResponse
s {$sel:startTime:DescribeHarvestJobResponse' :: Maybe Text
startTime = Maybe Text
a} :: DescribeHarvestJobResponse)

-- | The current status of the HarvestJob. Consider setting up a CloudWatch
-- Event to listen for HarvestJobs as they succeed or fail. In the event of
-- failure, the CloudWatch Event will include an explanation of why the
-- HarvestJob failed.
describeHarvestJobResponse_status :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Status)
describeHarvestJobResponse_status :: Lens' DescribeHarvestJobResponse (Maybe Status)
describeHarvestJobResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJobResponse' {Maybe Status
status :: Maybe Status
$sel:status:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Status
status} -> Maybe Status
status) (\s :: DescribeHarvestJobResponse
s@DescribeHarvestJobResponse' {} Maybe Status
a -> DescribeHarvestJobResponse
s {$sel:status:DescribeHarvestJobResponse' :: Maybe Status
status = Maybe Status
a} :: DescribeHarvestJobResponse)

-- | The response's http status code.
describeHarvestJobResponse_httpStatus :: Lens.Lens' DescribeHarvestJobResponse Prelude.Int
describeHarvestJobResponse_httpStatus :: Lens' DescribeHarvestJobResponse Int
describeHarvestJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHarvestJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeHarvestJobResponse
s@DescribeHarvestJobResponse' {} Int
a -> DescribeHarvestJobResponse
s {$sel:httpStatus:DescribeHarvestJobResponse' :: Int
httpStatus = Int
a} :: DescribeHarvestJobResponse)

instance Prelude.NFData DescribeHarvestJobResponse where
  rnf :: DescribeHarvestJobResponse -> ()
rnf DescribeHarvestJobResponse' {Int
Maybe Text
Maybe S3Destination
Maybe Status
httpStatus :: Int
status :: Maybe Status
startTime :: Maybe Text
s3Destination :: Maybe S3Destination
originEndpointId :: Maybe Text
id :: Maybe Text
endTime :: Maybe Text
createdAt :: Maybe Text
channelId :: Maybe Text
arn :: Maybe Text
$sel:httpStatus:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Int
$sel:status:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Status
$sel:startTime:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
$sel:s3Destination:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe S3Destination
$sel:originEndpointId:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
$sel:id:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
$sel:endTime:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
$sel:createdAt:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
$sel:channelId:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> Maybe Text
$sel:arn:DescribeHarvestJobResponse' :: DescribeHarvestJobResponse -> 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
channelId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
endTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
originEndpointId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe S3Destination
s3Destination
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
startTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Status
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus