{-# 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.CodeGuruReviewer.Types.RepositoryAssociationSummary where
import Amazonka.CodeGuruReviewer.Types.ProviderType
import Amazonka.CodeGuruReviewer.Types.RepositoryAssociationState
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RepositoryAssociationSummary = RepositoryAssociationSummary'
{
RepositoryAssociationSummary -> Maybe Text
associationArn :: Prelude.Maybe Prelude.Text,
RepositoryAssociationSummary -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
RepositoryAssociationSummary -> Maybe RepositoryAssociationState
state :: Prelude.Maybe RepositoryAssociationState,
RepositoryAssociationSummary -> Maybe ProviderType
providerType :: Prelude.Maybe ProviderType,
RepositoryAssociationSummary -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
RepositoryAssociationSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
RepositoryAssociationSummary -> Maybe Text
connectionArn :: Prelude.Maybe Prelude.Text,
RepositoryAssociationSummary -> Maybe POSIX
lastUpdatedTimeStamp :: Prelude.Maybe Core.POSIX
}
deriving (RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool
(RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool)
-> (RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool)
-> Eq RepositoryAssociationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool
$c/= :: RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool
== :: RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool
$c== :: RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool
Prelude.Eq, ReadPrec [RepositoryAssociationSummary]
ReadPrec RepositoryAssociationSummary
Int -> ReadS RepositoryAssociationSummary
ReadS [RepositoryAssociationSummary]
(Int -> ReadS RepositoryAssociationSummary)
-> ReadS [RepositoryAssociationSummary]
-> ReadPrec RepositoryAssociationSummary
-> ReadPrec [RepositoryAssociationSummary]
-> Read RepositoryAssociationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RepositoryAssociationSummary]
$creadListPrec :: ReadPrec [RepositoryAssociationSummary]
readPrec :: ReadPrec RepositoryAssociationSummary
$creadPrec :: ReadPrec RepositoryAssociationSummary
readList :: ReadS [RepositoryAssociationSummary]
$creadList :: ReadS [RepositoryAssociationSummary]
readsPrec :: Int -> ReadS RepositoryAssociationSummary
$creadsPrec :: Int -> ReadS RepositoryAssociationSummary
Prelude.Read, Int -> RepositoryAssociationSummary -> ShowS
[RepositoryAssociationSummary] -> ShowS
RepositoryAssociationSummary -> String
(Int -> RepositoryAssociationSummary -> ShowS)
-> (RepositoryAssociationSummary -> String)
-> ([RepositoryAssociationSummary] -> ShowS)
-> Show RepositoryAssociationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositoryAssociationSummary] -> ShowS
$cshowList :: [RepositoryAssociationSummary] -> ShowS
show :: RepositoryAssociationSummary -> String
$cshow :: RepositoryAssociationSummary -> String
showsPrec :: Int -> RepositoryAssociationSummary -> ShowS
$cshowsPrec :: Int -> RepositoryAssociationSummary -> ShowS
Prelude.Show, (forall x.
RepositoryAssociationSummary -> Rep RepositoryAssociationSummary x)
-> (forall x.
Rep RepositoryAssociationSummary x -> RepositoryAssociationSummary)
-> Generic RepositoryAssociationSummary
forall x.
Rep RepositoryAssociationSummary x -> RepositoryAssociationSummary
forall x.
RepositoryAssociationSummary -> Rep RepositoryAssociationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RepositoryAssociationSummary x -> RepositoryAssociationSummary
$cfrom :: forall x.
RepositoryAssociationSummary -> Rep RepositoryAssociationSummary x
Prelude.Generic)
newRepositoryAssociationSummary ::
RepositoryAssociationSummary
newRepositoryAssociationSummary :: RepositoryAssociationSummary
newRepositoryAssociationSummary =
RepositoryAssociationSummary' :: Maybe Text
-> Maybe Text
-> Maybe RepositoryAssociationState
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary
RepositoryAssociationSummary'
{ $sel:associationArn:RepositoryAssociationSummary' :: Maybe Text
associationArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:associationId:RepositoryAssociationSummary' :: Maybe Text
associationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:state:RepositoryAssociationSummary' :: Maybe RepositoryAssociationState
state = Maybe RepositoryAssociationState
forall a. Maybe a
Prelude.Nothing,
$sel:providerType:RepositoryAssociationSummary' :: Maybe ProviderType
providerType = Maybe ProviderType
forall a. Maybe a
Prelude.Nothing,
$sel:owner:RepositoryAssociationSummary' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:RepositoryAssociationSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:connectionArn:RepositoryAssociationSummary' :: Maybe Text
connectionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimeStamp:RepositoryAssociationSummary' :: Maybe POSIX
lastUpdatedTimeStamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
repositoryAssociationSummary_associationArn :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.Text)
repositoryAssociationSummary_associationArn :: (Maybe Text -> f (Maybe Text))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_associationArn = (RepositoryAssociationSummary -> Maybe Text)
-> (RepositoryAssociationSummary
-> Maybe Text -> RepositoryAssociationSummary)
-> Lens
RepositoryAssociationSummary
RepositoryAssociationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe Text
associationArn :: Maybe Text
$sel:associationArn:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe Text
associationArn} -> Maybe Text
associationArn) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe Text
a -> RepositoryAssociationSummary
s {$sel:associationArn:RepositoryAssociationSummary' :: Maybe Text
associationArn = Maybe Text
a} :: RepositoryAssociationSummary)
repositoryAssociationSummary_associationId :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.Text)
repositoryAssociationSummary_associationId :: (Maybe Text -> f (Maybe Text))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_associationId = (RepositoryAssociationSummary -> Maybe Text)
-> (RepositoryAssociationSummary
-> Maybe Text -> RepositoryAssociationSummary)
-> Lens
RepositoryAssociationSummary
RepositoryAssociationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe Text
associationId :: Maybe Text
$sel:associationId:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe Text
associationId} -> Maybe Text
associationId) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe Text
a -> RepositoryAssociationSummary
s {$sel:associationId:RepositoryAssociationSummary' :: Maybe Text
associationId = Maybe Text
a} :: RepositoryAssociationSummary)
repositoryAssociationSummary_state :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe RepositoryAssociationState)
repositoryAssociationSummary_state :: (Maybe RepositoryAssociationState
-> f (Maybe RepositoryAssociationState))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_state = (RepositoryAssociationSummary -> Maybe RepositoryAssociationState)
-> (RepositoryAssociationSummary
-> Maybe RepositoryAssociationState
-> RepositoryAssociationSummary)
-> Lens
RepositoryAssociationSummary
RepositoryAssociationSummary
(Maybe RepositoryAssociationState)
(Maybe RepositoryAssociationState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe RepositoryAssociationState
state :: Maybe RepositoryAssociationState
$sel:state:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe RepositoryAssociationState
state} -> Maybe RepositoryAssociationState
state) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe RepositoryAssociationState
a -> RepositoryAssociationSummary
s {$sel:state:RepositoryAssociationSummary' :: Maybe RepositoryAssociationState
state = Maybe RepositoryAssociationState
a} :: RepositoryAssociationSummary)
repositoryAssociationSummary_providerType :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe ProviderType)
repositoryAssociationSummary_providerType :: (Maybe ProviderType -> f (Maybe ProviderType))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_providerType = (RepositoryAssociationSummary -> Maybe ProviderType)
-> (RepositoryAssociationSummary
-> Maybe ProviderType -> RepositoryAssociationSummary)
-> Lens
RepositoryAssociationSummary
RepositoryAssociationSummary
(Maybe ProviderType)
(Maybe ProviderType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe ProviderType
providerType :: Maybe ProviderType
$sel:providerType:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe ProviderType
providerType} -> Maybe ProviderType
providerType) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe ProviderType
a -> RepositoryAssociationSummary
s {$sel:providerType:RepositoryAssociationSummary' :: Maybe ProviderType
providerType = Maybe ProviderType
a} :: RepositoryAssociationSummary)
repositoryAssociationSummary_owner :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.Text)
repositoryAssociationSummary_owner :: (Maybe Text -> f (Maybe Text))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_owner = (RepositoryAssociationSummary -> Maybe Text)
-> (RepositoryAssociationSummary
-> Maybe Text -> RepositoryAssociationSummary)
-> Lens
RepositoryAssociationSummary
RepositoryAssociationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe Text
owner :: Maybe Text
$sel:owner:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe Text
owner} -> Maybe Text
owner) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe Text
a -> RepositoryAssociationSummary
s {$sel:owner:RepositoryAssociationSummary' :: Maybe Text
owner = Maybe Text
a} :: RepositoryAssociationSummary)
repositoryAssociationSummary_name :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.Text)
repositoryAssociationSummary_name :: (Maybe Text -> f (Maybe Text))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_name = (RepositoryAssociationSummary -> Maybe Text)
-> (RepositoryAssociationSummary
-> Maybe Text -> RepositoryAssociationSummary)
-> Lens
RepositoryAssociationSummary
RepositoryAssociationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe Text
name :: Maybe Text
$sel:name:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe Text
a -> RepositoryAssociationSummary
s {$sel:name:RepositoryAssociationSummary' :: Maybe Text
name = Maybe Text
a} :: RepositoryAssociationSummary)
repositoryAssociationSummary_connectionArn :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.Text)
repositoryAssociationSummary_connectionArn :: (Maybe Text -> f (Maybe Text))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_connectionArn = (RepositoryAssociationSummary -> Maybe Text)
-> (RepositoryAssociationSummary
-> Maybe Text -> RepositoryAssociationSummary)
-> Lens
RepositoryAssociationSummary
RepositoryAssociationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe Text
connectionArn :: Maybe Text
$sel:connectionArn:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe Text
connectionArn} -> Maybe Text
connectionArn) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe Text
a -> RepositoryAssociationSummary
s {$sel:connectionArn:RepositoryAssociationSummary' :: Maybe Text
connectionArn = Maybe Text
a} :: RepositoryAssociationSummary)
repositoryAssociationSummary_lastUpdatedTimeStamp :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.UTCTime)
repositoryAssociationSummary_lastUpdatedTimeStamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_lastUpdatedTimeStamp = (RepositoryAssociationSummary -> Maybe POSIX)
-> (RepositoryAssociationSummary
-> Maybe POSIX -> RepositoryAssociationSummary)
-> Lens
RepositoryAssociationSummary
RepositoryAssociationSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe POSIX
lastUpdatedTimeStamp :: Maybe POSIX
$sel:lastUpdatedTimeStamp:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe POSIX
lastUpdatedTimeStamp} -> Maybe POSIX
lastUpdatedTimeStamp) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe POSIX
a -> RepositoryAssociationSummary
s {$sel:lastUpdatedTimeStamp:RepositoryAssociationSummary' :: Maybe POSIX
lastUpdatedTimeStamp = Maybe POSIX
a} :: RepositoryAssociationSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RepositoryAssociationSummary
-> f RepositoryAssociationSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON RepositoryAssociationSummary where
parseJSON :: Value -> Parser RepositoryAssociationSummary
parseJSON =
String
-> (Object -> Parser RepositoryAssociationSummary)
-> Value
-> Parser RepositoryAssociationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RepositoryAssociationSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe RepositoryAssociationState
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary
RepositoryAssociationSummary'
(Maybe Text
-> Maybe Text
-> Maybe RepositoryAssociationState
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe RepositoryAssociationState
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary)
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
"AssociationArn")
Parser
(Maybe Text
-> Maybe RepositoryAssociationState
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe RepositoryAssociationState
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary)
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
"AssociationId")
Parser
(Maybe RepositoryAssociationState
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary)
-> Parser (Maybe RepositoryAssociationState)
-> Parser
(Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RepositoryAssociationState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
Parser
(Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary)
-> Parser (Maybe ProviderType)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProviderType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProviderType")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe POSIX -> RepositoryAssociationSummary)
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
"Owner")
Parser
(Maybe Text
-> Maybe Text -> Maybe POSIX -> RepositoryAssociationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe POSIX -> RepositoryAssociationSummary)
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 POSIX -> RepositoryAssociationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> RepositoryAssociationSummary)
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
"ConnectionArn")
Parser (Maybe POSIX -> RepositoryAssociationSummary)
-> Parser (Maybe POSIX) -> Parser RepositoryAssociationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdatedTimeStamp")
)
instance
Prelude.Hashable
RepositoryAssociationSummary
instance Prelude.NFData RepositoryAssociationSummary