{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CodeGuruReviewer.ListRepositoryAssociations
(
ListRepositoryAssociations (..),
newListRepositoryAssociations,
listRepositoryAssociations_states,
listRepositoryAssociations_owners,
listRepositoryAssociations_providerTypes,
listRepositoryAssociations_nextToken,
listRepositoryAssociations_names,
listRepositoryAssociations_maxResults,
ListRepositoryAssociationsResponse (..),
newListRepositoryAssociationsResponse,
listRepositoryAssociationsResponse_nextToken,
listRepositoryAssociationsResponse_repositoryAssociationSummaries,
listRepositoryAssociationsResponse_httpStatus,
)
where
import Amazonka.CodeGuruReviewer.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListRepositoryAssociations = ListRepositoryAssociations'
{
ListRepositoryAssociations
-> Maybe (NonEmpty RepositoryAssociationState)
states :: Prelude.Maybe (Prelude.NonEmpty RepositoryAssociationState),
ListRepositoryAssociations -> Maybe (NonEmpty Text)
owners :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
ListRepositoryAssociations -> Maybe (NonEmpty ProviderType)
providerTypes :: Prelude.Maybe (Prelude.NonEmpty ProviderType),
ListRepositoryAssociations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListRepositoryAssociations -> Maybe (NonEmpty Text)
names :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
ListRepositoryAssociations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListRepositoryAssociations -> ListRepositoryAssociations -> Bool
(ListRepositoryAssociations -> ListRepositoryAssociations -> Bool)
-> (ListRepositoryAssociations
-> ListRepositoryAssociations -> Bool)
-> Eq ListRepositoryAssociations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRepositoryAssociations -> ListRepositoryAssociations -> Bool
$c/= :: ListRepositoryAssociations -> ListRepositoryAssociations -> Bool
== :: ListRepositoryAssociations -> ListRepositoryAssociations -> Bool
$c== :: ListRepositoryAssociations -> ListRepositoryAssociations -> Bool
Prelude.Eq, ReadPrec [ListRepositoryAssociations]
ReadPrec ListRepositoryAssociations
Int -> ReadS ListRepositoryAssociations
ReadS [ListRepositoryAssociations]
(Int -> ReadS ListRepositoryAssociations)
-> ReadS [ListRepositoryAssociations]
-> ReadPrec ListRepositoryAssociations
-> ReadPrec [ListRepositoryAssociations]
-> Read ListRepositoryAssociations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRepositoryAssociations]
$creadListPrec :: ReadPrec [ListRepositoryAssociations]
readPrec :: ReadPrec ListRepositoryAssociations
$creadPrec :: ReadPrec ListRepositoryAssociations
readList :: ReadS [ListRepositoryAssociations]
$creadList :: ReadS [ListRepositoryAssociations]
readsPrec :: Int -> ReadS ListRepositoryAssociations
$creadsPrec :: Int -> ReadS ListRepositoryAssociations
Prelude.Read, Int -> ListRepositoryAssociations -> ShowS
[ListRepositoryAssociations] -> ShowS
ListRepositoryAssociations -> String
(Int -> ListRepositoryAssociations -> ShowS)
-> (ListRepositoryAssociations -> String)
-> ([ListRepositoryAssociations] -> ShowS)
-> Show ListRepositoryAssociations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRepositoryAssociations] -> ShowS
$cshowList :: [ListRepositoryAssociations] -> ShowS
show :: ListRepositoryAssociations -> String
$cshow :: ListRepositoryAssociations -> String
showsPrec :: Int -> ListRepositoryAssociations -> ShowS
$cshowsPrec :: Int -> ListRepositoryAssociations -> ShowS
Prelude.Show, (forall x.
ListRepositoryAssociations -> Rep ListRepositoryAssociations x)
-> (forall x.
Rep ListRepositoryAssociations x -> ListRepositoryAssociations)
-> Generic ListRepositoryAssociations
forall x.
Rep ListRepositoryAssociations x -> ListRepositoryAssociations
forall x.
ListRepositoryAssociations -> Rep ListRepositoryAssociations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRepositoryAssociations x -> ListRepositoryAssociations
$cfrom :: forall x.
ListRepositoryAssociations -> Rep ListRepositoryAssociations x
Prelude.Generic)
newListRepositoryAssociations ::
ListRepositoryAssociations
newListRepositoryAssociations :: ListRepositoryAssociations
newListRepositoryAssociations =
ListRepositoryAssociations' :: Maybe (NonEmpty RepositoryAssociationState)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty ProviderType)
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Natural
-> ListRepositoryAssociations
ListRepositoryAssociations'
{ $sel:states:ListRepositoryAssociations' :: Maybe (NonEmpty RepositoryAssociationState)
states =
Maybe (NonEmpty RepositoryAssociationState)
forall a. Maybe a
Prelude.Nothing,
$sel:owners:ListRepositoryAssociations' :: Maybe (NonEmpty Text)
owners = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:providerTypes:ListRepositoryAssociations' :: Maybe (NonEmpty ProviderType)
providerTypes = Maybe (NonEmpty ProviderType)
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListRepositoryAssociations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:names:ListRepositoryAssociations' :: Maybe (NonEmpty Text)
names = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListRepositoryAssociations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listRepositoryAssociations_states :: Lens.Lens' ListRepositoryAssociations (Prelude.Maybe (Prelude.NonEmpty RepositoryAssociationState))
listRepositoryAssociations_states :: (Maybe (NonEmpty RepositoryAssociationState)
-> f (Maybe (NonEmpty RepositoryAssociationState)))
-> ListRepositoryAssociations -> f ListRepositoryAssociations
listRepositoryAssociations_states = (ListRepositoryAssociations
-> Maybe (NonEmpty RepositoryAssociationState))
-> (ListRepositoryAssociations
-> Maybe (NonEmpty RepositoryAssociationState)
-> ListRepositoryAssociations)
-> Lens
ListRepositoryAssociations
ListRepositoryAssociations
(Maybe (NonEmpty RepositoryAssociationState))
(Maybe (NonEmpty RepositoryAssociationState))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRepositoryAssociations' {Maybe (NonEmpty RepositoryAssociationState)
states :: Maybe (NonEmpty RepositoryAssociationState)
$sel:states:ListRepositoryAssociations' :: ListRepositoryAssociations
-> Maybe (NonEmpty RepositoryAssociationState)
states} -> Maybe (NonEmpty RepositoryAssociationState)
states) (\s :: ListRepositoryAssociations
s@ListRepositoryAssociations' {} Maybe (NonEmpty RepositoryAssociationState)
a -> ListRepositoryAssociations
s {$sel:states:ListRepositoryAssociations' :: Maybe (NonEmpty RepositoryAssociationState)
states = Maybe (NonEmpty RepositoryAssociationState)
a} :: ListRepositoryAssociations) ((Maybe (NonEmpty RepositoryAssociationState)
-> f (Maybe (NonEmpty RepositoryAssociationState)))
-> ListRepositoryAssociations -> f ListRepositoryAssociations)
-> ((Maybe (NonEmpty RepositoryAssociationState)
-> f (Maybe (NonEmpty RepositoryAssociationState)))
-> Maybe (NonEmpty RepositoryAssociationState)
-> f (Maybe (NonEmpty RepositoryAssociationState)))
-> (Maybe (NonEmpty RepositoryAssociationState)
-> f (Maybe (NonEmpty RepositoryAssociationState)))
-> ListRepositoryAssociations
-> f ListRepositoryAssociations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty RepositoryAssociationState)
(NonEmpty RepositoryAssociationState)
(NonEmpty RepositoryAssociationState)
(NonEmpty RepositoryAssociationState)
-> Iso
(Maybe (NonEmpty RepositoryAssociationState))
(Maybe (NonEmpty RepositoryAssociationState))
(Maybe (NonEmpty RepositoryAssociationState))
(Maybe (NonEmpty RepositoryAssociationState))
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
(NonEmpty RepositoryAssociationState)
(NonEmpty RepositoryAssociationState)
(NonEmpty RepositoryAssociationState)
(NonEmpty RepositoryAssociationState)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listRepositoryAssociations_owners :: Lens.Lens' ListRepositoryAssociations (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listRepositoryAssociations_owners :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListRepositoryAssociations -> f ListRepositoryAssociations
listRepositoryAssociations_owners = (ListRepositoryAssociations -> Maybe (NonEmpty Text))
-> (ListRepositoryAssociations
-> Maybe (NonEmpty Text) -> ListRepositoryAssociations)
-> Lens
ListRepositoryAssociations
ListRepositoryAssociations
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRepositoryAssociations' {Maybe (NonEmpty Text)
owners :: Maybe (NonEmpty Text)
$sel:owners:ListRepositoryAssociations' :: ListRepositoryAssociations -> Maybe (NonEmpty Text)
owners} -> Maybe (NonEmpty Text)
owners) (\s :: ListRepositoryAssociations
s@ListRepositoryAssociations' {} Maybe (NonEmpty Text)
a -> ListRepositoryAssociations
s {$sel:owners:ListRepositoryAssociations' :: Maybe (NonEmpty Text)
owners = Maybe (NonEmpty Text)
a} :: ListRepositoryAssociations) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListRepositoryAssociations -> f ListRepositoryAssociations)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListRepositoryAssociations
-> f ListRepositoryAssociations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listRepositoryAssociations_providerTypes :: Lens.Lens' ListRepositoryAssociations (Prelude.Maybe (Prelude.NonEmpty ProviderType))
listRepositoryAssociations_providerTypes :: (Maybe (NonEmpty ProviderType)
-> f (Maybe (NonEmpty ProviderType)))
-> ListRepositoryAssociations -> f ListRepositoryAssociations
listRepositoryAssociations_providerTypes = (ListRepositoryAssociations -> Maybe (NonEmpty ProviderType))
-> (ListRepositoryAssociations
-> Maybe (NonEmpty ProviderType) -> ListRepositoryAssociations)
-> Lens
ListRepositoryAssociations
ListRepositoryAssociations
(Maybe (NonEmpty ProviderType))
(Maybe (NonEmpty ProviderType))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRepositoryAssociations' {Maybe (NonEmpty ProviderType)
providerTypes :: Maybe (NonEmpty ProviderType)
$sel:providerTypes:ListRepositoryAssociations' :: ListRepositoryAssociations -> Maybe (NonEmpty ProviderType)
providerTypes} -> Maybe (NonEmpty ProviderType)
providerTypes) (\s :: ListRepositoryAssociations
s@ListRepositoryAssociations' {} Maybe (NonEmpty ProviderType)
a -> ListRepositoryAssociations
s {$sel:providerTypes:ListRepositoryAssociations' :: Maybe (NonEmpty ProviderType)
providerTypes = Maybe (NonEmpty ProviderType)
a} :: ListRepositoryAssociations) ((Maybe (NonEmpty ProviderType)
-> f (Maybe (NonEmpty ProviderType)))
-> ListRepositoryAssociations -> f ListRepositoryAssociations)
-> ((Maybe (NonEmpty ProviderType)
-> f (Maybe (NonEmpty ProviderType)))
-> Maybe (NonEmpty ProviderType)
-> f (Maybe (NonEmpty ProviderType)))
-> (Maybe (NonEmpty ProviderType)
-> f (Maybe (NonEmpty ProviderType)))
-> ListRepositoryAssociations
-> f ListRepositoryAssociations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty ProviderType)
(NonEmpty ProviderType)
(NonEmpty ProviderType)
(NonEmpty ProviderType)
-> Iso
(Maybe (NonEmpty ProviderType))
(Maybe (NonEmpty ProviderType))
(Maybe (NonEmpty ProviderType))
(Maybe (NonEmpty ProviderType))
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
(NonEmpty ProviderType)
(NonEmpty ProviderType)
(NonEmpty ProviderType)
(NonEmpty ProviderType)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listRepositoryAssociations_nextToken :: Lens.Lens' ListRepositoryAssociations (Prelude.Maybe Prelude.Text)
listRepositoryAssociations_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRepositoryAssociations -> f ListRepositoryAssociations
listRepositoryAssociations_nextToken = (ListRepositoryAssociations -> Maybe Text)
-> (ListRepositoryAssociations
-> Maybe Text -> ListRepositoryAssociations)
-> Lens
ListRepositoryAssociations
ListRepositoryAssociations
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRepositoryAssociations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRepositoryAssociations' :: ListRepositoryAssociations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRepositoryAssociations
s@ListRepositoryAssociations' {} Maybe Text
a -> ListRepositoryAssociations
s {$sel:nextToken:ListRepositoryAssociations' :: Maybe Text
nextToken = Maybe Text
a} :: ListRepositoryAssociations)
listRepositoryAssociations_names :: Lens.Lens' ListRepositoryAssociations (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listRepositoryAssociations_names :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListRepositoryAssociations -> f ListRepositoryAssociations
listRepositoryAssociations_names = (ListRepositoryAssociations -> Maybe (NonEmpty Text))
-> (ListRepositoryAssociations
-> Maybe (NonEmpty Text) -> ListRepositoryAssociations)
-> Lens
ListRepositoryAssociations
ListRepositoryAssociations
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRepositoryAssociations' {Maybe (NonEmpty Text)
names :: Maybe (NonEmpty Text)
$sel:names:ListRepositoryAssociations' :: ListRepositoryAssociations -> Maybe (NonEmpty Text)
names} -> Maybe (NonEmpty Text)
names) (\s :: ListRepositoryAssociations
s@ListRepositoryAssociations' {} Maybe (NonEmpty Text)
a -> ListRepositoryAssociations
s {$sel:names:ListRepositoryAssociations' :: Maybe (NonEmpty Text)
names = Maybe (NonEmpty Text)
a} :: ListRepositoryAssociations) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListRepositoryAssociations -> f ListRepositoryAssociations)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListRepositoryAssociations
-> f ListRepositoryAssociations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listRepositoryAssociations_maxResults :: Lens.Lens' ListRepositoryAssociations (Prelude.Maybe Prelude.Natural)
listRepositoryAssociations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListRepositoryAssociations -> f ListRepositoryAssociations
listRepositoryAssociations_maxResults = (ListRepositoryAssociations -> Maybe Natural)
-> (ListRepositoryAssociations
-> Maybe Natural -> ListRepositoryAssociations)
-> Lens
ListRepositoryAssociations
ListRepositoryAssociations
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRepositoryAssociations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListRepositoryAssociations' :: ListRepositoryAssociations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListRepositoryAssociations
s@ListRepositoryAssociations' {} Maybe Natural
a -> ListRepositoryAssociations
s {$sel:maxResults:ListRepositoryAssociations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListRepositoryAssociations)
instance Core.AWSPager ListRepositoryAssociations where
page :: ListRepositoryAssociations
-> AWSResponse ListRepositoryAssociations
-> Maybe ListRepositoryAssociations
page ListRepositoryAssociations
rq AWSResponse ListRepositoryAssociations
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListRepositoryAssociations
ListRepositoryAssociationsResponse
rs
ListRepositoryAssociationsResponse
-> Getting (First Text) ListRepositoryAssociationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRepositoryAssociationsResponse
-> Const (First Text) ListRepositoryAssociationsResponse
Lens' ListRepositoryAssociationsResponse (Maybe Text)
listRepositoryAssociationsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListRepositoryAssociationsResponse
-> Const (First Text) ListRepositoryAssociationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListRepositoryAssociationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListRepositoryAssociations
forall a. Maybe a
Prelude.Nothing
| Maybe [RepositoryAssociationSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListRepositoryAssociations
ListRepositoryAssociationsResponse
rs
ListRepositoryAssociationsResponse
-> Getting
(First [RepositoryAssociationSummary])
ListRepositoryAssociationsResponse
[RepositoryAssociationSummary]
-> Maybe [RepositoryAssociationSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [RepositoryAssociationSummary]
-> Const
(First [RepositoryAssociationSummary])
(Maybe [RepositoryAssociationSummary]))
-> ListRepositoryAssociationsResponse
-> Const
(First [RepositoryAssociationSummary])
ListRepositoryAssociationsResponse
Lens'
ListRepositoryAssociationsResponse
(Maybe [RepositoryAssociationSummary])
listRepositoryAssociationsResponse_repositoryAssociationSummaries
((Maybe [RepositoryAssociationSummary]
-> Const
(First [RepositoryAssociationSummary])
(Maybe [RepositoryAssociationSummary]))
-> ListRepositoryAssociationsResponse
-> Const
(First [RepositoryAssociationSummary])
ListRepositoryAssociationsResponse)
-> (([RepositoryAssociationSummary]
-> Const
(First [RepositoryAssociationSummary])
[RepositoryAssociationSummary])
-> Maybe [RepositoryAssociationSummary]
-> Const
(First [RepositoryAssociationSummary])
(Maybe [RepositoryAssociationSummary]))
-> Getting
(First [RepositoryAssociationSummary])
ListRepositoryAssociationsResponse
[RepositoryAssociationSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([RepositoryAssociationSummary]
-> Const
(First [RepositoryAssociationSummary])
[RepositoryAssociationSummary])
-> Maybe [RepositoryAssociationSummary]
-> Const
(First [RepositoryAssociationSummary])
(Maybe [RepositoryAssociationSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListRepositoryAssociations
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListRepositoryAssociations -> Maybe ListRepositoryAssociations
forall a. a -> Maybe a
Prelude.Just (ListRepositoryAssociations -> Maybe ListRepositoryAssociations)
-> ListRepositoryAssociations -> Maybe ListRepositoryAssociations
forall a b. (a -> b) -> a -> b
Prelude.$
ListRepositoryAssociations
rq
ListRepositoryAssociations
-> (ListRepositoryAssociations -> ListRepositoryAssociations)
-> ListRepositoryAssociations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListRepositoryAssociations
-> Identity ListRepositoryAssociations
Lens
ListRepositoryAssociations
ListRepositoryAssociations
(Maybe Text)
(Maybe Text)
listRepositoryAssociations_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListRepositoryAssociations
-> Identity ListRepositoryAssociations)
-> Maybe Text
-> ListRepositoryAssociations
-> ListRepositoryAssociations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListRepositoryAssociations
ListRepositoryAssociationsResponse
rs
ListRepositoryAssociationsResponse
-> Getting (First Text) ListRepositoryAssociationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRepositoryAssociationsResponse
-> Const (First Text) ListRepositoryAssociationsResponse
Lens' ListRepositoryAssociationsResponse (Maybe Text)
listRepositoryAssociationsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListRepositoryAssociationsResponse
-> Const (First Text) ListRepositoryAssociationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListRepositoryAssociationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListRepositoryAssociations where
type
AWSResponse ListRepositoryAssociations =
ListRepositoryAssociationsResponse
request :: ListRepositoryAssociations -> Request ListRepositoryAssociations
request = Service
-> ListRepositoryAssociations -> Request ListRepositoryAssociations
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListRepositoryAssociations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListRepositoryAssociations)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListRepositoryAssociations))
-> Logger
-> Service
-> Proxy ListRepositoryAssociations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListRepositoryAssociations)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe [RepositoryAssociationSummary]
-> Int
-> ListRepositoryAssociationsResponse
ListRepositoryAssociationsResponse'
(Maybe Text
-> Maybe [RepositoryAssociationSummary]
-> Int
-> ListRepositoryAssociationsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [RepositoryAssociationSummary]
-> Int -> ListRepositoryAssociationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either
String
(Maybe [RepositoryAssociationSummary]
-> Int -> ListRepositoryAssociationsResponse)
-> Either String (Maybe [RepositoryAssociationSummary])
-> Either String (Int -> ListRepositoryAssociationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [RepositoryAssociationSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RepositoryAssociationSummaries"
Either String (Maybe (Maybe [RepositoryAssociationSummary]))
-> Maybe [RepositoryAssociationSummary]
-> Either String (Maybe [RepositoryAssociationSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RepositoryAssociationSummary]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> ListRepositoryAssociationsResponse)
-> Either String Int
-> Either String ListRepositoryAssociationsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListRepositoryAssociations
instance Prelude.NFData ListRepositoryAssociations
instance Core.ToHeaders ListRepositoryAssociations where
toHeaders :: ListRepositoryAssociations -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListRepositoryAssociations -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath ListRepositoryAssociations where
toPath :: ListRepositoryAssociations -> ByteString
toPath = ByteString -> ListRepositoryAssociations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/associations"
instance Core.ToQuery ListRepositoryAssociations where
toQuery :: ListRepositoryAssociations -> QueryString
toQuery ListRepositoryAssociations' {Maybe Natural
Maybe (NonEmpty Text)
Maybe (NonEmpty ProviderType)
Maybe (NonEmpty RepositoryAssociationState)
Maybe Text
maxResults :: Maybe Natural
names :: Maybe (NonEmpty Text)
nextToken :: Maybe Text
providerTypes :: Maybe (NonEmpty ProviderType)
owners :: Maybe (NonEmpty Text)
states :: Maybe (NonEmpty RepositoryAssociationState)
$sel:maxResults:ListRepositoryAssociations' :: ListRepositoryAssociations -> Maybe Natural
$sel:names:ListRepositoryAssociations' :: ListRepositoryAssociations -> Maybe (NonEmpty Text)
$sel:nextToken:ListRepositoryAssociations' :: ListRepositoryAssociations -> Maybe Text
$sel:providerTypes:ListRepositoryAssociations' :: ListRepositoryAssociations -> Maybe (NonEmpty ProviderType)
$sel:owners:ListRepositoryAssociations' :: ListRepositoryAssociations -> Maybe (NonEmpty Text)
$sel:states:ListRepositoryAssociations' :: ListRepositoryAssociations
-> Maybe (NonEmpty RepositoryAssociationState)
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"State"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> NonEmpty RepositoryAssociationState -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" (NonEmpty RepositoryAssociationState -> QueryString)
-> Maybe (NonEmpty RepositoryAssociationState) -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty RepositoryAssociationState)
states),
ByteString
"Owner"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> NonEmpty Text -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" (NonEmpty Text -> QueryString)
-> Maybe (NonEmpty Text) -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
owners),
ByteString
"ProviderType"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> NonEmpty ProviderType -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
(NonEmpty ProviderType -> QueryString)
-> Maybe (NonEmpty ProviderType) -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty ProviderType)
providerTypes
),
ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"Name"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> NonEmpty Text -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" (NonEmpty Text -> QueryString)
-> Maybe (NonEmpty Text) -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
names),
ByteString
"MaxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data ListRepositoryAssociationsResponse = ListRepositoryAssociationsResponse'
{
ListRepositoryAssociationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListRepositoryAssociationsResponse
-> Maybe [RepositoryAssociationSummary]
repositoryAssociationSummaries :: Prelude.Maybe [RepositoryAssociationSummary],
ListRepositoryAssociationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListRepositoryAssociationsResponse
-> ListRepositoryAssociationsResponse -> Bool
(ListRepositoryAssociationsResponse
-> ListRepositoryAssociationsResponse -> Bool)
-> (ListRepositoryAssociationsResponse
-> ListRepositoryAssociationsResponse -> Bool)
-> Eq ListRepositoryAssociationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRepositoryAssociationsResponse
-> ListRepositoryAssociationsResponse -> Bool
$c/= :: ListRepositoryAssociationsResponse
-> ListRepositoryAssociationsResponse -> Bool
== :: ListRepositoryAssociationsResponse
-> ListRepositoryAssociationsResponse -> Bool
$c== :: ListRepositoryAssociationsResponse
-> ListRepositoryAssociationsResponse -> Bool
Prelude.Eq, ReadPrec [ListRepositoryAssociationsResponse]
ReadPrec ListRepositoryAssociationsResponse
Int -> ReadS ListRepositoryAssociationsResponse
ReadS [ListRepositoryAssociationsResponse]
(Int -> ReadS ListRepositoryAssociationsResponse)
-> ReadS [ListRepositoryAssociationsResponse]
-> ReadPrec ListRepositoryAssociationsResponse
-> ReadPrec [ListRepositoryAssociationsResponse]
-> Read ListRepositoryAssociationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRepositoryAssociationsResponse]
$creadListPrec :: ReadPrec [ListRepositoryAssociationsResponse]
readPrec :: ReadPrec ListRepositoryAssociationsResponse
$creadPrec :: ReadPrec ListRepositoryAssociationsResponse
readList :: ReadS [ListRepositoryAssociationsResponse]
$creadList :: ReadS [ListRepositoryAssociationsResponse]
readsPrec :: Int -> ReadS ListRepositoryAssociationsResponse
$creadsPrec :: Int -> ReadS ListRepositoryAssociationsResponse
Prelude.Read, Int -> ListRepositoryAssociationsResponse -> ShowS
[ListRepositoryAssociationsResponse] -> ShowS
ListRepositoryAssociationsResponse -> String
(Int -> ListRepositoryAssociationsResponse -> ShowS)
-> (ListRepositoryAssociationsResponse -> String)
-> ([ListRepositoryAssociationsResponse] -> ShowS)
-> Show ListRepositoryAssociationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRepositoryAssociationsResponse] -> ShowS
$cshowList :: [ListRepositoryAssociationsResponse] -> ShowS
show :: ListRepositoryAssociationsResponse -> String
$cshow :: ListRepositoryAssociationsResponse -> String
showsPrec :: Int -> ListRepositoryAssociationsResponse -> ShowS
$cshowsPrec :: Int -> ListRepositoryAssociationsResponse -> ShowS
Prelude.Show, (forall x.
ListRepositoryAssociationsResponse
-> Rep ListRepositoryAssociationsResponse x)
-> (forall x.
Rep ListRepositoryAssociationsResponse x
-> ListRepositoryAssociationsResponse)
-> Generic ListRepositoryAssociationsResponse
forall x.
Rep ListRepositoryAssociationsResponse x
-> ListRepositoryAssociationsResponse
forall x.
ListRepositoryAssociationsResponse
-> Rep ListRepositoryAssociationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRepositoryAssociationsResponse x
-> ListRepositoryAssociationsResponse
$cfrom :: forall x.
ListRepositoryAssociationsResponse
-> Rep ListRepositoryAssociationsResponse x
Prelude.Generic)
newListRepositoryAssociationsResponse ::
Prelude.Int ->
ListRepositoryAssociationsResponse
newListRepositoryAssociationsResponse :: Int -> ListRepositoryAssociationsResponse
newListRepositoryAssociationsResponse Int
pHttpStatus_ =
ListRepositoryAssociationsResponse' :: Maybe Text
-> Maybe [RepositoryAssociationSummary]
-> Int
-> ListRepositoryAssociationsResponse
ListRepositoryAssociationsResponse'
{ $sel:nextToken:ListRepositoryAssociationsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryAssociationSummaries:ListRepositoryAssociationsResponse' :: Maybe [RepositoryAssociationSummary]
repositoryAssociationSummaries =
Maybe [RepositoryAssociationSummary]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListRepositoryAssociationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listRepositoryAssociationsResponse_nextToken :: Lens.Lens' ListRepositoryAssociationsResponse (Prelude.Maybe Prelude.Text)
listRepositoryAssociationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRepositoryAssociationsResponse
-> f ListRepositoryAssociationsResponse
listRepositoryAssociationsResponse_nextToken = (ListRepositoryAssociationsResponse -> Maybe Text)
-> (ListRepositoryAssociationsResponse
-> Maybe Text -> ListRepositoryAssociationsResponse)
-> Lens' ListRepositoryAssociationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRepositoryAssociationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRepositoryAssociationsResponse' :: ListRepositoryAssociationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRepositoryAssociationsResponse
s@ListRepositoryAssociationsResponse' {} Maybe Text
a -> ListRepositoryAssociationsResponse
s {$sel:nextToken:ListRepositoryAssociationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRepositoryAssociationsResponse)
listRepositoryAssociationsResponse_repositoryAssociationSummaries :: Lens.Lens' ListRepositoryAssociationsResponse (Prelude.Maybe [RepositoryAssociationSummary])
listRepositoryAssociationsResponse_repositoryAssociationSummaries :: (Maybe [RepositoryAssociationSummary]
-> f (Maybe [RepositoryAssociationSummary]))
-> ListRepositoryAssociationsResponse
-> f ListRepositoryAssociationsResponse
listRepositoryAssociationsResponse_repositoryAssociationSummaries = (ListRepositoryAssociationsResponse
-> Maybe [RepositoryAssociationSummary])
-> (ListRepositoryAssociationsResponse
-> Maybe [RepositoryAssociationSummary]
-> ListRepositoryAssociationsResponse)
-> Lens'
ListRepositoryAssociationsResponse
(Maybe [RepositoryAssociationSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRepositoryAssociationsResponse' {Maybe [RepositoryAssociationSummary]
repositoryAssociationSummaries :: Maybe [RepositoryAssociationSummary]
$sel:repositoryAssociationSummaries:ListRepositoryAssociationsResponse' :: ListRepositoryAssociationsResponse
-> Maybe [RepositoryAssociationSummary]
repositoryAssociationSummaries} -> Maybe [RepositoryAssociationSummary]
repositoryAssociationSummaries) (\s :: ListRepositoryAssociationsResponse
s@ListRepositoryAssociationsResponse' {} Maybe [RepositoryAssociationSummary]
a -> ListRepositoryAssociationsResponse
s {$sel:repositoryAssociationSummaries:ListRepositoryAssociationsResponse' :: Maybe [RepositoryAssociationSummary]
repositoryAssociationSummaries = Maybe [RepositoryAssociationSummary]
a} :: ListRepositoryAssociationsResponse) ((Maybe [RepositoryAssociationSummary]
-> f (Maybe [RepositoryAssociationSummary]))
-> ListRepositoryAssociationsResponse
-> f ListRepositoryAssociationsResponse)
-> ((Maybe [RepositoryAssociationSummary]
-> f (Maybe [RepositoryAssociationSummary]))
-> Maybe [RepositoryAssociationSummary]
-> f (Maybe [RepositoryAssociationSummary]))
-> (Maybe [RepositoryAssociationSummary]
-> f (Maybe [RepositoryAssociationSummary]))
-> ListRepositoryAssociationsResponse
-> f ListRepositoryAssociationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[RepositoryAssociationSummary]
[RepositoryAssociationSummary]
[RepositoryAssociationSummary]
[RepositoryAssociationSummary]
-> Iso
(Maybe [RepositoryAssociationSummary])
(Maybe [RepositoryAssociationSummary])
(Maybe [RepositoryAssociationSummary])
(Maybe [RepositoryAssociationSummary])
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
[RepositoryAssociationSummary]
[RepositoryAssociationSummary]
[RepositoryAssociationSummary]
[RepositoryAssociationSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listRepositoryAssociationsResponse_httpStatus :: Lens.Lens' ListRepositoryAssociationsResponse Prelude.Int
listRepositoryAssociationsResponse_httpStatus :: (Int -> f Int)
-> ListRepositoryAssociationsResponse
-> f ListRepositoryAssociationsResponse
listRepositoryAssociationsResponse_httpStatus = (ListRepositoryAssociationsResponse -> Int)
-> (ListRepositoryAssociationsResponse
-> Int -> ListRepositoryAssociationsResponse)
-> Lens
ListRepositoryAssociationsResponse
ListRepositoryAssociationsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRepositoryAssociationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListRepositoryAssociationsResponse' :: ListRepositoryAssociationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListRepositoryAssociationsResponse
s@ListRepositoryAssociationsResponse' {} Int
a -> ListRepositoryAssociationsResponse
s {$sel:httpStatus:ListRepositoryAssociationsResponse' :: Int
httpStatus = Int
a} :: ListRepositoryAssociationsResponse)
instance
Prelude.NFData
ListRepositoryAssociationsResponse