{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data OutputFileUriValue = OutputFileUriValue'
{
OutputFileUriValue -> Text
fileName :: Prelude.Text
}
deriving (OutputFileUriValue -> OutputFileUriValue -> Bool
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]
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
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. 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' {$sel:fileName:OutputFileUriValue' :: Text
fileName = Text
pFileName_}
outputFileUriValue_fileName :: Lens.Lens' OutputFileUriValue Prelude.Text
outputFileUriValue_fileName :: Lens' OutputFileUriValue Text
outputFileUriValue_fileName = 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 Data.FromJSON OutputFileUriValue where
parseJSON :: Value -> Parser OutputFileUriValue
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"OutputFileUriValue"
( \Object
x ->
Text -> OutputFileUriValue
OutputFileUriValue'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"fileName")
)
instance Prelude.Hashable OutputFileUriValue where
hashWithSalt :: Int -> OutputFileUriValue -> Int
hashWithSalt Int
_salt OutputFileUriValue' {Text
fileName :: Text
$sel:fileName:OutputFileUriValue' :: OutputFileUriValue -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
fileName
instance Prelude.NFData OutputFileUriValue where
rnf :: OutputFileUriValue -> ()
rnf OutputFileUriValue' {Text
fileName :: Text
$sel:fileName:OutputFileUriValue' :: OutputFileUriValue -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
fileName
instance Data.ToJSON OutputFileUriValue where
toJSON :: OutputFileUriValue -> Value
toJSON OutputFileUriValue' {Text
fileName :: Text
$sel:fileName:OutputFileUriValue' :: OutputFileUriValue -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"fileName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
fileName)]
)