{-# 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.Panorama.Types.StorageLocation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StorageLocation = StorageLocation'
{
StorageLocation -> Text
bucket :: Prelude.Text,
StorageLocation -> Text
repoPrefixLocation :: Prelude.Text,
StorageLocation -> Text
generatedPrefixLocation :: Prelude.Text,
StorageLocation -> Text
binaryPrefixLocation :: Prelude.Text,
StorageLocation -> Text
manifestPrefixLocation :: Prelude.Text
}
deriving (StorageLocation -> StorageLocation -> Bool
(StorageLocation -> StorageLocation -> Bool)
-> (StorageLocation -> StorageLocation -> Bool)
-> Eq StorageLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StorageLocation -> StorageLocation -> Bool
$c/= :: StorageLocation -> StorageLocation -> Bool
== :: StorageLocation -> StorageLocation -> Bool
$c== :: StorageLocation -> StorageLocation -> Bool
Prelude.Eq, ReadPrec [StorageLocation]
ReadPrec StorageLocation
Int -> ReadS StorageLocation
ReadS [StorageLocation]
(Int -> ReadS StorageLocation)
-> ReadS [StorageLocation]
-> ReadPrec StorageLocation
-> ReadPrec [StorageLocation]
-> Read StorageLocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StorageLocation]
$creadListPrec :: ReadPrec [StorageLocation]
readPrec :: ReadPrec StorageLocation
$creadPrec :: ReadPrec StorageLocation
readList :: ReadS [StorageLocation]
$creadList :: ReadS [StorageLocation]
readsPrec :: Int -> ReadS StorageLocation
$creadsPrec :: Int -> ReadS StorageLocation
Prelude.Read, Int -> StorageLocation -> ShowS
[StorageLocation] -> ShowS
StorageLocation -> String
(Int -> StorageLocation -> ShowS)
-> (StorageLocation -> String)
-> ([StorageLocation] -> ShowS)
-> Show StorageLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StorageLocation] -> ShowS
$cshowList :: [StorageLocation] -> ShowS
show :: StorageLocation -> String
$cshow :: StorageLocation -> String
showsPrec :: Int -> StorageLocation -> ShowS
$cshowsPrec :: Int -> StorageLocation -> ShowS
Prelude.Show, (forall x. StorageLocation -> Rep StorageLocation x)
-> (forall x. Rep StorageLocation x -> StorageLocation)
-> Generic StorageLocation
forall x. Rep StorageLocation x -> StorageLocation
forall x. StorageLocation -> Rep StorageLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StorageLocation x -> StorageLocation
$cfrom :: forall x. StorageLocation -> Rep StorageLocation x
Prelude.Generic)
newStorageLocation ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
StorageLocation
newStorageLocation :: Text -> Text -> Text -> Text -> Text -> StorageLocation
newStorageLocation
Text
pBucket_
Text
pRepoPrefixLocation_
Text
pGeneratedPrefixLocation_
Text
pBinaryPrefixLocation_
Text
pManifestPrefixLocation_ =
StorageLocation' :: Text -> Text -> Text -> Text -> Text -> StorageLocation
StorageLocation'
{ $sel:bucket:StorageLocation' :: Text
bucket = Text
pBucket_,
$sel:repoPrefixLocation:StorageLocation' :: Text
repoPrefixLocation = Text
pRepoPrefixLocation_,
$sel:generatedPrefixLocation:StorageLocation' :: Text
generatedPrefixLocation = Text
pGeneratedPrefixLocation_,
$sel:binaryPrefixLocation:StorageLocation' :: Text
binaryPrefixLocation = Text
pBinaryPrefixLocation_,
$sel:manifestPrefixLocation:StorageLocation' :: Text
manifestPrefixLocation = Text
pManifestPrefixLocation_
}
storageLocation_bucket :: Lens.Lens' StorageLocation Prelude.Text
storageLocation_bucket :: (Text -> f Text) -> StorageLocation -> f StorageLocation
storageLocation_bucket = (StorageLocation -> Text)
-> (StorageLocation -> Text -> StorageLocation)
-> Lens StorageLocation StorageLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageLocation' {Text
bucket :: Text
$sel:bucket:StorageLocation' :: StorageLocation -> Text
bucket} -> Text
bucket) (\s :: StorageLocation
s@StorageLocation' {} Text
a -> StorageLocation
s {$sel:bucket:StorageLocation' :: Text
bucket = Text
a} :: StorageLocation)
storageLocation_repoPrefixLocation :: Lens.Lens' StorageLocation Prelude.Text
storageLocation_repoPrefixLocation :: (Text -> f Text) -> StorageLocation -> f StorageLocation
storageLocation_repoPrefixLocation = (StorageLocation -> Text)
-> (StorageLocation -> Text -> StorageLocation)
-> Lens StorageLocation StorageLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageLocation' {Text
repoPrefixLocation :: Text
$sel:repoPrefixLocation:StorageLocation' :: StorageLocation -> Text
repoPrefixLocation} -> Text
repoPrefixLocation) (\s :: StorageLocation
s@StorageLocation' {} Text
a -> StorageLocation
s {$sel:repoPrefixLocation:StorageLocation' :: Text
repoPrefixLocation = Text
a} :: StorageLocation)
storageLocation_generatedPrefixLocation :: Lens.Lens' StorageLocation Prelude.Text
storageLocation_generatedPrefixLocation :: (Text -> f Text) -> StorageLocation -> f StorageLocation
storageLocation_generatedPrefixLocation = (StorageLocation -> Text)
-> (StorageLocation -> Text -> StorageLocation)
-> Lens StorageLocation StorageLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageLocation' {Text
generatedPrefixLocation :: Text
$sel:generatedPrefixLocation:StorageLocation' :: StorageLocation -> Text
generatedPrefixLocation} -> Text
generatedPrefixLocation) (\s :: StorageLocation
s@StorageLocation' {} Text
a -> StorageLocation
s {$sel:generatedPrefixLocation:StorageLocation' :: Text
generatedPrefixLocation = Text
a} :: StorageLocation)
storageLocation_binaryPrefixLocation :: Lens.Lens' StorageLocation Prelude.Text
storageLocation_binaryPrefixLocation :: (Text -> f Text) -> StorageLocation -> f StorageLocation
storageLocation_binaryPrefixLocation = (StorageLocation -> Text)
-> (StorageLocation -> Text -> StorageLocation)
-> Lens StorageLocation StorageLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageLocation' {Text
binaryPrefixLocation :: Text
$sel:binaryPrefixLocation:StorageLocation' :: StorageLocation -> Text
binaryPrefixLocation} -> Text
binaryPrefixLocation) (\s :: StorageLocation
s@StorageLocation' {} Text
a -> StorageLocation
s {$sel:binaryPrefixLocation:StorageLocation' :: Text
binaryPrefixLocation = Text
a} :: StorageLocation)
storageLocation_manifestPrefixLocation :: Lens.Lens' StorageLocation Prelude.Text
storageLocation_manifestPrefixLocation :: (Text -> f Text) -> StorageLocation -> f StorageLocation
storageLocation_manifestPrefixLocation = (StorageLocation -> Text)
-> (StorageLocation -> Text -> StorageLocation)
-> Lens StorageLocation StorageLocation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageLocation' {Text
manifestPrefixLocation :: Text
$sel:manifestPrefixLocation:StorageLocation' :: StorageLocation -> Text
manifestPrefixLocation} -> Text
manifestPrefixLocation) (\s :: StorageLocation
s@StorageLocation' {} Text
a -> StorageLocation
s {$sel:manifestPrefixLocation:StorageLocation' :: Text
manifestPrefixLocation = Text
a} :: StorageLocation)
instance Core.FromJSON StorageLocation where
parseJSON :: Value -> Parser StorageLocation
parseJSON =
String
-> (Object -> Parser StorageLocation)
-> Value
-> Parser StorageLocation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"StorageLocation"
( \Object
x ->
Text -> Text -> Text -> Text -> Text -> StorageLocation
StorageLocation'
(Text -> Text -> Text -> Text -> Text -> StorageLocation)
-> Parser Text
-> Parser (Text -> Text -> Text -> Text -> StorageLocation)
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
"Bucket")
Parser (Text -> Text -> Text -> Text -> StorageLocation)
-> Parser Text -> Parser (Text -> Text -> Text -> StorageLocation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RepoPrefixLocation")
Parser (Text -> Text -> Text -> StorageLocation)
-> Parser Text -> Parser (Text -> Text -> StorageLocation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"GeneratedPrefixLocation")
Parser (Text -> Text -> StorageLocation)
-> Parser Text -> Parser (Text -> StorageLocation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"BinaryPrefixLocation")
Parser (Text -> StorageLocation)
-> Parser Text -> Parser StorageLocation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ManifestPrefixLocation")
)
instance Prelude.Hashable StorageLocation
instance Prelude.NFData StorageLocation