{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ECRPublic.DescribeRegistries
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns details for a public registry.
--
-- This operation returns paginated results.
module Amazonka.ECRPublic.DescribeRegistries
  ( -- * Creating a Request
    DescribeRegistries (..),
    newDescribeRegistries,

    -- * Request Lenses
    describeRegistries_nextToken,
    describeRegistries_maxResults,

    -- * Destructuring the Response
    DescribeRegistriesResponse (..),
    newDescribeRegistriesResponse,

    -- * Response Lenses
    describeRegistriesResponse_nextToken,
    describeRegistriesResponse_httpStatus,
    describeRegistriesResponse_registries,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ECRPublic.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeRegistries' smart constructor.
data DescribeRegistries = DescribeRegistries'
  { -- | The @nextToken@ value returned from a previous paginated
    -- @DescribeRegistries@ request where @maxResults@ was used and the results
    -- exceeded the value of that parameter. Pagination continues from the end
    -- of the previous results that returned the @nextToken@ value. This value
    -- is @null@ when there are no more results to return.
    --
    -- This token should be treated as an opaque identifier that is only used
    -- to retrieve the next items in a list and not for other programmatic
    -- purposes.
    DescribeRegistries -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of repository results returned by
    -- @DescribeRegistries@ in paginated output. When this parameter is used,
    -- @DescribeRegistries@ only returns @maxResults@ results in a single page
    -- along with a @nextToken@ response element. The remaining results of the
    -- initial request can be seen by sending another @DescribeRegistries@
    -- request with the returned @nextToken@ value. This value can be between 1
    -- and 1000. If this parameter is not used, then @DescribeRegistries@
    -- returns up to 100 results and a @nextToken@ value, if applicable.
    DescribeRegistries -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (DescribeRegistries -> DescribeRegistries -> Bool
(DescribeRegistries -> DescribeRegistries -> Bool)
-> (DescribeRegistries -> DescribeRegistries -> Bool)
-> Eq DescribeRegistries
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRegistries -> DescribeRegistries -> Bool
$c/= :: DescribeRegistries -> DescribeRegistries -> Bool
== :: DescribeRegistries -> DescribeRegistries -> Bool
$c== :: DescribeRegistries -> DescribeRegistries -> Bool
Prelude.Eq, ReadPrec [DescribeRegistries]
ReadPrec DescribeRegistries
Int -> ReadS DescribeRegistries
ReadS [DescribeRegistries]
(Int -> ReadS DescribeRegistries)
-> ReadS [DescribeRegistries]
-> ReadPrec DescribeRegistries
-> ReadPrec [DescribeRegistries]
-> Read DescribeRegistries
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRegistries]
$creadListPrec :: ReadPrec [DescribeRegistries]
readPrec :: ReadPrec DescribeRegistries
$creadPrec :: ReadPrec DescribeRegistries
readList :: ReadS [DescribeRegistries]
$creadList :: ReadS [DescribeRegistries]
readsPrec :: Int -> ReadS DescribeRegistries
$creadsPrec :: Int -> ReadS DescribeRegistries
Prelude.Read, Int -> DescribeRegistries -> ShowS
[DescribeRegistries] -> ShowS
DescribeRegistries -> String
(Int -> DescribeRegistries -> ShowS)
-> (DescribeRegistries -> String)
-> ([DescribeRegistries] -> ShowS)
-> Show DescribeRegistries
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRegistries] -> ShowS
$cshowList :: [DescribeRegistries] -> ShowS
show :: DescribeRegistries -> String
$cshow :: DescribeRegistries -> String
showsPrec :: Int -> DescribeRegistries -> ShowS
$cshowsPrec :: Int -> DescribeRegistries -> ShowS
Prelude.Show, (forall x. DescribeRegistries -> Rep DescribeRegistries x)
-> (forall x. Rep DescribeRegistries x -> DescribeRegistries)
-> Generic DescribeRegistries
forall x. Rep DescribeRegistries x -> DescribeRegistries
forall x. DescribeRegistries -> Rep DescribeRegistries x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRegistries x -> DescribeRegistries
$cfrom :: forall x. DescribeRegistries -> Rep DescribeRegistries x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRegistries' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'describeRegistries_nextToken' - The @nextToken@ value returned from a previous paginated
-- @DescribeRegistries@ request where @maxResults@ was used and the results
-- exceeded the value of that parameter. Pagination continues from the end
-- of the previous results that returned the @nextToken@ value. This value
-- is @null@ when there are no more results to return.
--
-- This token should be treated as an opaque identifier that is only used
-- to retrieve the next items in a list and not for other programmatic
-- purposes.
--
-- 'maxResults', 'describeRegistries_maxResults' - The maximum number of repository results returned by
-- @DescribeRegistries@ in paginated output. When this parameter is used,
-- @DescribeRegistries@ only returns @maxResults@ results in a single page
-- along with a @nextToken@ response element. The remaining results of the
-- initial request can be seen by sending another @DescribeRegistries@
-- request with the returned @nextToken@ value. This value can be between 1
-- and 1000. If this parameter is not used, then @DescribeRegistries@
-- returns up to 100 results and a @nextToken@ value, if applicable.
newDescribeRegistries ::
  DescribeRegistries
newDescribeRegistries :: DescribeRegistries
newDescribeRegistries =
  DescribeRegistries' :: Maybe Text -> Maybe Natural -> DescribeRegistries
DescribeRegistries'
    { $sel:nextToken:DescribeRegistries' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeRegistries' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The @nextToken@ value returned from a previous paginated
-- @DescribeRegistries@ request where @maxResults@ was used and the results
-- exceeded the value of that parameter. Pagination continues from the end
-- of the previous results that returned the @nextToken@ value. This value
-- is @null@ when there are no more results to return.
--
-- This token should be treated as an opaque identifier that is only used
-- to retrieve the next items in a list and not for other programmatic
-- purposes.
describeRegistries_nextToken :: Lens.Lens' DescribeRegistries (Prelude.Maybe Prelude.Text)
describeRegistries_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeRegistries -> f DescribeRegistries
describeRegistries_nextToken = (DescribeRegistries -> Maybe Text)
-> (DescribeRegistries -> Maybe Text -> DescribeRegistries)
-> Lens
     DescribeRegistries DescribeRegistries (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRegistries' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeRegistries' :: DescribeRegistries -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeRegistries
s@DescribeRegistries' {} Maybe Text
a -> DescribeRegistries
s {$sel:nextToken:DescribeRegistries' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeRegistries)

-- | The maximum number of repository results returned by
-- @DescribeRegistries@ in paginated output. When this parameter is used,
-- @DescribeRegistries@ only returns @maxResults@ results in a single page
-- along with a @nextToken@ response element. The remaining results of the
-- initial request can be seen by sending another @DescribeRegistries@
-- request with the returned @nextToken@ value. This value can be between 1
-- and 1000. If this parameter is not used, then @DescribeRegistries@
-- returns up to 100 results and a @nextToken@ value, if applicable.
describeRegistries_maxResults :: Lens.Lens' DescribeRegistries (Prelude.Maybe Prelude.Natural)
describeRegistries_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeRegistries -> f DescribeRegistries
describeRegistries_maxResults = (DescribeRegistries -> Maybe Natural)
-> (DescribeRegistries -> Maybe Natural -> DescribeRegistries)
-> Lens
     DescribeRegistries
     DescribeRegistries
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRegistries' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeRegistries' :: DescribeRegistries -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeRegistries
s@DescribeRegistries' {} Maybe Natural
a -> DescribeRegistries
s {$sel:maxResults:DescribeRegistries' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeRegistries)

instance Core.AWSPager DescribeRegistries where
  page :: DescribeRegistries
-> AWSResponse DescribeRegistries -> Maybe DescribeRegistries
page DescribeRegistries
rq AWSResponse DescribeRegistries
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeRegistries
DescribeRegistriesResponse
rs
            DescribeRegistriesResponse
-> Getting (First Text) DescribeRegistriesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeRegistriesResponse
-> Const (First Text) DescribeRegistriesResponse
Lens' DescribeRegistriesResponse (Maybe Text)
describeRegistriesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeRegistriesResponse
 -> Const (First Text) DescribeRegistriesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeRegistriesResponse 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 DescribeRegistries
forall a. Maybe a
Prelude.Nothing
    | [Registry] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse DescribeRegistries
DescribeRegistriesResponse
rs DescribeRegistriesResponse
-> Getting [Registry] DescribeRegistriesResponse [Registry]
-> [Registry]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [Registry] DescribeRegistriesResponse [Registry]
Lens' DescribeRegistriesResponse [Registry]
describeRegistriesResponse_registries) =
      Maybe DescribeRegistries
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeRegistries -> Maybe DescribeRegistries
forall a. a -> Maybe a
Prelude.Just (DescribeRegistries -> Maybe DescribeRegistries)
-> DescribeRegistries -> Maybe DescribeRegistries
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeRegistries
rq
          DescribeRegistries
-> (DescribeRegistries -> DescribeRegistries) -> DescribeRegistries
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeRegistries -> Identity DescribeRegistries
Lens
  DescribeRegistries DescribeRegistries (Maybe Text) (Maybe Text)
describeRegistries_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeRegistries -> Identity DescribeRegistries)
-> Maybe Text -> DescribeRegistries -> DescribeRegistries
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeRegistries
DescribeRegistriesResponse
rs
          DescribeRegistriesResponse
-> Getting (First Text) DescribeRegistriesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeRegistriesResponse
-> Const (First Text) DescribeRegistriesResponse
Lens' DescribeRegistriesResponse (Maybe Text)
describeRegistriesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeRegistriesResponse
 -> Const (First Text) DescribeRegistriesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeRegistriesResponse 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 DescribeRegistries where
  type
    AWSResponse DescribeRegistries =
      DescribeRegistriesResponse
  request :: DescribeRegistries -> Request DescribeRegistries
request = Service -> DescribeRegistries -> Request DescribeRegistries
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeRegistries
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRegistries)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeRegistries))
-> Logger
-> Service
-> Proxy DescribeRegistries
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRegistries)))
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 -> Int -> [Registry] -> DescribeRegistriesResponse
DescribeRegistriesResponse'
            (Maybe Text -> Int -> [Registry] -> DescribeRegistriesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [Registry] -> DescribeRegistriesResponse)
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 (Int -> [Registry] -> DescribeRegistriesResponse)
-> Either String Int
-> Either String ([Registry] -> DescribeRegistriesResponse)
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))
            Either String ([Registry] -> DescribeRegistriesResponse)
