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