{-# 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.RepositoryNameIdPair 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
data RepositoryNameIdPair = RepositoryNameIdPair'
{
RepositoryNameIdPair -> Maybe Text
repositoryId :: Prelude.Maybe Prelude.Text,
RepositoryNameIdPair -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text
}
deriving (RepositoryNameIdPair -> RepositoryNameIdPair -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositoryNameIdPair -> RepositoryNameIdPair -> Bool
$c/= :: RepositoryNameIdPair -> RepositoryNameIdPair -> Bool
== :: RepositoryNameIdPair -> RepositoryNameIdPair -> Bool
$c== :: RepositoryNameIdPair -> RepositoryNameIdPair -> Bool
Prelude.Eq, ReadPrec [RepositoryNameIdPair]
ReadPrec RepositoryNameIdPair
Int -> ReadS RepositoryNameIdPair
ReadS [RepositoryNameIdPair]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RepositoryNameIdPair]
$creadListPrec :: ReadPrec [RepositoryNameIdPair]
readPrec :: ReadPrec RepositoryNameIdPair
$creadPrec :: ReadPrec RepositoryNameIdPair
readList :: ReadS [RepositoryNameIdPair]
$creadList :: ReadS [RepositoryNameIdPair]
readsPrec :: Int -> ReadS RepositoryNameIdPair
$creadsPrec :: Int -> ReadS RepositoryNameIdPair
Prelude.Read, Int -> RepositoryNameIdPair -> ShowS
[RepositoryNameIdPair] -> ShowS
RepositoryNameIdPair -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositoryNameIdPair] -> ShowS
$cshowList :: [RepositoryNameIdPair] -> ShowS
show :: RepositoryNameIdPair -> String
$cshow :: RepositoryNameIdPair -> String
showsPrec :: Int -> RepositoryNameIdPair -> ShowS
$cshowsPrec :: Int -> RepositoryNameIdPair -> ShowS
Prelude.Show, forall x. Rep RepositoryNameIdPair x -> RepositoryNameIdPair
forall x. RepositoryNameIdPair -> Rep RepositoryNameIdPair x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RepositoryNameIdPair x -> RepositoryNameIdPair
$cfrom :: forall x. RepositoryNameIdPair -> Rep RepositoryNameIdPair x
Prelude.Generic)
newRepositoryNameIdPair ::
RepositoryNameIdPair
newRepositoryNameIdPair :: RepositoryNameIdPair
newRepositoryNameIdPair =
RepositoryNameIdPair'
{ $sel:repositoryId:RepositoryNameIdPair' :: Maybe Text
repositoryId =
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:RepositoryNameIdPair' :: Maybe Text
repositoryName = forall a. Maybe a
Prelude.Nothing
}
repositoryNameIdPair_repositoryId :: Lens.Lens' RepositoryNameIdPair (Prelude.Maybe Prelude.Text)
repositoryNameIdPair_repositoryId :: Lens' RepositoryNameIdPair (Maybe Text)
repositoryNameIdPair_repositoryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryNameIdPair' {Maybe Text
repositoryId :: Maybe Text
$sel:repositoryId:RepositoryNameIdPair' :: RepositoryNameIdPair -> Maybe Text
repositoryId} -> Maybe Text
repositoryId) (\s :: RepositoryNameIdPair
s@RepositoryNameIdPair' {} Maybe Text
a -> RepositoryNameIdPair
s {$sel:repositoryId:RepositoryNameIdPair' :: Maybe Text
repositoryId = Maybe Text
a} :: RepositoryNameIdPair)
repositoryNameIdPair_repositoryName :: Lens.Lens' RepositoryNameIdPair (Prelude.Maybe Prelude.Text)
repositoryNameIdPair_repositoryName :: Lens' RepositoryNameIdPair (Maybe Text)
repositoryNameIdPair_repositoryName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryNameIdPair' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:RepositoryNameIdPair' :: RepositoryNameIdPair -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: RepositoryNameIdPair
s@RepositoryNameIdPair' {} Maybe Text
a -> RepositoryNameIdPair
s {$sel:repositoryName:RepositoryNameIdPair' :: Maybe Text
repositoryName = Maybe Text
a} :: RepositoryNameIdPair)
instance Data.FromJSON RepositoryNameIdPair where
parseJSON :: Value -> Parser RepositoryNameIdPair
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RepositoryNameIdPair"
( \Object
x ->
Maybe Text -> Maybe Text -> RepositoryNameIdPair
RepositoryNameIdPair'
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
"repositoryId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"repositoryName")
)
instance Prelude.Hashable RepositoryNameIdPair where
hashWithSalt :: Int -> RepositoryNameIdPair -> Int
hashWithSalt Int
_salt RepositoryNameIdPair' {Maybe Text
repositoryName :: Maybe Text
repositoryId :: Maybe Text
$sel:repositoryName:RepositoryNameIdPair' :: RepositoryNameIdPair -> Maybe Text
$sel:repositoryId:RepositoryNameIdPair' :: RepositoryNameIdPair -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
repositoryId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
repositoryName
instance Prelude.NFData RepositoryNameIdPair where
rnf :: RepositoryNameIdPair -> ()
rnf RepositoryNameIdPair' {Maybe Text
repositoryName :: Maybe Text
repositoryId :: Maybe Text
$sel:repositoryName:RepositoryNameIdPair' :: RepositoryNameIdPair -> Maybe Text
$sel:repositoryId:RepositoryNameIdPair' :: RepositoryNameIdPair -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
repositoryId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
repositoryName