{-# 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.SageMaker.Types.CodeRepositorySummary 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
import Amazonka.SageMaker.Types.GitConfig
data CodeRepositorySummary = CodeRepositorySummary'
{
CodeRepositorySummary -> Maybe GitConfig
gitConfig :: Prelude.Maybe GitConfig,
CodeRepositorySummary -> Text
codeRepositoryName :: Prelude.Text,
CodeRepositorySummary -> Text
codeRepositoryArn :: Prelude.Text,
CodeRepositorySummary -> POSIX
creationTime :: Data.POSIX,
CodeRepositorySummary -> POSIX
lastModifiedTime :: Data.POSIX
}
deriving (CodeRepositorySummary -> CodeRepositorySummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeRepositorySummary -> CodeRepositorySummary -> Bool
$c/= :: CodeRepositorySummary -> CodeRepositorySummary -> Bool
== :: CodeRepositorySummary -> CodeRepositorySummary -> Bool
$c== :: CodeRepositorySummary -> CodeRepositorySummary -> Bool
Prelude.Eq, ReadPrec [CodeRepositorySummary]
ReadPrec CodeRepositorySummary
Int -> ReadS CodeRepositorySummary
ReadS [CodeRepositorySummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeRepositorySummary]
$creadListPrec :: ReadPrec [CodeRepositorySummary]
readPrec :: ReadPrec CodeRepositorySummary
$creadPrec :: ReadPrec CodeRepositorySummary
readList :: ReadS [CodeRepositorySummary]
$creadList :: ReadS [CodeRepositorySummary]
readsPrec :: Int -> ReadS CodeRepositorySummary
$creadsPrec :: Int -> ReadS CodeRepositorySummary
Prelude.Read, Int -> CodeRepositorySummary -> ShowS
[CodeRepositorySummary] -> ShowS
CodeRepositorySummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeRepositorySummary] -> ShowS
$cshowList :: [CodeRepositorySummary] -> ShowS
show :: CodeRepositorySummary -> String
$cshow :: CodeRepositorySummary -> String
showsPrec :: Int -> CodeRepositorySummary -> ShowS
$cshowsPrec :: Int -> CodeRepositorySummary -> ShowS
Prelude.Show, forall x. Rep CodeRepositorySummary x -> CodeRepositorySummary
forall x. CodeRepositorySummary -> Rep CodeRepositorySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeRepositorySummary x -> CodeRepositorySummary
$cfrom :: forall x. CodeRepositorySummary -> Rep CodeRepositorySummary x
Prelude.Generic)
newCodeRepositorySummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
CodeRepositorySummary
newCodeRepositorySummary :: Text -> Text -> UTCTime -> UTCTime -> CodeRepositorySummary
newCodeRepositorySummary
Text
pCodeRepositoryName_
Text
pCodeRepositoryArn_
UTCTime
pCreationTime_
UTCTime
pLastModifiedTime_ =
CodeRepositorySummary'
{ $sel:gitConfig:CodeRepositorySummary' :: Maybe GitConfig
gitConfig = forall a. Maybe a
Prelude.Nothing,
$sel:codeRepositoryName:CodeRepositorySummary' :: Text
codeRepositoryName = Text
pCodeRepositoryName_,
$sel:codeRepositoryArn:CodeRepositorySummary' :: Text
codeRepositoryArn = Text
pCodeRepositoryArn_,
$sel:creationTime:CodeRepositorySummary' :: POSIX
creationTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
$sel:lastModifiedTime:CodeRepositorySummary' :: POSIX
lastModifiedTime =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedTime_
}
codeRepositorySummary_gitConfig :: Lens.Lens' CodeRepositorySummary (Prelude.Maybe GitConfig)
codeRepositorySummary_gitConfig :: Lens' CodeRepositorySummary (Maybe GitConfig)
codeRepositorySummary_gitConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeRepositorySummary' {Maybe GitConfig
gitConfig :: Maybe GitConfig
$sel:gitConfig:CodeRepositorySummary' :: CodeRepositorySummary -> Maybe GitConfig
gitConfig} -> Maybe GitConfig
gitConfig) (\s :: CodeRepositorySummary
s@CodeRepositorySummary' {} Maybe GitConfig
a -> CodeRepositorySummary
s {$sel:gitConfig:CodeRepositorySummary' :: Maybe GitConfig
gitConfig = Maybe GitConfig
a} :: CodeRepositorySummary)
codeRepositorySummary_codeRepositoryName :: Lens.Lens' CodeRepositorySummary Prelude.Text
codeRepositorySummary_codeRepositoryName :: Lens' CodeRepositorySummary Text
codeRepositorySummary_codeRepositoryName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeRepositorySummary' {Text
codeRepositoryName :: Text
$sel:codeRepositoryName:CodeRepositorySummary' :: CodeRepositorySummary -> Text
codeRepositoryName} -> Text
codeRepositoryName) (\s :: CodeRepositorySummary
s@CodeRepositorySummary' {} Text
a -> CodeRepositorySummary
s {$sel:codeRepositoryName:CodeRepositorySummary' :: Text
codeRepositoryName = Text
a} :: CodeRepositorySummary)
codeRepositorySummary_codeRepositoryArn :: Lens.Lens' CodeRepositorySummary Prelude.Text
codeRepositorySummary_codeRepositoryArn :: Lens' CodeRepositorySummary Text
codeRepositorySummary_codeRepositoryArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeRepositorySummary' {Text
codeRepositoryArn :: Text
$sel:codeRepositoryArn:CodeRepositorySummary' :: CodeRepositorySummary -> Text
codeRepositoryArn} -> Text
codeRepositoryArn) (\s :: CodeRepositorySummary
s@CodeRepositorySummary' {} Text
a -> CodeRepositorySummary
s {$sel:codeRepositoryArn:CodeRepositorySummary' :: Text
codeRepositoryArn = Text
a} :: CodeRepositorySummary)
codeRepositorySummary_creationTime :: Lens.Lens' CodeRepositorySummary Prelude.UTCTime
codeRepositorySummary_creationTime :: Lens' CodeRepositorySummary UTCTime
codeRepositorySummary_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeRepositorySummary' {POSIX
creationTime :: POSIX
$sel:creationTime:CodeRepositorySummary' :: CodeRepositorySummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: CodeRepositorySummary
s@CodeRepositorySummary' {} POSIX
a -> CodeRepositorySummary
s {$sel:creationTime:CodeRepositorySummary' :: POSIX
creationTime = POSIX
a} :: CodeRepositorySummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
codeRepositorySummary_lastModifiedTime :: Lens.Lens' CodeRepositorySummary Prelude.UTCTime
codeRepositorySummary_lastModifiedTime :: Lens' CodeRepositorySummary UTCTime
codeRepositorySummary_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeRepositorySummary' {POSIX
lastModifiedTime :: POSIX
$sel:lastModifiedTime:CodeRepositorySummary' :: CodeRepositorySummary -> POSIX
lastModifiedTime} -> POSIX
lastModifiedTime) (\s :: CodeRepositorySummary
s@CodeRepositorySummary' {} POSIX
a -> CodeRepositorySummary
s {$sel:lastModifiedTime:CodeRepositorySummary' :: POSIX
lastModifiedTime = POSIX
a} :: CodeRepositorySummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON CodeRepositorySummary where
parseJSON :: Value -> Parser CodeRepositorySummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CodeRepositorySummary"
( \Object
x ->
Maybe GitConfig
-> Text -> Text -> POSIX -> POSIX -> CodeRepositorySummary
CodeRepositorySummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GitConfig")
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
"CodeRepositoryName")
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
"CodeRepositoryArn")
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
"CreationTime")
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
"LastModifiedTime")
)
instance Prelude.Hashable CodeRepositorySummary where
hashWithSalt :: Int -> CodeRepositorySummary -> Int
hashWithSalt Int
_salt CodeRepositorySummary' {Maybe GitConfig
Text
POSIX
lastModifiedTime :: POSIX
creationTime :: POSIX
codeRepositoryArn :: Text
codeRepositoryName :: Text
gitConfig :: Maybe GitConfig
$sel:lastModifiedTime:CodeRepositorySummary' :: CodeRepositorySummary -> POSIX
$sel:creationTime:CodeRepositorySummary' :: CodeRepositorySummary -> POSIX
$sel:codeRepositoryArn:CodeRepositorySummary' :: CodeRepositorySummary -> Text
$sel:codeRepositoryName:CodeRepositorySummary' :: CodeRepositorySummary -> Text
$sel:gitConfig:CodeRepositorySummary' :: CodeRepositorySummary -> Maybe GitConfig
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GitConfig
gitConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
codeRepositoryName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
codeRepositoryArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastModifiedTime
instance Prelude.NFData CodeRepositorySummary where
rnf :: CodeRepositorySummary -> ()
rnf CodeRepositorySummary' {Maybe GitConfig
Text
POSIX
lastModifiedTime :: POSIX
creationTime :: POSIX
codeRepositoryArn :: Text
codeRepositoryName :: Text
gitConfig :: Maybe GitConfig
$sel:lastModifiedTime:CodeRepositorySummary' :: CodeRepositorySummary -> POSIX
$sel:creationTime:CodeRepositorySummary' :: CodeRepositorySummary -> POSIX
$sel:codeRepositoryArn:CodeRepositorySummary' :: CodeRepositorySummary -> Text
$sel:codeRepositoryName:CodeRepositorySummary' :: CodeRepositorySummary -> Text
$sel:gitConfig:CodeRepositorySummary' :: CodeRepositorySummary -> Maybe GitConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe GitConfig
gitConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
codeRepositoryName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
codeRepositoryArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastModifiedTime