{-# 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.SSM.ListAssociationVersions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves all versions of an association for a specific association ID.
--
-- This operation returns paginated results.
module Amazonka.SSM.ListAssociationVersions
  ( -- * Creating a Request
    ListAssociationVersions (..),
    newListAssociationVersions,

    -- * Request Lenses
    listAssociationVersions_maxResults,
    listAssociationVersions_nextToken,
    listAssociationVersions_associationId,

    -- * Destructuring the Response
    ListAssociationVersionsResponse (..),
    newListAssociationVersionsResponse,

    -- * Response Lenses
    listAssociationVersionsResponse_associationVersions,
    listAssociationVersionsResponse_nextToken,
    listAssociationVersionsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListAssociationVersions' smart constructor.
data ListAssociationVersions = ListAssociationVersions'
  { -- | The maximum number of items to return for this call. The call also
    -- returns a token that you can specify in a subsequent call to get the
    -- next set of results.
    ListAssociationVersions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A token to start the list. Use this token to get the next set of
    -- results.
    ListAssociationVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The association ID for which you want to view all versions.
    ListAssociationVersions -> Text
associationId :: Prelude.Text
  }
  deriving (ListAssociationVersions -> ListAssociationVersions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAssociationVersions -> ListAssociationVersions -> Bool
$c/= :: ListAssociationVersions -> ListAssociationVersions -> Bool
== :: ListAssociationVersions -> ListAssociationVersions -> Bool
$c== :: ListAssociationVersions -> ListAssociationVersions -> Bool
Prelude.Eq, ReadPrec [ListAssociationVersions]
ReadPrec ListAssociationVersions
Int -> ReadS ListAssociationVersions
ReadS [ListAssociationVersions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAssociationVersions]
$creadListPrec :: ReadPrec [ListAssociationVersions]
readPrec :: ReadPrec ListAssociationVersions
$creadPrec :: ReadPrec ListAssociationVersions
readList :: ReadS [ListAssociationVersions]
$creadList :: ReadS [ListAssociationVersions]
readsPrec :: Int -> ReadS ListAssociationVersions
$creadsPrec :: Int -> ReadS ListAssociationVersions
Prelude.Read, Int -> ListAssociationVersions -> ShowS
[ListAssociationVersions] -> ShowS
ListAssociationVersions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAssociationVersions] -> ShowS
$cshowList :: [ListAssociationVersions] -> ShowS
show :: ListAssociationVersions -> String
$cshow :: ListAssociationVersions -> String
showsPrec :: Int -> ListAssociationVersions -> ShowS
$cshowsPrec :: Int -> ListAssociationVersions -> ShowS
Prelude.Show, forall x. Rep ListAssociationVersions x -> ListAssociationVersions
forall x. ListAssociationVersions -> Rep ListAssociationVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAssociationVersions x -> ListAssociationVersions
$cfrom :: forall x. ListAssociationVersions -> Rep ListAssociationVersions x
Prelude.Generic)

-- |
-- Create a value of 'ListAssociationVersions' 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:
--
-- 'maxResults', 'listAssociationVersions_maxResults' - The maximum number of items to return for this call. The call also
-- returns a token that you can specify in a subsequent call to get the
-- next set of results.
--
-- 'nextToken', 'listAssociationVersions_nextToken' - A token to start the list. Use this token to get the next set of
-- results.
--
-- 'associationId', 'listAssociationVersions_associationId' - The association ID for which you want to view all versions.
newListAssociationVersions ::
  -- | 'associationId'
  Prelude.Text ->
  ListAssociationVersions
newListAssociationVersions :: Text -> ListAssociationVersions
newListAssociationVersions Text
pAssociationId_ =
  ListAssociationVersions'
    { $sel:maxResults:ListAssociationVersions' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAssociationVersions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:associationId:ListAssociationVersions' :: Text
associationId = Text
pAssociationId_
    }

-- | The maximum number of items to return for this call. The call also
-- returns a token that you can specify in a subsequent call to get the
-- next set of results.
listAssociationVersions_maxResults :: Lens.Lens' ListAssociationVersions (Prelude.Maybe Prelude.Natural)
listAssociationVersions_maxResults :: Lens' ListAssociationVersions (Maybe Natural)
listAssociationVersions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssociationVersions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAssociationVersions' :: ListAssociationVersions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAssociationVersions
s@ListAssociationVersions' {} Maybe Natural
a -> ListAssociationVersions
s {$sel:maxResults:ListAssociationVersions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAssociationVersions)

-- | A token to start the list. Use this token to get the next set of
-- results.
listAssociationVersions_nextToken :: Lens.Lens' ListAssociationVersions (Prelude.Maybe Prelude.Text)
listAssociationVersions_nextToken :: Lens' ListAssociationVersions (Maybe Text)
listAssociationVersions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssociationVersions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAssociationVersions' :: ListAssociationVersions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAssociationVersions
s@ListAssociationVersions' {} Maybe Text
a -> ListAssociationVersions
s {$sel:nextToken:ListAssociationVersions' :: Maybe Text
nextToken = Maybe Text
a} :: ListAssociationVersions)

