{-# 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 postFileLinks
module StripeAPI.Operations.PostFileLinks 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

-- | > POST /v1/file_links
--
-- \<p>Creates a new file link object.\<\/p>
postFileLinks ::
  forall m.
  StripeAPI.Common.MonadHTTP m =>
  -- | The request body to send
  PostFileLinksRequestBody ->
  -- | Monadic computation which returns the result of the operation
  StripeAPI.Common.StripeT m (Network.HTTP.Client.Types.Response PostFileLinksResponse)
postFileLinks :: PostFileLinksRequestBody
-> StripeT m (Response PostFileLinksResponse)
postFileLinks PostFileLinksRequestBody
body =
  (Response ByteString -> Response PostFileLinksResponse)
-> StripeT m (Response ByteString)
-> StripeT m (Response PostFileLinksResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
    ( \Response ByteString
response_0 ->
        (ByteString -> PostFileLinksResponse)
-> Response ByteString -> Response PostFileLinksResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
          ( (String -> PostFileLinksResponse)
-> (PostFileLinksResponse -> PostFileLinksResponse)
-> Either String PostFileLinksResponse
-> PostFileLinksResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> PostFileLinksResponse
PostFileLinksResponseError PostFileLinksResponse -> PostFileLinksResponse
forall a. a -> a
GHC.Base.id
              (Either String PostFileLinksResponse -> PostFileLinksResponse)
-> (ByteString -> Either String PostFileLinksResponse)
-> ByteString
-> PostFileLinksResponse
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) ->
                                   FileLink -> PostFileLinksResponse
PostFileLinksResponse200
                                     (FileLink -> PostFileLinksResponse)
-> Either String FileLink -> Either String PostFileLinksResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String FileLink
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
                                                          Data.Either.Either
                                                            GHC.Base.String
                                                            FileLink
                                                      )
                                 | 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 -> PostFileLinksResponse
PostFileLinksResponseDefault
                                     (Error -> PostFileLinksResponse)
-> Either String Error -> Either String PostFileLinksResponse
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 PostFileLinksResponse
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]
-> Maybe PostFileLinksRequestBody
-> RequestBodyEncoding
-> StripeT m (Response ByteString)
forall (m :: * -> *) body.
(MonadHTTP m, ToJSON body) =>
Text
-> Text
-> [QueryParameter]
-> Maybe body
-> RequestBodyEncoding
-> StripeT m (Response ByteString)
StripeAPI.Common.doBodyCallWithConfigurationM (Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.pack String
"POST") (String -> Text
Data.Text.pack String
"/v1/file_links") [QueryParameter]
forall a. Monoid a => a
GHC.Base.mempty (PostFileLinksRequestBody -> Maybe PostFileLinksRequestBody
forall a. a -> Maybe a
GHC.Maybe.Just PostFileLinksRequestBody
body) RequestBodyEncoding
StripeAPI.Common.RequestBodyEncodingFormData)

