{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.Reporting_ReportRun where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified StripeAPI.Common
import StripeAPI.TypeAlias
import {-# SOURCE #-} StripeAPI.Types.File
import {-# SOURCE #-} StripeAPI.Types.FileLink
import {-# SOURCE #-} StripeAPI.Types.FinancialReportingFinanceReportRunRunParameters
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data Reporting'reportRun = Reporting'reportRun
{
Reporting'reportRun -> Int
reporting'reportRunCreated :: GHC.Types.Int,
Reporting'reportRun -> Maybe Text
reporting'reportRunError :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
Reporting'reportRun -> Text
reporting'reportRunId :: Data.Text.Internal.Text,
Reporting'reportRun -> Bool
reporting'reportRunLivemode :: GHC.Types.Bool,
Reporting'reportRun
-> FinancialReportingFinanceReportRunRunParameters
reporting'reportRunParameters :: FinancialReportingFinanceReportRunRunParameters,
Reporting'reportRun -> Text
reporting'reportRunReportType :: Data.Text.Internal.Text,
Reporting'reportRun -> Maybe Reporting'reportRunResult'
reporting'reportRunResult :: (GHC.Maybe.Maybe Reporting'reportRunResult'),
Reporting'reportRun -> Text
reporting'reportRunStatus :: Data.Text.Internal.Text,
Reporting'reportRun -> Maybe Int
reporting'reportRunSucceededAt :: (GHC.Maybe.Maybe GHC.Types.Int)
}
deriving
( Int -> Reporting'reportRun -> ShowS
[Reporting'reportRun] -> ShowS
Reporting'reportRun -> String
(Int -> Reporting'reportRun -> ShowS)
-> (Reporting'reportRun -> String)
-> ([Reporting'reportRun] -> ShowS)
-> Show Reporting'reportRun
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Reporting'reportRun] -> ShowS
$cshowList :: [Reporting'reportRun] -> ShowS
show :: Reporting'reportRun -> String
$cshow :: Reporting'reportRun -> String
showsPrec :: Int -> Reporting'reportRun -> ShowS
$cshowsPrec :: Int -> Reporting'reportRun -> ShowS
GHC.Show.Show,
Reporting'reportRun -> Reporting'reportRun -> Bool
(Reporting'reportRun -> Reporting'reportRun -> Bool)
-> (Reporting'reportRun -> Reporting'reportRun -> Bool)
-> Eq Reporting'reportRun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reporting'reportRun -> Reporting'reportRun -> Bool
$c/= :: Reporting'reportRun -> Reporting'reportRun -> Bool
== :: Reporting'reportRun -> Reporting'reportRun -> Bool
$c== :: Reporting'reportRun -> Reporting'reportRun -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON Reporting'reportRun where
toJSON :: Reporting'reportRun -> Value
toJSON Reporting'reportRun
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"created" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Int
reporting'reportRunCreated Reporting'reportRun
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"error" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Maybe Text
reporting'reportRunError Reporting'reportRun
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Text
reporting'reportRunId Reporting'reportRun
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"livemode" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Bool
reporting'reportRunLivemode Reporting'reportRun
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"parameters" Text -> FinancialReportingFinanceReportRunRunParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun
-> FinancialReportingFinanceReportRunRunParameters
reporting'reportRunParameters Reporting'reportRun
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"report_type" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Text
reporting'reportRunReportType Reporting'reportRun
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"result" Text -> Maybe Reporting'reportRunResult' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Maybe Reporting'reportRunResult'
reporting'reportRunResult Reporting'reportRun
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"status" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Text
reporting'reportRunStatus Reporting'reportRun
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"succeeded_at" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Maybe Int
reporting'reportRunSucceededAt Reporting'reportRun
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"reporting.report_run" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: Reporting'reportRun -> Encoding
toEncoding Reporting'reportRun
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"created" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Int
reporting'reportRunCreated Reporting'reportRun
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"error" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Maybe Text
reporting'reportRunError Reporting'reportRun
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Text
reporting'reportRunId Reporting'reportRun
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"livemode" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Bool
reporting'reportRunLivemode Reporting'reportRun
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"parameters" Text -> FinancialReportingFinanceReportRunRunParameters -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun
-> FinancialReportingFinanceReportRunRunParameters
reporting'reportRunParameters Reporting'reportRun
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"report_type" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Text
reporting'reportRunReportType Reporting'reportRun
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"result" Text -> Maybe Reporting'reportRunResult' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Maybe Reporting'reportRunResult'
reporting'reportRunResult Reporting'reportRun
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"status" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Text
reporting'reportRunStatus Reporting'reportRun
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"succeeded_at" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRun -> Maybe Int
reporting'reportRunSucceededAt Reporting'reportRun
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"reporting.report_run"))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON Reporting'reportRun where
parseJSON :: Value -> Parser Reporting'reportRun
parseJSON = String
-> (Object -> Parser Reporting'reportRun)
-> Value
-> Parser Reporting'reportRun
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"Reporting'reportRun" (\Object
obj -> (((((((((Int
-> Maybe Text
-> Text
-> Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
-> Parser
(Int
-> Maybe Text
-> Text
-> Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Int
-> Maybe Text
-> Text
-> Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun
Reporting'reportRun Parser
(Int
-> Maybe Text
-> Text
-> Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
-> Parser Int
-> Parser
(Maybe Text
-> Text
-> Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"created")) Parser
(Maybe Text
-> Text
-> Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
-> Parser (Maybe Text)
-> Parser
(Text
-> Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"error")) Parser
(Text
-> Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
-> Parser Text
-> Parser
(Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"id")) Parser
(Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
-> Parser Bool
-> Parser
(FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"livemode")) Parser
(FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
-> Parser FinancialReportingFinanceReportRunRunParameters
-> Parser
(Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser FinancialReportingFinanceReportRunRunParameters
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"parameters")) Parser
(Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun)
-> Parser Text
-> Parser
(Maybe Reporting'reportRunResult'
-> Text -> Maybe Int -> Reporting'reportRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"report_type")) Parser
(Maybe Reporting'reportRunResult'
-> Text -> Maybe Int -> Reporting'reportRun)
-> Parser (Maybe Reporting'reportRunResult')
-> Parser (Text -> Maybe Int -> Reporting'reportRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Reporting'reportRunResult')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"result")) Parser (Text -> Maybe Int -> Reporting'reportRun)
-> Parser Text -> Parser (Maybe Int -> Reporting'reportRun)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"status")) Parser (Maybe Int -> Reporting'reportRun)
-> Parser (Maybe Int) -> Parser Reporting'reportRun
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"succeeded_at"))
mkReporting'reportRun ::
GHC.Types.Int ->
Data.Text.Internal.Text ->
GHC.Types.Bool ->
FinancialReportingFinanceReportRunRunParameters ->
Data.Text.Internal.Text ->
Data.Text.Internal.Text ->
Reporting'reportRun
mkReporting'reportRun :: Int
-> Text
-> Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Text
-> Reporting'reportRun
mkReporting'reportRun Int
reporting'reportRunCreated Text
reporting'reportRunId Bool
reporting'reportRunLivemode FinancialReportingFinanceReportRunRunParameters
reporting'reportRunParameters Text
reporting'reportRunReportType Text
reporting'reportRunStatus =
Reporting'reportRun :: Int
-> Maybe Text
-> Text
-> Bool
-> FinancialReportingFinanceReportRunRunParameters
-> Text
-> Maybe Reporting'reportRunResult'
-> Text
-> Maybe Int
-> Reporting'reportRun
Reporting'reportRun
{ reporting'reportRunCreated :: Int
reporting'reportRunCreated = Int
reporting'reportRunCreated,
reporting'reportRunError :: Maybe Text
reporting'reportRunError = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunId :: Text
reporting'reportRunId = Text
reporting'reportRunId,
reporting'reportRunLivemode :: Bool
reporting'reportRunLivemode = Bool
reporting'reportRunLivemode,
reporting'reportRunParameters :: FinancialReportingFinanceReportRunRunParameters
reporting'reportRunParameters = FinancialReportingFinanceReportRunRunParameters
reporting'reportRunParameters,
reporting'reportRunReportType :: Text
reporting'reportRunReportType = Text
reporting'reportRunReportType,
reporting'reportRunResult :: Maybe Reporting'reportRunResult'
reporting'reportRunResult = Maybe Reporting'reportRunResult'
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunStatus :: Text
reporting'reportRunStatus = Text
reporting'reportRunStatus,
reporting'reportRunSucceededAt :: Maybe Int
reporting'reportRunSucceededAt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
}
data Reporting'reportRunResult' = Reporting'reportRunResult'
{
Reporting'reportRunResult' -> Maybe Int
reporting'reportRunResult'Created :: (GHC.Maybe.Maybe GHC.Types.Int),
Reporting'reportRunResult' -> Maybe Int
reporting'reportRunResult'ExpiresAt :: (GHC.Maybe.Maybe GHC.Types.Int),
Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Filename :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
Reporting'reportRunResult'
-> Maybe Reporting'reportRunResult'Links'
reporting'reportRunResult'Links :: (GHC.Maybe.Maybe Reporting'reportRunResult'Links'),
Reporting'reportRunResult'
-> Maybe Reporting'reportRunResult'Object'
reporting'reportRunResult'Object :: (GHC.Maybe.Maybe Reporting'reportRunResult'Object'),
Reporting'reportRunResult'
-> Maybe Reporting'reportRunResult'Purpose'
reporting'reportRunResult'Purpose :: (GHC.Maybe.Maybe Reporting'reportRunResult'Purpose'),
Reporting'reportRunResult' -> Maybe Int
reporting'reportRunResult'Size :: (GHC.Maybe.Maybe GHC.Types.Int),
Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Title :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Type :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Url :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> Reporting'reportRunResult' -> ShowS
[Reporting'reportRunResult'] -> ShowS
Reporting'reportRunResult' -> String
(Int -> Reporting'reportRunResult' -> ShowS)
-> (Reporting'reportRunResult' -> String)
-> ([Reporting'reportRunResult'] -> ShowS)
-> Show Reporting'reportRunResult'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Reporting'reportRunResult'] -> ShowS
$cshowList :: [Reporting'reportRunResult'] -> ShowS
show :: Reporting'reportRunResult' -> String
$cshow :: Reporting'reportRunResult' -> String
showsPrec :: Int -> Reporting'reportRunResult' -> ShowS
$cshowsPrec :: Int -> Reporting'reportRunResult' -> ShowS
GHC.Show.Show,
Reporting'reportRunResult' -> Reporting'reportRunResult' -> Bool
(Reporting'reportRunResult' -> Reporting'reportRunResult' -> Bool)
-> (Reporting'reportRunResult'
-> Reporting'reportRunResult' -> Bool)
-> Eq Reporting'reportRunResult'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reporting'reportRunResult' -> Reporting'reportRunResult' -> Bool
$c/= :: Reporting'reportRunResult' -> Reporting'reportRunResult' -> Bool
== :: Reporting'reportRunResult' -> Reporting'reportRunResult' -> Bool
$c== :: Reporting'reportRunResult' -> Reporting'reportRunResult' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON Reporting'reportRunResult' where
toJSON :: Reporting'reportRunResult' -> Value
toJSON Reporting'reportRunResult'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"created" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Int
reporting'reportRunResult'Created Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"expires_at" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Int
reporting'reportRunResult'ExpiresAt Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"filename" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Filename Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Id Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"links" Text -> Maybe Reporting'reportRunResult'Links' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'
-> Maybe Reporting'reportRunResult'Links'
reporting'reportRunResult'Links Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Maybe Reporting'reportRunResult'Object' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'
-> Maybe Reporting'reportRunResult'Object'
reporting'reportRunResult'Object Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"purpose" Text -> Maybe Reporting'reportRunResult'Purpose' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'
-> Maybe Reporting'reportRunResult'Purpose'
reporting'reportRunResult'Purpose Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"size" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Int
reporting'reportRunResult'Size Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"title" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Title Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"type" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Type Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"url" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Url Reporting'reportRunResult'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: Reporting'reportRunResult' -> Encoding
toEncoding Reporting'reportRunResult'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"created" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Int
reporting'reportRunResult'Created Reporting'reportRunResult'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"expires_at" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Int
reporting'reportRunResult'ExpiresAt Reporting'reportRunResult'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"filename" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Filename Reporting'reportRunResult'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Id Reporting'reportRunResult'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"links" Text -> Maybe Reporting'reportRunResult'Links' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'
-> Maybe Reporting'reportRunResult'Links'
reporting'reportRunResult'Links Reporting'reportRunResult'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"object" Text -> Maybe Reporting'reportRunResult'Object' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'
-> Maybe Reporting'reportRunResult'Object'
reporting'reportRunResult'Object Reporting'reportRunResult'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"purpose" Text -> Maybe Reporting'reportRunResult'Purpose' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'
-> Maybe Reporting'reportRunResult'Purpose'
reporting'reportRunResult'Purpose Reporting'reportRunResult'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"size" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Int
reporting'reportRunResult'Size Reporting'reportRunResult'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"title" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Title Reporting'reportRunResult'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"type" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Type Reporting'reportRunResult'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"url" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult' -> Maybe Text
reporting'reportRunResult'Url Reporting'reportRunResult'
obj)))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON Reporting'reportRunResult' where
parseJSON :: Value -> Parser Reporting'reportRunResult'
parseJSON = String
-> (Object -> Parser Reporting'reportRunResult')
-> Value
-> Parser Reporting'reportRunResult'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"Reporting'reportRunResult'" (\Object
obj -> (((((((((((Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult'
Reporting'reportRunResult' Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"created")) Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"expires_at")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"filename")) Parser
(Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
-> Parser (Maybe Text)
-> Parser
(Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"id")) Parser
(Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
-> Parser (Maybe Reporting'reportRunResult'Links')
-> Parser
(Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Reporting'reportRunResult'Links')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"links")) Parser
(Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
-> Parser (Maybe Reporting'reportRunResult'Object')
-> Parser
(Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Reporting'reportRunResult'Object')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"object")) Parser
(Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
-> Parser (Maybe Reporting'reportRunResult'Purpose')
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Reporting'reportRunResult'Purpose')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"purpose")) Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult')
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Reporting'reportRunResult')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"size")) Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Reporting'reportRunResult')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Reporting'reportRunResult')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"title")) Parser (Maybe Text -> Maybe Text -> Reporting'reportRunResult')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Reporting'reportRunResult')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"type")) Parser (Maybe Text -> Reporting'reportRunResult')
-> Parser (Maybe Text) -> Parser Reporting'reportRunResult'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"url"))
mkReporting'reportRunResult' :: Reporting'reportRunResult'
mkReporting'reportRunResult' :: Reporting'reportRunResult'
mkReporting'reportRunResult' =
Reporting'reportRunResult' :: Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Reporting'reportRunResult'Links'
-> Maybe Reporting'reportRunResult'Object'
-> Maybe Reporting'reportRunResult'Purpose'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Reporting'reportRunResult'
Reporting'reportRunResult'
{ reporting'reportRunResult'Created :: Maybe Int
reporting'reportRunResult'Created = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunResult'ExpiresAt :: Maybe Int
reporting'reportRunResult'ExpiresAt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunResult'Filename :: Maybe Text
reporting'reportRunResult'Filename = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunResult'Id :: Maybe Text
reporting'reportRunResult'Id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunResult'Links :: Maybe Reporting'reportRunResult'Links'
reporting'reportRunResult'Links = Maybe Reporting'reportRunResult'Links'
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunResult'Object :: Maybe Reporting'reportRunResult'Object'
reporting'reportRunResult'Object = Maybe Reporting'reportRunResult'Object'
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunResult'Purpose :: Maybe Reporting'reportRunResult'Purpose'
reporting'reportRunResult'Purpose = Maybe Reporting'reportRunResult'Purpose'
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunResult'Size :: Maybe Int
reporting'reportRunResult'Size = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunResult'Title :: Maybe Text
reporting'reportRunResult'Title = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunResult'Type :: Maybe Text
reporting'reportRunResult'Type = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
reporting'reportRunResult'Url :: Maybe Text
reporting'reportRunResult'Url = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data Reporting'reportRunResult'Links' = Reporting'reportRunResult'Links'
{
Reporting'reportRunResult'Links' -> [FileLink]
reporting'reportRunResult'Links'Data :: ([FileLink]),
Reporting'reportRunResult'Links' -> Bool
reporting'reportRunResult'Links'HasMore :: GHC.Types.Bool,
Reporting'reportRunResult'Links' -> Text
reporting'reportRunResult'Links'Url :: Data.Text.Internal.Text
}
deriving
( Int -> Reporting'reportRunResult'Links' -> ShowS
[Reporting'reportRunResult'Links'] -> ShowS
Reporting'reportRunResult'Links' -> String
(Int -> Reporting'reportRunResult'Links' -> ShowS)
-> (Reporting'reportRunResult'Links' -> String)
-> ([Reporting'reportRunResult'Links'] -> ShowS)
-> Show Reporting'reportRunResult'Links'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Reporting'reportRunResult'Links'] -> ShowS
$cshowList :: [Reporting'reportRunResult'Links'] -> ShowS
show :: Reporting'reportRunResult'Links' -> String
$cshow :: Reporting'reportRunResult'Links' -> String
showsPrec :: Int -> Reporting'reportRunResult'Links' -> ShowS
$cshowsPrec :: Int -> Reporting'reportRunResult'Links' -> ShowS
GHC.Show.Show,
Reporting'reportRunResult'Links'
-> Reporting'reportRunResult'Links' -> Bool
(Reporting'reportRunResult'Links'
-> Reporting'reportRunResult'Links' -> Bool)
-> (Reporting'reportRunResult'Links'
-> Reporting'reportRunResult'Links' -> Bool)
-> Eq Reporting'reportRunResult'Links'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reporting'reportRunResult'Links'
-> Reporting'reportRunResult'Links' -> Bool
$c/= :: Reporting'reportRunResult'Links'
-> Reporting'reportRunResult'Links' -> Bool
== :: Reporting'reportRunResult'Links'
-> Reporting'reportRunResult'Links' -> Bool
$c== :: Reporting'reportRunResult'Links'
-> Reporting'reportRunResult'Links' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON Reporting'reportRunResult'Links' where
toJSON :: Reporting'reportRunResult'Links' -> Value
toJSON Reporting'reportRunResult'Links'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"data" Text -> [FileLink] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'Links' -> [FileLink]
reporting'reportRunResult'Links'Data Reporting'reportRunResult'Links'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"has_more" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'Links' -> Bool
reporting'reportRunResult'Links'HasMore Reporting'reportRunResult'Links'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"url" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'Links' -> Text
reporting'reportRunResult'Links'Url Reporting'reportRunResult'Links'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: Reporting'reportRunResult'Links' -> Encoding
toEncoding Reporting'reportRunResult'Links'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"data" Text -> [FileLink] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'Links' -> [FileLink]
reporting'reportRunResult'Links'Data Reporting'reportRunResult'Links'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"has_more" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'Links' -> Bool
reporting'reportRunResult'Links'HasMore Reporting'reportRunResult'Links'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"url" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Reporting'reportRunResult'Links' -> Text
reporting'reportRunResult'Links'Url Reporting'reportRunResult'Links'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list"))))
instance Data.Aeson.Types.FromJSON.FromJSON Reporting'reportRunResult'Links' where
parseJSON :: Value -> Parser Reporting'reportRunResult'Links'
parseJSON = String
-> (Object -> Parser Reporting'reportRunResult'Links')
-> Value
-> Parser Reporting'reportRunResult'Links'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"Reporting'reportRunResult'Links'" (\Object
obj -> ((([FileLink] -> Bool -> Text -> Reporting'reportRunResult'Links')
-> Parser
([FileLink] -> Bool -> Text -> Reporting'reportRunResult'Links')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure [FileLink] -> Bool -> Text -> Reporting'reportRunResult'Links'
Reporting'reportRunResult'Links' Parser
([FileLink] -> Bool -> Text -> Reporting'reportRunResult'Links')
-> Parser [FileLink]
-> Parser (Bool -> Text -> Reporting'reportRunResult'Links')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [FileLink]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"data")) Parser (Bool -> Text -> Reporting'reportRunResult'Links')
-> Parser Bool -> Parser (Text -> Reporting'reportRunResult'Links')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"has_more")) Parser (Text -> Reporting'reportRunResult'Links')
-> Parser Text -> Parser Reporting'reportRunResult'Links'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"url"))
mkReporting'reportRunResult'Links' ::
[FileLink] ->
GHC.Types.Bool ->
Data.Text.Internal.Text ->
Reporting'reportRunResult'Links'
mkReporting'reportRunResult'Links' :: [FileLink] -> Bool -> Text -> Reporting'reportRunResult'Links'
mkReporting'reportRunResult'Links' [FileLink]
reporting'reportRunResult'Links'Data Bool
reporting'reportRunResult'Links'HasMore Text
reporting'reportRunResult'Links'Url =
Reporting'reportRunResult'Links' :: [FileLink] -> Bool -> Text -> Reporting'reportRunResult'Links'
Reporting'reportRunResult'Links'
{ reporting'reportRunResult'Links'Data :: [FileLink]
reporting'reportRunResult'Links'Data = [FileLink]
reporting'reportRunResult'Links'Data,
reporting'reportRunResult'Links'HasMore :: Bool
reporting'reportRunResult'Links'HasMore = Bool
reporting'reportRunResult'Links'HasMore,
reporting'reportRunResult'Links'Url :: Text
reporting'reportRunResult'Links'Url = Text
reporting'reportRunResult'Links'Url
}
data Reporting'reportRunResult'Object'
=
Reporting'reportRunResult'Object'Other Data.Aeson.Types.Internal.Value
|
Reporting'reportRunResult'Object'Typed Data.Text.Internal.Text
|
Reporting'reportRunResult'Object'EnumFile
deriving (Int -> Reporting'reportRunResult'Object' -> ShowS
[Reporting'reportRunResult'Object'] -> ShowS
Reporting'reportRunResult'Object' -> String
(Int -> Reporting'reportRunResult'Object' -> ShowS)
-> (Reporting'reportRunResult'Object' -> String)
-> ([Reporting'reportRunResult'Object'] -> ShowS)
-> Show Reporting'reportRunResult'Object'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Reporting'reportRunResult'Object'] -> ShowS
$cshowList :: [Reporting'reportRunResult'Object'] -> ShowS
show :: Reporting'reportRunResult'Object' -> String
$cshow :: Reporting'reportRunResult'Object' -> String
showsPrec :: Int -> Reporting'reportRunResult'Object' -> ShowS
$cshowsPrec :: Int -> Reporting'reportRunResult'Object' -> ShowS
GHC.Show.Show, Reporting'reportRunResult'Object'
-> Reporting'reportRunResult'Object' -> Bool
(Reporting'reportRunResult'Object'
-> Reporting'reportRunResult'Object' -> Bool)
-> (Reporting'reportRunResult'Object'
-> Reporting'reportRunResult'Object' -> Bool)
-> Eq Reporting'reportRunResult'Object'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reporting'reportRunResult'Object'
-> Reporting'reportRunResult'Object' -> Bool
$c/= :: Reporting'reportRunResult'Object'
-> Reporting'reportRunResult'Object' -> Bool
== :: Reporting'reportRunResult'Object'
-> Reporting'reportRunResult'Object' -> Bool
$c== :: Reporting'reportRunResult'Object'
-> Reporting'reportRunResult'Object' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON Reporting'reportRunResult'Object' where
toJSON :: Reporting'reportRunResult'Object' -> Value
toJSON (Reporting'reportRunResult'Object'Other Value
val) = Value
val
toJSON (Reporting'reportRunResult'Object'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (Reporting'reportRunResult'Object'
Reporting'reportRunResult'Object'EnumFile) = Value
"file"
instance Data.Aeson.Types.FromJSON.FromJSON Reporting'reportRunResult'Object' where
parseJSON :: Value -> Parser Reporting'reportRunResult'Object'
parseJSON Value
val =
Reporting'reportRunResult'Object'
-> Parser Reporting'reportRunResult'Object'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"file" -> Reporting'reportRunResult'Object'
Reporting'reportRunResult'Object'EnumFile
| Bool
GHC.Base.otherwise -> Value -> Reporting'reportRunResult'Object'
Reporting'reportRunResult'Object'Other Value
val
)
data Reporting'reportRunResult'Purpose'
=
Reporting'reportRunResult'Purpose'Other Data.Aeson.Types.Internal.Value
|
Reporting'reportRunResult'Purpose'Typed Data.Text.Internal.Text
|
Reporting'reportRunResult'Purpose'EnumAccountRequirement
|
Reporting'reportRunResult'Purpose'EnumAdditionalVerification
|
Reporting'reportRunResult'Purpose'EnumBusinessIcon
|
Reporting'reportRunResult'Purpose'EnumBusinessLogo
|
Reporting'reportRunResult'Purpose'EnumCustomerSignature
|
Reporting'reportRunResult'Purpose'EnumDisputeEvidence
|
Reporting'reportRunResult'Purpose'EnumDocumentProviderIdentityDocument
|
Reporting'reportRunResult'Purpose'EnumFinanceReportRun
|
Reporting'reportRunResult'Purpose'EnumIdentityDocument
|
Reporting'reportRunResult'Purpose'EnumIdentityDocumentDownloadable
|
Reporting'reportRunResult'Purpose'EnumPciDocument
|
Reporting'reportRunResult'Purpose'EnumSelfie
|
Reporting'reportRunResult'Purpose'EnumSigmaScheduledQuery
|
Reporting'reportRunResult'Purpose'EnumTaxDocumentUserUpload
deriving (Int -> Reporting'reportRunResult'Purpose' -> ShowS
[Reporting'reportRunResult'Purpose'] -> ShowS
Reporting'reportRunResult'Purpose' -> String
(Int -> Reporting'reportRunResult'Purpose' -> ShowS)
-> (Reporting'reportRunResult'Purpose' -> String)
-> ([Reporting'reportRunResult'Purpose'] -> ShowS)
-> Show Reporting'reportRunResult'Purpose'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Reporting'reportRunResult'Purpose'] -> ShowS
$cshowList :: [Reporting'reportRunResult'Purpose'] -> ShowS
show :: Reporting'reportRunResult'Purpose' -> String
$cshow :: Reporting'reportRunResult'Purpose' -> String
showsPrec :: Int -> Reporting'reportRunResult'Purpose' -> ShowS
$cshowsPrec :: Int -> Reporting'reportRunResult'Purpose' -> ShowS
GHC.Show.Show, Reporting'reportRunResult'Purpose'
-> Reporting'reportRunResult'Purpose' -> Bool
(Reporting'reportRunResult'Purpose'
-> Reporting'reportRunResult'Purpose' -> Bool)
-> (Reporting'reportRunResult'Purpose'
-> Reporting'reportRunResult'Purpose' -> Bool)
-> Eq Reporting'reportRunResult'Purpose'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reporting'reportRunResult'Purpose'
-> Reporting'reportRunResult'Purpose' -> Bool
$c/= :: Reporting'reportRunResult'Purpose'
-> Reporting'reportRunResult'Purpose' -> Bool
== :: Reporting'reportRunResult'Purpose'
-> Reporting'reportRunResult'Purpose' -> Bool
$c== :: Reporting'reportRunResult'Purpose'
-> Reporting'reportRunResult'Purpose' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON Reporting'reportRunResult'Purpose' where
toJSON :: Reporting'reportRunResult'Purpose' -> Value
toJSON (Reporting'reportRunResult'Purpose'Other Value
val) = Value
val
toJSON (Reporting'reportRunResult'Purpose'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumAccountRequirement) = Value
"account_requirement"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumAdditionalVerification) = Value
"additional_verification"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumBusinessIcon) = Value
"business_icon"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumBusinessLogo) = Value
"business_logo"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumCustomerSignature) = Value
"customer_signature"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumDisputeEvidence) = Value
"dispute_evidence"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumDocumentProviderIdentityDocument) = Value
"document_provider_identity_document"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumFinanceReportRun) = Value
"finance_report_run"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumIdentityDocument) = Value
"identity_document"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumIdentityDocumentDownloadable) = Value
"identity_document_downloadable"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumPciDocument) = Value
"pci_document"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumSelfie) = Value
"selfie"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumSigmaScheduledQuery) = Value
"sigma_scheduled_query"
toJSON (Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumTaxDocumentUserUpload) = Value
"tax_document_user_upload"
instance Data.Aeson.Types.FromJSON.FromJSON Reporting'reportRunResult'Purpose' where
parseJSON :: Value -> Parser Reporting'reportRunResult'Purpose'
parseJSON Value
val =
Reporting'reportRunResult'Purpose'
-> Parser Reporting'reportRunResult'Purpose'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"account_requirement" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumAccountRequirement
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"additional_verification" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumAdditionalVerification
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"business_icon" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumBusinessIcon
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"business_logo" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumBusinessLogo
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"customer_signature" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumCustomerSignature
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"dispute_evidence" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumDisputeEvidence
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"document_provider_identity_document" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumDocumentProviderIdentityDocument
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"finance_report_run" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumFinanceReportRun
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"identity_document" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumIdentityDocument
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"identity_document_downloadable" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumIdentityDocumentDownloadable
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pci_document" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumPciDocument
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"selfie" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumSelfie
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sigma_scheduled_query" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumSigmaScheduledQuery
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"tax_document_user_upload" -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'EnumTaxDocumentUserUpload
| Bool
GHC.Base.otherwise -> Value -> Reporting'reportRunResult'Purpose'
Reporting'reportRunResult'Purpose'Other Value
val
)