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