{-# 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.OpenSearch.GetPackageVersionHistory
-- 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 a list of package versions, along with their creation time and
-- commit message.
module Amazonka.OpenSearch.GetPackageVersionHistory
  ( -- * Creating a Request
    GetPackageVersionHistory (..),
    newGetPackageVersionHistory,

    -- * Request Lenses
    getPackageVersionHistory_nextToken,
    getPackageVersionHistory_maxResults,
    getPackageVersionHistory_packageID,

    -- * Destructuring the Response
    GetPackageVersionHistoryResponse (..),
    newGetPackageVersionHistoryResponse,

    -- * Response Lenses
    getPackageVersionHistoryResponse_packageID,
    getPackageVersionHistoryResponse_packageVersionHistoryList,
    getPackageVersionHistoryResponse_nextToken,
    getPackageVersionHistoryResponse_httpStatus,
  )
where

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

-- | Container for the request parameters to the @ GetPackageVersionHistory @
-- operation.
--
-- /See:/ 'newGetPackageVersionHistory' smart constructor.
data GetPackageVersionHistory = GetPackageVersionHistory'
  { -- | Used for pagination. Only necessary if a previous API call includes a
    -- non-null NextToken value. If provided, returns results for the next
    -- page.
    GetPackageVersionHistory -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Limits results to a maximum number of package versions.
    GetPackageVersionHistory -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | Returns an audit history of package versions.
    GetPackageVersionHistory -> Text
packageID :: Prelude.Text
  }
  deriving (GetPackageVersionHistory -> GetPackageVersionHistory -> Bool
(GetPackageVersionHistory -> GetPackageVersionHistory -> Bool)
-> (GetPackageVersionHistory -> GetPackageVersionHistory -> Bool)
-> Eq GetPackageVersionHistory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPackageVersionHistory -> GetPackageVersionHistory -> Bool
$c/= :: GetPackageVersionHistory -> GetPackageVersionHistory -> Bool
== :: GetPackageVersionHistory -> GetPackageVersionHistory -> Bool
$c== :: GetPackageVersionHistory -> GetPackageVersionHistory -> Bool
Prelude.Eq, ReadPrec [GetPackageVersionHistory]
ReadPrec GetPackageVersionHistory
Int -> ReadS GetPackageVersionHistory
ReadS [GetPackageVersionHistory]
(Int -> ReadS GetPackageVersionHistory)
-> ReadS [GetPackageVersionHistory]
-> ReadPrec GetPackageVersionHistory
-> ReadPrec [GetPackageVersionHistory]
-> Read GetPackageVersionHistory
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPackageVersionHistory]
$creadListPrec :: ReadPrec [GetPackageVersionHistory]
readPrec :: ReadPrec GetPackageVersionHistory
$creadPrec :: ReadPrec GetPackageVersionHistory
readList :: ReadS [GetPackageVersionHistory]
$creadList :: ReadS [GetPackageVersionHistory]
readsPrec :: Int -> ReadS GetPackageVersionHistory
$creadsPrec :: Int -> ReadS GetPackageVersionHistory
Prelude.Read, Int -> GetPackageVersionHistory -> ShowS
[GetPackageVersionHistory] -> ShowS
GetPackageVersionHistory -> String
(Int -> GetPackageVersionHistory -> ShowS)
-> (GetPackageVersionHistory -> String)
-> ([GetPackageVersionHistory] -> ShowS)
-> Show GetPackageVersionHistory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPackageVersionHistory] -> ShowS
$cshowList :: [GetPackageVersionHistory] -> ShowS
show :: GetPackageVersionHistory -> String
$cshow :: GetPackageVersionHistory -> String
showsPrec :: Int -> GetPackageVersionHistory -> ShowS
$cshowsPrec :: Int -> GetPackageVersionHistory -> ShowS
Prelude.Show, (forall x.
 GetPackageVersionHistory -> Rep GetPackageVersionHistory x)
-> (forall x.
    Rep GetPackageVersionHistory x -> GetPackageVersionHistory)
-> Generic GetPackageVersionHistory
forall x.
Rep GetPackageVersionHistory x -> GetPackageVersionHistory
forall x.
GetPackageVersionHistory -> Rep GetPackageVersionHistory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetPackageVersionHistory x -> GetPackageVersionHistory
$cfrom :: forall x.
GetPackageVersionHistory -> Rep GetPackageVersionHistory x
Prelude.Generic)

