{-# 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.S3.Types.JSONInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
import Amazonka.S3.Types.JSONType
data JSONInput = JSONInput'
{
JSONInput -> Maybe JSONType
type' :: Prelude.Maybe JSONType
}
deriving (JSONInput -> JSONInput -> Bool
(JSONInput -> JSONInput -> Bool)
-> (JSONInput -> JSONInput -> Bool) -> Eq JSONInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JSONInput -> JSONInput -> Bool
$c/= :: JSONInput -> JSONInput -> Bool
== :: JSONInput -> JSONInput -> Bool
$c== :: JSONInput -> JSONInput -> Bool
Prelude.Eq, ReadPrec [JSONInput]
ReadPrec JSONInput
Int -> ReadS JSONInput
ReadS [JSONInput]
(Int -> ReadS JSONInput)
-> ReadS [JSONInput]
-> ReadPrec JSONInput
-> ReadPrec [JSONInput]
-> Read JSONInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JSONInput]
$creadListPrec :: ReadPrec [JSONInput]
readPrec :: ReadPrec JSONInput
$creadPrec :: ReadPrec JSONInput
readList :: ReadS [JSONInput]
$creadList :: ReadS [JSONInput]
readsPrec :: Int -> ReadS JSONInput
$creadsPrec :: Int -> ReadS JSONInput
Prelude.Read, Int -> JSONInput -> ShowS
[JSONInput] -> ShowS
JSONInput -> String
(Int -> JSONInput -> ShowS)
-> (JSONInput -> String)
-> ([JSONInput] -> ShowS)
-> Show JSONInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JSONInput] -> ShowS
$cshowList :: [JSONInput] -> ShowS
show :: JSONInput -> String
$cshow :: JSONInput -> String
showsPrec :: Int -> JSONInput -> ShowS
$cshowsPrec :: Int -> JSONInput -> ShowS
Prelude.Show, (forall x. JSONInput -> Rep JSONInput x)
-> (forall x. Rep JSONInput x -> JSONInput) -> Generic JSONInput
forall x. Rep JSONInput x -> JSONInput
forall x. JSONInput -> Rep JSONInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JSONInput x -> JSONInput
$cfrom :: forall x. JSONInput -> Rep JSONInput x
Prelude.Generic)
newJSONInput ::
JSONInput
newJSONInput :: JSONInput
newJSONInput = JSONInput' :: Maybe JSONType -> JSONInput
JSONInput' {$sel:type':JSONInput' :: Maybe JSONType
type' = Maybe JSONType
forall a. Maybe a
Prelude.Nothing}
jSONInput_type :: Lens.Lens' JSONInput (Prelude.Maybe JSONType)
jSONInput_type :: (Maybe JSONType -> f (Maybe JSONType)) -> JSONInput -> f JSONInput
jSONInput_type = (JSONInput -> Maybe JSONType)
-> (JSONInput -> Maybe JSONType -> JSONInput)
-> Lens JSONInput JSONInput (Maybe JSONType) (Maybe JSONType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JSONInput' {Maybe JSONType
type' :: Maybe JSONType
$sel:type':JSONInput' :: JSONInput -> Maybe JSONType
type'} -> Maybe JSONType
type') (\s :: JSONInput
s@JSONInput' {} Maybe JSONType
a -> JSONInput
s {$sel:type':JSONInput' :: Maybe JSONType
type' = Maybe JSONType
a} :: JSONInput)
instance Prelude.Hashable JSONInput
instance Prelude.NFData JSONInput
instance Core.ToXML JSONInput where
toXML :: JSONInput -> XML
toXML JSONInput' {Maybe JSONType
type' :: Maybe JSONType
$sel:type':JSONInput' :: JSONInput -> Maybe JSONType
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"Type" Name -> Maybe JSONType -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe JSONType
type']