{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Operations.PostSkusId 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
postSkusId ::
forall m.
StripeAPI.Common.MonadHTTP m =>
Data.Text.Internal.Text ->
GHC.Maybe.Maybe PostSkusIdRequestBody ->
StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response PostSkusIdResponse)
postSkusId :: Text
-> Maybe PostSkusIdRequestBody
-> ClientT m (Response PostSkusIdResponse)
postSkusId
Text
id
Maybe PostSkusIdRequestBody
body =
(Response ByteString -> Response PostSkusIdResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response PostSkusIdResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_0 ->
(ByteString -> PostSkusIdResponse)
-> Response ByteString -> Response PostSkusIdResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> PostSkusIdResponse)
-> (PostSkusIdResponse -> PostSkusIdResponse)
-> Either String PostSkusIdResponse
-> PostSkusIdResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> PostSkusIdResponse
PostSkusIdResponseError PostSkusIdResponse -> PostSkusIdResponse
forall a. a -> a
GHC.Base.id
(Either String PostSkusIdResponse -> PostSkusIdResponse)
-> (ByteString -> Either String PostSkusIdResponse)
-> ByteString
-> PostSkusIdResponse
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) ->
Sku -> PostSkusIdResponse
PostSkusIdResponse200
(Sku -> PostSkusIdResponse)
-> Either String Sku -> Either String PostSkusIdResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String Sku
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
Sku
)
| 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 -> PostSkusIdResponse
PostSkusIdResponseDefault
(Error -> PostSkusIdResponse)
-> Either String Error -> Either String PostSkusIdResponse
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 PostSkusIdResponse
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 PostSkusIdRequestBody
-> RequestBodyEncoding
-> ClientT m (Response ByteString)
forall (m :: * -> *) body.
(MonadHTTP m, ToJSON body) =>
Text
-> Text
-> [QueryParameter]
-> Maybe body
-> RequestBodyEncoding
-> ClientT 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/skus/" String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ (ByteString -> String
Data.ByteString.Char8.unpack (Bool -> ByteString -> ByteString
Network.HTTP.Types.URI.urlEncode Bool
GHC.Types.True (ByteString -> ByteString) -> ByteString -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ (String -> ByteString
Data.ByteString.Char8.pack (String -> ByteString) -> String -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> String
forall a. StringifyModel a => a -> String
StripeAPI.Common.stringifyModel Text
id)) String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ String
""))) [QueryParameter]
forall a. Monoid a => a
GHC.Base.mempty Maybe PostSkusIdRequestBody
body RequestBodyEncoding
StripeAPI.Common.RequestBodyEncodingFormData)
data PostSkusIdRequestBody = PostSkusIdRequestBody
{
PostSkusIdRequestBody -> Maybe Bool
postSkusIdRequestBodyActive :: (GHC.Maybe.Maybe GHC.Types.Bool),
PostSkusIdRequestBody -> Maybe Object
postSkusIdRequestBodyAttributes :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
PostSkusIdRequestBody -> Maybe Text
postSkusIdRequestBodyCurrency :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostSkusIdRequestBody -> Maybe [Text]
postSkusIdRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
PostSkusIdRequestBody -> Maybe Text
postSkusIdRequestBodyImage :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostSkusIdRequestBody -> Maybe PostSkusIdRequestBodyInventory'
postSkusIdRequestBodyInventory :: (GHC.Maybe.Maybe PostSkusIdRequestBodyInventory'),
PostSkusIdRequestBody
-> Maybe PostSkusIdRequestBodyMetadata'Variants
postSkusIdRequestBodyMetadata :: (GHC.Maybe.Maybe PostSkusIdRequestBodyMetadata'Variants),
PostSkusIdRequestBody
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
postSkusIdRequestBodyPackageDimensions :: (GHC.Maybe.Maybe PostSkusIdRequestBodyPackageDimensions'Variants),
PostSkusIdRequestBody -> Maybe Int
postSkusIdRequestBodyPrice :: (GHC.Maybe.Maybe GHC.Types.Int),
PostSkusIdRequestBody -> Maybe Text
postSkusIdRequestBodyProduct :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> PostSkusIdRequestBody -> String -> String
[PostSkusIdRequestBody] -> String -> String
PostSkusIdRequestBody -> String
(Int -> PostSkusIdRequestBody -> String -> String)
-> (PostSkusIdRequestBody -> String)
-> ([PostSkusIdRequestBody] -> String -> String)
-> Show PostSkusIdRequestBody
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostSkusIdRequestBody] -> String -> String
$cshowList :: [PostSkusIdRequestBody] -> String -> String
show :: PostSkusIdRequestBody -> String
$cshow :: PostSkusIdRequestBody -> String
showsPrec :: Int -> PostSkusIdRequestBody -> String -> String
$cshowsPrec :: Int -> PostSkusIdRequestBody -> String -> String
GHC.Show.Show,
PostSkusIdRequestBody -> PostSkusIdRequestBody -> Bool
(PostSkusIdRequestBody -> PostSkusIdRequestBody -> Bool)
-> (PostSkusIdRequestBody -> PostSkusIdRequestBody -> Bool)
-> Eq PostSkusIdRequestBody
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostSkusIdRequestBody -> PostSkusIdRequestBody -> Bool
$c/= :: PostSkusIdRequestBody -> PostSkusIdRequestBody -> Bool
== :: PostSkusIdRequestBody -> PostSkusIdRequestBody -> Bool
$c== :: PostSkusIdRequestBody -> PostSkusIdRequestBody -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostSkusIdRequestBody where
toJSON :: PostSkusIdRequestBody -> Value
toJSON PostSkusIdRequestBody
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"active" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Bool
postSkusIdRequestBodyActive PostSkusIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"attributes" Text -> Maybe Object -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Object
postSkusIdRequestBodyAttributes PostSkusIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"currency" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Text
postSkusIdRequestBodyCurrency PostSkusIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"expand" Text -> Maybe [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe [Text]
postSkusIdRequestBodyExpand PostSkusIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"image" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Text
postSkusIdRequestBodyImage PostSkusIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"inventory" Text -> Maybe PostSkusIdRequestBodyInventory' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe PostSkusIdRequestBodyInventory'
postSkusIdRequestBodyInventory PostSkusIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text -> Maybe PostSkusIdRequestBodyMetadata'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody
-> Maybe PostSkusIdRequestBodyMetadata'Variants
postSkusIdRequestBodyMetadata PostSkusIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"package_dimensions" Text
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
postSkusIdRequestBodyPackageDimensions PostSkusIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"price" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Int
postSkusIdRequestBodyPrice PostSkusIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"product" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Text
postSkusIdRequestBodyProduct PostSkusIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PostSkusIdRequestBody -> Encoding
toEncoding PostSkusIdRequestBody
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"active" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Bool
postSkusIdRequestBodyActive PostSkusIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"attributes" Text -> Maybe Object -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Object
postSkusIdRequestBodyAttributes PostSkusIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"currency" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Text
postSkusIdRequestBodyCurrency PostSkusIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"expand" Text -> Maybe [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe [Text]
postSkusIdRequestBodyExpand PostSkusIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"image" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Text
postSkusIdRequestBodyImage PostSkusIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"inventory" Text -> Maybe PostSkusIdRequestBodyInventory' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe PostSkusIdRequestBodyInventory'
postSkusIdRequestBodyInventory PostSkusIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"metadata" Text -> Maybe PostSkusIdRequestBodyMetadata'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody
-> Maybe PostSkusIdRequestBodyMetadata'Variants
postSkusIdRequestBodyMetadata PostSkusIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"package_dimensions" Text
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
postSkusIdRequestBodyPackageDimensions PostSkusIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"price" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Int
postSkusIdRequestBodyPrice PostSkusIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"product" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBody -> Maybe Text
postSkusIdRequestBodyProduct PostSkusIdRequestBody
obj))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON PostSkusIdRequestBody where
parseJSON :: Value -> Parser PostSkusIdRequestBody
parseJSON = String
-> (Object -> Parser PostSkusIdRequestBody)
-> Value
-> Parser PostSkusIdRequestBody
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PostSkusIdRequestBody" (\Object
obj -> ((((((((((Maybe Bool
-> Maybe Object
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
-> Parser
(Maybe Bool
-> Maybe Object
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Bool
-> Maybe Object
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody
PostSkusIdRequestBody Parser
(Maybe Bool
-> Maybe Object
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
-> Parser (Maybe Bool)
-> Parser
(Maybe Object
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"active")) Parser
(Maybe Object
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
-> Parser (Maybe Object)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Object)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"attributes")) Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
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
"currency")) Parser
(Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
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 Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
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
"image")) Parser
(Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
-> Parser (Maybe PostSkusIdRequestBodyInventory')
-> Parser
(Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe PostSkusIdRequestBodyInventory')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"inventory")) Parser
(Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody)
-> Parser (Maybe PostSkusIdRequestBodyMetadata'Variants)
-> Parser
(Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int -> Maybe Text -> PostSkusIdRequestBody)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe PostSkusIdRequestBodyMetadata'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"metadata")) Parser
(Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int -> Maybe Text -> PostSkusIdRequestBody)
-> Parser (Maybe PostSkusIdRequestBodyPackageDimensions'Variants)
-> Parser (Maybe Int -> Maybe Text -> PostSkusIdRequestBody)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe PostSkusIdRequestBodyPackageDimensions'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"package_dimensions")) Parser (Maybe Int -> Maybe Text -> PostSkusIdRequestBody)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> PostSkusIdRequestBody)
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
"price")) Parser (Maybe Text -> PostSkusIdRequestBody)
-> Parser (Maybe Text) -> Parser PostSkusIdRequestBody
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
"product"))
mkPostSkusIdRequestBody :: PostSkusIdRequestBody
mkPostSkusIdRequestBody :: PostSkusIdRequestBody
mkPostSkusIdRequestBody =
PostSkusIdRequestBody :: Maybe Bool
-> Maybe Object
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyMetadata'Variants
-> Maybe PostSkusIdRequestBodyPackageDimensions'Variants
-> Maybe Int
-> Maybe Text
-> PostSkusIdRequestBody
PostSkusIdRequestBody
{ postSkusIdRequestBodyActive :: Maybe Bool
postSkusIdRequestBodyActive = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyAttributes :: Maybe Object
postSkusIdRequestBodyAttributes = Maybe Object
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyCurrency :: Maybe Text
postSkusIdRequestBodyCurrency = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyExpand :: Maybe [Text]
postSkusIdRequestBodyExpand = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyImage :: Maybe Text
postSkusIdRequestBodyImage = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyInventory :: Maybe PostSkusIdRequestBodyInventory'
postSkusIdRequestBodyInventory = Maybe PostSkusIdRequestBodyInventory'
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyMetadata :: Maybe PostSkusIdRequestBodyMetadata'Variants
postSkusIdRequestBodyMetadata = Maybe PostSkusIdRequestBodyMetadata'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyPackageDimensions :: Maybe PostSkusIdRequestBodyPackageDimensions'Variants
postSkusIdRequestBodyPackageDimensions = Maybe PostSkusIdRequestBodyPackageDimensions'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyPrice :: Maybe Int
postSkusIdRequestBodyPrice = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyProduct :: Maybe Text
postSkusIdRequestBodyProduct = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data PostSkusIdRequestBodyInventory' = PostSkusIdRequestBodyInventory'
{
PostSkusIdRequestBodyInventory' -> Maybe Int
postSkusIdRequestBodyInventory'Quantity :: (GHC.Maybe.Maybe GHC.Types.Int),
PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyInventory'Type'
postSkusIdRequestBodyInventory'Type :: (GHC.Maybe.Maybe PostSkusIdRequestBodyInventory'Type'),
PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyInventory'Value'
postSkusIdRequestBodyInventory'Value :: (GHC.Maybe.Maybe PostSkusIdRequestBodyInventory'Value')
}
deriving
( Int -> PostSkusIdRequestBodyInventory' -> String -> String
[PostSkusIdRequestBodyInventory'] -> String -> String
PostSkusIdRequestBodyInventory' -> String
(Int -> PostSkusIdRequestBodyInventory' -> String -> String)
-> (PostSkusIdRequestBodyInventory' -> String)
-> ([PostSkusIdRequestBodyInventory'] -> String -> String)
-> Show PostSkusIdRequestBodyInventory'
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostSkusIdRequestBodyInventory'] -> String -> String
$cshowList :: [PostSkusIdRequestBodyInventory'] -> String -> String
show :: PostSkusIdRequestBodyInventory' -> String
$cshow :: PostSkusIdRequestBodyInventory' -> String
showsPrec :: Int -> PostSkusIdRequestBodyInventory' -> String -> String
$cshowsPrec :: Int -> PostSkusIdRequestBodyInventory' -> String -> String
GHC.Show.Show,
PostSkusIdRequestBodyInventory'
-> PostSkusIdRequestBodyInventory' -> Bool
(PostSkusIdRequestBodyInventory'
-> PostSkusIdRequestBodyInventory' -> Bool)
-> (PostSkusIdRequestBodyInventory'
-> PostSkusIdRequestBodyInventory' -> Bool)
-> Eq PostSkusIdRequestBodyInventory'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostSkusIdRequestBodyInventory'
-> PostSkusIdRequestBodyInventory' -> Bool
$c/= :: PostSkusIdRequestBodyInventory'
-> PostSkusIdRequestBodyInventory' -> Bool
== :: PostSkusIdRequestBodyInventory'
-> PostSkusIdRequestBodyInventory' -> Bool
$c== :: PostSkusIdRequestBodyInventory'
-> PostSkusIdRequestBodyInventory' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostSkusIdRequestBodyInventory' where
toJSON :: PostSkusIdRequestBodyInventory' -> Value
toJSON PostSkusIdRequestBodyInventory'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"quantity" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyInventory' -> Maybe Int
postSkusIdRequestBodyInventory'Quantity PostSkusIdRequestBodyInventory'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"type" Text -> Maybe PostSkusIdRequestBodyInventory'Type' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyInventory'Type'
postSkusIdRequestBodyInventory'Type PostSkusIdRequestBodyInventory'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"value" Text -> Maybe PostSkusIdRequestBodyInventory'Value' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyInventory'Value'
postSkusIdRequestBodyInventory'Value PostSkusIdRequestBodyInventory'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PostSkusIdRequestBodyInventory' -> Encoding
toEncoding PostSkusIdRequestBodyInventory'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"quantity" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyInventory' -> Maybe Int
postSkusIdRequestBodyInventory'Quantity PostSkusIdRequestBodyInventory'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"type" Text -> Maybe PostSkusIdRequestBodyInventory'Type' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyInventory'Type'
postSkusIdRequestBodyInventory'Type PostSkusIdRequestBodyInventory'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"value" Text -> Maybe PostSkusIdRequestBodyInventory'Value' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyInventory'
-> Maybe PostSkusIdRequestBodyInventory'Value'
postSkusIdRequestBodyInventory'Value PostSkusIdRequestBodyInventory'
obj)))
instance Data.Aeson.Types.FromJSON.FromJSON PostSkusIdRequestBodyInventory' where
parseJSON :: Value -> Parser PostSkusIdRequestBodyInventory'
parseJSON = String
-> (Object -> Parser PostSkusIdRequestBodyInventory')
-> Value
-> Parser PostSkusIdRequestBodyInventory'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PostSkusIdRequestBodyInventory'" (\Object
obj -> (((Maybe Int
-> Maybe PostSkusIdRequestBodyInventory'Type'
-> Maybe PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory')
-> Parser
(Maybe Int
-> Maybe PostSkusIdRequestBodyInventory'Type'
-> Maybe PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Int
-> Maybe PostSkusIdRequestBodyInventory'Type'
-> Maybe PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory'
PostSkusIdRequestBodyInventory' Parser
(Maybe Int
-> Maybe PostSkusIdRequestBodyInventory'Type'
-> Maybe PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory')
-> Parser (Maybe Int)
-> Parser
(Maybe PostSkusIdRequestBodyInventory'Type'
-> Maybe PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory')
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
"quantity")) Parser
(Maybe PostSkusIdRequestBodyInventory'Type'
-> Maybe PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory')
-> Parser (Maybe PostSkusIdRequestBodyInventory'Type')
-> Parser
(Maybe PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe PostSkusIdRequestBodyInventory'Type')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"type")) Parser
(Maybe PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory')
-> Parser (Maybe PostSkusIdRequestBodyInventory'Value')
-> Parser PostSkusIdRequestBodyInventory'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe PostSkusIdRequestBodyInventory'Value')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"value"))
mkPostSkusIdRequestBodyInventory' :: PostSkusIdRequestBodyInventory'
mkPostSkusIdRequestBodyInventory' :: PostSkusIdRequestBodyInventory'
mkPostSkusIdRequestBodyInventory' =
PostSkusIdRequestBodyInventory' :: Maybe Int
-> Maybe PostSkusIdRequestBodyInventory'Type'
-> Maybe PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory'
PostSkusIdRequestBodyInventory'
{ postSkusIdRequestBodyInventory'Quantity :: Maybe Int
postSkusIdRequestBodyInventory'Quantity = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyInventory'Type :: Maybe PostSkusIdRequestBodyInventory'Type'
postSkusIdRequestBodyInventory'Type = Maybe PostSkusIdRequestBodyInventory'Type'
forall a. Maybe a
GHC.Maybe.Nothing,
postSkusIdRequestBodyInventory'Value :: Maybe PostSkusIdRequestBodyInventory'Value'
postSkusIdRequestBodyInventory'Value = Maybe PostSkusIdRequestBodyInventory'Value'
forall a. Maybe a
GHC.Maybe.Nothing
}
data PostSkusIdRequestBodyInventory'Type'
=
PostSkusIdRequestBodyInventory'Type'Other Data.Aeson.Types.Internal.Value
|
PostSkusIdRequestBodyInventory'Type'Typed Data.Text.Internal.Text
|
PostSkusIdRequestBodyInventory'Type'EnumBucket
|
PostSkusIdRequestBodyInventory'Type'EnumFinite
|
PostSkusIdRequestBodyInventory'Type'EnumInfinite
deriving (Int -> PostSkusIdRequestBodyInventory'Type' -> String -> String
[PostSkusIdRequestBodyInventory'Type'] -> String -> String
PostSkusIdRequestBodyInventory'Type' -> String
(Int -> PostSkusIdRequestBodyInventory'Type' -> String -> String)
-> (PostSkusIdRequestBodyInventory'Type' -> String)
-> ([PostSkusIdRequestBodyInventory'Type'] -> String -> String)
-> Show PostSkusIdRequestBodyInventory'Type'
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostSkusIdRequestBodyInventory'Type'] -> String -> String
$cshowList :: [PostSkusIdRequestBodyInventory'Type'] -> String -> String
show :: PostSkusIdRequestBodyInventory'Type' -> String
$cshow :: PostSkusIdRequestBodyInventory'Type' -> String
showsPrec :: Int -> PostSkusIdRequestBodyInventory'Type' -> String -> String
$cshowsPrec :: Int -> PostSkusIdRequestBodyInventory'Type' -> String -> String
GHC.Show.Show, PostSkusIdRequestBodyInventory'Type'
-> PostSkusIdRequestBodyInventory'Type' -> Bool
(PostSkusIdRequestBodyInventory'Type'
-> PostSkusIdRequestBodyInventory'Type' -> Bool)
-> (PostSkusIdRequestBodyInventory'Type'
-> PostSkusIdRequestBodyInventory'Type' -> Bool)
-> Eq PostSkusIdRequestBodyInventory'Type'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostSkusIdRequestBodyInventory'Type'
-> PostSkusIdRequestBodyInventory'Type' -> Bool
$c/= :: PostSkusIdRequestBodyInventory'Type'
-> PostSkusIdRequestBodyInventory'Type' -> Bool
== :: PostSkusIdRequestBodyInventory'Type'
-> PostSkusIdRequestBodyInventory'Type' -> Bool
$c== :: PostSkusIdRequestBodyInventory'Type'
-> PostSkusIdRequestBodyInventory'Type' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostSkusIdRequestBodyInventory'Type' where
toJSON :: PostSkusIdRequestBodyInventory'Type' -> Value
toJSON (PostSkusIdRequestBodyInventory'Type'Other Value
val) = Value
val
toJSON (PostSkusIdRequestBodyInventory'Type'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (PostSkusIdRequestBodyInventory'Type'
PostSkusIdRequestBodyInventory'Type'EnumBucket) = Value
"bucket"
toJSON (PostSkusIdRequestBodyInventory'Type'
PostSkusIdRequestBodyInventory'Type'EnumFinite) = Value
"finite"
toJSON (PostSkusIdRequestBodyInventory'Type'
PostSkusIdRequestBodyInventory'Type'EnumInfinite) = Value
"infinite"
instance Data.Aeson.Types.FromJSON.FromJSON PostSkusIdRequestBodyInventory'Type' where
parseJSON :: Value -> Parser PostSkusIdRequestBodyInventory'Type'
parseJSON Value
val =
PostSkusIdRequestBodyInventory'Type'
-> Parser PostSkusIdRequestBodyInventory'Type'
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
"bucket" -> PostSkusIdRequestBodyInventory'Type'
PostSkusIdRequestBodyInventory'Type'EnumBucket
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"finite" -> PostSkusIdRequestBodyInventory'Type'
PostSkusIdRequestBodyInventory'Type'EnumFinite
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"infinite" -> PostSkusIdRequestBodyInventory'Type'
PostSkusIdRequestBodyInventory'Type'EnumInfinite
| Bool
GHC.Base.otherwise -> Value -> PostSkusIdRequestBodyInventory'Type'
PostSkusIdRequestBodyInventory'Type'Other Value
val
)
data PostSkusIdRequestBodyInventory'Value'
=
PostSkusIdRequestBodyInventory'Value'Other Data.Aeson.Types.Internal.Value
|
PostSkusIdRequestBodyInventory'Value'Typed Data.Text.Internal.Text
|
PostSkusIdRequestBodyInventory'Value'EnumEmptyString
|
PostSkusIdRequestBodyInventory'Value'EnumInStock
|
PostSkusIdRequestBodyInventory'Value'EnumLimited
|
PostSkusIdRequestBodyInventory'Value'EnumOutOfStock
deriving (Int -> PostSkusIdRequestBodyInventory'Value' -> String -> String
[PostSkusIdRequestBodyInventory'Value'] -> String -> String
PostSkusIdRequestBodyInventory'Value' -> String
(Int -> PostSkusIdRequestBodyInventory'Value' -> String -> String)
-> (PostSkusIdRequestBodyInventory'Value' -> String)
-> ([PostSkusIdRequestBodyInventory'Value'] -> String -> String)
-> Show PostSkusIdRequestBodyInventory'Value'
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostSkusIdRequestBodyInventory'Value'] -> String -> String
$cshowList :: [PostSkusIdRequestBodyInventory'Value'] -> String -> String
show :: PostSkusIdRequestBodyInventory'Value' -> String
$cshow :: PostSkusIdRequestBodyInventory'Value' -> String
showsPrec :: Int -> PostSkusIdRequestBodyInventory'Value' -> String -> String
$cshowsPrec :: Int -> PostSkusIdRequestBodyInventory'Value' -> String -> String
GHC.Show.Show, PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory'Value' -> Bool
(PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory'Value' -> Bool)
-> (PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory'Value' -> Bool)
-> Eq PostSkusIdRequestBodyInventory'Value'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory'Value' -> Bool
$c/= :: PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory'Value' -> Bool
== :: PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory'Value' -> Bool
$c== :: PostSkusIdRequestBodyInventory'Value'
-> PostSkusIdRequestBodyInventory'Value' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostSkusIdRequestBodyInventory'Value' where
toJSON :: PostSkusIdRequestBodyInventory'Value' -> Value
toJSON (PostSkusIdRequestBodyInventory'Value'Other Value
val) = Value
val
toJSON (PostSkusIdRequestBodyInventory'Value'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (PostSkusIdRequestBodyInventory'Value'
PostSkusIdRequestBodyInventory'Value'EnumEmptyString) = Value
""
toJSON (PostSkusIdRequestBodyInventory'Value'
PostSkusIdRequestBodyInventory'Value'EnumInStock) = Value
"in_stock"
toJSON (PostSkusIdRequestBodyInventory'Value'
PostSkusIdRequestBodyInventory'Value'EnumLimited) = Value
"limited"
toJSON (PostSkusIdRequestBodyInventory'Value'
PostSkusIdRequestBodyInventory'Value'EnumOutOfStock) = Value
"out_of_stock"
instance Data.Aeson.Types.FromJSON.FromJSON PostSkusIdRequestBodyInventory'Value' where
parseJSON :: Value -> Parser PostSkusIdRequestBodyInventory'Value'
parseJSON Value
val =
PostSkusIdRequestBodyInventory'Value'
-> Parser PostSkusIdRequestBodyInventory'Value'
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
"" -> PostSkusIdRequestBodyInventory'Value'
PostSkusIdRequestBodyInventory'Value'EnumEmptyString
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"in_stock" -> PostSkusIdRequestBodyInventory'Value'
PostSkusIdRequestBodyInventory'Value'EnumInStock
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"limited" -> PostSkusIdRequestBodyInventory'Value'
PostSkusIdRequestBodyInventory'Value'EnumLimited
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"out_of_stock" -> PostSkusIdRequestBodyInventory'Value'
PostSkusIdRequestBodyInventory'Value'EnumOutOfStock
| Bool
GHC.Base.otherwise -> Value -> PostSkusIdRequestBodyInventory'Value'
PostSkusIdRequestBodyInventory'Value'Other Value
val
)
data PostSkusIdRequestBodyMetadata'Variants
=
PostSkusIdRequestBodyMetadata'EmptyString
| PostSkusIdRequestBodyMetadata'Object Data.Aeson.Types.Internal.Object
deriving (Int -> PostSkusIdRequestBodyMetadata'Variants -> String -> String
[PostSkusIdRequestBodyMetadata'Variants] -> String -> String
PostSkusIdRequestBodyMetadata'Variants -> String
(Int -> PostSkusIdRequestBodyMetadata'Variants -> String -> String)
-> (PostSkusIdRequestBodyMetadata'Variants -> String)
-> ([PostSkusIdRequestBodyMetadata'Variants] -> String -> String)
-> Show PostSkusIdRequestBodyMetadata'Variants
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostSkusIdRequestBodyMetadata'Variants] -> String -> String
$cshowList :: [PostSkusIdRequestBodyMetadata'Variants] -> String -> String
show :: PostSkusIdRequestBodyMetadata'Variants -> String
$cshow :: PostSkusIdRequestBodyMetadata'Variants -> String
showsPrec :: Int -> PostSkusIdRequestBodyMetadata'Variants -> String -> String
$cshowsPrec :: Int -> PostSkusIdRequestBodyMetadata'Variants -> String -> String
GHC.Show.Show, PostSkusIdRequestBodyMetadata'Variants
-> PostSkusIdRequestBodyMetadata'Variants -> Bool
(PostSkusIdRequestBodyMetadata'Variants
-> PostSkusIdRequestBodyMetadata'Variants -> Bool)
-> (PostSkusIdRequestBodyMetadata'Variants
-> PostSkusIdRequestBodyMetadata'Variants -> Bool)
-> Eq PostSkusIdRequestBodyMetadata'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostSkusIdRequestBodyMetadata'Variants
-> PostSkusIdRequestBodyMetadata'Variants -> Bool
$c/= :: PostSkusIdRequestBodyMetadata'Variants
-> PostSkusIdRequestBodyMetadata'Variants -> Bool
== :: PostSkusIdRequestBodyMetadata'Variants
-> PostSkusIdRequestBodyMetadata'Variants -> Bool
$c== :: PostSkusIdRequestBodyMetadata'Variants
-> PostSkusIdRequestBodyMetadata'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostSkusIdRequestBodyMetadata'Variants where
toJSON :: PostSkusIdRequestBodyMetadata'Variants -> Value
toJSON (PostSkusIdRequestBodyMetadata'Object Object
a) = Object -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Object
a
toJSON (PostSkusIdRequestBodyMetadata'Variants
PostSkusIdRequestBodyMetadata'EmptyString) = Value
""
instance Data.Aeson.Types.FromJSON.FromJSON PostSkusIdRequestBodyMetadata'Variants where
parseJSON :: Value -> Parser PostSkusIdRequestBodyMetadata'Variants
parseJSON Value
val =
if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"" -> PostSkusIdRequestBodyMetadata'Variants
-> Parser PostSkusIdRequestBodyMetadata'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure PostSkusIdRequestBodyMetadata'Variants
PostSkusIdRequestBodyMetadata'EmptyString
| Bool
GHC.Base.otherwise -> case (Object -> PostSkusIdRequestBodyMetadata'Variants
PostSkusIdRequestBodyMetadata'Object (Object -> PostSkusIdRequestBodyMetadata'Variants)
-> Result Object -> Result PostSkusIdRequestBodyMetadata'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 PostSkusIdRequestBodyMetadata'Variants
-> Result PostSkusIdRequestBodyMetadata'Variants
-> Result PostSkusIdRequestBodyMetadata'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result PostSkusIdRequestBodyMetadata'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched" of
Data.Aeson.Types.Internal.Success PostSkusIdRequestBodyMetadata'Variants
a -> PostSkusIdRequestBodyMetadata'Variants
-> Parser PostSkusIdRequestBodyMetadata'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure PostSkusIdRequestBodyMetadata'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser PostSkusIdRequestBodyMetadata'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data PostSkusIdRequestBodyPackageDimensions'OneOf1 = PostSkusIdRequestBodyPackageDimensions'OneOf1
{
PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Height :: GHC.Types.Double,
PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Length :: GHC.Types.Double,
PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Weight :: GHC.Types.Double,
PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Width :: GHC.Types.Double
}
deriving
( Int
-> PostSkusIdRequestBodyPackageDimensions'OneOf1
-> String
-> String
[PostSkusIdRequestBodyPackageDimensions'OneOf1] -> String -> String
PostSkusIdRequestBodyPackageDimensions'OneOf1 -> String
(Int
-> PostSkusIdRequestBodyPackageDimensions'OneOf1
-> String
-> String)
-> (PostSkusIdRequestBodyPackageDimensions'OneOf1 -> String)
-> ([PostSkusIdRequestBodyPackageDimensions'OneOf1]
-> String -> String)
-> Show PostSkusIdRequestBodyPackageDimensions'OneOf1
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostSkusIdRequestBodyPackageDimensions'OneOf1] -> String -> String
$cshowList :: [PostSkusIdRequestBodyPackageDimensions'OneOf1] -> String -> String
show :: PostSkusIdRequestBodyPackageDimensions'OneOf1 -> String
$cshow :: PostSkusIdRequestBodyPackageDimensions'OneOf1 -> String
showsPrec :: Int
-> PostSkusIdRequestBodyPackageDimensions'OneOf1
-> String
-> String
$cshowsPrec :: Int
-> PostSkusIdRequestBodyPackageDimensions'OneOf1
-> String
-> String
GHC.Show.Show,
PostSkusIdRequestBodyPackageDimensions'OneOf1
-> PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Bool
(PostSkusIdRequestBodyPackageDimensions'OneOf1
-> PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Bool)
-> (PostSkusIdRequestBodyPackageDimensions'OneOf1
-> PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Bool)
-> Eq PostSkusIdRequestBodyPackageDimensions'OneOf1
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostSkusIdRequestBodyPackageDimensions'OneOf1
-> PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Bool
$c/= :: PostSkusIdRequestBodyPackageDimensions'OneOf1
-> PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Bool
== :: PostSkusIdRequestBodyPackageDimensions'OneOf1
-> PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Bool
$c== :: PostSkusIdRequestBodyPackageDimensions'OneOf1
-> PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostSkusIdRequestBodyPackageDimensions'OneOf1 where
toJSON :: PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Value
toJSON PostSkusIdRequestBodyPackageDimensions'OneOf1
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"height" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Height PostSkusIdRequestBodyPackageDimensions'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"length" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Length PostSkusIdRequestBodyPackageDimensions'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"weight" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Weight PostSkusIdRequestBodyPackageDimensions'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"width" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Width PostSkusIdRequestBodyPackageDimensions'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Encoding
toEncoding PostSkusIdRequestBodyPackageDimensions'OneOf1
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"height" Text -> Double -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Height PostSkusIdRequestBodyPackageDimensions'OneOf1
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"length" Text -> Double -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Length PostSkusIdRequestBodyPackageDimensions'OneOf1
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"weight" Text -> Double -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Weight PostSkusIdRequestBodyPackageDimensions'OneOf1
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"width" Text -> Double -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Double
postSkusIdRequestBodyPackageDimensions'OneOf1Width PostSkusIdRequestBodyPackageDimensions'OneOf1
obj))))
instance Data.Aeson.Types.FromJSON.FromJSON PostSkusIdRequestBodyPackageDimensions'OneOf1 where
parseJSON :: Value -> Parser PostSkusIdRequestBodyPackageDimensions'OneOf1
parseJSON = String
-> (Object -> Parser PostSkusIdRequestBodyPackageDimensions'OneOf1)
-> Value
-> Parser PostSkusIdRequestBodyPackageDimensions'OneOf1
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PostSkusIdRequestBodyPackageDimensions'OneOf1" (\Object
obj -> ((((Double
-> Double
-> Double
-> Double
-> PostSkusIdRequestBodyPackageDimensions'OneOf1)
-> Parser
(Double
-> Double
-> Double
-> Double
-> PostSkusIdRequestBodyPackageDimensions'OneOf1)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Double
-> Double
-> Double
-> Double
-> PostSkusIdRequestBodyPackageDimensions'OneOf1
PostSkusIdRequestBodyPackageDimensions'OneOf1 Parser
(Double
-> Double
-> Double
-> Double
-> PostSkusIdRequestBodyPackageDimensions'OneOf1)
-> Parser Double
-> Parser
(Double
-> Double
-> Double
-> PostSkusIdRequestBodyPackageDimensions'OneOf1)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Double
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"height")) Parser
(Double
-> Double
-> Double
-> PostSkusIdRequestBodyPackageDimensions'OneOf1)
-> Parser Double
-> Parser
(Double -> Double -> PostSkusIdRequestBodyPackageDimensions'OneOf1)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Double
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"length")) Parser
(Double -> Double -> PostSkusIdRequestBodyPackageDimensions'OneOf1)
-> Parser Double
-> Parser (Double -> PostSkusIdRequestBodyPackageDimensions'OneOf1)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Double
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"weight")) Parser (Double -> PostSkusIdRequestBodyPackageDimensions'OneOf1)
-> Parser Double
-> Parser PostSkusIdRequestBodyPackageDimensions'OneOf1
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Double
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"width"))
mkPostSkusIdRequestBodyPackageDimensions'OneOf1 ::
GHC.Types.Double ->
GHC.Types.Double ->
GHC.Types.Double ->
GHC.Types.Double ->
PostSkusIdRequestBodyPackageDimensions'OneOf1
mkPostSkusIdRequestBodyPackageDimensions'OneOf1 :: Double
-> Double
-> Double
-> Double
-> PostSkusIdRequestBodyPackageDimensions'OneOf1
mkPostSkusIdRequestBodyPackageDimensions'OneOf1 Double
postSkusIdRequestBodyPackageDimensions'OneOf1Height Double
postSkusIdRequestBodyPackageDimensions'OneOf1Length Double
postSkusIdRequestBodyPackageDimensions'OneOf1Weight Double
postSkusIdRequestBodyPackageDimensions'OneOf1Width =
PostSkusIdRequestBodyPackageDimensions'OneOf1 :: Double
-> Double
-> Double
-> Double
-> PostSkusIdRequestBodyPackageDimensions'OneOf1
PostSkusIdRequestBodyPackageDimensions'OneOf1
{ postSkusIdRequestBodyPackageDimensions'OneOf1Height :: Double
postSkusIdRequestBodyPackageDimensions'OneOf1Height = Double
postSkusIdRequestBodyPackageDimensions'OneOf1Height,
postSkusIdRequestBodyPackageDimensions'OneOf1Length :: Double
postSkusIdRequestBodyPackageDimensions'OneOf1Length = Double
postSkusIdRequestBodyPackageDimensions'OneOf1Length,
postSkusIdRequestBodyPackageDimensions'OneOf1Weight :: Double
postSkusIdRequestBodyPackageDimensions'OneOf1Weight = Double
postSkusIdRequestBodyPackageDimensions'OneOf1Weight,
postSkusIdRequestBodyPackageDimensions'OneOf1Width :: Double
postSkusIdRequestBodyPackageDimensions'OneOf1Width = Double
postSkusIdRequestBodyPackageDimensions'OneOf1Width
}
data PostSkusIdRequestBodyPackageDimensions'Variants
=
PostSkusIdRequestBodyPackageDimensions'EmptyString
| PostSkusIdRequestBodyPackageDimensions'PostSkusIdRequestBodyPackageDimensions'OneOf1 PostSkusIdRequestBodyPackageDimensions'OneOf1
deriving (Int
-> PostSkusIdRequestBodyPackageDimensions'Variants
-> String
-> String
[PostSkusIdRequestBodyPackageDimensions'Variants]
-> String -> String
PostSkusIdRequestBodyPackageDimensions'Variants -> String
(Int
-> PostSkusIdRequestBodyPackageDimensions'Variants
-> String
-> String)
-> (PostSkusIdRequestBodyPackageDimensions'Variants -> String)
-> ([PostSkusIdRequestBodyPackageDimensions'Variants]
-> String -> String)
-> Show PostSkusIdRequestBodyPackageDimensions'Variants
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostSkusIdRequestBodyPackageDimensions'Variants]
-> String -> String
$cshowList :: [PostSkusIdRequestBodyPackageDimensions'Variants]
-> String -> String
show :: PostSkusIdRequestBodyPackageDimensions'Variants -> String
$cshow :: PostSkusIdRequestBodyPackageDimensions'Variants -> String
showsPrec :: Int
-> PostSkusIdRequestBodyPackageDimensions'Variants
-> String
-> String
$cshowsPrec :: Int
-> PostSkusIdRequestBodyPackageDimensions'Variants
-> String
-> String
GHC.Show.Show, PostSkusIdRequestBodyPackageDimensions'Variants
-> PostSkusIdRequestBodyPackageDimensions'Variants -> Bool
(PostSkusIdRequestBodyPackageDimensions'Variants
-> PostSkusIdRequestBodyPackageDimensions'Variants -> Bool)
-> (PostSkusIdRequestBodyPackageDimensions'Variants
-> PostSkusIdRequestBodyPackageDimensions'Variants -> Bool)
-> Eq PostSkusIdRequestBodyPackageDimensions'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostSkusIdRequestBodyPackageDimensions'Variants
-> PostSkusIdRequestBodyPackageDimensions'Variants -> Bool
$c/= :: PostSkusIdRequestBodyPackageDimensions'Variants
-> PostSkusIdRequestBodyPackageDimensions'Variants -> Bool
== :: PostSkusIdRequestBodyPackageDimensions'Variants
-> PostSkusIdRequestBodyPackageDimensions'Variants -> Bool
$c== :: PostSkusIdRequestBodyPackageDimensions'Variants
-> PostSkusIdRequestBodyPackageDimensions'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostSkusIdRequestBodyPackageDimensions'Variants where
toJSON :: PostSkusIdRequestBodyPackageDimensions'Variants -> Value
toJSON (PostSkusIdRequestBodyPackageDimensions'PostSkusIdRequestBodyPackageDimensions'OneOf1 PostSkusIdRequestBodyPackageDimensions'OneOf1
a) = PostSkusIdRequestBodyPackageDimensions'OneOf1 -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON PostSkusIdRequestBodyPackageDimensions'OneOf1
a
toJSON (PostSkusIdRequestBodyPackageDimensions'Variants
PostSkusIdRequestBodyPackageDimensions'EmptyString) = Value
""
instance Data.Aeson.Types.FromJSON.FromJSON PostSkusIdRequestBodyPackageDimensions'Variants where
parseJSON :: Value -> Parser PostSkusIdRequestBodyPackageDimensions'Variants
parseJSON Value
val =
if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"" -> PostSkusIdRequestBodyPackageDimensions'Variants
-> Parser PostSkusIdRequestBodyPackageDimensions'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure PostSkusIdRequestBodyPackageDimensions'Variants
PostSkusIdRequestBodyPackageDimensions'EmptyString
| Bool
GHC.Base.otherwise -> case (PostSkusIdRequestBodyPackageDimensions'OneOf1
-> PostSkusIdRequestBodyPackageDimensions'Variants
PostSkusIdRequestBodyPackageDimensions'PostSkusIdRequestBodyPackageDimensions'OneOf1 (PostSkusIdRequestBodyPackageDimensions'OneOf1
-> PostSkusIdRequestBodyPackageDimensions'Variants)
-> Result PostSkusIdRequestBodyPackageDimensions'OneOf1
-> Result PostSkusIdRequestBodyPackageDimensions'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result PostSkusIdRequestBodyPackageDimensions'OneOf1
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result PostSkusIdRequestBodyPackageDimensions'Variants
-> Result PostSkusIdRequestBodyPackageDimensions'Variants
-> Result PostSkusIdRequestBodyPackageDimensions'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result PostSkusIdRequestBodyPackageDimensions'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched" of
Data.Aeson.Types.Internal.Success PostSkusIdRequestBodyPackageDimensions'Variants
a -> PostSkusIdRequestBodyPackageDimensions'Variants
-> Parser PostSkusIdRequestBodyPackageDimensions'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure PostSkusIdRequestBodyPackageDimensions'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser PostSkusIdRequestBodyPackageDimensions'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data PostSkusIdResponse
=
PostSkusIdResponseError GHC.Base.String
|
PostSkusIdResponse200 Sku
|
PostSkusIdResponseDefault Error
deriving (Int -> PostSkusIdResponse -> String -> String
[PostSkusIdResponse] -> String -> String
PostSkusIdResponse -> String
(Int -> PostSkusIdResponse -> String -> String)
-> (PostSkusIdResponse -> String)
-> ([PostSkusIdResponse] -> String -> String)
-> Show PostSkusIdResponse
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostSkusIdResponse] -> String -> String
$cshowList :: [PostSkusIdResponse] -> String -> String
show :: PostSkusIdResponse -> String
$cshow :: PostSkusIdResponse -> String
showsPrec :: Int -> PostSkusIdResponse -> String -> String
$cshowsPrec :: Int -> PostSkusIdResponse -> String -> String
GHC.Show.Show, PostSkusIdResponse -> PostSkusIdResponse -> Bool
(PostSkusIdResponse -> PostSkusIdResponse -> Bool)
-> (PostSkusIdResponse -> PostSkusIdResponse -> Bool)
-> Eq PostSkusIdResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostSkusIdResponse -> PostSkusIdResponse -> Bool
$c/= :: PostSkusIdResponse -> PostSkusIdResponse -> Bool
== :: PostSkusIdResponse -> PostSkusIdResponse -> Bool
$c== :: PostSkusIdResponse -> PostSkusIdResponse -> Bool
GHC.Classes.Eq)