-- |
-- Create a value of 'GetPackageVersionHistory' 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', 'getPackageVersionHistory_nextToken' - Used for pagination. Only necessary if a previous API call includes a
-- non-null NextToken value. If provided, returns results for the next
-- page.
--
-- 'maxResults', 'getPackageVersionHistory_maxResults' - Limits results to a maximum number of package versions.
--
-- 'packageID', 'getPackageVersionHistory_packageID' - Returns an audit history of package versions.
newGetPackageVersionHistory ::
  -- | 'packageID'
  Prelude.Text ->
  GetPackageVersionHistory
newGetPackageVersionHistory :: Text -> GetPackageVersionHistory
newGetPackageVersionHistory Text
pPackageID_ =
  GetPackageVersionHistory' :: Maybe Text -> Maybe Int -> Text -> GetPackageVersionHistory
GetPackageVersionHistory'
    { $sel:nextToken:GetPackageVersionHistory' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetPackageVersionHistory' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:packageID:GetPackageVersionHistory' :: Text
packageID = Text
pPackageID_
    }

-- | Used for pagination. Only necessary if a previous API call includes a
-- non-null NextToken value. If provided, returns results for the next
-- page.
getPackageVersionHistory_nextToken :: Lens.Lens' GetPackageVersionHistory (Prelude.Maybe Prelude.Text)
getPackageVersionHistory_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetPackageVersionHistory -> f GetPackageVersionHistory
getPackageVersionHistory_nextToken = (GetPackageVersionHistory -> Maybe Text)
-> (GetPackageVersionHistory
    -> Maybe Text -> GetPackageVersionHistory)
-> Lens
     GetPackageVersionHistory
     GetPackageVersionHistory
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionHistory' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetPackageVersionHistory' :: GetPackageVersionHistory -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetPackageVersionHistory
s@GetPackageVersionHistory' {} Maybe Text
a -> GetPackageVersionHistory
s {$sel:nextToken:GetPackageVersionHistory' :: Maybe Text
nextToken = Maybe Text
a} :: GetPackageVersionHistory)

-- | Limits results to a maximum number of package versions.
getPackageVersionHistory_maxResults :: Lens.Lens' GetPackageVersionHistory (Prelude.Maybe Prelude.Int)
getPackageVersionHistory_maxResults :: (Maybe Int -> f (Maybe Int))
-> GetPackageVersionHistory -> f GetPackageVersionHistory
getPackageVersionHistory_maxResults = (GetPackageVersionHistory -> Maybe Int)
-> (GetPackageVersionHistory
    -> Maybe Int -> GetPackageVersionHistory)
-> Lens
     GetPackageVersionHistory
     GetPackageVersionHistory
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionHistory' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:GetPackageVersionHistory' :: GetPackageVersionHistory -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: GetPackageVersionHistory
s@GetPackageVersionHistory' {} Maybe Int
a -> GetPackageVersionHistory
s {$sel:maxResults:GetPackageVersionHistory' :: Maybe Int
maxResults = Maybe Int
a} :: GetPackageVersionHistory)

-- | Returns an audit history of package versions.
getPackageVersionHistory_packageID :: Lens.Lens' GetPackageVersionHistory Prelude.Text
getPackageVersionHistory_packageID :: (Text -> f Text)
-> GetPackageVersionHistory -> f GetPackageVersionHistory
getPackageVersionHistory_packageID = (GetPackageVersionHistory -> Text)
-> (GetPackageVersionHistory -> Text -> GetPackageVersionHistory)
-> Lens GetPackageVersionHistory GetPackageVersionHistory Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionHistory' {Text
packageID :: Text
$sel:packageID:GetPackageVersionHistory' :: GetPackageVersionHistory -> Text
packageID} -> Text
packageID) (\s :: GetPackageVersionHistory
s@GetPackageVersionHistory' {} Text
a -> GetPackageVersionHistory
s {$sel:packageID:GetPackageVersionHistory' :: Text
packageID = Text
a} :: GetPackageVersionHistory)

instance Core.AWSRequest GetPackageVersionHistory where
  type
    AWSResponse GetPackageVersionHistory =
      GetPackageVersionHistoryResponse
  request :: GetPackageVersionHistory -> Request GetPackageVersionHistory
