{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.
{-# LANGUAGE OverloadedStrings #-}

-- | Contains the different functions to run the operation getReportingReportRuns
module StripeAPI.Operations.GetReportingReportRuns where

import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
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.Either
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 Data.Vector
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified Network.HTTP.Client
import qualified Network.HTTP.Client as Network.HTTP.Client.Request
import qualified Network.HTTP.Client as Network.HTTP.Client.Types
import qualified Network.HTTP.Simple
import qualified Network.HTTP.Types
import qualified Network.HTTP.Types as Network.HTTP.Types.Status
import qualified Network.HTTP.Types as Network.HTTP.Types.URI
import qualified StripeAPI.Common
import StripeAPI.Types
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | > GET /v1/reporting/report_runs
--
-- \<p>Returns a list of Report Runs, with the most recent appearing first.\<\/p>
getReportingReportRuns ::
  forall m.
  StripeAPI.Common.MonadHTTP m =>
  -- | Contains all available parameters of this operation (query and path parameters)
  GetReportingReportRunsParameters ->
  -- | Monadic computation which returns the result of the operation
  StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response GetReportingReportRunsResponse)
getReportingReportRuns :: GetReportingReportRunsParameters
-> ClientT m (Response GetReportingReportRunsResponse)
getReportingReportRuns GetReportingReportRunsParameters
parameters =
  (Response ByteString -> Response GetReportingReportRunsResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response GetReportingReportRunsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
    ( \Response ByteString
response_0 ->
        (ByteString -> GetReportingReportRunsResponse)
-> Response ByteString -> Response GetReportingReportRunsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
          ( (String -> GetReportingReportRunsResponse)
-> (GetReportingReportRunsResponse
    -> GetReportingReportRunsResponse)
-> Either String GetReportingReportRunsResponse
-> GetReportingReportRunsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> GetReportingReportRunsResponse
GetReportingReportRunsResponseError GetReportingReportRunsResponse -> GetReportingReportRunsResponse
forall a. a -> a
GHC.Base.id
              (Either String GetReportingReportRunsResponse
 -> GetReportingReportRunsResponse)
-> (ByteString -> Either String GetReportingReportRunsResponse)
-> ByteString
-> GetReportingReportRunsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. ( \Response ByteString
response ByteString
body ->
                             if
                                 | (\Status
status_1 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_1 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Int
200) (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
                                   GetReportingReportRunsResponseBody200
-> GetReportingReportRunsResponse
GetReportingReportRunsResponse200
                                     (GetReportingReportRunsResponseBody200
 -> GetReportingReportRunsResponse)
-> Either String GetReportingReportRunsResponseBody200
-> Either String GetReportingReportRunsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String GetReportingReportRunsResponseBody200
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
                                                          Data.Either.Either
                                                            GHC.Base.String
                                                            GetReportingReportRunsResponseBody200
                                                      )
                                 | Bool -> Status -> Bool
forall a b. a -> b -> a
GHC.Base.const Bool
GHC.Types.True (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
                                   Error -> GetReportingReportRunsResponse
GetReportingReportRunsResponseDefault
                                     (Error -> GetReportingReportRunsResponse)
-> Either String Error
-> Either String GetReportingReportRunsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String Error
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
                                                          Data.Either.Either
                                                            GHC.Base.String
                                                            Error
                                                      )
                                 | Bool
GHC.Base.otherwise -> String -> Either String GetReportingReportRunsResponse
forall a b. a -> Either a b
Data.Either.Left String
"Missing default response type"
                         )
                Response ByteString
response_0
          )
          Response ByteString
response_0
    )
    ( Text -> Text -> [QueryParameter] -> ClientT m (Response ByteString)
forall (m :: * -> *).
MonadHTTP m =>
Text -> Text -> [QueryParameter] -> ClientT m (Response ByteString)
StripeAPI.Common.doCallWithConfigurationM
        (Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.pack String
"GET")
        (String -> Text
Data.Text.pack String
"/v1/reporting/report_runs")
        [ Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"created") (GetReportingReportRunsParametersQueryCreated'Variants -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (GetReportingReportRunsParametersQueryCreated'Variants -> Value)
-> Maybe GetReportingReportRunsParametersQueryCreated'Variants
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetReportingReportRunsParameters
-> Maybe GetReportingReportRunsParametersQueryCreated'Variants
getReportingReportRunsParametersQueryCreated GetReportingReportRunsParameters
parameters) (String -> Text
Data.Text.pack String
"deepObject") Bool
GHC.Types.True,
          Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"ending_before") (Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Text -> Value) -> Maybe Text -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetReportingReportRunsParameters -> Maybe Text
getReportingReportRunsParametersQueryEndingBefore GetReportingReportRunsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True,
          Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"expand") ([Text] -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON ([Text] -> Value) -> Maybe [Text] -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetReportingReportRunsParameters -> Maybe [Text]
getReportingReportRunsParametersQueryExpand GetReportingReportRunsParameters
parameters) (String -> Text
Data.Text.pack String
"deepObject") Bool
GHC.Types.True,
          Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"limit") (Int -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Int -> Value) -> Maybe Int -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetReportingReportRunsParameters -> Maybe Int
getReportingReportRunsParametersQueryLimit GetReportingReportRunsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True,
          Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"starting_after") (Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Text -> Value) -> Maybe Text -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetReportingReportRunsParameters -> Maybe Text
getReportingReportRunsParametersQueryStartingAfter GetReportingReportRunsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True
        ]
    )

-- | Defines the object schema located at @paths.\/v1\/reporting\/report_runs.GET.parameters@ in the specification.
data GetReportingReportRunsParameters = GetReportingReportRunsParameters
  { -- | queryCreated: Represents the parameter named \'created\'
    GetReportingReportRunsParameters
-> Maybe GetReportingReportRunsParametersQueryCreated'Variants
getReportingReportRunsParametersQueryCreated :: (GHC.Maybe.Maybe GetReportingReportRunsParametersQueryCreated'Variants),
    -- | queryEnding_before: Represents the parameter named \'ending_before\'
    --
    -- A cursor for use in pagination. \`ending_before\` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with \`obj_bar\`, your subsequent call can include \`ending_before=obj_bar\` in order to fetch the previous page of the list.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    GetReportingReportRunsParameters -> Maybe Text
getReportingReportRunsParametersQueryEndingBefore :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | queryExpand: Represents the parameter named \'expand\'
    --
    -- Specifies which fields in the response should be expanded.
    GetReportingReportRunsParameters -> Maybe [Text]
getReportingReportRunsParametersQueryExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
    -- | queryLimit: Represents the parameter named \'limit\'
    --
    -- A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
    GetReportingReportRunsParameters -> Maybe Int
getReportingReportRunsParametersQueryLimit :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | queryStarting_after: Represents the parameter named \'starting_after\'
    --
    -- A cursor for use in pagination. \`starting_after\` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with \`obj_foo\`, your subsequent call can include \`starting_after=obj_foo\` in order to fetch the next page of the list.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    GetReportingReportRunsParameters -> Maybe Text
getReportingReportRunsParametersQueryStartingAfter :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int -> GetReportingReportRunsParameters -> ShowS
[GetReportingReportRunsParameters] -> ShowS
GetReportingReportRunsParameters -> String
(Int -> GetReportingReportRunsParameters -> ShowS)
-> (GetReportingReportRunsParameters -> String)
-> ([GetReportingReportRunsParameters] -> ShowS)
-> Show GetReportingReportRunsParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReportingReportRunsParameters] -> ShowS
$cshowList :: [GetReportingReportRunsParameters] -> ShowS
show :: GetReportingReportRunsParameters -> String
$cshow :: GetReportingReportRunsParameters -> String
showsPrec :: Int -> GetReportingReportRunsParameters -> ShowS
$cshowsPrec :: Int -> GetReportingReportRunsParameters -> ShowS
GHC.Show.Show,
      GetReportingReportRunsParameters
-> GetReportingReportRunsParameters -> Bool
(GetReportingReportRunsParameters
 -> GetReportingReportRunsParameters -> Bool)
-> (GetReportingReportRunsParameters
    -> GetReportingReportRunsParameters -> Bool)
-> Eq GetReportingReportRunsParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReportingReportRunsParameters
-> GetReportingReportRunsParameters -> Bool
$c/= :: GetReportingReportRunsParameters
-> GetReportingReportRunsParameters -> Bool
== :: GetReportingReportRunsParameters
-> GetReportingReportRunsParameters -> Bool
$c== :: GetReportingReportRunsParameters
-> GetReportingReportRunsParameters -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON GetReportingReportRunsParameters where
  toJSON :: GetReportingReportRunsParameters -> Value
toJSON GetReportingReportRunsParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"queryCreated" Text
-> Maybe GetReportingReportRunsParametersQueryCreated'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParameters
-> Maybe GetReportingReportRunsParametersQueryCreated'Variants
getReportingReportRunsParametersQueryCreated GetReportingReportRunsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryEnding_before" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParameters -> Maybe Text
getReportingReportRunsParametersQueryEndingBefore GetReportingReportRunsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryExpand" Text -> Maybe [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParameters -> Maybe [Text]
getReportingReportRunsParametersQueryExpand GetReportingReportRunsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryLimit" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParameters -> Maybe Int
getReportingReportRunsParametersQueryLimit GetReportingReportRunsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryStarting_after" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParameters -> Maybe Text
getReportingReportRunsParametersQueryStartingAfter GetReportingReportRunsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: GetReportingReportRunsParameters -> Encoding
toEncoding GetReportingReportRunsParameters
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"queryCreated" Text
-> Maybe GetReportingReportRunsParametersQueryCreated'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParameters
-> Maybe GetReportingReportRunsParametersQueryCreated'Variants
getReportingReportRunsParametersQueryCreated GetReportingReportRunsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryEnding_before" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParameters -> Maybe Text
getReportingReportRunsParametersQueryEndingBefore GetReportingReportRunsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryExpand" Text -> Maybe [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParameters -> Maybe [Text]
getReportingReportRunsParametersQueryExpand GetReportingReportRunsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryLimit" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParameters -> Maybe Int
getReportingReportRunsParametersQueryLimit GetReportingReportRunsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"queryStarting_after" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParameters -> Maybe Text
getReportingReportRunsParametersQueryStartingAfter GetReportingReportRunsParameters
obj)))))

instance Data.Aeson.Types.FromJSON.FromJSON GetReportingReportRunsParameters where
  parseJSON :: Value -> Parser GetReportingReportRunsParameters
parseJSON = String
-> (Object -> Parser GetReportingReportRunsParameters)
-> Value
-> Parser GetReportingReportRunsParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetReportingReportRunsParameters" (\Object
obj -> (((((Maybe GetReportingReportRunsParametersQueryCreated'Variants
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Int
 -> Maybe Text
 -> GetReportingReportRunsParameters)
-> Parser
     (Maybe GetReportingReportRunsParametersQueryCreated'Variants
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Text
      -> GetReportingReportRunsParameters)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe GetReportingReportRunsParametersQueryCreated'Variants
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetReportingReportRunsParameters
GetReportingReportRunsParameters Parser
  (Maybe GetReportingReportRunsParametersQueryCreated'Variants
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Text
   -> GetReportingReportRunsParameters)
-> Parser
     (Maybe GetReportingReportRunsParametersQueryCreated'Variants)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Text
      -> GetReportingReportRunsParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     (Maybe GetReportingReportRunsParametersQueryCreated'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"queryCreated")) Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Text
   -> GetReportingReportRunsParameters)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Int -> Maybe Text -> GetReportingReportRunsParameters)
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
"queryEnding_before")) Parser
  (Maybe [Text]
   -> Maybe Int -> Maybe Text -> GetReportingReportRunsParameters)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Int -> Maybe Text -> GetReportingReportRunsParameters)
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
"queryExpand")) Parser
  (Maybe Int -> Maybe Text -> GetReportingReportRunsParameters)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> GetReportingReportRunsParameters)
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
"queryLimit")) Parser (Maybe Text -> GetReportingReportRunsParameters)
-> Parser (Maybe Text) -> Parser GetReportingReportRunsParameters
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
"queryStarting_after"))

-- | Create a new 'GetReportingReportRunsParameters' with all required fields.
mkGetReportingReportRunsParameters :: GetReportingReportRunsParameters
mkGetReportingReportRunsParameters :: GetReportingReportRunsParameters
mkGetReportingReportRunsParameters =
  GetReportingReportRunsParameters :: Maybe GetReportingReportRunsParametersQueryCreated'Variants
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetReportingReportRunsParameters
GetReportingReportRunsParameters
    { getReportingReportRunsParametersQueryCreated :: Maybe GetReportingReportRunsParametersQueryCreated'Variants
getReportingReportRunsParametersQueryCreated = Maybe GetReportingReportRunsParametersQueryCreated'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
      getReportingReportRunsParametersQueryEndingBefore :: Maybe Text
getReportingReportRunsParametersQueryEndingBefore = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      getReportingReportRunsParametersQueryExpand :: Maybe [Text]
getReportingReportRunsParametersQueryExpand = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
      getReportingReportRunsParametersQueryLimit :: Maybe Int
getReportingReportRunsParametersQueryLimit = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      getReportingReportRunsParametersQueryStartingAfter :: Maybe Text
getReportingReportRunsParametersQueryStartingAfter = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @paths.\/v1\/reporting\/report_runs.GET.parameters.properties.queryCreated.anyOf@ in the specification.
data GetReportingReportRunsParametersQueryCreated'OneOf1 = GetReportingReportRunsParametersQueryCreated'OneOf1
  { -- | gt
    GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Gt :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | gte
    GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Gte :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | lt
    GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Lt :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | lte
    GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Lte :: (GHC.Maybe.Maybe GHC.Types.Int)
  }
  deriving
    ( Int -> GetReportingReportRunsParametersQueryCreated'OneOf1 -> ShowS
[GetReportingReportRunsParametersQueryCreated'OneOf1] -> ShowS
GetReportingReportRunsParametersQueryCreated'OneOf1 -> String
(Int
 -> GetReportingReportRunsParametersQueryCreated'OneOf1 -> ShowS)
-> (GetReportingReportRunsParametersQueryCreated'OneOf1 -> String)
-> ([GetReportingReportRunsParametersQueryCreated'OneOf1] -> ShowS)
-> Show GetReportingReportRunsParametersQueryCreated'OneOf1
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReportingReportRunsParametersQueryCreated'OneOf1] -> ShowS
$cshowList :: [GetReportingReportRunsParametersQueryCreated'OneOf1] -> ShowS
show :: GetReportingReportRunsParametersQueryCreated'OneOf1 -> String
$cshow :: GetReportingReportRunsParametersQueryCreated'OneOf1 -> String
showsPrec :: Int -> GetReportingReportRunsParametersQueryCreated'OneOf1 -> ShowS
$cshowsPrec :: Int -> GetReportingReportRunsParametersQueryCreated'OneOf1 -> ShowS
GHC.Show.Show,
      GetReportingReportRunsParametersQueryCreated'OneOf1
-> GetReportingReportRunsParametersQueryCreated'OneOf1 -> Bool
(GetReportingReportRunsParametersQueryCreated'OneOf1
 -> GetReportingReportRunsParametersQueryCreated'OneOf1 -> Bool)
-> (GetReportingReportRunsParametersQueryCreated'OneOf1
    -> GetReportingReportRunsParametersQueryCreated'OneOf1 -> Bool)
-> Eq GetReportingReportRunsParametersQueryCreated'OneOf1
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReportingReportRunsParametersQueryCreated'OneOf1
-> GetReportingReportRunsParametersQueryCreated'OneOf1 -> Bool
$c/= :: GetReportingReportRunsParametersQueryCreated'OneOf1
-> GetReportingReportRunsParametersQueryCreated'OneOf1 -> Bool
== :: GetReportingReportRunsParametersQueryCreated'OneOf1
-> GetReportingReportRunsParametersQueryCreated'OneOf1 -> Bool
$c== :: GetReportingReportRunsParametersQueryCreated'OneOf1
-> GetReportingReportRunsParametersQueryCreated'OneOf1 -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON GetReportingReportRunsParametersQueryCreated'OneOf1 where
  toJSON :: GetReportingReportRunsParametersQueryCreated'OneOf1 -> Value
toJSON GetReportingReportRunsParametersQueryCreated'OneOf1
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"gt" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Gt GetReportingReportRunsParametersQueryCreated'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"gte" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Gte GetReportingReportRunsParametersQueryCreated'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"lt" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Lt GetReportingReportRunsParametersQueryCreated'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"lte" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Lte GetReportingReportRunsParametersQueryCreated'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: GetReportingReportRunsParametersQueryCreated'OneOf1 -> Encoding
toEncoding GetReportingReportRunsParametersQueryCreated'OneOf1
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"gt" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Gt GetReportingReportRunsParametersQueryCreated'OneOf1
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"gte" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Gte GetReportingReportRunsParametersQueryCreated'OneOf1
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"lt" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Lt GetReportingReportRunsParametersQueryCreated'OneOf1
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"lte" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsParametersQueryCreated'OneOf1 -> Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Lte GetReportingReportRunsParametersQueryCreated'OneOf1
obj))))

instance Data.Aeson.Types.FromJSON.FromJSON GetReportingReportRunsParametersQueryCreated'OneOf1 where
  parseJSON :: Value -> Parser GetReportingReportRunsParametersQueryCreated'OneOf1
parseJSON = String
-> (Object
    -> Parser GetReportingReportRunsParametersQueryCreated'OneOf1)
-> Value
-> Parser GetReportingReportRunsParametersQueryCreated'OneOf1
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetReportingReportRunsParametersQueryCreated'OneOf1" (\Object
obj -> ((((Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> GetReportingReportRunsParametersQueryCreated'OneOf1)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> GetReportingReportRunsParametersQueryCreated'OneOf1)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> GetReportingReportRunsParametersQueryCreated'OneOf1
GetReportingReportRunsParametersQueryCreated'OneOf1 Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> GetReportingReportRunsParametersQueryCreated'OneOf1)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> GetReportingReportRunsParametersQueryCreated'OneOf1)
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
"gt")) Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> GetReportingReportRunsParametersQueryCreated'OneOf1)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> GetReportingReportRunsParametersQueryCreated'OneOf1)
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
"gte")) Parser
  (Maybe Int
   -> Maybe Int
   -> GetReportingReportRunsParametersQueryCreated'OneOf1)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int -> GetReportingReportRunsParametersQueryCreated'OneOf1)
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
"lt")) Parser
  (Maybe Int -> GetReportingReportRunsParametersQueryCreated'OneOf1)
-> Parser (Maybe Int)
-> Parser GetReportingReportRunsParametersQueryCreated'OneOf1
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
"lte"))

-- | Create a new 'GetReportingReportRunsParametersQueryCreated'OneOf1' with all required fields.
mkGetReportingReportRunsParametersQueryCreated'OneOf1 :: GetReportingReportRunsParametersQueryCreated'OneOf1
mkGetReportingReportRunsParametersQueryCreated'OneOf1 :: GetReportingReportRunsParametersQueryCreated'OneOf1
mkGetReportingReportRunsParametersQueryCreated'OneOf1 =
  GetReportingReportRunsParametersQueryCreated'OneOf1 :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> GetReportingReportRunsParametersQueryCreated'OneOf1
GetReportingReportRunsParametersQueryCreated'OneOf1
    { getReportingReportRunsParametersQueryCreated'OneOf1Gt :: Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Gt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      getReportingReportRunsParametersQueryCreated'OneOf1Gte :: Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Gte = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      getReportingReportRunsParametersQueryCreated'OneOf1Lt :: Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Lt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      getReportingReportRunsParametersQueryCreated'OneOf1Lte :: Maybe Int
getReportingReportRunsParametersQueryCreated'OneOf1Lte = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the oneOf schema located at @paths.\/v1\/reporting\/report_runs.GET.parameters.properties.queryCreated.anyOf@ in the specification.
--
-- Represents the parameter named \'created\'
data GetReportingReportRunsParametersQueryCreated'Variants
  = GetReportingReportRunsParametersQueryCreated'GetReportingReportRunsParametersQueryCreated'OneOf1 GetReportingReportRunsParametersQueryCreated'OneOf1
  | GetReportingReportRunsParametersQueryCreated'Int GHC.Types.Int
  deriving (Int
-> GetReportingReportRunsParametersQueryCreated'Variants -> ShowS
[GetReportingReportRunsParametersQueryCreated'Variants] -> ShowS
GetReportingReportRunsParametersQueryCreated'Variants -> String
(Int
 -> GetReportingReportRunsParametersQueryCreated'Variants -> ShowS)
-> (GetReportingReportRunsParametersQueryCreated'Variants
    -> String)
-> ([GetReportingReportRunsParametersQueryCreated'Variants]
    -> ShowS)
-> Show GetReportingReportRunsParametersQueryCreated'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReportingReportRunsParametersQueryCreated'Variants] -> ShowS
$cshowList :: [GetReportingReportRunsParametersQueryCreated'Variants] -> ShowS
show :: GetReportingReportRunsParametersQueryCreated'Variants -> String
$cshow :: GetReportingReportRunsParametersQueryCreated'Variants -> String
showsPrec :: Int
-> GetReportingReportRunsParametersQueryCreated'Variants -> ShowS
$cshowsPrec :: Int
-> GetReportingReportRunsParametersQueryCreated'Variants -> ShowS
GHC.Show.Show, GetReportingReportRunsParametersQueryCreated'Variants
-> GetReportingReportRunsParametersQueryCreated'Variants -> Bool
(GetReportingReportRunsParametersQueryCreated'Variants
 -> GetReportingReportRunsParametersQueryCreated'Variants -> Bool)
-> (GetReportingReportRunsParametersQueryCreated'Variants
    -> GetReportingReportRunsParametersQueryCreated'Variants -> Bool)
-> Eq GetReportingReportRunsParametersQueryCreated'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReportingReportRunsParametersQueryCreated'Variants
-> GetReportingReportRunsParametersQueryCreated'Variants -> Bool
$c/= :: GetReportingReportRunsParametersQueryCreated'Variants
-> GetReportingReportRunsParametersQueryCreated'Variants -> Bool
== :: GetReportingReportRunsParametersQueryCreated'Variants
-> GetReportingReportRunsParametersQueryCreated'Variants -> Bool
$c== :: GetReportingReportRunsParametersQueryCreated'Variants
-> GetReportingReportRunsParametersQueryCreated'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON GetReportingReportRunsParametersQueryCreated'Variants where
  toJSON :: GetReportingReportRunsParametersQueryCreated'Variants -> Value
toJSON (GetReportingReportRunsParametersQueryCreated'GetReportingReportRunsParametersQueryCreated'OneOf1 GetReportingReportRunsParametersQueryCreated'OneOf1
a) = GetReportingReportRunsParametersQueryCreated'OneOf1 -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON GetReportingReportRunsParametersQueryCreated'OneOf1
a
  toJSON (GetReportingReportRunsParametersQueryCreated'Int Int
a) = Int -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Int
a

instance Data.Aeson.Types.FromJSON.FromJSON GetReportingReportRunsParametersQueryCreated'Variants where
  parseJSON :: Value
-> Parser GetReportingReportRunsParametersQueryCreated'Variants
parseJSON Value
val = case (GetReportingReportRunsParametersQueryCreated'OneOf1
-> GetReportingReportRunsParametersQueryCreated'Variants
GetReportingReportRunsParametersQueryCreated'GetReportingReportRunsParametersQueryCreated'OneOf1 (GetReportingReportRunsParametersQueryCreated'OneOf1
 -> GetReportingReportRunsParametersQueryCreated'Variants)
-> Result GetReportingReportRunsParametersQueryCreated'OneOf1
-> Result GetReportingReportRunsParametersQueryCreated'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result GetReportingReportRunsParametersQueryCreated'OneOf1
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result GetReportingReportRunsParametersQueryCreated'Variants
-> Result GetReportingReportRunsParametersQueryCreated'Variants
-> Result GetReportingReportRunsParametersQueryCreated'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Int -> GetReportingReportRunsParametersQueryCreated'Variants
GetReportingReportRunsParametersQueryCreated'Int (Int -> GetReportingReportRunsParametersQueryCreated'Variants)
-> Result Int
-> Result GetReportingReportRunsParametersQueryCreated'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Int
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result GetReportingReportRunsParametersQueryCreated'Variants
-> Result GetReportingReportRunsParametersQueryCreated'Variants
-> Result GetReportingReportRunsParametersQueryCreated'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result GetReportingReportRunsParametersQueryCreated'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
    Data.Aeson.Types.Internal.Success GetReportingReportRunsParametersQueryCreated'Variants
a -> GetReportingReportRunsParametersQueryCreated'Variants
-> Parser GetReportingReportRunsParametersQueryCreated'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure GetReportingReportRunsParametersQueryCreated'Variants
a
    Data.Aeson.Types.Internal.Error String
a -> String
-> Parser GetReportingReportRunsParametersQueryCreated'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a

-- | Represents a response of the operation 'getReportingReportRuns'.
--
-- The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), 'GetReportingReportRunsResponseError' is used.
data GetReportingReportRunsResponse
  = -- | Means either no matching case available or a parse error
    GetReportingReportRunsResponseError GHC.Base.String
  | -- | Successful response.
    GetReportingReportRunsResponse200 GetReportingReportRunsResponseBody200
  | -- | Error response.
    GetReportingReportRunsResponseDefault Error
  deriving (Int -> GetReportingReportRunsResponse -> ShowS
[GetReportingReportRunsResponse] -> ShowS
GetReportingReportRunsResponse -> String
(Int -> GetReportingReportRunsResponse -> ShowS)
-> (GetReportingReportRunsResponse -> String)
-> ([GetReportingReportRunsResponse] -> ShowS)
-> Show GetReportingReportRunsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReportingReportRunsResponse] -> ShowS
$cshowList :: [GetReportingReportRunsResponse] -> ShowS
show :: GetReportingReportRunsResponse -> String
$cshow :: GetReportingReportRunsResponse -> String
showsPrec :: Int -> GetReportingReportRunsResponse -> ShowS
$cshowsPrec :: Int -> GetReportingReportRunsResponse -> ShowS
GHC.Show.Show, GetReportingReportRunsResponse
-> GetReportingReportRunsResponse -> Bool
(GetReportingReportRunsResponse
 -> GetReportingReportRunsResponse -> Bool)
-> (GetReportingReportRunsResponse
    -> GetReportingReportRunsResponse -> Bool)
-> Eq GetReportingReportRunsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReportingReportRunsResponse
-> GetReportingReportRunsResponse -> Bool
$c/= :: GetReportingReportRunsResponse
-> GetReportingReportRunsResponse -> Bool
== :: GetReportingReportRunsResponse
-> GetReportingReportRunsResponse -> Bool
$c== :: GetReportingReportRunsResponse
-> GetReportingReportRunsResponse -> Bool
GHC.Classes.Eq)

-- | Defines the object schema located at @paths.\/v1\/reporting\/report_runs.GET.responses.200.content.application\/json.schema@ in the specification.
data GetReportingReportRunsResponseBody200 = GetReportingReportRunsResponseBody200
  { -- | data
    GetReportingReportRunsResponseBody200 -> [Reporting'reportRun]
getReportingReportRunsResponseBody200Data :: ([Reporting'reportRun]),
    -- | has_more: True if this list has another page of items after this one that can be fetched.
    GetReportingReportRunsResponseBody200 -> Bool
getReportingReportRunsResponseBody200HasMore :: GHC.Types.Bool,
    -- | url: The URL where this list can be accessed.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    -- * Must match pattern \'^\/v1\/reporting\/report_runs\'
    GetReportingReportRunsResponseBody200 -> Text
getReportingReportRunsResponseBody200Url :: Data.Text.Internal.Text
  }
  deriving
    ( Int -> GetReportingReportRunsResponseBody200 -> ShowS
[GetReportingReportRunsResponseBody200] -> ShowS
GetReportingReportRunsResponseBody200 -> String
(Int -> GetReportingReportRunsResponseBody200 -> ShowS)
-> (GetReportingReportRunsResponseBody200 -> String)
-> ([GetReportingReportRunsResponseBody200] -> ShowS)
-> Show GetReportingReportRunsResponseBody200
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReportingReportRunsResponseBody200] -> ShowS
$cshowList :: [GetReportingReportRunsResponseBody200] -> ShowS
show :: GetReportingReportRunsResponseBody200 -> String
$cshow :: GetReportingReportRunsResponseBody200 -> String
showsPrec :: Int -> GetReportingReportRunsResponseBody200 -> ShowS
$cshowsPrec :: Int -> GetReportingReportRunsResponseBody200 -> ShowS
GHC.Show.Show,
      GetReportingReportRunsResponseBody200
-> GetReportingReportRunsResponseBody200 -> Bool
(GetReportingReportRunsResponseBody200
 -> GetReportingReportRunsResponseBody200 -> Bool)
-> (GetReportingReportRunsResponseBody200
    -> GetReportingReportRunsResponseBody200 -> Bool)
-> Eq GetReportingReportRunsResponseBody200
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReportingReportRunsResponseBody200
-> GetReportingReportRunsResponseBody200 -> Bool
$c/= :: GetReportingReportRunsResponseBody200
-> GetReportingReportRunsResponseBody200 -> Bool
== :: GetReportingReportRunsResponseBody200
-> GetReportingReportRunsResponseBody200 -> Bool
$c== :: GetReportingReportRunsResponseBody200
-> GetReportingReportRunsResponseBody200 -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON GetReportingReportRunsResponseBody200 where
  toJSON :: GetReportingReportRunsResponseBody200 -> Value
toJSON GetReportingReportRunsResponseBody200
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"data" Text -> [Reporting'reportRun] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsResponseBody200 -> [Reporting'reportRun]
getReportingReportRunsResponseBody200Data GetReportingReportRunsResponseBody200
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..= GetReportingReportRunsResponseBody200 -> Bool
getReportingReportRunsResponseBody200HasMore GetReportingReportRunsResponseBody200
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..= GetReportingReportRunsResponseBody200 -> Text
getReportingReportRunsResponseBody200Url GetReportingReportRunsResponseBody200
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 :: GetReportingReportRunsResponseBody200 -> Encoding
toEncoding GetReportingReportRunsResponseBody200
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"data" Text -> [Reporting'reportRun] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetReportingReportRunsResponseBody200 -> [Reporting'reportRun]
getReportingReportRunsResponseBody200Data GetReportingReportRunsResponseBody200
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..= GetReportingReportRunsResponseBody200 -> Bool
getReportingReportRunsResponseBody200HasMore GetReportingReportRunsResponseBody200
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..= GetReportingReportRunsResponseBody200 -> Text
getReportingReportRunsResponseBody200Url GetReportingReportRunsResponseBody200
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 GetReportingReportRunsResponseBody200 where
  parseJSON :: Value -> Parser GetReportingReportRunsResponseBody200
parseJSON = String
-> (Object -> Parser GetReportingReportRunsResponseBody200)
-> Value
-> Parser GetReportingReportRunsResponseBody200
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetReportingReportRunsResponseBody200" (\Object
obj -> ((([Reporting'reportRun]
 -> Bool -> Text -> GetReportingReportRunsResponseBody200)
-> Parser
     ([Reporting'reportRun]
      -> Bool -> Text -> GetReportingReportRunsResponseBody200)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure [Reporting'reportRun]
-> Bool -> Text -> GetReportingReportRunsResponseBody200
GetReportingReportRunsResponseBody200 Parser
  ([Reporting'reportRun]
   -> Bool -> Text -> GetReportingReportRunsResponseBody200)
-> Parser [Reporting'reportRun]
-> Parser (Bool -> Text -> GetReportingReportRunsResponseBody200)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [Reporting'reportRun]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"data")) Parser (Bool -> Text -> GetReportingReportRunsResponseBody200)
-> Parser Bool
-> Parser (Text -> GetReportingReportRunsResponseBody200)
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 -> GetReportingReportRunsResponseBody200)
-> Parser Text -> Parser GetReportingReportRunsResponseBody200
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"))

-- | Create a new 'GetReportingReportRunsResponseBody200' with all required fields.
mkGetReportingReportRunsResponseBody200 ::
  -- | 'getReportingReportRunsResponseBody200Data'
  [Reporting'reportRun] ->
  -- | 'getReportingReportRunsResponseBody200HasMore'
  GHC.Types.Bool ->
  -- | 'getReportingReportRunsResponseBody200Url'
  Data.Text.Internal.Text ->
  GetReportingReportRunsResponseBody200
mkGetReportingReportRunsResponseBody200 :: [Reporting'reportRun]
-> Bool -> Text -> GetReportingReportRunsResponseBody200
mkGetReportingReportRunsResponseBody200 [Reporting'reportRun]
getReportingReportRunsResponseBody200Data Bool
getReportingReportRunsResponseBody200HasMore Text
getReportingReportRunsResponseBody200Url =
  GetReportingReportRunsResponseBody200 :: [Reporting'reportRun]
-> Bool -> Text -> GetReportingReportRunsResponseBody200
GetReportingReportRunsResponseBody200
    { getReportingReportRunsResponseBody200Data :: [Reporting'reportRun]
getReportingReportRunsResponseBody200Data = [Reporting'reportRun]
getReportingReportRunsResponseBody200Data,
      getReportingReportRunsResponseBody200HasMore :: Bool
getReportingReportRunsResponseBody200HasMore = Bool
getReportingReportRunsResponseBody200HasMore,
      getReportingReportRunsResponseBody200Url :: Text
getReportingReportRunsResponseBody200Url = Text
getReportingReportRunsResponseBody200Url
    }