{-# 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.GetParameterHistory
-- 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 the history of all changes to a parameter.
--
-- If you change the KMS key alias for the KMS key used to encrypt a
-- parameter, then you must also update the key alias the parameter uses to
-- reference KMS. Otherwise, @GetParameterHistory@ retrieves whatever the
-- original key alias was referencing.
--
-- This operation returns paginated results.
module Amazonka.SSM.GetParameterHistory
  ( -- * Creating a Request
    GetParameterHistory (..),
    newGetParameterHistory,

    -- * Request Lenses
    getParameterHistory_maxResults,
    getParameterHistory_nextToken,
    getParameterHistory_withDecryption,
    getParameterHistory_name,

    -- * Destructuring the Response
    GetParameterHistoryResponse (..),
    newGetParameterHistoryResponse,

    -- * Response Lenses
    getParameterHistoryResponse_nextToken,
    getParameterHistoryResponse_parameters,
    getParameterHistoryResponse_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:/ 'newGetParameterHistory' smart constructor.
data GetParameterHistory = GetParameterHistory'
  { -- | 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.
    GetParameterHistory -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of items to return. (You received this token
    -- from a previous call.)
    GetParameterHistory -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Return decrypted values for secure string parameters. This flag is
    -- ignored for @String@ and @StringList@ parameter types.
    GetParameterHistory -> Maybe Bool
withDecryption :: Prelude.Maybe Prelude.Bool,
    -- | The name of the parameter for which you want to review history.
    GetParameterHistory -> Text
name :: Prelude.Text
  }
  deriving (GetParameterHistory -> GetParameterHistory -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetParameterHistory -> GetParameterHistory -> Bool
$c/= :: GetParameterHistory -> GetParameterHistory -> Bool
== :: GetParameterHistory -> GetParameterHistory -> Bool
$c== :: GetParameterHistory -> GetParameterHistory -> Bool
Prelude.Eq, ReadPrec [GetParameterHistory]
ReadPrec GetParameterHistory
Int -> ReadS GetParameterHistory
ReadS [GetParameterHistory]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetParameterHistory]
$creadListPrec :: ReadPrec [GetParameterHistory]
readPrec :: ReadPrec GetParameterHistory
$creadPrec :: ReadPrec GetParameterHistory
readList :: ReadS [GetParameterHistory]
$creadList :: ReadS [GetParameterHistory]
readsPrec :: Int -> ReadS GetParameterHistory
$creadsPrec :: Int -> ReadS GetParameterHistory
Prelude.Read, Int -> GetParameterHistory -> ShowS
[GetParameterHistory] -> ShowS
GetParameterHistory -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetParameterHistory] -> ShowS
$cshowList :: [GetParameterHistory] -> ShowS
show :: GetParameterHistory -> String
$cshow :: GetParameterHistory -> String
showsPrec :: Int -> GetParameterHistory -> ShowS
$cshowsPrec :: Int -> GetParameterHistory -> ShowS
Prelude.Show, forall x. Rep GetParameterHistory x -> GetParameterHistory
forall x. GetParameterHistory -> Rep GetParameterHistory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetParameterHistory x -> GetParameterHistory
$cfrom :: forall x. GetParameterHistory -> Rep GetParameterHistory x
Prelude.Generic)

-- |
-- Create a value of 'GetParameterHistory' 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', 'getParameterHistory_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', 'getParameterHistory_nextToken' - The token for the next set of items to return. (You received this token
-- from a previous call.)
--
-- 'withDecryption', 'getParameterHistory_withDecryption' - Return decrypted values for secure string parameters. This flag is
-- ignored for @String@ and @StringList@ parameter types.
--
-- 'name', 'getParameterHistory_name' - The name of the parameter for which you want to review history.
newGetParameterHistory ::
  -- | 'name'
  Prelude.Text ->
  GetParameterHistory
newGetParameterHistory :: Text -> GetParameterHistory
newGetParameterHistory Text
pName_ =
  GetParameterHistory'
    { $sel:maxResults:GetParameterHistory' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetParameterHistory' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:withDecryption:GetParameterHistory' :: Maybe Bool
withDecryption = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetParameterHistory' :: Text
name = Text
pName_
    }

-- | 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.
getParameterHistory_maxResults :: Lens.Lens' GetParameterHistory (Prelude.Maybe Prelude.Natural)
getParameterHistory_maxResults :: Lens' GetParameterHistory (Maybe Natural)
getParameterHistory_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetParameterHistory' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetParameterHistory' :: GetParameterHistory -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetParameterHistory
s@GetParameterHistory' {} Maybe Natural
a -> GetParameterHistory
s {$sel:maxResults:GetParameterHistory' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetParameterHistory)

-- | The token for the next set of items to return. (You received this token
-- from a previous call.)
getParameterHistory_nextToken :: Lens.Lens' GetParameterHistory (Prelude.Maybe Prelude.Text)
getParameterHistory_nextToken :: Lens' GetParameterHistory (Maybe Text)
getParameterHistory_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetParameterHistory' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetParameterHistory' :: GetParameterHistory -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetParameterHistory
s@GetParameterHistory' {} Maybe Text
a -> GetParameterHistory
s {$sel:nextToken:GetParameterHistory' :: Maybe Text
nextToken = Maybe Text
a} :: GetParameterHistory)