request = Service
-> GetPackageVersionHistory -> Request GetPackageVersionHistory
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetPackageVersionHistory
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetPackageVersionHistory)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetPackageVersionHistory))
-> Logger
-> Service
-> Proxy GetPackageVersionHistory
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetPackageVersionHistory)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [PackageVersionHistory]
-> Maybe Text
-> Int
-> GetPackageVersionHistoryResponse
GetPackageVersionHistoryResponse'
            (Maybe Text
 -> Maybe [PackageVersionHistory]
 -> Maybe Text
 -> Int
 -> GetPackageVersionHistoryResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [PackageVersionHistory]
      -> Maybe Text -> Int -> GetPackageVersionHistoryResponse)
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
"PackageID")
            Either
  String
  (Maybe [PackageVersionHistory]
   -> Maybe Text -> Int -> GetPackageVersionHistoryResponse)
-> Either String (Maybe [PackageVersionHistory])
-> Either
     String (Maybe Text -> Int -> GetPackageVersionHistoryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [PackageVersionHistory]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PackageVersionHistoryList"
                            Either String (Maybe (Maybe [PackageVersionHistory]))
-> Maybe [PackageVersionHistory]
-> Either String (Maybe [PackageVersionHistory])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [PackageVersionHistory]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe Text -> Int -> GetPackageVersionHistoryResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetPackageVersionHistoryResponse)
forall (f :: * -> *) a b. Applicative f => 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 -> GetPackageVersionHistoryResponse)
-> Either String Int
-> Either String GetPackageVersionHistoryResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetPackageVersionHistory

instance Prelude.NFData GetPackageVersionHistory

instance Core.ToHeaders GetPackageVersionHistory where
  toHeaders :: GetPackageVersionHistory -> ResponseHeaders
toHeaders = ResponseHeaders -> GetPackageVersionHistory -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath GetPackageVersionHistory where
  toPath :: GetPackageVersionHistory -> ByteString
toPath GetPackageVersionHistory' {Maybe Int
Maybe Text
Text
packageID :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:packageID:GetPackageVersionHistory' :: GetPackageVersionHistory -> Text
$sel:maxResults:GetPackageVersionHistory' :: GetPackageVersionHistory -> Maybe Int
$sel:nextToken:GetPackageVersionHistory' :: GetPackageVersionHistory -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2021-01-01/packages/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
packageID,
        ByteString
"/history"
      ]

instance Core.ToQuery GetPackageVersionHistory where
  toQuery :: GetPackageVersionHistory -> QueryString
toQuery GetPackageVersionHistory' {Maybe Int
Maybe Text
Text
packageID :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:packageID:GetPackageVersionHistory' :: GetPackageVersionHistory -> Text
$sel:maxResults:GetPackageVersionHistory' :: GetPackageVersionHistory -> Maybe Int
$sel:nextToken:GetPackageVersionHistory' :: GetPackageVersionHistory -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxResults
      ]

