{-# 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.EKS.ListUpdates
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the updates associated with an Amazon EKS cluster or managed node
-- group in your Amazon Web Services account, in the specified Region.
--
-- This operation returns paginated results.
module Amazonka.EKS.ListUpdates
  ( -- * Creating a Request
    ListUpdates (..),
    newListUpdates,

    -- * Request Lenses
    listUpdates_addonName,
    listUpdates_maxResults,
    listUpdates_nextToken,
    listUpdates_nodegroupName,
    listUpdates_name,

    -- * Destructuring the Response
    ListUpdatesResponse (..),
    newListUpdatesResponse,

    -- * Response Lenses
    listUpdatesResponse_nextToken,
    listUpdatesResponse_updateIds,
    listUpdatesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EKS.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListUpdates' smart constructor.
data ListUpdates = ListUpdates'
  { -- | The names of the installed add-ons that have available updates.
    ListUpdates -> Maybe Text
addonName :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of update results returned by @ListUpdates@ in
    -- paginated output. When you use this parameter, @ListUpdates@ returns
    -- only @maxResults@ results in a single page along with a @nextToken@
    -- response element. You can see the remaining results of the initial
    -- request by sending another @ListUpdates@ request with the returned
    -- @nextToken@ value. This value can be between 1 and 100. If you don\'t
    -- use this parameter, @ListUpdates@ returns up to 100 results and a
    -- @nextToken@ value if applicable.
    ListUpdates -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The @nextToken@ value returned from a previous paginated @ListUpdates@
    -- 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.
    ListUpdates -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the Amazon EKS managed node group to list updates for.
    ListUpdates -> Maybe Text
nodegroupName :: Prelude.Maybe Prelude.Text,
    -- | The name of the Amazon EKS cluster to list updates for.
    ListUpdates -> Text
name :: Prelude.Text
  }
  deriving (ListUpdates -> ListUpdates -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListUpdates -> ListUpdates -> Bool
$c/= :: ListUpdates -> ListUpdates -> Bool
== :: ListUpdates -> ListUpdates -> Bool
$c== :: ListUpdates -> ListUpdates -> Bool
Prelude.Eq, ReadPrec [ListUpdates]
ReadPrec ListUpdates
Int -> ReadS ListUpdates
ReadS [ListUpdates]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListUpdates]
$creadListPrec :: ReadPrec [ListUpdates]
readPrec :: ReadPrec ListUpdates
$creadPrec :: ReadPrec ListUpdates
readList :: ReadS [ListUpdates]
$creadList :: ReadS [ListUpdates]
readsPrec :: Int -> ReadS ListUpdates
$creadsPrec :: Int -> ReadS ListUpdates
Prelude.Read, Int -> ListUpdates -> ShowS
[ListUpdates] -> ShowS
ListUpdates -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListUpdates] -> ShowS
$cshowList :: [ListUpdates] -> ShowS
show :: ListUpdates -> String
$cshow :: ListUpdates -> String
showsPrec :: Int -> ListUpdates -> ShowS
$cshowsPrec :: Int -> ListUpdates -> ShowS
Prelude.Show, forall x. Rep ListUpdates x -> ListUpdates
forall x. ListUpdates -> Rep ListUpdates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListUpdates x -> ListUpdates
$cfrom :: forall x. ListUpdates -> Rep ListUpdates x
Prelude.Generic)

-- |
-- Create a value of 'ListUpdates' 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:
--
-- 'addonName', 'listUpdates_addonName' - The names of the installed add-ons that have available updates.
--
-- 'maxResults', 'listUpdates_maxResults' - The maximum number of update results returned by @ListUpdates@ in
-- paginated output. When you use this parameter, @ListUpdates@ returns
-- only @maxResults@ results in a single page along with a @nextToken@
-- response element. You can see the remaining results of the initial
-- request by sending another @ListUpdates@ request with the returned
-- @nextToken@ value. This value can be between 1 and 100. If you don\'t
-- use this parameter, @ListUpdates@ returns up to 100 results and a
-- @nextToken@ value if applicable.
--
-- 'nextToken', 'listUpdates_nextToken' - The @nextToken@ value returned from a previous paginated @ListUpdates@
-- 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.
--
-- 'nodegroupName', 'listUpdates_nodegroupName' - The name of the Amazon EKS managed node group to list updates for.
--
-- 'name', 'listUpdates_name' - The name of the Amazon EKS cluster to list updates for.
newListUpdates ::
  -- | 'name'
  Prelude.Text ->
  ListUpdates