-- | Defines the object schema located at @paths.\/v1\/file_links.POST.requestBody.content.application\/x-www-form-urlencoded.schema@ in the specification.
data PostFileLinksRequestBody = PostFileLinksRequestBody
  { -- | expand: Specifies which fields in the response should be expanded.
    PostFileLinksRequestBody -> Maybe [Text]
postFileLinksRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
    -- | expires_at: A future timestamp after which the link will no longer be usable.
    PostFileLinksRequestBody -> Maybe Int
postFileLinksRequestBodyExpiresAt :: (GHC.Maybe.Maybe GHC.Types.Int),
    -- | file: The ID of the file. The file\'s \`purpose\` must be one of the following: \`business_icon\`, \`business_logo\`, \`customer_signature\`, \`dispute_evidence\`, \`finance_report_run\`, \`identity_document_downloadable\`, \`pci_document\`, \`selfie\`, \`sigma_scheduled_query\`, or \`tax_document_user_upload\`.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PostFileLinksRequestBody -> Text
postFileLinksRequestBodyFile :: Data.Text.Internal.Text,
    -- | metadata: Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to \`metadata\`.
    PostFileLinksRequestBody
-> Maybe PostFileLinksRequestBodyMetadata'Variants
postFileLinksRequestBodyMetadata :: (GHC.Maybe.Maybe PostFileLinksRequestBodyMetadata'Variants)
  }
  deriving
    ( Int -> PostFileLinksRequestBody -> ShowS
[PostFileLinksRequestBody] -> ShowS
PostFileLinksRequestBody -> String
(Int -> PostFileLinksRequestBody -> ShowS)
-> (PostFileLinksRequestBody -> String)
-> ([PostFileLinksRequestBody] -> ShowS)
-> Show PostFileLinksRequestBody
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PostFileLinksRequestBody] -> ShowS
$cshowList :: [PostFileLinksRequestBody] -> ShowS
show :: PostFileLinksRequestBody -> String
$cshow :: PostFileLinksRequestBody -> String
showsPrec :: Int -> PostFileLinksRequestBody -> ShowS
$cshowsPrec :: Int -> PostFileLinksRequestBody -> ShowS
GHC.Show.Show,
      PostFileLinksRequestBody -> PostFileLinksRequestBody -> Bool
(PostFileLinksRequestBody -> PostFileLinksRequestBody -> Bool)
-> (PostFileLinksRequestBody -> PostFileLinksRequestBody -> Bool)
-> Eq PostFileLinksRequestBody
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostFileLinksRequestBody -> PostFileLinksRequestBody -> Bool
$c/= :: PostFileLinksRequestBody -> PostFileLinksRequestBody -> Bool
== :: PostFileLinksRequestBody -> PostFileLinksRequestBody -> Bool
$c== :: PostFileLinksRequestBody -> PostFileLinksRequestBody -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON PostFileLinksRequestBody where
  toJSON :: PostFileLinksRequestBody -> Value
toJSON PostFileLinksRequestBody
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"expand" Text -> Maybe [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostFileLinksRequestBody -> Maybe [Text]
postFileLinksRequestBodyExpand PostFileLinksRequestBody
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..= PostFileLinksRequestBody -> Maybe Int
postFileLinksRequestBodyExpiresAt PostFileLinksRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"file" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostFileLinksRequestBody -> Text
postFileLinksRequestBodyFile PostFileLinksRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text -> Maybe PostFileLinksRequestBodyMetadata'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostFileLinksRequestBody
-> Maybe PostFileLinksRequestBodyMetadata'Variants
postFileLinksRequestBodyMetadata PostFileLinksRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: PostFileLinksRequestBody -> Encoding
toEncoding PostFileLinksRequestBody
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"expand" Text -> Maybe [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostFileLinksRequestBody -> Maybe [Text]
postFileLinksRequestBodyExpand PostFileLinksRequestBody
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..= PostFileLinksRequestBody -> Maybe Int
postFileLinksRequestBodyExpiresAt PostFileLinksRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"file" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostFileLinksRequestBody -> Text
postFileLinksRequestBodyFile PostFileLinksRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"metadata" Text -> Maybe PostFileLinksRequestBodyMetadata'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostFileLinksRequestBody
-> Maybe PostFileLinksRequestBodyMetadata'Variants
postFileLinksRequestBodyMetadata PostFileLinksRequestBody
obj))))

instance Data.Aeson.Types.FromJSON.FromJSON PostFileLinksRequestBody where
  parseJSON :: Value -> Parser PostFileLinksRequestBody
parseJSON = String
-> (Object -> Parser PostFileLinksRequestBody)
-> Value
-> Parser PostFileLinksRequestBody
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PostFileLinksRequestBody" (\Object
obj -> ((((Maybe [Text]
 -> Maybe Int
 -> Text
 -> Maybe PostFileLinksRequestBodyMetadata'Variants
 -> PostFileLinksRequestBody)
-> Parser
     (Maybe [Text]
      -> Maybe Int
      -> Text
      -> Maybe PostFileLinksRequestBodyMetadata'Variants
      -> PostFileLinksRequestBody)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe [Text]
-> Maybe Int
-> Text
-> Maybe PostFileLinksRequestBodyMetadata'Variants
-> PostFileLinksRequestBody
PostFileLinksRequestBody Parser
  (Maybe [Text]
   -> Maybe Int
   -> Text
   -> Maybe PostFileLinksRequestBodyMetadata'Variants
   -> PostFileLinksRequestBody)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Int
      -> Text
      -> Maybe PostFileLinksRequestBodyMetadata'Variants
      -> PostFileLinksRequestBody)
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
"expand")) Parser
  (Maybe Int
   -> Text
   -> Maybe PostFileLinksRequestBodyMetadata'Variants
   -> PostFileLinksRequestBody)
-> Parser (Maybe Int)
-> Parser
     (Text
      -> Maybe PostFileLinksRequestBodyMetadata'Variants
      -> PostFileLinksRequestBody)
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
  (Text
   -> Maybe PostFileLinksRequestBodyMetadata'Variants
   -> PostFileLinksRequestBody)
-> Parser Text
-> Parser
     (Maybe PostFileLinksRequestBodyMetadata'Variants
      -> PostFileLinksRequestBody)
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
"file")) Parser
  (Maybe PostFileLinksRequestBodyMetadata'Variants
   -> PostFileLinksRequestBody)
-> Parser (Maybe PostFileLinksRequestBodyMetadata'Variants)
-> Parser PostFileLinksRequestBody
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe PostFileLinksRequestBodyMetadata'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"metadata"))

-- | Create a new 'PostFileLinksRequestBody' with all required fields.
mkPostFileLinksRequestBody ::
  -- | 'postFileLinksRequestBodyFile'
  Data.Text.Internal.Text ->
  PostFileLinksRequestBody
mkPostFileLinksRequestBody :: Text -> PostFileLinksRequestBody
mkPostFileLinksRequestBody Text
postFileLinksRequestBodyFile =
  PostFileLinksRequestBody :: Maybe [Text]
-> Maybe Int
-> Text
-> Maybe PostFileLinksRequestBodyMetadata'Variants
-> PostFileLinksRequestBody
PostFileLinksRequestBody
    { postFileLinksRequestBodyExpand :: Maybe [Text]
postFileLinksRequestBodyExpand = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
      postFileLinksRequestBodyExpiresAt :: Maybe Int
postFileLinksRequestBodyExpiresAt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
      postFileLinksRequestBodyFile :: Text
postFileLinksRequestBodyFile = Text
postFileLinksRequestBodyFile,
      postFileLinksRequestBodyMetadata :: Maybe PostFileLinksRequestBodyMetadata'Variants
postFileLinksRequestBodyMetadata = Maybe PostFileLinksRequestBodyMetadata'Variants
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the oneOf schema located at @paths.\/v1\/file_links.POST.requestBody.content.application\/x-www-form-urlencoded.schema.properties.metadata.anyOf@ in the specification.
--
-- Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to \`metadata\`.
data PostFileLinksRequestBodyMetadata'Variants
  = -- | Represents the JSON value @""@
    PostFileLinksRequestBodyMetadata'EmptyString
  | PostFileLinksRequestBodyMetadata'Object Data.Aeson.Types.Internal.Object
  deriving (Int -> PostFileLinksRequestBodyMetadata'Variants -> ShowS
[PostFileLinksRequestBodyMetadata'Variants] -> ShowS
PostFileLinksRequestBodyMetadata'Variants -> String
(Int -> PostFileLinksRequestBodyMetadata'Variants -> ShowS)
-> (PostFileLinksRequestBodyMetadata'Variants -> String)
-> ([PostFileLinksRequestBodyMetadata'Variants] -> ShowS)
-> Show PostFileLinksRequestBodyMetadata'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PostFileLinksRequestBodyMetadata'Variants] -> ShowS
$cshowList :: [PostFileLinksRequestBodyMetadata'Variants] -> ShowS
show :: PostFileLinksRequestBodyMetadata'Variants -> String
$cshow :: PostFileLinksRequestBodyMetadata'Variants -> String
showsPrec :: Int -> PostFileLinksRequestBodyMetadata'Variants -> ShowS
$cshowsPrec :: Int -> PostFileLinksRequestBodyMetadata'Variants -> ShowS
GHC.Show.Show, PostFileLinksRequestBodyMetadata'Variants
-> PostFileLinksRequestBodyMetadata'Variants -> Bool
(PostFileLinksRequestBodyMetadata'Variants
 -> PostFileLinksRequestBodyMetadata'Variants -> Bool)
-> (PostFileLinksRequestBodyMetadata'Variants
    -> PostFileLinksRequestBodyMetadata'Variants -> Bool)
-> Eq PostFileLinksRequestBodyMetadata'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostFileLinksRequestBodyMetadata'Variants
-> PostFileLinksRequestBodyMetadata'Variants -> Bool
$c/= :: PostFileLinksRequestBodyMetadata'Variants
-> PostFileLinksRequestBodyMetadata'Variants -> Bool
== :: PostFileLinksRequestBodyMetadata'Variants
-> PostFileLinksRequestBodyMetadata'Variants -> Bool
$c== :: PostFileLinksRequestBodyMetadata'Variants
-> PostFileLinksRequestBodyMetadata'Variants -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON PostFileLinksRequestBodyMetadata'Variants where
  toJSON :: PostFileLinksRequestBodyMetadata'Variants -> Value
toJSON (PostFileLinksRequestBodyMetadata'Object Object
a) = Object -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Object
a
  toJSON (PostFileLinksRequestBodyMetadata'Variants
PostFileLinksRequestBodyMetadata'EmptyString) = Value
""

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

-- | Represents a response of the operation 'postFileLinks'.
--
-- 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), 'PostFileLinksResponseError' is used.
data PostFileLinksResponse
  = -- | Means either no matching case available or a parse error
    PostFileLinksResponseError GHC.Base.String
  | -- | Successful response.
    PostFileLinksResponse200 FileLink
  | -- | Error response.
    PostFileLinksResponseDefault Error
  deriving (Int -> PostFileLinksResponse -> ShowS
[PostFileLinksResponse] -> ShowS
PostFileLinksResponse -> String
(Int -> PostFileLinksResponse -> ShowS)
-> (PostFileLinksResponse -> String)
-> ([PostFileLinksResponse] -> ShowS)
-> Show PostFileLinksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PostFileLinksResponse] -> ShowS
$cshowList :: [PostFileLinksResponse] -> ShowS
show :: PostFileLinksResponse -> String
$cshow :: PostFileLinksResponse -> String
showsPrec :: Int -> PostFileLinksResponse -> ShowS
$cshowsPrec :: Int -> PostFileLinksResponse -> ShowS
GHC.Show.Show, PostFileLinksResponse -> PostFileLinksResponse -> Bool
(PostFileLinksResponse -> PostFileLinksResponse -> Bool)
-> (PostFileLinksResponse -> PostFileLinksResponse -> Bool)
-> Eq PostFileLinksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostFileLinksResponse -> PostFileLinksResponse -> Bool
$c/= :: PostFileLinksResponse -> PostFileLinksResponse -> Bool
== :: PostFileLinksResponse -> PostFileLinksResponse -> Bool
$c== :: PostFileLinksResponse -> PostFileLinksResponse -> Bool
GHC.Classes.Eq)