{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Snowball.Types.INDTaxDocuments where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data INDTaxDocuments = INDTaxDocuments'
{
INDTaxDocuments -> Maybe Text
gstin :: Prelude.Maybe Prelude.Text
}
deriving (INDTaxDocuments -> INDTaxDocuments -> Bool
(INDTaxDocuments -> INDTaxDocuments -> Bool)
-> (INDTaxDocuments -> INDTaxDocuments -> Bool)
-> Eq INDTaxDocuments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: INDTaxDocuments -> INDTaxDocuments -> Bool
$c/= :: INDTaxDocuments -> INDTaxDocuments -> Bool
== :: INDTaxDocuments -> INDTaxDocuments -> Bool
$c== :: INDTaxDocuments -> INDTaxDocuments -> Bool
Prelude.Eq, ReadPrec [INDTaxDocuments]
ReadPrec INDTaxDocuments
Int -> ReadS INDTaxDocuments
ReadS [INDTaxDocuments]
(Int -> ReadS INDTaxDocuments)
-> ReadS [INDTaxDocuments]
-> ReadPrec INDTaxDocuments
-> ReadPrec [INDTaxDocuments]
-> Read INDTaxDocuments
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [INDTaxDocuments]
$creadListPrec :: ReadPrec [INDTaxDocuments]
readPrec :: ReadPrec INDTaxDocuments
$creadPrec :: ReadPrec INDTaxDocuments
readList :: ReadS [INDTaxDocuments]
$creadList :: ReadS [INDTaxDocuments]
readsPrec :: Int -> ReadS INDTaxDocuments
$creadsPrec :: Int -> ReadS INDTaxDocuments
Prelude.Read, Int -> INDTaxDocuments -> ShowS
[INDTaxDocuments] -> ShowS
INDTaxDocuments -> String
(Int -> INDTaxDocuments -> ShowS)
-> (INDTaxDocuments -> String)
-> ([INDTaxDocuments] -> ShowS)
-> Show INDTaxDocuments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [INDTaxDocuments] -> ShowS
$cshowList :: [INDTaxDocuments] -> ShowS
show :: INDTaxDocuments -> String
$cshow :: INDTaxDocuments -> String
showsPrec :: Int -> INDTaxDocuments -> ShowS
$cshowsPrec :: Int -> INDTaxDocuments -> ShowS
Prelude.Show, (forall x. INDTaxDocuments -> Rep INDTaxDocuments x)
-> (forall x. Rep INDTaxDocuments x -> INDTaxDocuments)
-> Generic INDTaxDocuments
forall x. Rep INDTaxDocuments x -> INDTaxDocuments
forall x. INDTaxDocuments -> Rep INDTaxDocuments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep INDTaxDocuments x -> INDTaxDocuments
$cfrom :: forall x. INDTaxDocuments -> Rep INDTaxDocuments x
Prelude.Generic)
newINDTaxDocuments ::
INDTaxDocuments
newINDTaxDocuments :: INDTaxDocuments
newINDTaxDocuments =
INDTaxDocuments' :: Maybe Text -> INDTaxDocuments
INDTaxDocuments' {$sel:gstin:INDTaxDocuments' :: Maybe Text
gstin = Maybe Text
forall a. Maybe a
Prelude.Nothing}
iNDTaxDocuments_gstin :: Lens.Lens' INDTaxDocuments (Prelude.Maybe Prelude.Text)
iNDTaxDocuments_gstin :: (Maybe Text -> f (Maybe Text))
-> INDTaxDocuments -> f INDTaxDocuments
iNDTaxDocuments_gstin = (INDTaxDocuments -> Maybe Text)
-> (INDTaxDocuments -> Maybe Text -> INDTaxDocuments)
-> Lens INDTaxDocuments INDTaxDocuments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\INDTaxDocuments' {Maybe Text
gstin :: Maybe Text
$sel:gstin:INDTaxDocuments' :: INDTaxDocuments -> Maybe Text
gstin} -> Maybe Text
gstin) (\s :: INDTaxDocuments
s@INDTaxDocuments' {} Maybe Text
a -> INDTaxDocuments
s {$sel:gstin:INDTaxDocuments' :: Maybe Text
gstin = Maybe Text
a} :: INDTaxDocuments)
instance Core.FromJSON INDTaxDocuments where
parseJSON :: Value -> Parser INDTaxDocuments
parseJSON =
String
-> (Object -> Parser INDTaxDocuments)
-> Value
-> Parser INDTaxDocuments
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"INDTaxDocuments"
( \Object
x ->
Maybe Text -> INDTaxDocuments
INDTaxDocuments' (Maybe Text -> INDTaxDocuments)
-> Parser (Maybe Text) -> Parser INDTaxDocuments
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GSTIN")
)
instance Prelude.Hashable INDTaxDocuments
instance Prelude.NFData INDTaxDocuments
instance Core.ToJSON INDTaxDocuments where
toJSON :: INDTaxDocuments -> Value
toJSON INDTaxDocuments' {Maybe Text
gstin :: Maybe Text
$sel:gstin:INDTaxDocuments' :: INDTaxDocuments -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"GSTIN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
gstin]
)