-- | Return decrypted values for secure string parameters. This flag is
-- ignored for @String@ and @StringList@ parameter types.
getParameterHistory_withDecryption :: Lens.Lens' GetParameterHistory (Prelude.Maybe Prelude.Bool)
getParameterHistory_withDecryption :: Lens' GetParameterHistory (Maybe Bool)
getParameterHistory_withDecryption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetParameterHistory' {Maybe Bool
withDecryption :: Maybe Bool
$sel:withDecryption:GetParameterHistory' :: GetParameterHistory -> Maybe Bool
withDecryption} -> Maybe Bool
withDecryption) (\s :: GetParameterHistory
s@GetParameterHistory' {} Maybe Bool
a -> GetParameterHistory
s {$sel:withDecryption:GetParameterHistory' :: Maybe Bool
withDecryption = Maybe Bool
a} :: GetParameterHistory)

-- | The name of the parameter for which you want to review history.
getParameterHistory_name :: Lens.Lens' GetParameterHistory Prelude.Text
getParameterHistory_name :: Lens' GetParameterHistory Text
getParameterHistory_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetParameterHistory' {Text
name :: Text
$sel:name:GetParameterHistory' :: GetParameterHistory -> Text
name} -> Text
name) (\s :: GetParameterHistory
s@GetParameterHistory' {} Text
a -> GetParameterHistory
s {$sel:name:GetParameterHistory' :: Text
name = Text
a} :: GetParameterHistory)

instance Core.AWSPager GetParameterHistory where
  page :: GetParameterHistory
-> AWSResponse GetParameterHistory -> Maybe GetParameterHistory
page GetParameterHistory
rq AWSResponse GetParameterHistory
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetParameterHistory
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetParameterHistoryResponse (Maybe Text)
getParameterHistoryResponse_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 GetParameterHistory
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetParameterHistoryResponse (Maybe [ParameterHistory])
getParameterHistoryResponse_parameters
            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.$ GetParameterHistory
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetParameterHistory (Maybe Text)
getParameterHistory_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetParameterHistory
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetParameterHistoryResponse (Maybe Text)
getParameterHistoryResponse_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 GetParameterHistory where
  type
    AWSResponse GetParameterHistory =
      GetParameterHistoryResponse
  request :: (Service -> Service)
-> GetParameterHistory -> Request GetParameterHistory
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 GetParameterHistory
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetParameterHistory)))
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 [ParameterHistory] -> Int -> GetParameterHistoryResponse
GetParameterHistoryResponse'
            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
"Parameters" 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 GetParameterHistory where
  hashWithSalt :: Int -> GetParameterHistory -> Int
hashWithSalt Int
_salt GetParameterHistory' {Maybe Bool
Maybe Natural
Maybe Text
Text
name :: Text
withDecryption :: Maybe Bool
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:GetParameterHistory' :: GetParameterHistory -> Text
$sel:withDecryption:GetParameterHistory' :: GetParameterHistory -> Maybe Bool
$sel:nextToken:GetParameterHistory' :: GetParameterHistory -> Maybe Text
$sel:maxResults:GetParameterHistory' :: GetParameterHistory -> 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` Maybe Bool
withDecryption
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData GetParameterHistory where
  rnf :: GetParameterHistory -> ()
rnf GetParameterHistory' {Maybe Bool
Maybe Natural
Maybe Text
Text
name :: Text
withDecryption :: Maybe Bool
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:GetParameterHistory' :: GetParameterHistory -> Text
$sel:withDecryption:GetParameterHistory' :: GetParameterHistory -> Maybe Bool
$sel:nextToken:GetParameterHistory' :: GetParameterHistory -> Maybe Text
$sel:maxResults:GetParameterHistory' :: GetParameterHistory -> 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 Maybe Bool
withDecryption
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders GetParameterHistory where
  toHeaders :: GetParameterHistory -> 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.GetParameterHistory" ::
                          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 GetParameterHistory where
  toJSON :: GetParameterHistory -> Value
toJSON GetParameterHistory' {Maybe Bool
Maybe Natural
Maybe Text
Text
name :: Text
withDecryption :: Maybe Bool
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:GetParameterHistory' :: GetParameterHistory -> Text
$sel:withDecryption:GetParameterHistory' :: GetParameterHistory -> Maybe Bool
$sel:nextToken:GetParameterHistory' :: GetParameterHistory -> Maybe Text
$sel:maxResults:GetParameterHistory' :: GetParameterHistory -> 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,
            (Key
"WithDecryption" 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 Bool
withDecryption,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
          ]
      )

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

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