-> Either String [Registry]
-> Either String DescribeRegistriesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [Registry])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"registries" Either String (Maybe [Registry])
-> [Registry] -> Either String [Registry]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Registry]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable DescribeRegistries

instance Prelude.NFData DescribeRegistries

instance Core.ToHeaders DescribeRegistries where
  toHeaders :: DescribeRegistries -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeRegistries -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SpencerFrontendService.DescribeRegistries" ::
                          Prelude.ByteString
                      ),
            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.ToJSON DescribeRegistries where
  toJSON :: DescribeRegistries -> Value
toJSON DescribeRegistries' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:DescribeRegistries' :: DescribeRegistries -> Maybe Natural
$sel:nextToken:DescribeRegistries' :: DescribeRegistries -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

instance Core.ToPath DescribeRegistries where
  toPath :: DescribeRegistries -> ByteString
toPath = ByteString -> DescribeRegistries -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DescribeRegistries where
  toQuery :: DescribeRegistries -> QueryString
toQuery = QueryString -> DescribeRegistries -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeRegistriesResponse' smart constructor.
data DescribeRegistriesResponse = DescribeRegistriesResponse'
  { -- | The @nextToken@ value to include in a future @DescribeRepositories@
    -- request. When the results of a @DescribeRepositories@ request exceed
    -- @maxResults@, this value can be used to retrieve the next page of
    -- results. This value is @null@ when there are no more results to return.
    DescribeRegistriesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeRegistriesResponse -> Int
httpStatus :: Prelude.Int,
    -- | An object containing the details for a public registry.
    DescribeRegistriesResponse -> [Registry]
registries :: [Registry]
  }
  deriving (DescribeRegistriesResponse -> DescribeRegistriesResponse -> Bool
(DescribeRegistriesResponse -> DescribeRegistriesResponse -> Bool)
-> (DescribeRegistriesResponse
    -> DescribeRegistriesResponse -> Bool)
-> Eq DescribeRegistriesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRegistriesResponse -> DescribeRegistriesResponse -> Bool
$c/= :: DescribeRegistriesResponse -> DescribeRegistriesResponse -> Bool
== :: DescribeRegistriesResponse -> DescribeRegistriesResponse -> Bool
$c== :: DescribeRegistriesResponse -> DescribeRegistriesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeRegistriesResponse]
ReadPrec DescribeRegistriesResponse
Int -> ReadS DescribeRegistriesResponse
ReadS [DescribeRegistriesResponse]
(Int -> ReadS DescribeRegistriesResponse)
-> ReadS [DescribeRegistriesResponse]
-> ReadPrec DescribeRegistriesResponse
-> ReadPrec [DescribeRegistriesResponse]
-> Read DescribeRegistriesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRegistriesResponse]
$creadListPrec :: ReadPrec [DescribeRegistriesResponse]
readPrec :: ReadPrec DescribeRegistriesResponse
$creadPrec :: ReadPrec DescribeRegistriesResponse
readList :: ReadS [DescribeRegistriesResponse]
$creadList :: ReadS [DescribeRegistriesResponse]
readsPrec :: Int -> ReadS DescribeRegistriesResponse
$creadsPrec :: Int -> ReadS DescribeRegistriesResponse
Prelude.Read, Int -> DescribeRegistriesResponse -> ShowS
[DescribeRegistriesResponse] -> ShowS
DescribeRegistriesResponse -> String
(Int -> DescribeRegistriesResponse -> ShowS)
-> (DescribeRegistriesResponse -> String)
-> ([DescribeRegistriesResponse] -> ShowS)
-> Show DescribeRegistriesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRegistriesResponse] -> ShowS
$cshowList :: [DescribeRegistriesResponse] -> ShowS
show :: DescribeRegistriesResponse -> String
$cshow :: DescribeRegistriesResponse -> String
showsPrec :: Int -> DescribeRegistriesResponse -> ShowS
$cshowsPrec :: Int -> DescribeRegistriesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeRegistriesResponse -> Rep DescribeRegistriesResponse x)
-> (forall x.
    Rep DescribeRegistriesResponse x -> DescribeRegistriesResponse)