newListUpdates :: Text -> ListUpdates
newListUpdates Text
pName_ =
  ListUpdates'
    { $sel:addonName:ListUpdates' :: Maybe Text
addonName = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListUpdates' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListUpdates' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:nodegroupName:ListUpdates' :: Maybe Text
nodegroupName = forall a. Maybe a
Prelude.Nothing,
      $sel:name:ListUpdates' :: Text
name = Text
pName_
    }

-- | The names of the installed add-ons that have available updates.
listUpdates_addonName :: Lens.Lens' ListUpdates (Prelude.Maybe Prelude.Text)
listUpdates_addonName :: Lens' ListUpdates (Maybe Text)
listUpdates_addonName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUpdates' {Maybe Text
addonName :: Maybe Text
$sel:addonName:ListUpdates' :: ListUpdates -> Maybe Text
addonName} -> Maybe Text
addonName) (\s :: ListUpdates
s@ListUpdates' {} Maybe Text
a -> ListUpdates
s {$sel:addonName:ListUpdates' :: Maybe Text
addonName = Maybe Text
a} :: ListUpdates)

-- | The maximum number of update results returned by @ListUpdates@ in
-- paginated output. When you use this parameter, @ListUpdates@ returns
-- only @maxResults@ results in a single page along with a @nextToken@
-- response element. You can see the remaining results of the initial
-- request by sending another @ListUpdates@ request with the returned
-- @nextToken@ value. This value can be between 1 and 100. If you don\'t
-- use this parameter, @ListUpdates@ returns up to 100 results and a
-- @nextToken@ value if applicable.
listUpdates_maxResults :: Lens.Lens' ListUpdates (Prelude.Maybe Prelude.Natural)
listUpdates_maxResults :: Lens' ListUpdates (Maybe Natural)
listUpdates_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUpdates' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListUpdates' :: ListUpdates -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListUpdates
s@ListUpdates' {} Maybe Natural
a -> ListUpdates
s {$sel:maxResults:ListUpdates' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListUpdates)

-- | The @nextToken@ value returned from a previous paginated @ListUpdates@
-- 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.
listUpdates_nextToken :: Lens.Lens' ListUpdates (Prelude.Maybe Prelude.Text)
listUpdates_nextToken :: Lens' ListUpdates (Maybe Text)
listUpdates_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUpdates' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListUpdates' :: ListUpdates -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListUpdates
s@ListUpdates' {} Maybe Text
a -> ListUpdates
s {$sel:nextToken:ListUpdates' :: Maybe Text
nextToken = Maybe Text
a} :: ListUpdates)

-- | The name of the Amazon EKS managed node group to list updates for.
listUpdates_nodegroupName :: Lens.Lens' ListUpdates (Prelude.Maybe Prelude.Text)
listUpdates_nodegroupName :: Lens' ListUpdates (Maybe Text)
listUpdates_nodegroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUpdates' {Maybe Text
nodegroupName :: Maybe Text
$sel:nodegroupName:ListUpdates' :: ListUpdates -> Maybe Text
nodegroupName} -> Maybe Text
nodegroupName) (\s :: ListUpdates
s@ListUpdates' {} Maybe Text
a -> ListUpdates
s {$sel:nodegroupName:ListUpdates' :: Maybe Text
nodegroupName = Maybe Text
a} :: ListUpdates)

-- | The name of the Amazon EKS cluster to list updates for.
listUpdates_name :: Lens.Lens' ListUpdates Prelude.Text
listUpdates_name :: Lens' ListUpdates Text
listUpdates_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUpdates' {Text
name :: Text
$sel:name:ListUpdates' :: ListUpdates -> Text
name} -> Text
name) (\s :: ListUpdates
s@ListUpdates' {} Text
a -> ListUpdates
s {$sel:name:ListUpdates' :: Text
name = Text
a} :: ListUpdates)

instance Core.AWSPager ListUpdates where
  page :: ListUpdates -> AWSResponse ListUpdates -> Maybe ListUpdates
page ListUpdates
rq AWSResponse ListUpdates
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListUpdates
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUpdatesResponse (Maybe Text)
listUpdatesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListUpdates
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUpdatesResponse (Maybe [Text])
listUpdatesResponse_updateIds
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListUpdates
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListUpdates (Maybe Text)
listUpdates_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListUpdates
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListUpdatesResponse (Maybe Text)
listUpdatesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListUpdates where
  type AWSResponse ListUpdates = ListUpdatesResponse
  request :: (Service -> Service) -> ListUpdates -> Request ListUpdates
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListUpdates
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListUpdates)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe [Text] -> Int -> ListUpdatesResponse
ListUpdatesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"updateIds" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListUpdates where
  hashWithSalt :: Int -> ListUpdates -> Int
hashWithSalt Int
_salt ListUpdates' {Maybe Natural
Maybe Text
Text
name :: Text
nodegroupName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
addonName :: Maybe Text
$sel:name:ListUpdates' :: ListUpdates -> Text
$sel:nodegroupName:ListUpdates' :: ListUpdates -> Maybe Text
$sel:nextToken:ListUpdates' :: ListUpdates -> Maybe Text
$sel:maxResults:ListUpdates' :: ListUpdates -> Maybe Natural
$sel:addonName:ListUpdates' :: ListUpdates -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
addonName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nodegroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData ListUpdates where
  rnf :: ListUpdates -> ()
rnf ListUpdates' {Maybe Natural
Maybe Text
Text
name :: Text
nodegroupName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
addonName :: Maybe Text
$sel:name:ListUpdates' :: ListUpdates -> Text
$sel:nodegroupName:ListUpdates' :: ListUpdates -> Maybe Text
$sel:nextToken:ListUpdates' :: ListUpdates -> Maybe Text
$sel:maxResults:ListUpdates' :: ListUpdates -> Maybe Natural
$sel:addonName:ListUpdates' :: ListUpdates -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
addonName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nodegroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders ListUpdates where
  toHeaders :: ListUpdates -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath ListUpdates where
  toPath :: ListUpdates -> ByteString
toPath ListUpdates' {Maybe Natural
Maybe Text
Text
name :: Text
nodegroupName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
addonName :: Maybe Text
$sel:name:ListUpdates' :: ListUpdates -> Text
$sel:nodegroupName:ListUpdates' :: ListUpdates -> Maybe Text
$sel:nextToken:ListUpdates' :: ListUpdates -> Maybe Text
$sel:maxResults:ListUpdates' :: ListUpdates -> Maybe Natural
$sel:addonName:ListUpdates' :: ListUpdates -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/clusters/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
name, ByteString
"/updates"]

instance Data.ToQuery ListUpdates where
  toQuery :: ListUpdates -> QueryString
toQuery ListUpdates' {Maybe Natural
Maybe Text
Text
name :: Text
nodegroupName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
addonName :: Maybe Text
$sel:name:ListUpdates' :: ListUpdates -> Text
$sel:nodegroupName:ListUpdates' :: ListUpdates -> Maybe Text
$sel:nextToken:ListUpdates' :: ListUpdates -> Maybe Text
$sel:maxResults:ListUpdates' :: ListUpdates -> Maybe Natural
$sel:addonName:ListUpdates' :: ListUpdates -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"addonName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
addonName,
        ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"nodegroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nodegroupName
      ]

