{-# 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-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)
--
-- 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_status,
    describeHarvestJobResponse_originEndpointId,
    describeHarvestJobResponse_startTime,
    describeHarvestJobResponse_arn,
    describeHarvestJobResponse_createdAt,
    describeHarvestJobResponse_channelId,
    describeHarvestJobResponse_s3Destination,
    describeHarvestJobResponse_endTime,
    describeHarvestJobResponse_id,
    describeHarvestJobResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(DescribeHarvestJob -> DescribeHarvestJob -> Bool)
-> (DescribeHarvestJob -> DescribeHarvestJob -> Bool)
-> Eq DescribeHarvestJob
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]
(Int -> ReadS DescribeHarvestJob)
-> ReadS [DescribeHarvestJob]
-> ReadPrec DescribeHarvestJob
-> ReadPrec [DescribeHarvestJob]
-> Read 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
(Int -> DescribeHarvestJob -> ShowS)
-> (DescribeHarvestJob -> String)
-> ([DescribeHarvestJob] -> ShowS)
-> Show DescribeHarvestJob
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. DescribeHarvestJob -> Rep DescribeHarvestJob x)
-> (forall x. Rep DescribeHarvestJob x -> DescribeHarvestJob)
-> Generic DescribeHarvestJob
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' :: Text -> DescribeHarvestJob
DescribeHarvestJob' {$sel:id:DescribeHarvestJob' :: Text
id = Text
pId_}

-- | The ID of the HarvestJob.
describeHarvestJob_id :: Lens.Lens' DescribeHarvestJob Prelude.Text
describeHarvestJob_id :: (Text -> f Text) -> DescribeHarvestJob -> f DescribeHarvestJob
describeHarvestJob_id = (DescribeHarvestJob -> Text)
-> (DescribeHarvestJob -> Text -> DescribeHarvestJob)
-> Lens DescribeHarvestJob DescribeHarvestJob Text Text
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 :: DescribeHarvestJob -> Request DescribeHarvestJob
request = Service -> DescribeHarvestJob -> Request DescribeHarvestJob
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeHarvestJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeHarvestJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeHarvestJob))
-> Logger
-> Service
-> Proxy DescribeHarvestJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeHarvestJob)))
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 Status
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHarvestJobResponse
DescribeHarvestJobResponse'
            (Maybe Status
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe S3Destination
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeHarvestJobResponse)
-> Either String (Maybe Status)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe S3Destination
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeHarvestJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Status)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"status")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe S3Destination
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeHarvestJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe S3Destination
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeHarvestJobResponse)
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
"originEndpointId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe S3Destination
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeHarvestJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe S3Destination
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeHarvestJobResponse)
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
"startTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe S3Destination
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeHarvestJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe S3Destination
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeHarvestJobResponse)
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 Text
   -> Maybe S3Destination
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeHarvestJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe S3Destination
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeHarvestJobResponse)
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
"createdAt")
            Either
  String
  (Maybe Text
   -> Maybe S3Destination
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeHarvestJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe S3Destination
      -> Maybe Text -> Maybe Text -> Int -> DescribeHarvestJobResponse)
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
"channelId")
            Either
  String
  (Maybe S3Destination
   -> Maybe Text -> Maybe Text -> Int -> DescribeHarvestJobResponse)
-> Either String (Maybe S3Destination)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> DescribeHarvestJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe S3Destination)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"s3Destination")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> DescribeHarvestJobResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DescribeHarvestJobResponse)
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
"endTime")
            Either String (Maybe Text -> Int -> DescribeHarvestJobResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeHarvestJobResponse)
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
"id")
            Either String (Int -> DescribeHarvestJobResponse)
-> Either String Int -> Either String DescribeHarvestJobResponse
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 DescribeHarvestJob

instance Prelude.NFData DescribeHarvestJob

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

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

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

-- | /See:/ 'newDescribeHarvestJobResponse' smart constructor.
data DescribeHarvestJobResponse = 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 -> Maybe Status
status :: Prelude.Maybe Status,
    -- | 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,
    -- | The start of the time-window which will be harvested.
    DescribeHarvestJobResponse -> Maybe Text
startTime :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) assigned to the HarvestJob.
    DescribeHarvestJobResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time the HarvestJob was submitted
    DescribeHarvestJobResponse -> Maybe Text
createdAt :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Channel that the HarvestJob will harvest from.
    DescribeHarvestJobResponse -> Maybe Text