-> Generic DescribeRegistriesResponse
forall x.
Rep DescribeRegistriesResponse x -> DescribeRegistriesResponse
forall x.
DescribeRegistriesResponse -> Rep DescribeRegistriesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeRegistriesResponse x -> DescribeRegistriesResponse
$cfrom :: forall x.
DescribeRegistriesResponse -> Rep DescribeRegistriesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRegistriesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'describeRegistriesResponse_nextToken' - The @nextToken@ value to include in a future @DescribeRepositories@
-- request. When the results of a @DescribeRepositories@ request exceed
-- @maxResults@, this value can be used to retrieve the next page of
-- results. This value is @null@ when there are no more results to return.
--
-- 'httpStatus', 'describeRegistriesResponse_httpStatus' - The response's http status code.
--
-- 'registries', 'describeRegistriesResponse_registries' - An object containing the details for a public registry.
newDescribeRegistriesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeRegistriesResponse
newDescribeRegistriesResponse :: Int -> DescribeRegistriesResponse
newDescribeRegistriesResponse Int
pHttpStatus_ =
  DescribeRegistriesResponse' :: Maybe Text -> Int -> [Registry] -> DescribeRegistriesResponse
DescribeRegistriesResponse'
    { $sel:nextToken:DescribeRegistriesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeRegistriesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:registries:DescribeRegistriesResponse' :: [Registry]
registries = [Registry]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The @nextToken@ value to include in a future @DescribeRepositories@
-- request. When the results of a @DescribeRepositories@ request exceed
-- @maxResults@, this value can be used to retrieve the next page of
-- results. This value is @null@ when there are no more results to return.
describeRegistriesResponse_nextToken :: Lens.Lens' DescribeRegistriesResponse (Prelude.Maybe Prelude.Text)
describeRegistriesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeRegistriesResponse -> f DescribeRegistriesResponse
describeRegistriesResponse_nextToken = (DescribeRegistriesResponse -> Maybe Text)
-> (DescribeRegistriesResponse
    -> Maybe Text -> DescribeRegistriesResponse)
-> Lens' DescribeRegistriesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRegistriesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeRegistriesResponse' :: DescribeRegistriesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeRegistriesResponse
s@DescribeRegistriesResponse' {} Maybe Text
a -> DescribeRegistriesResponse
s {$sel:nextToken:DescribeRegistriesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeRegistriesResponse)

-- | The response's http status code.
describeRegistriesResponse_httpStatus :: Lens.Lens' DescribeRegistriesResponse Prelude.Int
describeRegistriesResponse_httpStatus :: (Int -> f Int)
-> DescribeRegistriesResponse -> f DescribeRegistriesResponse
describeRegistriesResponse_httpStatus = (DescribeRegistriesResponse -> Int)
-> (DescribeRegistriesResponse
    -> Int -> DescribeRegistriesResponse)
-> Lens
     DescribeRegistriesResponse DescribeRegistriesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRegistriesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeRegistriesResponse' :: DescribeRegistriesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeRegistriesResponse
s@DescribeRegistriesResponse' {} Int
a -> DescribeRegistriesResponse
s {$sel:httpStatus:DescribeRegistriesResponse' :: Int
httpStatus = Int
a} :: DescribeRegistriesResponse)