-- | Container for response returned by @ GetPackageVersionHistory @
-- operation.
--
-- /See:/ 'newGetPackageVersionHistoryResponse' smart constructor.
data GetPackageVersionHistoryResponse = GetPackageVersionHistoryResponse'
  { GetPackageVersionHistoryResponse -> Maybe Text
packageID :: Prelude.Maybe Prelude.Text,
    -- | List of @PackageVersionHistory@ objects.
    GetPackageVersionHistoryResponse -> Maybe [PackageVersionHistory]
packageVersionHistoryList :: Prelude.Maybe [PackageVersionHistory],
    GetPackageVersionHistoryResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetPackageVersionHistoryResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetPackageVersionHistoryResponse
-> GetPackageVersionHistoryResponse -> Bool
(GetPackageVersionHistoryResponse
 -> GetPackageVersionHistoryResponse -> Bool)
-> (GetPackageVersionHistoryResponse
    -> GetPackageVersionHistoryResponse -> Bool)
-> Eq GetPackageVersionHistoryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPackageVersionHistoryResponse
-> GetPackageVersionHistoryResponse -> Bool
$c/= :: GetPackageVersionHistoryResponse
-> GetPackageVersionHistoryResponse -> Bool
== :: GetPackageVersionHistoryResponse
-> GetPackageVersionHistoryResponse -> Bool
$c== :: GetPackageVersionHistoryResponse
-> GetPackageVersionHistoryResponse -> Bool
Prelude.Eq, ReadPrec [GetPackageVersionHistoryResponse]
ReadPrec GetPackageVersionHistoryResponse
Int -> ReadS GetPackageVersionHistoryResponse
ReadS [GetPackageVersionHistoryResponse]
(Int -> ReadS GetPackageVersionHistoryResponse)
-> ReadS [GetPackageVersionHistoryResponse]
-> ReadPrec GetPackageVersionHistoryResponse
-> ReadPrec [GetPackageVersionHistoryResponse]
-> Read GetPackageVersionHistoryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPackageVersionHistoryResponse]
$creadListPrec :: ReadPrec [GetPackageVersionHistoryResponse]
readPrec :: ReadPrec GetPackageVersionHistoryResponse
$creadPrec :: ReadPrec GetPackageVersionHistoryResponse
readList :: ReadS [GetPackageVersionHistoryResponse]
$creadList :: ReadS [GetPackageVersionHistoryResponse]
readsPrec :: Int -> ReadS GetPackageVersionHistoryResponse
$creadsPrec :: Int -> ReadS GetPackageVersionHistoryResponse
Prelude.Read, Int -> GetPackageVersionHistoryResponse -> ShowS
[GetPackageVersionHistoryResponse] -> ShowS
GetPackageVersionHistoryResponse -> String
(Int -> GetPackageVersionHistoryResponse -> ShowS)
-> (GetPackageVersionHistoryResponse -> String)
-> ([GetPackageVersionHistoryResponse] -> ShowS)
-> Show GetPackageVersionHistoryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPackageVersionHistoryResponse] -> ShowS
$cshowList :: [GetPackageVersionHistoryResponse] -> ShowS
show :: GetPackageVersionHistoryResponse -> String
$cshow :: GetPackageVersionHistoryResponse -> String
showsPrec :: Int -> GetPackageVersionHistoryResponse -> ShowS
$cshowsPrec :: Int -> GetPackageVersionHistoryResponse -> ShowS
Prelude.Show, (forall x.
 GetPackageVersionHistoryResponse
 -> Rep GetPackageVersionHistoryResponse x)
-> (forall x.
    Rep GetPackageVersionHistoryResponse x
    -> GetPackageVersionHistoryResponse)
-> Generic GetPackageVersionHistoryResponse
forall x.
Rep GetPackageVersionHistoryResponse x
-> GetPackageVersionHistoryResponse
forall x.
GetPackageVersionHistoryResponse
-> Rep GetPackageVersionHistoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetPackageVersionHistoryResponse x
-> GetPackageVersionHistoryResponse
$cfrom :: forall x.
GetPackageVersionHistoryResponse
-> Rep GetPackageVersionHistoryResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetPackageVersionHistoryResponse' 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:
--
-- 'packageID', 'getPackageVersionHistoryResponse_packageID' - Undocumented member.
--
-- 'packageVersionHistoryList', 'getPackageVersionHistoryResponse_packageVersionHistoryList' - List of @PackageVersionHistory@ objects.
--
-- 'nextToken', 'getPackageVersionHistoryResponse_nextToken' - Undocumented member.
--
-- 'httpStatus', 'getPackageVersionHistoryResponse_httpStatus' - The response's http status code.
newGetPackageVersionHistoryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetPackageVersionHistoryResponse
newGetPackageVersionHistoryResponse :: Int -> GetPackageVersionHistoryResponse
newGetPackageVersionHistoryResponse Int
pHttpStatus_ =
  GetPackageVersionHistoryResponse' :: Maybe Text
-> Maybe [PackageVersionHistory]
-> Maybe Text
-> Int
-> GetPackageVersionHistoryResponse
GetPackageVersionHistoryResponse'
    { $sel:packageID:GetPackageVersionHistoryResponse' :: Maybe Text
packageID =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:packageVersionHistoryList:GetPackageVersionHistoryResponse' :: Maybe [PackageVersionHistory]
packageVersionHistoryList =
        Maybe [PackageVersionHistory]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetPackageVersionHistoryResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetPackageVersionHistoryResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
getPackageVersionHistoryResponse_packageID :: Lens.Lens' GetPackageVersionHistoryResponse (Prelude.Maybe Prelude.Text)
getPackageVersionHistoryResponse_packageID :: (Maybe Text -> f (Maybe Text))
-> GetPackageVersionHistoryResponse
-> f GetPackageVersionHistoryResponse
getPackageVersionHistoryResponse_packageID = (GetPackageVersionHistoryResponse -> Maybe Text)
-> (GetPackageVersionHistoryResponse
    -> Maybe Text -> GetPackageVersionHistoryResponse)
-> Lens
     GetPackageVersionHistoryResponse
     GetPackageVersionHistoryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionHistoryResponse' {Maybe Text
packageID :: Maybe Text
$sel:packageID:GetPackageVersionHistoryResponse' :: GetPackageVersionHistoryResponse -> Maybe Text
packageID} -> Maybe Text
packageID) (\s :: GetPackageVersionHistoryResponse
s@GetPackageVersionHistoryResponse' {} Maybe Text
a -> GetPackageVersionHistoryResponse
s {$sel:packageID:GetPackageVersionHistoryResponse' :: Maybe Text
packageID = Maybe Text
a} :: GetPackageVersionHistoryResponse)