-- | The association ID for which you want to view all versions.
listAssociationVersions_associationId :: Lens.Lens' ListAssociationVersions Prelude.Text
listAssociationVersions_associationId :: Lens' ListAssociationVersions Text
listAssociationVersions_associationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssociationVersions' {Text
associationId :: Text
$sel:associationId:ListAssociationVersions' :: ListAssociationVersions -> Text
associationId} -> Text
associationId) (\s :: ListAssociationVersions
s@ListAssociationVersions' {} Text
a -> ListAssociationVersions
s {$sel:associationId:ListAssociationVersions' :: Text
associationId = Text
a} :: ListAssociationVersions)

instance Core.AWSPager ListAssociationVersions where
  page :: ListAssociationVersions
-> AWSResponse ListAssociationVersions
-> Maybe ListAssociationVersions
page ListAssociationVersions
rq AWSResponse ListAssociationVersions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAssociationVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAssociationVersionsResponse (Maybe Text)
listAssociationVersionsResponse_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 ListAssociationVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListAssociationVersionsResponse
  (Maybe (NonEmpty AssociationVersionInfo))
listAssociationVersionsResponse_associationVersions
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall l. IsList l => l -> [Item l]
Prelude.toList
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListAssociationVersions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListAssociationVersions (Maybe Text)
listAssociationVersions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAssociationVersions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAssociationVersionsResponse (Maybe Text)
listAssociationVersionsResponse_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 ListAssociationVersions where
  type
    AWSResponse ListAssociationVersions =
      ListAssociationVersionsResponse
  request :: (Service -> Service)
-> ListAssociationVersions -> Request ListAssociationVersions
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListAssociationVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAssociationVersions)))
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 (NonEmpty AssociationVersionInfo)
-> Maybe Text -> Int -> ListAssociationVersionsResponse
ListAssociationVersionsResponse'
            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
"AssociationVersions")
            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
"NextToken")
            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 ListAssociationVersions where
  hashWithSalt :: Int -> ListAssociationVersions -> Int
hashWithSalt Int
_salt ListAssociationVersions' {Maybe Natural
Maybe Text
Text
associationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:associationId:ListAssociationVersions' :: ListAssociationVersions -> Text
$sel:nextToken:ListAssociationVersions' :: ListAssociationVersions -> Maybe Text
$sel:maxResults:ListAssociationVersions' :: ListAssociationVersions -> Maybe Natural
..} =
    Int