-- | An object containing the details for a public registry.
describeRegistriesResponse_registries :: Lens.Lens' DescribeRegistriesResponse [Registry]
describeRegistriesResponse_registries :: ([Registry] -> f [Registry])
-> DescribeRegistriesResponse -> f DescribeRegistriesResponse
describeRegistriesResponse_registries = (DescribeRegistriesResponse -> [Registry])
-> (DescribeRegistriesResponse
    -> [Registry] -> DescribeRegistriesResponse)
-> Lens' DescribeRegistriesResponse [Registry]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRegistriesResponse' {[Registry]
registries :: [Registry]
$sel:registries:DescribeRegistriesResponse' :: DescribeRegistriesResponse -> [Registry]
registries} -> [Registry]
registries) (\s :: DescribeRegistriesResponse
s@DescribeRegistriesResponse' {} [Registry]
a -> DescribeRegistriesResponse
s {$sel:registries:DescribeRegistriesResponse' :: [Registry]
registries = [Registry]
a} :: DescribeRegistriesResponse) (([Registry] -> f [Registry])
 -> DescribeRegistriesResponse -> f DescribeRegistriesResponse)
-> (([Registry] -> f [Registry]) -> [Registry] -> f [Registry])
-> ([Registry] -> f [Registry])
-> DescribeRegistriesResponse
-> f DescribeRegistriesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Registry] -> f [Registry]) -> [Registry] -> f [Registry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData DescribeRegistriesResponse