{-# 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.SageMakerGeoSpatial.Types.EarthObservationJobErrorDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMakerGeoSpatial.Types.EarthObservationJobErrorType
data EarthObservationJobErrorDetails = EarthObservationJobErrorDetails'
{ EarthObservationJobErrorDetails -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
EarthObservationJobErrorDetails
-> Maybe EarthObservationJobErrorType
type' :: Prelude.Maybe EarthObservationJobErrorType
}
deriving (EarthObservationJobErrorDetails
-> EarthObservationJobErrorDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EarthObservationJobErrorDetails
-> EarthObservationJobErrorDetails -> Bool
$c/= :: EarthObservationJobErrorDetails
-> EarthObservationJobErrorDetails -> Bool
== :: EarthObservationJobErrorDetails
-> EarthObservationJobErrorDetails -> Bool
$c== :: EarthObservationJobErrorDetails
-> EarthObservationJobErrorDetails -> Bool
Prelude.Eq, ReadPrec [EarthObservationJobErrorDetails]
ReadPrec EarthObservationJobErrorDetails
Int -> ReadS EarthObservationJobErrorDetails
ReadS [EarthObservationJobErrorDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EarthObservationJobErrorDetails]
$creadListPrec :: ReadPrec [EarthObservationJobErrorDetails]
readPrec :: ReadPrec EarthObservationJobErrorDetails
$creadPrec :: ReadPrec EarthObservationJobErrorDetails
readList :: ReadS [EarthObservationJobErrorDetails]
$creadList :: ReadS [EarthObservationJobErrorDetails]
readsPrec :: Int -> ReadS EarthObservationJobErrorDetails
$creadsPrec :: Int -> ReadS EarthObservationJobErrorDetails
Prelude.Read, Int -> EarthObservationJobErrorDetails -> ShowS
[EarthObservationJobErrorDetails] -> ShowS
EarthObservationJobErrorDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EarthObservationJobErrorDetails] -> ShowS
$cshowList :: [EarthObservationJobErrorDetails] -> ShowS
show :: EarthObservationJobErrorDetails -> String
$cshow :: EarthObservationJobErrorDetails -> String
showsPrec :: Int -> EarthObservationJobErrorDetails -> ShowS
$cshowsPrec :: Int -> EarthObservationJobErrorDetails -> ShowS
Prelude.Show, forall x.
Rep EarthObservationJobErrorDetails x
-> EarthObservationJobErrorDetails
forall x.
EarthObservationJobErrorDetails
-> Rep EarthObservationJobErrorDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EarthObservationJobErrorDetails x
-> EarthObservationJobErrorDetails
$cfrom :: forall x.
EarthObservationJobErrorDetails
-> Rep EarthObservationJobErrorDetails x
Prelude.Generic)
newEarthObservationJobErrorDetails ::
EarthObservationJobErrorDetails
newEarthObservationJobErrorDetails :: EarthObservationJobErrorDetails
newEarthObservationJobErrorDetails =
EarthObservationJobErrorDetails'
{ $sel:message:EarthObservationJobErrorDetails' :: Maybe Text
message =
forall a. Maybe a
Prelude.Nothing,
$sel:type':EarthObservationJobErrorDetails' :: Maybe EarthObservationJobErrorType
type' = forall a. Maybe a
Prelude.Nothing
}
earthObservationJobErrorDetails_message :: Lens.Lens' EarthObservationJobErrorDetails (Prelude.Maybe Prelude.Text)
earthObservationJobErrorDetails_message :: Lens' EarthObservationJobErrorDetails (Maybe Text)
earthObservationJobErrorDetails_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EarthObservationJobErrorDetails' {Maybe Text
message :: Maybe Text
$sel:message:EarthObservationJobErrorDetails' :: EarthObservationJobErrorDetails -> Maybe Text
message} -> Maybe Text
message) (\s :: EarthObservationJobErrorDetails
s@EarthObservationJobErrorDetails' {} Maybe Text
a -> EarthObservationJobErrorDetails
s {$sel:message:EarthObservationJobErrorDetails' :: Maybe Text
message = Maybe Text
a} :: EarthObservationJobErrorDetails)
earthObservationJobErrorDetails_type :: Lens.Lens' EarthObservationJobErrorDetails (Prelude.Maybe EarthObservationJobErrorType)
earthObservationJobErrorDetails_type :: Lens'
EarthObservationJobErrorDetails
(Maybe EarthObservationJobErrorType)
earthObservationJobErrorDetails_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EarthObservationJobErrorDetails' {Maybe EarthObservationJobErrorType
type' :: Maybe EarthObservationJobErrorType
$sel:type':EarthObservationJobErrorDetails' :: EarthObservationJobErrorDetails
-> Maybe EarthObservationJobErrorType
type'} -> Maybe EarthObservationJobErrorType
type') (\s :: EarthObservationJobErrorDetails
s@EarthObservationJobErrorDetails' {} Maybe EarthObservationJobErrorType
a -> EarthObservationJobErrorDetails
s {$sel:type':EarthObservationJobErrorDetails' :: Maybe EarthObservationJobErrorType
type' = Maybe EarthObservationJobErrorType
a} :: EarthObservationJobErrorDetails)
instance
Data.FromJSON
EarthObservationJobErrorDetails
where
parseJSON :: Value -> Parser EarthObservationJobErrorDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EarthObservationJobErrorDetails"
( \Object
x ->
Maybe Text
-> Maybe EarthObservationJobErrorType
-> EarthObservationJobErrorDetails
EarthObservationJobErrorDetails'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Message")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Type")
)
instance
Prelude.Hashable
EarthObservationJobErrorDetails
where
hashWithSalt :: Int -> EarthObservationJobErrorDetails -> Int
hashWithSalt
Int
_salt
EarthObservationJobErrorDetails' {Maybe Text
Maybe EarthObservationJobErrorType
type' :: Maybe EarthObservationJobErrorType
message :: Maybe Text
$sel:type':EarthObservationJobErrorDetails' :: EarthObservationJobErrorDetails
-> Maybe EarthObservationJobErrorType
$sel:message:EarthObservationJobErrorDetails' :: EarthObservationJobErrorDetails -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EarthObservationJobErrorType
type'
instance
Prelude.NFData
EarthObservationJobErrorDetails
where
rnf :: EarthObservationJobErrorDetails -> ()
rnf EarthObservationJobErrorDetails' {Maybe Text
Maybe EarthObservationJobErrorType
type' :: Maybe EarthObservationJobErrorType
message :: Maybe Text
$sel:type':EarthObservationJobErrorDetails' :: EarthObservationJobErrorDetails
-> Maybe EarthObservationJobErrorType
$sel:message:EarthObservationJobErrorDetails' :: EarthObservationJobErrorDetails -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EarthObservationJobErrorType
type'