{-# 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.Snowball.Types.JobLogs where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JobLogs = JobLogs'
{
JobLogs -> Maybe Text
jobFailureLogURI :: Prelude.Maybe Prelude.Text,
JobLogs -> Maybe Text
jobCompletionReportURI :: Prelude.Maybe Prelude.Text,
JobLogs -> Maybe Text
jobSuccessLogURI :: Prelude.Maybe Prelude.Text
}
deriving (JobLogs -> JobLogs -> Bool
(JobLogs -> JobLogs -> Bool)
-> (JobLogs -> JobLogs -> Bool) -> Eq JobLogs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobLogs -> JobLogs -> Bool
$c/= :: JobLogs -> JobLogs -> Bool
== :: JobLogs -> JobLogs -> Bool
$c== :: JobLogs -> JobLogs -> Bool
Prelude.Eq, ReadPrec [JobLogs]
ReadPrec JobLogs
Int -> ReadS JobLogs
ReadS [JobLogs]
(Int -> ReadS JobLogs)
-> ReadS [JobLogs]
-> ReadPrec JobLogs
-> ReadPrec [JobLogs]
-> Read JobLogs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobLogs]
$creadListPrec :: ReadPrec [JobLogs]
readPrec :: ReadPrec JobLogs
$creadPrec :: ReadPrec JobLogs
readList :: ReadS [JobLogs]
$creadList :: ReadS [JobLogs]
readsPrec :: Int -> ReadS JobLogs
$creadsPrec :: Int -> ReadS JobLogs
Prelude.Read, Int -> JobLogs -> ShowS
[JobLogs] -> ShowS
JobLogs -> String
(Int -> JobLogs -> ShowS)
-> (JobLogs -> String) -> ([JobLogs] -> ShowS) -> Show JobLogs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobLogs] -> ShowS
$cshowList :: [JobLogs] -> ShowS
show :: JobLogs -> String
$cshow :: JobLogs -> String
showsPrec :: Int -> JobLogs -> ShowS
$cshowsPrec :: Int -> JobLogs -> ShowS
Prelude.Show, (forall x. JobLogs -> Rep JobLogs x)
-> (forall x. Rep JobLogs x -> JobLogs) -> Generic JobLogs
forall x. Rep JobLogs x -> JobLogs
forall x. JobLogs -> Rep JobLogs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobLogs x -> JobLogs
$cfrom :: forall x. JobLogs -> Rep JobLogs x
Prelude.Generic)
newJobLogs ::
JobLogs
newJobLogs :: JobLogs
newJobLogs =
JobLogs' :: Maybe Text -> Maybe Text -> Maybe Text -> JobLogs
JobLogs'
{ $sel:jobFailureLogURI:JobLogs' :: Maybe Text
jobFailureLogURI = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobCompletionReportURI:JobLogs' :: Maybe Text
jobCompletionReportURI = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobSuccessLogURI:JobLogs' :: Maybe Text
jobSuccessLogURI = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
jobLogs_jobFailureLogURI :: Lens.Lens' JobLogs (Prelude.Maybe Prelude.Text)
jobLogs_jobFailureLogURI :: (Maybe Text -> f (Maybe Text)) -> JobLogs -> f JobLogs
jobLogs_jobFailureLogURI = (JobLogs -> Maybe Text)
-> (JobLogs -> Maybe Text -> JobLogs)
-> Lens JobLogs JobLogs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobLogs' {Maybe Text
jobFailureLogURI :: Maybe Text
$sel:jobFailureLogURI:JobLogs' :: JobLogs -> Maybe Text
jobFailureLogURI} -> Maybe Text
jobFailureLogURI) (\s :: JobLogs
s@JobLogs' {} Maybe Text
a -> JobLogs
s {$sel:jobFailureLogURI:JobLogs' :: Maybe Text
jobFailureLogURI = Maybe Text
a} :: JobLogs)
jobLogs_jobCompletionReportURI :: Lens.Lens' JobLogs (Prelude.Maybe Prelude.Text)
jobLogs_jobCompletionReportURI :: (Maybe Text -> f (Maybe Text)) -> JobLogs -> f JobLogs
jobLogs_jobCompletionReportURI = (JobLogs -> Maybe Text)
-> (JobLogs -> Maybe Text -> JobLogs)
-> Lens JobLogs JobLogs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobLogs' {Maybe Text
jobCompletionReportURI :: Maybe Text
$sel:jobCompletionReportURI:JobLogs' :: JobLogs -> Maybe Text
jobCompletionReportURI} -> Maybe Text
jobCompletionReportURI) (\s :: JobLogs
s@JobLogs' {} Maybe Text
a -> JobLogs
s {$sel:jobCompletionReportURI:JobLogs' :: Maybe Text
jobCompletionReportURI = Maybe Text
a} :: JobLogs)
jobLogs_jobSuccessLogURI :: Lens.Lens' JobLogs (Prelude.Maybe Prelude.Text)
jobLogs_jobSuccessLogURI :: (Maybe Text -> f (Maybe Text)) -> JobLogs -> f JobLogs
jobLogs_jobSuccessLogURI = (JobLogs -> Maybe Text)
-> (JobLogs -> Maybe Text -> JobLogs)
-> Lens JobLogs JobLogs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobLogs' {Maybe Text
jobSuccessLogURI :: Maybe Text
$sel:jobSuccessLogURI:JobLogs' :: JobLogs -> Maybe Text
jobSuccessLogURI} -> Maybe Text
jobSuccessLogURI) (\s :: JobLogs
s@JobLogs' {} Maybe Text
a -> JobLogs
s {$sel:jobSuccessLogURI:JobLogs' :: Maybe Text
jobSuccessLogURI = Maybe Text
a} :: JobLogs)
instance Core.FromJSON JobLogs where
parseJSON :: Value -> Parser JobLogs
parseJSON =
String -> (Object -> Parser JobLogs) -> Value -> Parser JobLogs
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JobLogs"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> JobLogs
JobLogs'
(Maybe Text -> Maybe Text -> Maybe Text -> JobLogs)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> JobLogs)
forall (f :: * -> *) a b. Functor 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
"JobFailureLogURI")
Parser (Maybe Text -> Maybe Text -> JobLogs)
-> Parser (Maybe Text) -> Parser (Maybe Text -> JobLogs)
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
"JobCompletionReportURI")
Parser (Maybe Text -> JobLogs)
-> Parser (Maybe Text) -> Parser JobLogs
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
"JobSuccessLogURI")
)
instance Prelude.Hashable JobLogs
instance Prelude.NFData JobLogs