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