{-# 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.TimeStreamQuery.Types.ErrorReportLocation 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.TimeStreamQuery.Types.S3ReportLocation
data ErrorReportLocation = ErrorReportLocation'
{
ErrorReportLocation -> Maybe S3ReportLocation
s3ReportLocation :: Prelude.Maybe S3ReportLocation
}
deriving (ErrorReportLocation -> ErrorReportLocation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ErrorReportLocation -> ErrorReportLocation -> Bool
$c/= :: ErrorReportLocation -> ErrorReportLocation -> Bool
== :: ErrorReportLocation -> ErrorReportLocation -> Bool
$c== :: ErrorReportLocation -> ErrorReportLocation -> Bool
Prelude.Eq, ReadPrec [ErrorReportLocation]
ReadPrec ErrorReportLocation
Int -> ReadS ErrorReportLocation
ReadS [ErrorReportLocation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ErrorReportLocation]
$creadListPrec :: ReadPrec [ErrorReportLocation]
readPrec :: ReadPrec ErrorReportLocation
$creadPrec :: ReadPrec ErrorReportLocation
readList :: ReadS [ErrorReportLocation]
$creadList :: ReadS [ErrorReportLocation]
readsPrec :: Int -> ReadS ErrorReportLocation
$creadsPrec :: Int -> ReadS ErrorReportLocation
Prelude.Read, Int -> ErrorReportLocation -> ShowS
[ErrorReportLocation] -> ShowS
ErrorReportLocation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ErrorReportLocation] -> ShowS
$cshowList :: [ErrorReportLocation] -> ShowS
show :: ErrorReportLocation -> String
$cshow :: ErrorReportLocation -> String
showsPrec :: Int -> ErrorReportLocation -> ShowS
$cshowsPrec :: Int -> ErrorReportLocation -> ShowS
Prelude.Show, forall x. Rep ErrorReportLocation x -> ErrorReportLocation
forall x. ErrorReportLocation -> Rep ErrorReportLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ErrorReportLocation x -> ErrorReportLocation
$cfrom :: forall x. ErrorReportLocation -> Rep ErrorReportLocation x
Prelude.Generic)
newErrorReportLocation ::
ErrorReportLocation
newErrorReportLocation :: ErrorReportLocation
newErrorReportLocation =
ErrorReportLocation'
{ $sel:s3ReportLocation:ErrorReportLocation' :: Maybe S3ReportLocation
s3ReportLocation =
forall a. Maybe a
Prelude.Nothing
}
errorReportLocation_s3ReportLocation :: Lens.Lens' ErrorReportLocation (Prelude.Maybe S3ReportLocation)
errorReportLocation_s3ReportLocation :: Lens' ErrorReportLocation (Maybe S3ReportLocation)
errorReportLocation_s3ReportLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ErrorReportLocation' {Maybe S3ReportLocation
s3ReportLocation :: Maybe S3ReportLocation
$sel:s3ReportLocation:ErrorReportLocation' :: ErrorReportLocation -> Maybe S3ReportLocation
s3ReportLocation} -> Maybe S3ReportLocation
s3ReportLocation) (\s :: ErrorReportLocation
s@ErrorReportLocation' {} Maybe S3ReportLocation
a -> ErrorReportLocation
s {$sel:s3ReportLocation:ErrorReportLocation' :: Maybe S3ReportLocation
s3ReportLocation = Maybe S3ReportLocation
a} :: ErrorReportLocation)
instance Data.FromJSON ErrorReportLocation where
parseJSON :: Value -> Parser ErrorReportLocation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ErrorReportLocation"
( \Object
x ->
Maybe S3ReportLocation -> ErrorReportLocation
ErrorReportLocation'
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
"S3ReportLocation")
)
instance Prelude.Hashable ErrorReportLocation where
hashWithSalt :: Int -> ErrorReportLocation -> Int
hashWithSalt Int
_salt ErrorReportLocation' {Maybe S3ReportLocation
s3ReportLocation :: Maybe S3ReportLocation
$sel:s3ReportLocation:ErrorReportLocation' :: ErrorReportLocation -> Maybe S3ReportLocation
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3ReportLocation
s3ReportLocation
instance Prelude.NFData ErrorReportLocation where
rnf :: ErrorReportLocation -> ()
rnf ErrorReportLocation' {Maybe S3ReportLocation
s3ReportLocation :: Maybe S3ReportLocation
$sel:s3ReportLocation:ErrorReportLocation' :: ErrorReportLocation -> Maybe S3ReportLocation
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe S3ReportLocation
s3ReportLocation