{-# 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.CodeArtifact.Types.RepositorySummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RepositorySummary = RepositorySummary'
{
RepositorySummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
RepositorySummary -> Maybe Text
domainOwner :: Prelude.Maybe Prelude.Text,
RepositorySummary -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
RepositorySummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
RepositorySummary -> Maybe Text
administratorAccount :: Prelude.Maybe Prelude.Text,
RepositorySummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (RepositorySummary -> RepositorySummary -> Bool
(RepositorySummary -> RepositorySummary -> Bool)
-> (RepositorySummary -> RepositorySummary -> Bool)
-> Eq RepositorySummary
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]
(Int -> ReadS RepositorySummary)
-> ReadS [RepositorySummary]
-> ReadPrec RepositorySummary
-> ReadPrec [RepositorySummary]
-> Read 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
(Int -> RepositorySummary -> ShowS)
-> (RepositorySummary -> String)
-> ([RepositorySummary] -> ShowS)
-> Show RepositorySummary
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. RepositorySummary -> Rep RepositorySummary x)
-> (forall x. Rep RepositorySummary x -> RepositorySummary)
-> Generic RepositorySummary
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 ::
RepositorySummary
newRepositorySummary :: RepositorySummary
newRepositorySummary =
RepositorySummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RepositorySummary
RepositorySummary'
{ $sel:arn:RepositorySummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domainOwner:RepositorySummary' :: Maybe Text
domainOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:RepositorySummary' :: Maybe Text
domainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:RepositorySummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:administratorAccount:RepositorySummary' :: Maybe Text
administratorAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:RepositorySummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
repositorySummary_arn :: Lens.Lens' RepositorySummary (Prelude.Maybe Prelude.Text)
repositorySummary_arn :: (Maybe Text -> f (Maybe Text))
-> RepositorySummary -> f RepositorySummary
repositorySummary_arn = (RepositorySummary -> Maybe Text)
-> (RepositorySummary -> Maybe Text -> RepositorySummary)
-> Lens
RepositorySummary RepositorySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySummary' {Maybe Text
arn :: Maybe Text
$sel:arn:RepositorySummary' :: RepositorySummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RepositorySummary
s@RepositorySummary' {} Maybe Text
a -> RepositorySummary
s {$sel:arn:RepositorySummary' :: Maybe Text
arn = Maybe Text
a} :: RepositorySummary)
repositorySummary_domainOwner :: Lens.Lens' RepositorySummary (Prelude.Maybe Prelude.Text)
repositorySummary_domainOwner :: (Maybe Text -> f (Maybe Text))
-> RepositorySummary -> f RepositorySummary
repositorySummary_domainOwner = (RepositorySummary -> Maybe Text)
-> (RepositorySummary -> Maybe Text -> RepositorySummary)
-> Lens
RepositorySummary RepositorySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySummary' {Maybe Text
domainOwner :: Maybe Text
$sel:domainOwner:RepositorySummary' :: RepositorySummary -> Maybe Text
domainOwner} -> Maybe Text
domainOwner) (\s :: RepositorySummary
s@RepositorySummary' {} Maybe Text
a -> RepositorySummary
s {$sel:domainOwner:RepositorySummary' :: Maybe Text
domainOwner = Maybe Text
a} :: RepositorySummary)
repositorySummary_domainName :: Lens.Lens' RepositorySummary (Prelude.Maybe Prelude.Text)
repositorySummary_domainName :: (Maybe Text -> f (Maybe Text))
-> RepositorySummary -> f RepositorySummary
repositorySummary_domainName = (RepositorySummary -> Maybe Text)
-> (RepositorySummary -> Maybe Text -> RepositorySummary)
-> Lens
RepositorySummary RepositorySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySummary' {Maybe Text
domainName :: Maybe Text
$sel:domainName:RepositorySummary' :: RepositorySummary -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: RepositorySummary
s@RepositorySummary' {} Maybe Text
a -> RepositorySummary
s {$sel:domainName:RepositorySummary' :: Maybe Text
domainName = Maybe Text
a} :: RepositorySummary)
repositorySummary_name :: Lens.Lens' RepositorySummary (Prelude.Maybe Prelude.Text)
repositorySummary_name :: (Maybe Text -> f (Maybe Text))
-> RepositorySummary -> f RepositorySummary
repositorySummary_name = (RepositorySummary -> Maybe Text)
-> (RepositorySummary -> Maybe Text -> RepositorySummary)
-> Lens
RepositorySummary RepositorySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySummary' {Maybe Text
name :: Maybe Text
$sel:name:RepositorySummary' :: RepositorySummary -> Maybe Text
name} -> Maybe Text
name) (\s :: RepositorySummary
s@RepositorySummary' {} Maybe Text
a -> RepositorySummary
s {$sel:name:RepositorySummary' :: Maybe Text
name = Maybe Text
a} :: RepositorySummary)
repositorySummary_administratorAccount :: Lens.Lens' RepositorySummary (Prelude.Maybe Prelude.Text)
repositorySummary_administratorAccount :: (Maybe Text -> f (Maybe Text))
-> RepositorySummary -> f RepositorySummary
repositorySummary_administratorAccount = (RepositorySummary -> Maybe Text)
-> (RepositorySummary -> Maybe Text -> RepositorySummary)
-> Lens
RepositorySummary RepositorySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySummary' {Maybe Text
administratorAccount :: Maybe Text
$sel:administratorAccount:RepositorySummary' :: RepositorySummary -> Maybe Text
administratorAccount} -> Maybe Text
administratorAccount) (\s :: RepositorySummary
s@RepositorySummary' {} Maybe Text
a -> RepositorySummary
s {$sel:administratorAccount:RepositorySummary' :: Maybe Text
administratorAccount = Maybe Text
a} :: RepositorySummary)
repositorySummary_description :: Lens.Lens' RepositorySummary (Prelude.Maybe Prelude.Text)
repositorySummary_description :: (Maybe Text -> f (Maybe Text))
-> RepositorySummary -> f RepositorySummary
repositorySummary_description = (RepositorySummary -> Maybe Text)
-> (RepositorySummary -> Maybe Text -> RepositorySummary)
-> Lens
RepositorySummary RepositorySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySummary' {Maybe Text
description :: Maybe Text
$sel:description:RepositorySummary' :: RepositorySummary -> Maybe Text
description} -> Maybe Text
description) (\s :: RepositorySummary
s@RepositorySummary' {} Maybe Text
a -> RepositorySummary
s {$sel:description:RepositorySummary' :: Maybe Text
description = Maybe Text
a} :: RepositorySummary)
instance Core.FromJSON RepositorySummary where
parseJSON :: Value -> Parser RepositorySummary
parseJSON =
String
-> (Object -> Parser RepositorySummary)
-> Value
-> Parser RepositorySummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RepositorySummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RepositorySummary
RepositorySummary'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RepositorySummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RepositorySummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RepositorySummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> RepositorySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"domainOwner")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> RepositorySummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> RepositorySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"domainName")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> RepositorySummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> RepositorySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
Parser (Maybe Text -> Maybe Text -> RepositorySummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> RepositorySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"administratorAccount")
Parser (Maybe Text -> RepositorySummary)
-> Parser (Maybe Text) -> Parser RepositorySummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
)
instance Prelude.Hashable RepositorySummary
instance Prelude.NFData RepositorySummary