{-# 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.DataExchange.Types.OriginDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OriginDetails = OriginDetails'
{
OriginDetails -> Text
productId :: Prelude.Text
}
deriving (OriginDetails -> OriginDetails -> Bool
(OriginDetails -> OriginDetails -> Bool)
-> (OriginDetails -> OriginDetails -> Bool) -> Eq OriginDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OriginDetails -> OriginDetails -> Bool
$c/= :: OriginDetails -> OriginDetails -> Bool
== :: OriginDetails -> OriginDetails -> Bool
$c== :: OriginDetails -> OriginDetails -> Bool
Prelude.Eq, ReadPrec [OriginDetails]
ReadPrec OriginDetails
Int -> ReadS OriginDetails
ReadS [OriginDetails]
(Int -> ReadS OriginDetails)
-> ReadS [OriginDetails]
-> ReadPrec OriginDetails
-> ReadPrec [OriginDetails]
-> Read OriginDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OriginDetails]
$creadListPrec :: ReadPrec [OriginDetails]
readPrec :: ReadPrec OriginDetails
$creadPrec :: ReadPrec OriginDetails
readList :: ReadS [OriginDetails]
$creadList :: ReadS [OriginDetails]
readsPrec :: Int -> ReadS OriginDetails
$creadsPrec :: Int -> ReadS OriginDetails
Prelude.Read, Int -> OriginDetails -> ShowS
[OriginDetails] -> ShowS
OriginDetails -> String
(Int -> OriginDetails -> ShowS)
-> (OriginDetails -> String)
-> ([OriginDetails] -> ShowS)
-> Show OriginDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OriginDetails] -> ShowS
$cshowList :: [OriginDetails] -> ShowS
show :: OriginDetails -> String
$cshow :: OriginDetails -> String
showsPrec :: Int -> OriginDetails -> ShowS
$cshowsPrec :: Int -> OriginDetails -> ShowS
Prelude.Show, (forall x. OriginDetails -> Rep OriginDetails x)
-> (forall x. Rep OriginDetails x -> OriginDetails)
-> Generic OriginDetails
forall x. Rep OriginDetails x -> OriginDetails
forall x. OriginDetails -> Rep OriginDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OriginDetails x -> OriginDetails
$cfrom :: forall x. OriginDetails -> Rep OriginDetails x
Prelude.Generic)
newOriginDetails ::
Prelude.Text ->
OriginDetails
newOriginDetails :: Text -> OriginDetails
newOriginDetails Text
pProductId_ =
OriginDetails' :: Text -> OriginDetails
OriginDetails' {$sel:productId:OriginDetails' :: Text
productId = Text
pProductId_}
originDetails_productId :: Lens.Lens' OriginDetails Prelude.Text
originDetails_productId :: (Text -> f Text) -> OriginDetails -> f OriginDetails
originDetails_productId = (OriginDetails -> Text)
-> (OriginDetails -> Text -> OriginDetails)
-> Lens OriginDetails OriginDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginDetails' {Text
productId :: Text
$sel:productId:OriginDetails' :: OriginDetails -> Text
productId} -> Text
productId) (\s :: OriginDetails
s@OriginDetails' {} Text
a -> OriginDetails
s {$sel:productId:OriginDetails' :: Text
productId = Text
a} :: OriginDetails)
instance Core.FromJSON OriginDetails where
parseJSON :: Value -> Parser OriginDetails
parseJSON =
String
-> (Object -> Parser OriginDetails)
-> Value
-> Parser OriginDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OriginDetails"
( \Object
x ->
Text -> OriginDetails
OriginDetails' (Text -> OriginDetails) -> Parser Text -> Parser OriginDetails
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ProductId")
)
instance Prelude.Hashable OriginDetails
instance Prelude.NFData OriginDetails