{-# 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.QuickSight.Types.ManifestFileLocation 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 ManifestFileLocation = ManifestFileLocation'
{
ManifestFileLocation -> Text
bucket :: Prelude.Text,
ManifestFileLocation -> Text
key :: Prelude.Text
}
deriving (ManifestFileLocation -> ManifestFileLocation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ManifestFileLocation -> ManifestFileLocation -> Bool
$c/= :: ManifestFileLocation -> ManifestFileLocation -> Bool
== :: ManifestFileLocation -> ManifestFileLocation -> Bool
$c== :: ManifestFileLocation -> ManifestFileLocation -> Bool
Prelude.Eq, ReadPrec [ManifestFileLocation]
ReadPrec ManifestFileLocation
Int -> ReadS ManifestFileLocation
ReadS [ManifestFileLocation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ManifestFileLocation]
$creadListPrec :: ReadPrec [ManifestFileLocation]
readPrec :: ReadPrec ManifestFileLocation
$creadPrec :: ReadPrec ManifestFileLocation
readList :: ReadS [ManifestFileLocation]
$creadList :: ReadS [ManifestFileLocation]
readsPrec :: Int -> ReadS ManifestFileLocation
$creadsPrec :: Int -> ReadS ManifestFileLocation
Prelude.Read, Int -> ManifestFileLocation -> ShowS
[ManifestFileLocation] -> ShowS
ManifestFileLocation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ManifestFileLocation] -> ShowS
$cshowList :: [ManifestFileLocation] -> ShowS
show :: ManifestFileLocation -> String
$cshow :: ManifestFileLocation -> String
showsPrec :: Int -> ManifestFileLocation -> ShowS
$cshowsPrec :: Int -> ManifestFileLocation -> ShowS
Prelude.Show, forall x. Rep ManifestFileLocation x -> ManifestFileLocation
forall x. ManifestFileLocation -> Rep ManifestFileLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ManifestFileLocation x -> ManifestFileLocation
$cfrom :: forall x. ManifestFileLocation -> Rep ManifestFileLocation x
Prelude.Generic)
newManifestFileLocation ::
Prelude.Text ->
Prelude.Text ->
ManifestFileLocation
newManifestFileLocation :: Text -> Text -> ManifestFileLocation
newManifestFileLocation Text
pBucket_ Text
pKey_ =
ManifestFileLocation'
{ $sel:bucket:ManifestFileLocation' :: Text
bucket = Text
pBucket_,
$sel:key:ManifestFileLocation' :: Text
key = Text
pKey_
}
manifestFileLocation_bucket :: Lens.Lens' ManifestFileLocation Prelude.Text
manifestFileLocation_bucket :: Lens' ManifestFileLocation Text
manifestFileLocation_bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManifestFileLocation' {Text
bucket :: Text
$sel:bucket:ManifestFileLocation' :: ManifestFileLocation -> Text
bucket} -> Text
bucket) (\s :: ManifestFileLocation
s@ManifestFileLocation' {} Text
a -> ManifestFileLocation
s {$sel:bucket:ManifestFileLocation' :: Text
bucket = Text
a} :: ManifestFileLocation)
manifestFileLocation_key :: Lens.Lens' ManifestFileLocation Prelude.Text
manifestFileLocation_key :: Lens' ManifestFileLocation Text
manifestFileLocation_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManifestFileLocation' {Text
key :: Text
$sel:key:ManifestFileLocation' :: ManifestFileLocation -> Text
key} -> Text
key) (\s :: ManifestFileLocation
s@ManifestFileLocation' {} Text
a -> ManifestFileLocation
s {$sel:key:ManifestFileLocation' :: Text
key = Text
a} :: ManifestFileLocation)
instance Data.FromJSON ManifestFileLocation where
parseJSON :: Value -> Parser ManifestFileLocation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ManifestFileLocation"
( \Object
x ->
Text -> Text -> ManifestFileLocation
ManifestFileLocation'
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
"Bucket")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Key")
)
instance Prelude.Hashable ManifestFileLocation where
hashWithSalt :: Int -> ManifestFileLocation -> Int
hashWithSalt Int
_salt ManifestFileLocation' {Text
key :: Text
bucket :: Text
$sel:key:ManifestFileLocation' :: ManifestFileLocation -> Text
$sel:bucket:ManifestFileLocation' :: ManifestFileLocation -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
bucket
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
key
instance Prelude.NFData ManifestFileLocation where
rnf :: ManifestFileLocation -> ()
rnf ManifestFileLocation' {Text
key :: Text
bucket :: Text
$sel:key:ManifestFileLocation' :: ManifestFileLocation -> Text
$sel:bucket:ManifestFileLocation' :: ManifestFileLocation -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
bucket seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
key
instance Data.ToJSON ManifestFileLocation where
toJSON :: ManifestFileLocation -> Value
toJSON ManifestFileLocation' {Text
key :: Text
bucket :: Text
$sel:key:ManifestFileLocation' :: ManifestFileLocation -> Text
$sel:bucket:ManifestFileLocation' :: ManifestFileLocation -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"Bucket" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
bucket),
forall a. a -> Maybe a
Prelude.Just (Key
"Key" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
key)
]
)