{-# 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.Proton.Types.RepositorySummary 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.Proton.Types.RepositoryProvider
data RepositorySummary = RepositorySummary'
{
RepositorySummary -> Text
arn :: Prelude.Text,
RepositorySummary -> Text
name :: Prelude.Text,
RepositorySummary -> RepositoryProvider
provider :: RepositoryProvider
}
deriving (RepositorySummary -> RepositorySummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositorySummary -> RepositorySummary -> Bool
$c/= :: RepositorySummary -> RepositorySummary -> Bool
== :: RepositorySummary -> RepositorySummary -> Bool
$c== :: RepositorySummary -> RepositorySummary -> Bool
Prelude.Eq, ReadPrec [RepositorySummary]
ReadPrec RepositorySummary
Int -> ReadS RepositorySummary
ReadS [RepositorySummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RepositorySummary]
$creadListPrec :: ReadPrec [RepositorySummary]
readPrec :: ReadPrec RepositorySummary
$creadPrec :: ReadPrec RepositorySummary
readList :: ReadS [RepositorySummary]
$creadList :: ReadS [RepositorySummary]
readsPrec :: Int -> ReadS RepositorySummary
$creadsPrec :: Int -> ReadS RepositorySummary
Prelude.Read, Int -> RepositorySummary -> ShowS
[RepositorySummary] -> ShowS
RepositorySummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositorySummary] -> ShowS
$cshowList :: [RepositorySummary] -> ShowS
show :: RepositorySummary -> String
$cshow :: RepositorySummary -> String
showsPrec :: Int -> RepositorySummary -> ShowS
$cshowsPrec :: Int -> RepositorySummary -> ShowS
Prelude.Show, forall x. Rep RepositorySummary x -> RepositorySummary
forall x. RepositorySummary -> Rep RepositorySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RepositorySummary x -> RepositorySummary
$cfrom :: forall x. RepositorySummary -> Rep RepositorySummary x
Prelude.Generic)
newRepositorySummary ::
Prelude.Text ->
Prelude.Text ->
RepositoryProvider ->
RepositorySummary
newRepositorySummary :: Text -> Text -> RepositoryProvider -> RepositorySummary
newRepositorySummary Text
pArn_ Text
pName_ RepositoryProvider
pProvider_ =
RepositorySummary'
{ $sel:arn:RepositorySummary' :: Text
arn = Text
pArn_,
$sel:name:RepositorySummary' :: Text
name = Text
pName_,
$sel:provider:RepositorySummary' :: RepositoryProvider
provider = RepositoryProvider
pProvider_
}
repositorySummary_arn :: Lens.Lens' RepositorySummary Prelude.Text
repositorySummary_arn :: Lens' RepositorySummary Text
repositorySummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySummary' {Text
arn :: Text
$sel:arn:RepositorySummary' :: RepositorySummary -> Text
arn} -> Text
arn) (\s :: RepositorySummary
s@RepositorySummary' {} Text
a -> RepositorySummary
s {$sel:arn:RepositorySummary' :: Text
arn = Text
a} :: RepositorySummary)
repositorySummary_name :: Lens.Lens' RepositorySummary Prelude.Text
repositorySummary_name :: Lens' RepositorySummary Text
repositorySummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySummary' {Text
name :: Text
$sel:name:RepositorySummary' :: RepositorySummary -> Text
name} -> Text
name) (\s :: RepositorySummary
s@RepositorySummary' {} Text
a -> RepositorySummary
s {$sel:name:RepositorySummary' :: Text
name = Text
a} :: RepositorySummary)
repositorySummary_provider :: Lens.Lens' RepositorySummary RepositoryProvider
repositorySummary_provider :: Lens' RepositorySummary RepositoryProvider
repositorySummary_provider = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySummary' {RepositoryProvider
provider :: RepositoryProvider
$sel:provider:RepositorySummary' :: RepositorySummary -> RepositoryProvider
provider} -> RepositoryProvider
provider) (\s :: RepositorySummary
s@RepositorySummary' {} RepositoryProvider
a -> RepositorySummary
s {$sel:provider:RepositorySummary' :: RepositoryProvider
provider = RepositoryProvider
a} :: RepositorySummary)
instance Data.FromJSON RepositorySummary where
parseJSON :: Value -> Parser RepositorySummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RepositorySummary"
( \Object
x ->
Text -> Text -> RepositoryProvider -> RepositorySummary
RepositorySummary'
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
"arn")
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
"name")
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
"provider")
)
instance Prelude.Hashable RepositorySummary where
hashWithSalt :: Int -> RepositorySummary -> Int
hashWithSalt Int
_salt RepositorySummary' {Text
RepositoryProvider
provider :: RepositoryProvider
name :: Text
arn :: Text
$sel:provider:RepositorySummary' :: RepositorySummary -> RepositoryProvider
$sel:name:RepositorySummary' :: RepositorySummary -> Text
$sel:arn:RepositorySummary' :: RepositorySummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RepositoryProvider
provider
instance Prelude.NFData RepositorySummary where
rnf :: RepositorySummary -> ()
rnf RepositorySummary' {Text
RepositoryProvider
provider :: RepositoryProvider
name :: Text
arn :: Text
$sel:provider:RepositorySummary' :: RepositorySummary -> RepositoryProvider
$sel:name:RepositorySummary' :: RepositorySummary -> Text
$sel:arn:RepositorySummary' :: RepositorySummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf RepositoryProvider
provider