_salt
      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` Text
associationId

instance Prelude.NFData ListAssociationVersions where
  rnf :: ListAssociationVersions -> ()
rnf ListAssociationVersions' {Maybe Natural
Maybe Text
Text
associationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:associationId:ListAssociationVersions' :: ListAssociationVersions -> Text
$sel:nextToken:ListAssociationVersions' :: ListAssociationVersions -> Maybe Text
$sel:maxResults:ListAssociationVersions' :: ListAssociationVersions -> Maybe Natural
..} =
    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 Text
associationId

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

instance Data.ToJSON ListAssociationVersions where
  toJSON :: ListAssociationVersions -> Value
toJSON ListAssociationVersions' {Maybe Natural
Maybe Text
Text
associationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:associationId:ListAssociationVersions' :: ListAssociationVersions -> Text
$sel:nextToken:ListAssociationVersions' :: ListAssociationVersions -> Maybe Text
$sel:maxResults:ListAssociationVersions' :: ListAssociationVersions -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"AssociationId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
associationId)
          ]
      )

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

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

-- | /See:/ 'newListAssociationVersionsResponse' smart constructor.
data ListAssociationVersionsResponse = ListAssociationVersionsResponse'
  { -- | Information about all versions of the association for the specified
    -- association ID.
    ListAssociationVersionsResponse
-> Maybe (NonEmpty AssociationVersionInfo)
associationVersions :: Prelude.Maybe (Prelude.NonEmpty AssociationVersionInfo),
    -- | The token for the next set of items to return. Use this token to get the
    -- next set of results.
    ListAssociationVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAssociationVersionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListAssociationVersionsResponse
-> ListAssociationVersionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAssociationVersionsResponse
-> ListAssociationVersionsResponse -> Bool
$c/= :: ListAssociationVersionsResponse
-> ListAssociationVersionsResponse -> Bool
== :: ListAssociationVersionsResponse
-> ListAssociationVersionsResponse -> Bool
$c== :: ListAssociationVersionsResponse
-> ListAssociationVersionsResponse -> Bool
Prelude.Eq, Int -> ListAssociationVersionsResponse -> ShowS
[ListAssociationVersionsResponse] -> ShowS
ListAssociationVersionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAssociationVersionsResponse] -> ShowS
$cshowList :: [ListAssociationVersionsResponse] -> ShowS
show :: ListAssociationVersionsResponse -> String
$cshow :: ListAssociationVersionsResponse -> String
showsPrec :: Int -> ListAssociationVersionsResponse -> ShowS
$cshowsPrec :: Int -> ListAssociationVersionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListAssociationVersionsResponse x
-> ListAssociationVersionsResponse
forall x.
ListAssociationVersionsResponse
-> Rep ListAssociationVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAssociationVersionsResponse x
-> ListAssociationVersionsResponse
$cfrom :: forall x.
ListAssociationVersionsResponse
-> Rep ListAssociationVersionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAssociationVersionsResponse' 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:
--
-- 'associationVersions', 'listAssociationVersionsResponse_associationVersions' - Information about all versions of the association for the specified
-- association ID.
--
-- 'nextToken', 'listAssociationVersionsResponse_nextToken' - The token for the next set of items to return. Use this token to get the
-- next set of results.
--
-- 'httpStatus', 'listAssociationVersionsResponse_httpStatus' - The response's http status code.
newListAssociationVersionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAssociationVersionsResponse
newListAssociationVersionsResponse :: Int -> ListAssociationVersionsResponse
newListAssociationVersionsResponse Int
pHttpStatus_ =
  ListAssociationVersionsResponse'
    { $sel:associationVersions:ListAssociationVersionsResponse' :: Maybe (NonEmpty AssociationVersionInfo)
associationVersions =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAssociationVersionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAssociationVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about all versions of the association for the specified
-- association ID.
listAssociationVersionsResponse_associationVersions :: Lens.Lens' ListAssociationVersionsResponse (Prelude.Maybe (Prelude.NonEmpty AssociationVersionInfo))
listAssociationVersionsResponse_associationVersions :: Lens'
  ListAssociationVersionsResponse
  (Maybe (NonEmpty AssociationVersionInfo))
listAssociationVersionsResponse_associationVersions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssociationVersionsResponse' {Maybe (NonEmpty AssociationVersionInfo)
associationVersions :: Maybe (NonEmpty AssociationVersionInfo)
$sel:associationVersions:ListAssociationVersionsResponse' :: ListAssociationVersionsResponse
-> Maybe (NonEmpty AssociationVersionInfo)
associationVersions} -> Maybe (NonEmpty AssociationVersionInfo)
associationVersions) (\s :: ListAssociationVersionsResponse
s@ListAssociationVersionsResponse' {} Maybe (NonEmpty AssociationVersionInfo)
a -> ListAssociationVersionsResponse
s {$sel:associationVersions:ListAssociationVersionsResponse' :: Maybe (NonEmpty AssociationVersionInfo)
associationVersions = Maybe (NonEmpty AssociationVersionInfo)
a} :: ListAssociationVersionsResponse) 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 token for the next set of items to return. Use this token to get the
-- next set of results.
listAssociationVersionsResponse_nextToken :: Lens.Lens' ListAssociationVersionsResponse (Prelude.Maybe Prelude.Text)
listAssociationVersionsResponse_nextToken :: Lens' ListAssociationVersionsResponse (Maybe Text)
listAssociationVersionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAssociationVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAssociationVersionsResponse' :: ListAssociationVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAssociationVersionsResponse
s@ListAssociationVersionsResponse' {} Maybe Text
a -> ListAssociationVersionsResponse
s {$sel:nextToken:ListAssociationVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAssociationVersionsResponse)

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

instance
  Prelude.NFData
    ListAssociationVersionsResponse
  where
  rnf :: ListAssociationVersionsResponse -> ()
rnf ListAssociationVersionsResponse' {Int
Maybe (NonEmpty AssociationVersionInfo)
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
associationVersions :: Maybe (NonEmpty AssociationVersionInfo)
$sel:httpStatus:ListAssociationVersionsResponse' :: ListAssociationVersionsResponse -> Int
$sel:nextToken:ListAssociationVersionsResponse' :: ListAssociationVersionsResponse -> Maybe Text
$sel:associationVersions:ListAssociationVersionsResponse' :: ListAssociationVersionsResponse
-> Maybe (NonEmpty AssociationVersionInfo)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty AssociationVersionInfo)
associationVersions
      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 Int
httpStatus