{-# 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.IoTAnalytics.Types.OutputFileUriValue where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OutputFileUriValue = OutputFileUriValue'
{
OutputFileUriValue -> Text
fileName :: Prelude.Text
}
deriving (OutputFileUriValue -> OutputFileUriValue -> Bool
(OutputFileUriValue -> OutputFileUriValue -> Bool)
-> (OutputFileUriValue -> OutputFileUriValue -> Bool)
-> Eq OutputFileUriValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutputFileUriValue -> OutputFileUriValue -> Bool
$c/= :: OutputFileUriValue -> OutputFileUriValue -> Bool
== :: OutputFileUriValue -> OutputFileUriValue -> Bool
$c== :: OutputFileUriValue -> OutputFileUriValue -> Bool
Prelude.Eq, ReadPrec [OutputFileUriValue]
ReadPrec OutputFileUriValue
Int -> ReadS OutputFileUriValue
ReadS [OutputFileUriValue]
(Int -> ReadS OutputFileUriValue)
-> ReadS [OutputFileUriValue]
-> ReadPrec OutputFileUriValue
-> ReadPrec [OutputFileUriValue]
-> Read OutputFileUriValue
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutputFileUriValue]
$creadListPrec :: ReadPrec [OutputFileUriValue]
readPrec :: ReadPrec OutputFileUriValue
$creadPrec :: ReadPrec OutputFileUriValue
readList :: ReadS [OutputFileUriValue]
$creadList :: ReadS [OutputFileUriValue]
readsPrec :: Int -> ReadS OutputFileUriValue
$creadsPrec :: Int -> ReadS OutputFileUriValue
Prelude.Read, Int -> OutputFileUriValue -> ShowS
[OutputFileUriValue] -> ShowS
OutputFileUriValue -> String
(Int -> OutputFileUriValue -> ShowS)
-> (OutputFileUriValue -> String)
-> ([OutputFileUriValue] -> ShowS)
-> Show OutputFileUriValue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputFileUriValue] -> ShowS
$cshowList :: [OutputFileUriValue] -> ShowS
show :: OutputFileUriValue -> String
$cshow :: OutputFileUriValue -> String
showsPrec :: Int -> OutputFileUriValue -> ShowS
$cshowsPrec :: Int -> OutputFileUriValue -> ShowS
Prelude.Show, (forall x. OutputFileUriValue -> Rep OutputFileUriValue x)
-> (forall x. Rep OutputFileUriValue x -> OutputFileUriValue)
-> Generic OutputFileUriValue
forall x. Rep OutputFileUriValue x -> OutputFileUriValue
forall x. OutputFileUriValue -> Rep OutputFileUriValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutputFileUriValue x -> OutputFileUriValue
$cfrom :: forall x. OutputFileUriValue -> Rep OutputFileUriValue x
Prelude.Generic)
newOutputFileUriValue ::
Prelude.Text ->
OutputFileUriValue
newOutputFileUriValue :: Text -> OutputFileUriValue
newOutputFileUriValue Text
pFileName_ =
OutputFileUriValue' :: Text -> OutputFileUriValue
OutputFileUriValue' {$sel:fileName:OutputFileUriValue' :: Text
fileName = Text
pFileName_}
outputFileUriValue_fileName :: Lens.Lens' OutputFileUriValue Prelude.Text
outputFileUriValue_fileName :: (Text -> f Text) -> OutputFileUriValue -> f OutputFileUriValue
outputFileUriValue_fileName = (OutputFileUriValue -> Text)
-> (OutputFileUriValue -> Text -> OutputFileUriValue)
-> Lens OutputFileUriValue OutputFileUriValue Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputFileUriValue' {Text
fileName :: Text
$sel:fileName:OutputFileUriValue' :: OutputFileUriValue -> Text
fileName} -> Text
fileName) (\s :: OutputFileUriValue
s@OutputFileUriValue' {} Text
a -> OutputFileUriValue
s {$sel:fileName:OutputFileUriValue' :: Text
fileName = Text
a} :: OutputFileUriValue)
instance Core.FromJSON OutputFileUriValue where
parseJSON :: Value -> Parser OutputFileUriValue
parseJSON =
String
-> (Object -> Parser OutputFileUriValue)
-> Value
-> Parser OutputFileUriValue
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OutputFileUriValue"
( \Object
x ->
Text -> OutputFileUriValue
OutputFileUriValue'
(Text -> OutputFileUriValue)
-> Parser Text -> Parser OutputFileUriValue
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
"fileName")
)
instance Prelude.Hashable OutputFileUriValue
instance Prelude.NFData OutputFileUriValue
instance Core.ToJSON OutputFileUriValue where
toJSON :: OutputFileUriValue -> Value
toJSON OutputFileUriValue' {Text
fileName :: Text
$sel:fileName:OutputFileUriValue' :: OutputFileUriValue -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"fileName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fileName)]
)