-- | /See:/ 'newGetParameterHistoryResponse' smart constructor.
data GetParameterHistoryResponse = GetParameterHistoryResponse'
  { -- | The token to use when requesting the next set of items. If there are no
    -- additional items to return, the string is empty.
    GetParameterHistoryResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of parameters returned by the request.
    GetParameterHistoryResponse -> Maybe [ParameterHistory]
parameters :: Prelude.Maybe [ParameterHistory],
    -- | The response's http status code.
    GetParameterHistoryResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetParameterHistoryResponse -> GetParameterHistoryResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetParameterHistoryResponse -> GetParameterHistoryResponse -> Bool
$c/= :: GetParameterHistoryResponse -> GetParameterHistoryResponse -> Bool
== :: GetParameterHistoryResponse -> GetParameterHistoryResponse -> Bool
$c== :: GetParameterHistoryResponse -> GetParameterHistoryResponse -> Bool
Prelude.Eq, Int -> GetParameterHistoryResponse -> ShowS
[GetParameterHistoryResponse] -> ShowS
GetParameterHistoryResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetParameterHistoryResponse] -> ShowS
$cshowList :: [GetParameterHistoryResponse] -> ShowS
show :: GetParameterHistoryResponse -> String
$cshow :: GetParameterHistoryResponse -> String
showsPrec :: Int -> GetParameterHistoryResponse -> ShowS
$cshowsPrec :: Int -> GetParameterHistoryResponse -> ShowS
Prelude.Show, forall x.
Rep GetParameterHistoryResponse x -> GetParameterHistoryResponse
forall x.
GetParameterHistoryResponse -> Rep GetParameterHistoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetParameterHistoryResponse x -> GetParameterHistoryResponse
$cfrom :: forall x.
GetParameterHistoryResponse -> Rep GetParameterHistoryResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetParameterHistoryResponse' 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', 'getParameterHistoryResponse_nextToken' - The token to use when requesting the next set of items. If there are no
-- additional items to return, the string is empty.
--
-- 'parameters', 'getParameterHistoryResponse_parameters' - A list of parameters returned by the request.
--
-- 'httpStatus', 'getParameterHistoryResponse_httpStatus' - The response's http status code.
newGetParameterHistoryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetParameterHistoryResponse
newGetParameterHistoryResponse :: Int -> GetParameterHistoryResponse
newGetParameterHistoryResponse Int
pHttpStatus_ =
  GetParameterHistoryResponse'
    { $sel:nextToken:GetParameterHistoryResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:GetParameterHistoryResponse' :: Maybe [ParameterHistory]
parameters = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetParameterHistoryResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to use when requesting the next set of items. If there are no
-- additional items to return, the string is empty.
getParameterHistoryResponse_nextToken :: Lens.Lens' GetParameterHistoryResponse (Prelude.Maybe Prelude.Text)
getParameterHistoryResponse_nextToken :: Lens' GetParameterHistoryResponse (Maybe Text)
getParameterHistoryResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetParameterHistoryResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetParameterHistoryResponse' :: GetParameterHistoryResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetParameterHistoryResponse
s@GetParameterHistoryResponse' {} Maybe Text
a -> GetParameterHistoryResponse
s {$sel:nextToken:GetParameterHistoryResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetParameterHistoryResponse)

-- | A list of parameters returned by the request.
getParameterHistoryResponse_parameters :: Lens.Lens' GetParameterHistoryResponse (Prelude.Maybe [ParameterHistory])
getParameterHistoryResponse_parameters :: Lens' GetParameterHistoryResponse (Maybe [ParameterHistory])
getParameterHistoryResponse_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetParameterHistoryResponse' {Maybe [ParameterHistory]
parameters :: Maybe [ParameterHistory]
$sel:parameters:GetParameterHistoryResponse' :: GetParameterHistoryResponse -> Maybe [ParameterHistory]
parameters} -> Maybe [ParameterHistory]
parameters) (\s :: GetParameterHistoryResponse
s@GetParameterHistoryResponse' {} Maybe [ParameterHistory]
a -> GetParameterHistoryResponse
s {$sel:parameters:GetParameterHistoryResponse' :: Maybe [ParameterHistory]
parameters = Maybe [ParameterHistory]
a} :: GetParameterHistoryResponse) 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.
getParameterHistoryResponse_httpStatus :: Lens.Lens' GetParameterHistoryResponse Prelude.Int
getParameterHistoryResponse_httpStatus :: Lens' GetParameterHistoryResponse Int
getParameterHistoryResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetParameterHistoryResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetParameterHistoryResponse' :: GetParameterHistoryResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetParameterHistoryResponse
s@GetParameterHistoryResponse' {} Int
a -> GetParameterHistoryResponse
s {$sel:httpStatus:GetParameterHistoryResponse' :: Int
httpStatus = Int
a} :: GetParameterHistoryResponse)

instance Prelude.NFData GetParameterHistoryResponse where
  rnf :: GetParameterHistoryResponse -> ()
rnf GetParameterHistoryResponse' {Int
Maybe [ParameterHistory]
Maybe Text
httpStatus :: Int
parameters :: Maybe [ParameterHistory]
nextToken :: Maybe Text
$sel:httpStatus:GetParameterHistoryResponse' :: GetParameterHistoryResponse -> Int
$sel:parameters:GetParameterHistoryResponse' :: GetParameterHistoryResponse -> Maybe [ParameterHistory]
$sel:nextToken:GetParameterHistoryResponse' :: GetParameterHistoryResponse -> 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 [ParameterHistory]
parameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus