{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MediaPackage.Types.HarvestJob where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaPackage.Types.S3Destination
import Amazonka.MediaPackage.Types.Status
import qualified Amazonka.Prelude as Prelude
data HarvestJob = HarvestJob'
{
HarvestJob -> Maybe Status
status :: Prelude.Maybe Status,
HarvestJob -> Maybe Text
originEndpointId :: Prelude.Maybe Prelude.Text,
HarvestJob -> Maybe Text
startTime :: Prelude.Maybe Prelude.Text,
HarvestJob -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
HarvestJob -> Maybe Text
createdAt :: Prelude.Maybe Prelude.Text,
HarvestJob -> Maybe Text
channelId :: Prelude.Maybe Prelude.Text,
HarvestJob -> Maybe S3Destination
s3Destination :: Prelude.Maybe S3Destination,
HarvestJob -> Maybe Text
endTime :: Prelude.Maybe Prelude.Text,
HarvestJob -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (HarvestJob -> HarvestJob -> Bool
(HarvestJob -> HarvestJob -> Bool)
-> (HarvestJob -> HarvestJob -> Bool) -> Eq HarvestJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HarvestJob -> HarvestJob -> Bool
$c/= :: HarvestJob -> HarvestJob -> Bool
== :: HarvestJob -> HarvestJob -> Bool
$c== :: HarvestJob -> HarvestJob -> Bool
Prelude.Eq, ReadPrec [HarvestJob]
ReadPrec HarvestJob
Int -> ReadS HarvestJob
ReadS [HarvestJob]
(Int -> ReadS HarvestJob)
-> ReadS [HarvestJob]
-> ReadPrec HarvestJob
-> ReadPrec [HarvestJob]
-> Read HarvestJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HarvestJob]
$creadListPrec :: ReadPrec [HarvestJob]
readPrec :: ReadPrec HarvestJob
$creadPrec :: ReadPrec HarvestJob
readList :: ReadS [HarvestJob]
$creadList :: ReadS [HarvestJob]
readsPrec :: Int -> ReadS HarvestJob
$creadsPrec :: Int -> ReadS HarvestJob
Prelude.Read, Int -> HarvestJob -> ShowS
[HarvestJob] -> ShowS
HarvestJob -> String
(Int -> HarvestJob -> ShowS)
-> (HarvestJob -> String)
-> ([HarvestJob] -> ShowS)
-> Show HarvestJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HarvestJob] -> ShowS
$cshowList :: [HarvestJob] -> ShowS
show :: HarvestJob -> String
$cshow :: HarvestJob -> String
showsPrec :: Int -> HarvestJob -> ShowS
$cshowsPrec :: Int -> HarvestJob -> ShowS
Prelude.Show, (forall x. HarvestJob -> Rep HarvestJob x)
-> (forall x. Rep HarvestJob x -> HarvestJob) -> Generic HarvestJob
forall x. Rep HarvestJob x -> HarvestJob
forall x. HarvestJob -> Rep HarvestJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HarvestJob x -> HarvestJob
$cfrom :: forall x. HarvestJob -> Rep HarvestJob x
Prelude.Generic)
newHarvestJob ::
HarvestJob
newHarvestJob :: HarvestJob
newHarvestJob =
HarvestJob' :: Maybe Status
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob
HarvestJob'
{ $sel:status:HarvestJob' :: Maybe Status
status = Maybe Status
forall a. Maybe a
Prelude.Nothing,
$sel:originEndpointId:HarvestJob' :: Maybe Text
originEndpointId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:HarvestJob' :: Maybe Text
startTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:HarvestJob' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:HarvestJob' :: Maybe Text
createdAt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:channelId:HarvestJob' :: Maybe Text
channelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Destination:HarvestJob' :: Maybe S3Destination
s3Destination = Maybe S3Destination
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:HarvestJob' :: Maybe Text
endTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:HarvestJob' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
harvestJob_status :: Lens.Lens' HarvestJob (Prelude.Maybe Status)
harvestJob_status :: (Maybe Status -> f (Maybe Status)) -> HarvestJob -> f HarvestJob
harvestJob_status = (HarvestJob -> Maybe Status)
-> (HarvestJob -> Maybe Status -> HarvestJob)
-> Lens HarvestJob HarvestJob (Maybe Status) (Maybe Status)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HarvestJob' {Maybe Status
status :: Maybe Status
$sel:status:HarvestJob' :: HarvestJob -> Maybe Status
status} -> Maybe Status
status) (\s :: HarvestJob
s@HarvestJob' {} Maybe Status
a -> HarvestJob
s {$sel:status:HarvestJob' :: Maybe Status
status = Maybe Status
a} :: HarvestJob)
harvestJob_originEndpointId :: Lens.Lens' HarvestJob (Prelude.Maybe Prelude.Text)
harvestJob_originEndpointId :: (Maybe Text -> f (Maybe Text)) -> HarvestJob -> f HarvestJob
harvestJob_originEndpointId = (HarvestJob -> Maybe Text)
-> (HarvestJob -> Maybe Text -> HarvestJob)
-> Lens HarvestJob HarvestJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HarvestJob' {Maybe Text
originEndpointId :: Maybe Text
$sel:originEndpointId:HarvestJob' :: HarvestJob -> Maybe Text
originEndpointId} -> Maybe Text
originEndpointId) (\s :: HarvestJob
s@HarvestJob' {} Maybe Text
a -> HarvestJob
s {$sel:originEndpointId:HarvestJob' :: Maybe Text
originEndpointId = Maybe Text
a} :: HarvestJob)
harvestJob_startTime :: Lens.Lens' HarvestJob (Prelude.Maybe Prelude.Text)
harvestJob_startTime :: (Maybe Text -> f (Maybe Text)) -> HarvestJob -> f HarvestJob
harvestJob_startTime = (HarvestJob -> Maybe Text)
-> (HarvestJob -> Maybe Text -> HarvestJob)
-> Lens HarvestJob HarvestJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HarvestJob' {Maybe Text
startTime :: Maybe Text
$sel:startTime:HarvestJob' :: HarvestJob -> Maybe Text
startTime} -> Maybe Text
startTime) (\s :: HarvestJob
s@HarvestJob' {} Maybe Text
a -> HarvestJob
s {$sel:startTime:HarvestJob' :: Maybe Text
startTime = Maybe Text
a} :: HarvestJob)
harvestJob_arn :: Lens.Lens' HarvestJob (Prelude.Maybe Prelude.Text)
harvestJob_arn :: (Maybe Text -> f (Maybe Text)) -> HarvestJob -> f HarvestJob
harvestJob_arn = (HarvestJob -> Maybe Text)
-> (HarvestJob -> Maybe Text -> HarvestJob)
-> Lens HarvestJob HarvestJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HarvestJob' {Maybe Text
arn :: Maybe Text
$sel:arn:HarvestJob' :: HarvestJob -> Maybe Text
arn} -> Maybe Text
arn) (\s :: HarvestJob
s@HarvestJob' {} Maybe Text
a -> HarvestJob
s {$sel:arn:HarvestJob' :: Maybe Text
arn = Maybe Text
a} :: HarvestJob)
harvestJob_createdAt :: Lens.Lens' HarvestJob (Prelude.Maybe Prelude.Text)
harvestJob_createdAt :: (Maybe Text -> f (Maybe Text)) -> HarvestJob -> f HarvestJob
harvestJob_createdAt = (HarvestJob -> Maybe Text)
-> (HarvestJob -> Maybe Text -> HarvestJob)
-> Lens HarvestJob HarvestJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HarvestJob' {Maybe Text
createdAt :: Maybe Text
$sel:createdAt:HarvestJob' :: HarvestJob -> Maybe Text
createdAt} -> Maybe Text
createdAt) (\s :: HarvestJob
s@HarvestJob' {} Maybe Text
a -> HarvestJob
s {$sel:createdAt:HarvestJob' :: Maybe Text
createdAt = Maybe Text
a} :: HarvestJob)
harvestJob_channelId :: Lens.Lens' HarvestJob (Prelude.Maybe Prelude.Text)
harvestJob_channelId :: (Maybe Text -> f (Maybe Text)) -> HarvestJob -> f HarvestJob
harvestJob_channelId = (HarvestJob -> Maybe Text)
-> (HarvestJob -> Maybe Text -> HarvestJob)
-> Lens HarvestJob HarvestJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HarvestJob' {Maybe Text
channelId :: Maybe Text
$sel:channelId:HarvestJob' :: HarvestJob -> Maybe Text
channelId} -> Maybe Text
channelId) (\s :: HarvestJob
s@HarvestJob' {} Maybe Text
a -> HarvestJob
s {$sel:channelId:HarvestJob' :: Maybe Text
channelId = Maybe Text
a} :: HarvestJob)
harvestJob_s3Destination :: Lens.Lens' HarvestJob (Prelude.Maybe S3Destination)
harvestJob_s3Destination :: (Maybe S3Destination -> f (Maybe S3Destination))
-> HarvestJob -> f HarvestJob
harvestJob_s3Destination = (HarvestJob -> Maybe S3Destination)
-> (HarvestJob -> Maybe S3Destination -> HarvestJob)
-> Lens
HarvestJob HarvestJob (Maybe S3Destination) (Maybe S3Destination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HarvestJob' {Maybe S3Destination
s3Destination :: Maybe S3Destination
$sel:s3Destination:HarvestJob' :: HarvestJob -> Maybe S3Destination
s3Destination} -> Maybe S3Destination
s3Destination) (\s :: HarvestJob
s@HarvestJob' {} Maybe S3Destination
a -> HarvestJob
s {$sel:s3Destination:HarvestJob' :: Maybe S3Destination
s3Destination = Maybe S3Destination
a} :: HarvestJob)
harvestJob_endTime :: Lens.Lens' HarvestJob (Prelude.Maybe Prelude.Text)
harvestJob_endTime :: (Maybe Text -> f (Maybe Text)) -> HarvestJob -> f HarvestJob
harvestJob_endTime = (HarvestJob -> Maybe Text)
-> (HarvestJob -> Maybe Text -> HarvestJob)
-> Lens HarvestJob HarvestJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HarvestJob' {Maybe Text
endTime :: Maybe Text
$sel:endTime:HarvestJob' :: HarvestJob -> Maybe Text
endTime} -> Maybe Text
endTime) (\s :: HarvestJob
s@HarvestJob' {} Maybe Text
a -> HarvestJob
s {$sel:endTime:HarvestJob' :: Maybe Text
endTime = Maybe Text
a} :: HarvestJob)
harvestJob_id :: Lens.Lens' HarvestJob (Prelude.Maybe Prelude.Text)
harvestJob_id :: (Maybe Text -> f (Maybe Text)) -> HarvestJob -> f HarvestJob
harvestJob_id = (HarvestJob -> Maybe Text)
-> (HarvestJob -> Maybe Text -> HarvestJob)
-> Lens HarvestJob HarvestJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HarvestJob' {Maybe Text
id :: Maybe Text
$sel:id:HarvestJob' :: HarvestJob -> Maybe Text
id} -> Maybe Text
id) (\s :: HarvestJob
s@HarvestJob' {} Maybe Text
a -> HarvestJob
s {$sel:id:HarvestJob' :: Maybe Text
id = Maybe Text
a} :: HarvestJob)
instance Core.FromJSON HarvestJob where
parseJSON :: Value -> Parser HarvestJob
parseJSON =
String
-> (Object -> Parser HarvestJob) -> Value -> Parser HarvestJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HarvestJob"
( \Object
x ->
Maybe Status
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob
HarvestJob'
(Maybe Status
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob)
-> Parser (Maybe Status)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Status)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"originEndpointId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"startTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
Parser
(Maybe Text
-> Maybe Text
-> Maybe S3Destination
-> Maybe Text
-> Maybe Text
-> HarvestJob)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe S3Destination -> Maybe Text -> Maybe Text -> HarvestJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
Parser
(Maybe Text
-> Maybe S3Destination -> Maybe Text -> Maybe Text -> HarvestJob)
-> Parser (Maybe Text)
-> Parser
(Maybe S3Destination -> Maybe Text -> Maybe Text -> HarvestJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"channelId")
Parser
(Maybe S3Destination -> Maybe Text -> Maybe Text -> HarvestJob)
-> Parser (Maybe S3Destination)
-> Parser (Maybe Text -> Maybe Text -> HarvestJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe S3Destination)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"s3Destination")
Parser (Maybe Text -> Maybe Text -> HarvestJob)
-> Parser (Maybe Text) -> Parser (Maybe Text -> HarvestJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"endTime")
Parser (Maybe Text -> HarvestJob)
-> Parser (Maybe Text) -> Parser HarvestJob
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"id")
)
instance Prelude.Hashable HarvestJob
instance Prelude.NFData HarvestJob