channelId :: Prelude.Maybe Prelude.Text,
    DescribeHarvestJobResponse -> Maybe S3Destination
s3Destination :: Prelude.Maybe S3Destination,
    -- | 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 response's http status code.
    DescribeHarvestJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeHarvestJobResponse -> DescribeHarvestJobResponse -> Bool
(DescribeHarvestJobResponse -> DescribeHarvestJobResponse -> Bool)
-> (DescribeHarvestJobResponse
    -> DescribeHarvestJobResponse -> Bool)
-> Eq DescribeHarvestJobResponse
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]
(Int -> ReadS DescribeHarvestJobResponse)
-> ReadS [DescribeHarvestJobResponse]
-> ReadPrec DescribeHarvestJobResponse
-> ReadPrec [DescribeHarvestJobResponse]
-> Read 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
(Int -> DescribeHarvestJobResponse -> ShowS)
-> (DescribeHarvestJobResponse -> String)
-> ([DescribeHarvestJobResponse] -> ShowS)
-> Show DescribeHarvestJobResponse
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.
 DescribeHarvestJobResponse -> Rep DescribeHarvestJobResponse x)
-> (forall x.
    Rep DescribeHarvestJobResponse x -> DescribeHarvestJobResponse)
-> Generic DescribeHarvestJobResponse
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:
--
-- '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.
--
-- 'originEndpointId', 'describeHarvestJobResponse_originEndpointId' - The ID of the OriginEndpoint that the HarvestJob will harvest from. This
-- cannot be changed after the HarvestJob is submitted.
--
-- 'startTime', 'describeHarvestJobResponse_startTime' - The start of the time-window which will be harvested.
--
-- 'arn', 'describeHarvestJobResponse_arn' - The Amazon Resource Name (ARN) assigned to the HarvestJob.
--
-- 'createdAt', 'describeHarvestJobResponse_createdAt' - The time the HarvestJob was submitted
--
-- 'channelId', 'describeHarvestJobResponse_channelId' - The ID of the Channel that the HarvestJob will harvest from.
--
-- 's3Destination', 'describeHarvestJobResponse_s3Destination' - Undocumented member.
--
-- '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.
--
-- 'httpStatus', 'describeHarvestJobResponse_httpStatus' - The response's http status code.
newDescribeHarvestJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeHarvestJobResponse
newDescribeHarvestJobResponse :: Int -> DescribeHarvestJobResponse
newDescribeHarvestJobResponse Int
pHttpStatus_ =
  DescribeHarvestJobResponse' :: Maybe Status
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeHarvestJobResponse
DescribeHarvestJobResponse'
    { $sel:status:DescribeHarvestJobResponse' :: Maybe Status
status =
        Maybe Status
forall a. Maybe a
Prelude.Nothing,
      $sel:originEndpointId:DescribeHarvestJobResponse' :: Maybe Text
originEndpointId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:DescribeHarvestJobResponse' :: Maybe Text
startTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeHarvestJobResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:DescribeHarvestJobResponse' :: Maybe Text
createdAt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:channelId:DescribeHarvestJobResponse' :: Maybe Text
channelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3Destination:DescribeHarvestJobResponse' :: Maybe S3Destination
s3Destination = Maybe S3Destination
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:DescribeHarvestJobResponse' :: Maybe Text
endTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:DescribeHarvestJobResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeHarvestJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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 :: (Maybe Status -> f (Maybe Status))
-> DescribeHarvestJobResponse -> f DescribeHarvestJobResponse
describeHarvestJobResponse_status = (DescribeHarvestJobResponse -> Maybe Status)
-> (DescribeHarvestJobResponse
    -> Maybe Status -> DescribeHarvestJobResponse)
-> Lens
     DescribeHarvestJobResponse
     DescribeHarvestJobResponse
     (Maybe Status)
     (Maybe 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 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 :: (Maybe Text -> f (Maybe Text))
-> DescribeHarvestJobResponse -> f DescribeHarvestJobResponse
describeHarvestJobResponse_originEndpointId = (DescribeHarvestJobResponse -> Maybe Text)
-> (DescribeHarvestJobResponse
    -> Maybe Text -> DescribeHarvestJobResponse)
-> Lens
     DescribeHarvestJobResponse
     DescribeHarvestJobResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | The start of the time-window which will be harvested.
describeHarvestJobResponse_startTime :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_startTime :: (Maybe Text -> f (Maybe Text))
-> DescribeHarvestJobResponse -> f DescribeHarvestJobResponse
describeHarvestJobResponse_startTime = (DescribeHarvestJobResponse -> Maybe Text)
-> (DescribeHarvestJobResponse
    -> Maybe Text -> DescribeHarvestJobResponse)
-> Lens
     DescribeHarvestJobResponse
     DescribeHarvestJobResponse
     (Maybe Text)
     (Maybe Text)
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 Amazon Resource Name (ARN) assigned to the HarvestJob.
describeHarvestJobResponse_arn :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeHarvestJobResponse -> f DescribeHarvestJobResponse
describeHarvestJobResponse_arn = (DescribeHarvestJobResponse -> Maybe Text)
-> (DescribeHarvestJobResponse
    -> Maybe Text -> DescribeHarvestJobResponse)
-> Lens
     DescribeHarvestJobResponse
     DescribeHarvestJobResponse
     (Maybe Text)
     (Maybe Text)
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 time the HarvestJob was submitted
describeHarvestJobResponse_createdAt :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_createdAt :: (Maybe Text -> f (Maybe Text))
-> DescribeHarvestJobResponse -> f DescribeHarvestJobResponse
describeHarvestJobResponse_createdAt = (DescribeHarvestJobResponse -> Maybe Text)
-> (DescribeHarvestJobResponse
    -> Maybe Text -> DescribeHarvestJobResponse)
-> Lens
     DescribeHarvestJobResponse
     DescribeHarvestJobResponse
     (Maybe Text)
     (Maybe Text)
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 ID of the Channel that the HarvestJob will harvest from.
describeHarvestJobResponse_channelId :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_channelId :: (Maybe Text -> f (Maybe Text))
-> DescribeHarvestJobResponse -> f DescribeHarvestJobResponse
describeHarvestJobResponse_channelId = (DescribeHarvestJobResponse -> Maybe Text)
-> (DescribeHarvestJobResponse
    -> Maybe Text -> DescribeHarvestJobResponse)
-> Lens
     DescribeHarvestJobResponse
     DescribeHarvestJobResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | Undocumented member.
describeHarvestJobResponse_s3Destination :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe S3Destination)
describeHarvestJobResponse_s3Destination :: (Maybe S3Destination -> f (Maybe S3Destination))
-> DescribeHarvestJobResponse -> f DescribeHarvestJobResponse
describeHarvestJobResponse_s3Destination = (DescribeHarvestJobResponse -> Maybe S3Destination)
-> (DescribeHarvestJobResponse
    -> Maybe S3Destination -> DescribeHarvestJobResponse)
-> Lens
     DescribeHarvestJobResponse
     DescribeHarvestJobResponse
     (Maybe S3Destination)
     (Maybe 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 end of the time-window which will be harvested.
describeHarvestJobResponse_endTime :: Lens.Lens' DescribeHarvestJobResponse (Prelude.Maybe Prelude.Text)
describeHarvestJobResponse_endTime :: (Maybe Text -> f (Maybe Text))
-> DescribeHarvestJobResponse -> f DescribeHarvestJobResponse
describeHarvestJobResponse_endTime = (DescribeHarvestJobResponse -> Maybe Text)
-> (DescribeHarvestJobResponse
    -> Maybe Text -> DescribeHarvestJobResponse)
-> Lens
     DescribeHarvestJobResponse
     DescribeHarvestJobResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> DescribeHarvestJobResponse -> f DescribeHarvestJobResponse
describeHarvestJobResponse_id = (DescribeHarvestJobResponse -> Maybe Text)
-> (DescribeHarvestJobResponse
    -> Maybe Text -> DescribeHarvestJobResponse)
-> Lens
     DescribeHarvestJobResponse
     DescribeHarvestJobResponse
     (Maybe Text)
     (Maybe Text)
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 response's http status code.
describeHarvestJobResponse_httpStatus :: Lens.Lens' DescribeHarvestJobResponse Prelude.Int
describeHarvestJobResponse_httpStatus :: (Int -> f Int)
-> DescribeHarvestJobResponse -> f DescribeHarvestJobResponse
describeHarvestJobResponse_httpStatus = (DescribeHarvestJobResponse -> Int)
-> (DescribeHarvestJobResponse
    -> Int -> DescribeHarvestJobResponse)
-> Lens
     DescribeHarvestJobResponse DescribeHarvestJobResponse Int Int
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