-- | /See:/ 'newListUpdatesResponse' smart constructor.
data ListUpdatesResponse = ListUpdatesResponse'
  { -- | The @nextToken@ value to include in a future @ListUpdates@ request. When
    -- the results of a @ListUpdates@ request exceed @maxResults@, you can use
    -- this value to retrieve the next page of results. This value is @null@
    -- when there are no more results to return.
    ListUpdatesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of all the updates for the specified cluster and Region.
    ListUpdatesResponse -> Maybe [Text]
updateIds :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    ListUpdatesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListUpdatesResponse -> ListUpdatesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListUpdatesResponse -> ListUpdatesResponse -> Bool
$c/= :: ListUpdatesResponse -> ListUpdatesResponse -> Bool
== :: ListUpdatesResponse -> ListUpdatesResponse -> Bool
$c== :: ListUpdatesResponse -> ListUpdatesResponse -> Bool
Prelude.Eq, ReadPrec [ListUpdatesResponse]
ReadPrec ListUpdatesResponse
Int -> ReadS ListUpdatesResponse
ReadS [ListUpdatesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListUpdatesResponse]
$creadListPrec :: ReadPrec [ListUpdatesResponse]
readPrec :: ReadPrec ListUpdatesResponse
$creadPrec :: ReadPrec ListUpdatesResponse
readList :: ReadS [ListUpdatesResponse]
$creadList :: ReadS [ListUpdatesResponse]
readsPrec :: Int -> ReadS ListUpdatesResponse
$creadsPrec :: Int -> ReadS ListUpdatesResponse
Prelude.Read, Int -> ListUpdatesResponse -> ShowS
[ListUpdatesResponse] -> ShowS
ListUpdatesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListUpdatesResponse] -> ShowS
$cshowList :: [ListUpdatesResponse] -> ShowS
show :: ListUpdatesResponse -> String
$cshow :: ListUpdatesResponse -> String
showsPrec :: Int -> ListUpdatesResponse -> ShowS
$cshowsPrec :: Int -> ListUpdatesResponse -> ShowS
Prelude.Show, forall x. Rep ListUpdatesResponse x -> ListUpdatesResponse
forall x. ListUpdatesResponse -> Rep ListUpdatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListUpdatesResponse x -> ListUpdatesResponse
$cfrom :: forall x. ListUpdatesResponse -> Rep ListUpdatesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListUpdatesResponse' 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', 'listUpdatesResponse_nextToken' - The @nextToken@ value to include in a future @ListUpdates@ request. When
-- the results of a @ListUpdates@ request exceed @maxResults@, you can use
-- this value to retrieve the next page of results. This value is @null@
-- when there are no more results to return.
--
-- 'updateIds', 'listUpdatesResponse_updateIds' - A list of all the updates for the specified cluster and Region.
--
-- 'httpStatus', 'listUpdatesResponse_httpStatus' - The response's http status code.
newListUpdatesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListUpdatesResponse
newListUpdatesResponse :: Int -> ListUpdatesResponse
newListUpdatesResponse Int
pHttpStatus_ =
  ListUpdatesResponse'
    { $sel:nextToken:ListUpdatesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:updateIds:ListUpdatesResponse' :: Maybe [Text]
updateIds = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListUpdatesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | A list of all the updates for the specified cluster and Region.
listUpdatesResponse_updateIds :: Lens.Lens' ListUpdatesResponse (Prelude.Maybe [Prelude.Text])
listUpdatesResponse_updateIds :: Lens' ListUpdatesResponse (Maybe [Text])
listUpdatesResponse_updateIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUpdatesResponse' {Maybe [Text]
updateIds :: Maybe [Text]
$sel:updateIds:ListUpdatesResponse' :: ListUpdatesResponse -> Maybe [Text]
updateIds} -> Maybe [Text]
updateIds) (\s :: ListUpdatesResponse
s@ListUpdatesResponse' {} Maybe [Text]
a -> ListUpdatesResponse
s {$sel:updateIds:ListUpdatesResponse' :: Maybe [Text]
updateIds = Maybe [Text]
a} :: ListUpdatesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListUpdatesResponse where
  rnf :: ListUpdatesResponse -> ()
rnf ListUpdatesResponse' {Int
Maybe [Text]
Maybe Text
httpStatus :: Int
updateIds :: Maybe [Text]
nextToken :: Maybe Text
$sel:httpStatus:ListUpdatesResponse' :: ListUpdatesResponse -> Int
$sel:updateIds:ListUpdatesResponse' :: ListUpdatesResponse -> Maybe [Text]
$sel:nextToken:ListUpdatesResponse' :: ListUpdatesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
updateIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus