{-# 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.ListDocumentMetadataHistory
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Information about approval reviews for a version of a change template in
-- Change Manager.
module Amazonka.SSM.ListDocumentMetadataHistory
  ( -- * Creating a Request
    ListDocumentMetadataHistory (..),
    newListDocumentMetadataHistory,

    -- * Request Lenses
    listDocumentMetadataHistory_documentVersion,
    listDocumentMetadataHistory_maxResults,
    listDocumentMetadataHistory_nextToken,
    listDocumentMetadataHistory_name,
    listDocumentMetadataHistory_metadata,

    -- * Destructuring the Response
    ListDocumentMetadataHistoryResponse (..),
    newListDocumentMetadataHistoryResponse,

    -- * Response Lenses
    listDocumentMetadataHistoryResponse_author,
    listDocumentMetadataHistoryResponse_documentVersion,
    listDocumentMetadataHistoryResponse_metadata,
    listDocumentMetadataHistoryResponse_name,
    listDocumentMetadataHistoryResponse_nextToken,
    listDocumentMetadataHistoryResponse_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:/ 'newListDocumentMetadataHistory' smart constructor.
data ListDocumentMetadataHistory = ListDocumentMetadataHistory'
  { -- | The version of the change template.
    ListDocumentMetadataHistory -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
    -- | 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.
    ListDocumentMetadataHistory -> 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.)
    ListDocumentMetadataHistory -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the change template.
    ListDocumentMetadataHistory -> Text
name :: Prelude.Text,
    -- | The type of data for which details are being requested. Currently, the
    -- only supported value is @DocumentReviews@.
    ListDocumentMetadataHistory -> DocumentMetadataEnum
metadata :: DocumentMetadataEnum
  }
  deriving (ListDocumentMetadataHistory -> ListDocumentMetadataHistory -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDocumentMetadataHistory -> ListDocumentMetadataHistory -> Bool
$c/= :: ListDocumentMetadataHistory -> ListDocumentMetadataHistory -> Bool
== :: ListDocumentMetadataHistory -> ListDocumentMetadataHistory -> Bool
$c== :: ListDocumentMetadataHistory -> ListDocumentMetadataHistory -> Bool
Prelude.Eq, ReadPrec [ListDocumentMetadataHistory]
ReadPrec ListDocumentMetadataHistory
Int -> ReadS ListDocumentMetadataHistory
ReadS [ListDocumentMetadataHistory]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDocumentMetadataHistory]
$creadListPrec :: ReadPrec [ListDocumentMetadataHistory]
readPrec :: ReadPrec ListDocumentMetadataHistory
$creadPrec :: ReadPrec ListDocumentMetadataHistory
readList :: ReadS [ListDocumentMetadataHistory]
$creadList :: ReadS [ListDocumentMetadataHistory]
readsPrec :: Int -> ReadS ListDocumentMetadataHistory
$creadsPrec :: Int -> ReadS ListDocumentMetadataHistory
Prelude.Read, Int -> ListDocumentMetadataHistory -> ShowS
[ListDocumentMetadataHistory] -> ShowS
ListDocumentMetadataHistory -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDocumentMetadataHistory] -> ShowS
$cshowList :: [ListDocumentMetadataHistory] -> ShowS
show :: ListDocumentMetadataHistory -> String
$cshow :: ListDocumentMetadataHistory -> String
showsPrec :: Int -> ListDocumentMetadataHistory -> ShowS
$cshowsPrec :: Int -> ListDocumentMetadataHistory -> ShowS
Prelude.Show, forall x.
Rep ListDocumentMetadataHistory x -> ListDocumentMetadataHistory
forall x.
ListDocumentMetadataHistory -> Rep ListDocumentMetadataHistory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDocumentMetadataHistory x -> ListDocumentMetadataHistory
$cfrom :: forall x.
ListDocumentMetadataHistory -> Rep ListDocumentMetadataHistory x
Prelude.Generic)

-- |
-- Create a value of 'ListDocumentMetadataHistory' 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:
--
-- 'documentVersion', 'listDocumentMetadataHistory_documentVersion' - The version of the change template.
--
-- 'maxResults', 'listDocumentMetadataHistory_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', 'listDocumentMetadataHistory_nextToken' - The token for the next set of items to return. (You received this token
-- from a previous call.)
--
-- 'name', 'listDocumentMetadataHistory_name' - The name of the change template.
--
-- 'metadata', 'listDocumentMetadataHistory_metadata' - The type of data for which details are being requested. Currently, the
-- only supported value is @DocumentReviews@.
newListDocumentMetadataHistory ::
  -- | 'name'
  Prelude.Text ->
  -- | 'metadata'
  DocumentMetadataEnum ->
  ListDocumentMetadataHistory
newListDocumentMetadataHistory :: Text -> DocumentMetadataEnum -> ListDocumentMetadataHistory
newListDocumentMetadataHistory Text
pName_ DocumentMetadataEnum
pMetadata_ =
  ListDocumentMetadataHistory'
    { $sel:documentVersion:ListDocumentMetadataHistory' :: Maybe Text
documentVersion =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListDocumentMetadataHistory' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDocumentMetadataHistory' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:name:ListDocumentMetadataHistory' :: Text
name = Text
pName_,
      $sel:metadata:ListDocumentMetadataHistory' :: DocumentMetadataEnum
metadata = DocumentMetadataEnum
pMetadata_
    }

-- | The version of the change template.
listDocumentMetadataHistory_documentVersion :: Lens.Lens' ListDocumentMetadataHistory (Prelude.Maybe Prelude.Text)
listDocumentMetadataHistory_documentVersion :: Lens' ListDocumentMetadataHistory (Maybe Text)
listDocumentMetadataHistory_documentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentMetadataHistory' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: ListDocumentMetadataHistory
s@ListDocumentMetadataHistory' {} Maybe Text
a -> ListDocumentMetadataHistory
s {$sel:documentVersion:ListDocumentMetadataHistory' :: Maybe Text
documentVersion = Maybe Text
a} :: ListDocumentMetadataHistory)

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

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

-- | The name of the change template.
listDocumentMetadataHistory_name :: Lens.Lens' ListDocumentMetadataHistory Prelude.Text
listDocumentMetadataHistory_name :: Lens' ListDocumentMetadataHistory Text
listDocumentMetadataHistory_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentMetadataHistory' {Text
name :: Text
$sel:name:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> Text
name} -> Text
name) (\s :: ListDocumentMetadataHistory
s@ListDocumentMetadataHistory' {} Text
a -> ListDocumentMetadataHistory
s {$sel:name:ListDocumentMetadataHistory' :: Text
name = Text
a} :: ListDocumentMetadataHistory)

-- | The type of data for which details are being requested. Currently, the
-- only supported value is @DocumentReviews@.
listDocumentMetadataHistory_metadata :: Lens.Lens' ListDocumentMetadataHistory DocumentMetadataEnum
listDocumentMetadataHistory_metadata :: Lens' ListDocumentMetadataHistory DocumentMetadataEnum
listDocumentMetadataHistory_metadata = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentMetadataHistory' {DocumentMetadataEnum
metadata :: DocumentMetadataEnum
$sel:metadata:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> DocumentMetadataEnum
metadata} -> DocumentMetadataEnum
metadata) (\s :: ListDocumentMetadataHistory
s@ListDocumentMetadataHistory' {} DocumentMetadataEnum
a -> ListDocumentMetadataHistory
s {$sel:metadata:ListDocumentMetadataHistory' :: DocumentMetadataEnum
metadata = DocumentMetadataEnum
a} :: ListDocumentMetadataHistory)

instance Core.AWSRequest ListDocumentMetadataHistory where
  type
    AWSResponse ListDocumentMetadataHistory =
      ListDocumentMetadataHistoryResponse
  request :: (Service -> Service)
-> ListDocumentMetadataHistory
-> Request ListDocumentMetadataHistory
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 ListDocumentMetadataHistory
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDocumentMetadataHistory)))
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
-> Maybe DocumentMetadataResponseInfo
-> Maybe Text
-> Maybe Text
-> Int
-> ListDocumentMetadataHistoryResponse
ListDocumentMetadataHistoryResponse'
            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
"Author")
            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
"DocumentVersion")
            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
"Metadata")
            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
"Name")
            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 ListDocumentMetadataHistory where
  hashWithSalt :: Int -> ListDocumentMetadataHistory -> Int
hashWithSalt Int
_salt ListDocumentMetadataHistory' {Maybe Natural
Maybe Text
Text
DocumentMetadataEnum
metadata :: DocumentMetadataEnum
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
documentVersion :: Maybe Text
$sel:metadata:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> DocumentMetadataEnum
$sel:name:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> Text
$sel:nextToken:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> Maybe Text
$sel:maxResults:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> Maybe Natural
$sel:documentVersion:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
documentVersion
      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
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DocumentMetadataEnum
metadata

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

instance Data.ToHeaders ListDocumentMetadataHistory where
  toHeaders :: ListDocumentMetadataHistory -> 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.ListDocumentMetadataHistory" ::
                          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 ListDocumentMetadataHistory where
  toJSON :: ListDocumentMetadataHistory -> Value
toJSON ListDocumentMetadataHistory' {Maybe Natural
Maybe Text
Text
DocumentMetadataEnum
metadata :: DocumentMetadataEnum
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
documentVersion :: Maybe Text
$sel:metadata:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> DocumentMetadataEnum
$sel:name:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> Text
$sel:nextToken:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> Maybe Text
$sel:maxResults:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> Maybe Natural
$sel:documentVersion:ListDocumentMetadataHistory' :: ListDocumentMetadataHistory -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"DocumentVersion" 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
documentVersion,
            (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
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"Metadata" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DocumentMetadataEnum
metadata)
          ]
      )

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

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