-- | List of @PackageVersionHistory@ objects.
getPackageVersionHistoryResponse_packageVersionHistoryList :: Lens.Lens' GetPackageVersionHistoryResponse (Prelude.Maybe [PackageVersionHistory])
getPackageVersionHistoryResponse_packageVersionHistoryList :: (Maybe [PackageVersionHistory]
 -> f (Maybe [PackageVersionHistory]))
-> GetPackageVersionHistoryResponse
-> f GetPackageVersionHistoryResponse
getPackageVersionHistoryResponse_packageVersionHistoryList = (GetPackageVersionHistoryResponse -> Maybe [PackageVersionHistory])
-> (GetPackageVersionHistoryResponse
    -> Maybe [PackageVersionHistory]
    -> GetPackageVersionHistoryResponse)
-> Lens
     GetPackageVersionHistoryResponse
     GetPackageVersionHistoryResponse
     (Maybe [PackageVersionHistory])
     (Maybe [PackageVersionHistory])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionHistoryResponse' {Maybe [PackageVersionHistory]
packageVersionHistoryList :: Maybe [PackageVersionHistory]
$sel:packageVersionHistoryList:GetPackageVersionHistoryResponse' :: GetPackageVersionHistoryResponse -> Maybe [PackageVersionHistory]
packageVersionHistoryList} -> Maybe [PackageVersionHistory]
packageVersionHistoryList) (\s :: GetPackageVersionHistoryResponse
s@GetPackageVersionHistoryResponse' {} Maybe [PackageVersionHistory]
a -> GetPackageVersionHistoryResponse
s {$sel:packageVersionHistoryList:GetPackageVersionHistoryResponse' :: Maybe [PackageVersionHistory]
packageVersionHistoryList = Maybe [PackageVersionHistory]
a} :: GetPackageVersionHistoryResponse) ((Maybe [PackageVersionHistory]
  -> f (Maybe [PackageVersionHistory]))
 -> GetPackageVersionHistoryResponse
 -> f GetPackageVersionHistoryResponse)
-> ((Maybe [PackageVersionHistory]
     -> f (Maybe [PackageVersionHistory]))
    -> Maybe [PackageVersionHistory]
    -> f (Maybe [PackageVersionHistory]))
-> (Maybe [PackageVersionHistory]
    -> f (Maybe [PackageVersionHistory]))
-> GetPackageVersionHistoryResponse
-> f GetPackageVersionHistoryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PackageVersionHistory]
  [PackageVersionHistory]
  [PackageVersionHistory]
  [PackageVersionHistory]
-> Iso
     (Maybe [PackageVersionHistory])
     (Maybe [PackageVersionHistory])
     (Maybe [PackageVersionHistory])
     (Maybe [PackageVersionHistory])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [PackageVersionHistory]
  [PackageVersionHistory]
  [PackageVersionHistory]
  [PackageVersionHistory]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
getPackageVersionHistoryResponse_nextToken :: Lens.Lens' GetPackageVersionHistoryResponse (Prelude.Maybe Prelude.Text)
getPackageVersionHistoryResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetPackageVersionHistoryResponse
-> f GetPackageVersionHistoryResponse
getPackageVersionHistoryResponse_nextToken = (GetPackageVersionHistoryResponse -> Maybe Text)
-> (GetPackageVersionHistoryResponse
    -> Maybe Text -> GetPackageVersionHistoryResponse)
-> Lens
     GetPackageVersionHistoryResponse
     GetPackageVersionHistoryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionHistoryResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetPackageVersionHistoryResponse' :: GetPackageVersionHistoryResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetPackageVersionHistoryResponse
s@GetPackageVersionHistoryResponse' {} Maybe Text
a -> GetPackageVersionHistoryResponse
s {$sel:nextToken:GetPackageVersionHistoryResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetPackageVersionHistoryResponse)

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

instance
  Prelude.NFData
    GetPackageVersionHistoryResponse