-- | /See:/ 'newListDocumentMetadataHistoryResponse' smart constructor.
data ListDocumentMetadataHistoryResponse = ListDocumentMetadataHistoryResponse'
  { -- | The user ID of the person in the organization who requested the review
    -- of the change template.
    ListDocumentMetadataHistoryResponse -> Maybe Text
author :: Prelude.Maybe Prelude.Text,
    -- | The version of the change template.
    ListDocumentMetadataHistoryResponse -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
    -- | Information about the response to the change template approval request.
    ListDocumentMetadataHistoryResponse
-> Maybe DocumentMetadataResponseInfo
metadata :: Prelude.Maybe DocumentMetadataResponseInfo,
    -- | The name of the change template.
    ListDocumentMetadataHistoryResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | 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.
    ListDocumentMetadataHistoryResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDocumentMetadataHistoryResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDocumentMetadataHistoryResponse
-> ListDocumentMetadataHistoryResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDocumentMetadataHistoryResponse
-> ListDocumentMetadataHistoryResponse -> Bool
$c/= :: ListDocumentMetadataHistoryResponse
-> ListDocumentMetadataHistoryResponse -> Bool
== :: ListDocumentMetadataHistoryResponse
-> ListDocumentMetadataHistoryResponse -> Bool
$c== :: ListDocumentMetadataHistoryResponse
-> ListDocumentMetadataHistoryResponse -> Bool
Prelude.Eq, ReadPrec [ListDocumentMetadataHistoryResponse]
ReadPrec ListDocumentMetadataHistoryResponse
Int -> ReadS ListDocumentMetadataHistoryResponse
ReadS [ListDocumentMetadataHistoryResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDocumentMetadataHistoryResponse]
$creadListPrec :: ReadPrec [ListDocumentMetadataHistoryResponse]
readPrec :: ReadPrec ListDocumentMetadataHistoryResponse
$creadPrec :: ReadPrec ListDocumentMetadataHistoryResponse
readList :: ReadS [ListDocumentMetadataHistoryResponse]
$creadList :: ReadS [ListDocumentMetadataHistoryResponse]
readsPrec :: Int -> ReadS ListDocumentMetadataHistoryResponse
$creadsPrec :: Int -> ReadS ListDocumentMetadataHistoryResponse
Prelude.Read, Int -> ListDocumentMetadataHistoryResponse -> ShowS
[ListDocumentMetadataHistoryResponse] -> ShowS
ListDocumentMetadataHistoryResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDocumentMetadataHistoryResponse] -> ShowS
$cshowList :: [ListDocumentMetadataHistoryResponse] -> ShowS
show :: ListDocumentMetadataHistoryResponse -> String
$cshow :: ListDocumentMetadataHistoryResponse -> String
showsPrec :: Int -> ListDocumentMetadataHistoryResponse -> ShowS
$cshowsPrec :: Int -> ListDocumentMetadataHistoryResponse -> ShowS
Prelude.Show, forall x.
Rep ListDocumentMetadataHistoryResponse x
-> ListDocumentMetadataHistoryResponse
forall x.
ListDocumentMetadataHistoryResponse
-> Rep ListDocumentMetadataHistoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDocumentMetadataHistoryResponse x
-> ListDocumentMetadataHistoryResponse
$cfrom :: forall x.
ListDocumentMetadataHistoryResponse
-> Rep ListDocumentMetadataHistoryResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDocumentMetadataHistoryResponse' 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:
--
-- 'author', 'listDocumentMetadataHistoryResponse_author' - The user ID of the person in the organization who requested the review
-- of the change template.
--
-- 'documentVersion', 'listDocumentMetadataHistoryResponse_documentVersion' - The version of the change template.
--
-- 'metadata', 'listDocumentMetadataHistoryResponse_metadata' - Information about the response to the change template approval request.
--
-- 'name', 'listDocumentMetadataHistoryResponse_name' - The name of the change template.
--
-- 'nextToken', 'listDocumentMetadataHistoryResponse_nextToken' - 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.
--
-- 'httpStatus', 'listDocumentMetadataHistoryResponse_httpStatus' - The response's http status code.
newListDocumentMetadataHistoryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDocumentMetadataHistoryResponse
newListDocumentMetadataHistoryResponse :: Int -> ListDocumentMetadataHistoryResponse
newListDocumentMetadataHistoryResponse Int
pHttpStatus_ =
  ListDocumentMetadataHistoryResponse'
    { $sel:author:ListDocumentMetadataHistoryResponse' :: Maybe Text
author =
        forall a. Maybe a
Prelude.Nothing,
      $sel:documentVersion:ListDocumentMetadataHistoryResponse' :: Maybe Text
documentVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:metadata:ListDocumentMetadataHistoryResponse' :: Maybe DocumentMetadataResponseInfo
metadata = forall a. Maybe a
Prelude.Nothing,
      $sel:name:ListDocumentMetadataHistoryResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDocumentMetadataHistoryResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDocumentMetadataHistoryResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The user ID of the person in the organization who requested the review
-- of the change template.
listDocumentMetadataHistoryResponse_author :: Lens.Lens' ListDocumentMetadataHistoryResponse (Prelude.Maybe Prelude.Text)
listDocumentMetadataHistoryResponse_author :: Lens' ListDocumentMetadataHistoryResponse (Maybe Text)
listDocumentMetadataHistoryResponse_author = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentMetadataHistoryResponse' {Maybe Text
author :: Maybe Text
$sel:author:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse -> Maybe Text
author} -> Maybe Text
author) (\s :: ListDocumentMetadataHistoryResponse
s@ListDocumentMetadataHistoryResponse' {} Maybe Text
a -> ListDocumentMetadataHistoryResponse
s {$sel:author:ListDocumentMetadataHistoryResponse' :: Maybe Text
author = Maybe Text
a} :: ListDocumentMetadataHistoryResponse)

-- | The version of the change template.
listDocumentMetadataHistoryResponse_documentVersion :: Lens.Lens' ListDocumentMetadataHistoryResponse (Prelude.Maybe Prelude.Text)
listDocumentMetadataHistoryResponse_documentVersion :: Lens' ListDocumentMetadataHistoryResponse (Maybe Text)
listDocumentMetadataHistoryResponse_documentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentMetadataHistoryResponse' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: ListDocumentMetadataHistoryResponse
s@ListDocumentMetadataHistoryResponse' {} Maybe Text
a -> ListDocumentMetadataHistoryResponse
s {$sel:documentVersion:ListDocumentMetadataHistoryResponse' :: Maybe Text
documentVersion = Maybe Text
a} :: ListDocumentMetadataHistoryResponse)

-- | Information about the response to the change template approval request.
listDocumentMetadataHistoryResponse_metadata :: Lens.Lens' ListDocumentMetadataHistoryResponse (Prelude.Maybe DocumentMetadataResponseInfo)
listDocumentMetadataHistoryResponse_metadata :: Lens'
  ListDocumentMetadataHistoryResponse
  (Maybe DocumentMetadataResponseInfo)
listDocumentMetadataHistoryResponse_metadata = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentMetadataHistoryResponse' {Maybe DocumentMetadataResponseInfo
metadata :: Maybe DocumentMetadataResponseInfo
$sel:metadata:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse
-> Maybe DocumentMetadataResponseInfo
metadata} -> Maybe DocumentMetadataResponseInfo
metadata) (\s :: ListDocumentMetadataHistoryResponse
s@ListDocumentMetadataHistoryResponse' {} Maybe DocumentMetadataResponseInfo
a -> ListDocumentMetadataHistoryResponse
s {$sel:metadata:ListDocumentMetadataHistoryResponse' :: Maybe DocumentMetadataResponseInfo
metadata = Maybe DocumentMetadataResponseInfo
a} :: ListDocumentMetadataHistoryResponse)

-- | The name of the change template.
listDocumentMetadataHistoryResponse_name :: Lens.Lens' ListDocumentMetadataHistoryResponse (Prelude.Maybe Prelude.Text)
listDocumentMetadataHistoryResponse_name :: Lens' ListDocumentMetadataHistoryResponse (Maybe Text)
listDocumentMetadataHistoryResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentMetadataHistoryResponse' {Maybe Text
name :: Maybe Text
$sel:name:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: ListDocumentMetadataHistoryResponse
s@ListDocumentMetadataHistoryResponse' {} Maybe Text
a -> ListDocumentMetadataHistoryResponse
s {$sel:name:ListDocumentMetadataHistoryResponse' :: Maybe Text
name = Maybe Text
a} :: ListDocumentMetadataHistoryResponse)

-- | 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.
listDocumentMetadataHistoryResponse_nextToken :: Lens.Lens' ListDocumentMetadataHistoryResponse (Prelude.Maybe Prelude.Text)
listDocumentMetadataHistoryResponse_nextToken :: Lens' ListDocumentMetadataHistoryResponse (Maybe Text)
listDocumentMetadataHistoryResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentMetadataHistoryResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDocumentMetadataHistoryResponse
s@ListDocumentMetadataHistoryResponse' {} Maybe Text
a -> ListDocumentMetadataHistoryResponse
s {$sel:nextToken:ListDocumentMetadataHistoryResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDocumentMetadataHistoryResponse)

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

instance
  Prelude.NFData
    ListDocumentMetadataHistoryResponse
  where
  rnf :: ListDocumentMetadataHistoryResponse -> ()
rnf ListDocumentMetadataHistoryResponse' {Int
Maybe Text
Maybe DocumentMetadataResponseInfo
httpStatus :: Int
nextToken :: Maybe Text
name :: Maybe Text
metadata :: Maybe DocumentMetadataResponseInfo
documentVersion :: Maybe Text
author :: Maybe Text
$sel:httpStatus:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse -> Int
$sel:nextToken:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse -> Maybe Text
$sel:name:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse -> Maybe Text
$sel:metadata:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse
-> Maybe DocumentMetadataResponseInfo
$sel:documentVersion:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse -> Maybe Text
$sel:author:ListDocumentMetadataHistoryResponse' :: ListDocumentMetadataHistoryResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
author
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
documentVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DocumentMetadataResponseInfo
metadata
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      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