{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.DocumentVersionInfo
-- 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)
module Amazonka.SSM.Types.DocumentVersionInfo where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.DocumentFormat
import Amazonka.SSM.Types.DocumentStatus
import Amazonka.SSM.Types.ReviewStatus

-- | Version information about the document.
--
-- /See:/ 'newDocumentVersionInfo' smart constructor.
data DocumentVersionInfo = DocumentVersionInfo'
  { -- | The status of the SSM document, such as @Creating@, @Active@, @Failed@,
    -- and @Deleting@.
    DocumentVersionInfo -> Maybe DocumentStatus
status :: Prelude.Maybe DocumentStatus,
    -- | The version of the artifact associated with the document. For example,
    -- \"Release 12, Update 6\". This value is unique across all versions of a
    -- document, and can\'t be changed.
    DocumentVersionInfo -> Maybe Text
versionName :: Prelude.Maybe Prelude.Text,
    -- | The current status of the approval review for the latest version of the
    -- document.
    DocumentVersionInfo -> Maybe ReviewStatus
reviewStatus :: Prelude.Maybe ReviewStatus,
    -- | The date the document was created.
    DocumentVersionInfo -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | The document format, either JSON or YAML.
    DocumentVersionInfo -> Maybe DocumentFormat
documentFormat :: Prelude.Maybe DocumentFormat,
    -- | The document name.
    DocumentVersionInfo -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The document version.
    DocumentVersionInfo -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
    -- | The friendly name of the SSM document. This value can differ for each
    -- version of the document. If you want to update this value, see
    -- UpdateDocument.
    DocumentVersionInfo -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | A message returned by Amazon Web Services Systems Manager that explains
    -- the @Status@ value. For example, a @Failed@ status might be explained by
    -- the @StatusInformation@ message, \"The specified S3 bucket doesn\'t
    -- exist. Verify that the URL of the S3 bucket is correct.\"
    DocumentVersionInfo -> Maybe Text
statusInformation :: Prelude.Maybe Prelude.Text,
    -- | An identifier for the default version of the document.
    DocumentVersionInfo -> Maybe Bool
isDefaultVersion :: Prelude.Maybe Prelude.Bool
  }
  deriving (DocumentVersionInfo -> DocumentVersionInfo -> Bool
(DocumentVersionInfo -> DocumentVersionInfo -> Bool)
-> (DocumentVersionInfo -> DocumentVersionInfo -> Bool)
-> Eq DocumentVersionInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentVersionInfo -> DocumentVersionInfo -> Bool
$c/= :: DocumentVersionInfo -> DocumentVersionInfo -> Bool
== :: DocumentVersionInfo -> DocumentVersionInfo -> Bool
$c== :: DocumentVersionInfo -> DocumentVersionInfo -> Bool
Prelude.Eq, ReadPrec [DocumentVersionInfo]
ReadPrec DocumentVersionInfo
Int -> ReadS DocumentVersionInfo
ReadS [DocumentVersionInfo]
(Int -> ReadS DocumentVersionInfo)
-> ReadS [DocumentVersionInfo]
-> ReadPrec DocumentVersionInfo
-> ReadPrec [DocumentVersionInfo]
-> Read DocumentVersionInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DocumentVersionInfo]
$creadListPrec :: ReadPrec [DocumentVersionInfo]
readPrec :: ReadPrec DocumentVersionInfo
$creadPrec :: ReadPrec DocumentVersionInfo
readList :: ReadS [DocumentVersionInfo]
$creadList :: ReadS [DocumentVersionInfo]
readsPrec :: Int -> ReadS DocumentVersionInfo
$creadsPrec :: Int -> ReadS DocumentVersionInfo
Prelude.Read, Int -> DocumentVersionInfo -> ShowS
[DocumentVersionInfo] -> ShowS
DocumentVersionInfo -> String
(Int -> DocumentVersionInfo -> ShowS)
-> (DocumentVersionInfo -> String)
-> ([DocumentVersionInfo] -> ShowS)
-> Show DocumentVersionInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentVersionInfo] -> ShowS
$cshowList :: [DocumentVersionInfo] -> ShowS
show :: DocumentVersionInfo -> String
$cshow :: DocumentVersionInfo -> String
showsPrec :: Int -> DocumentVersionInfo -> ShowS
$cshowsPrec :: Int -> DocumentVersionInfo -> ShowS
Prelude.Show, (forall x. DocumentVersionInfo -> Rep DocumentVersionInfo x)
-> (forall x. Rep DocumentVersionInfo x -> DocumentVersionInfo)
-> Generic DocumentVersionInfo
forall x. Rep DocumentVersionInfo x -> DocumentVersionInfo
forall x. DocumentVersionInfo -> Rep DocumentVersionInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DocumentVersionInfo x -> DocumentVersionInfo
$cfrom :: forall x. DocumentVersionInfo -> Rep DocumentVersionInfo x
Prelude.Generic)

-- |
-- Create a value of 'DocumentVersionInfo' 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:
--
-- 'status', 'documentVersionInfo_status' - The status of the SSM document, such as @Creating@, @Active@, @Failed@,
-- and @Deleting@.
--
-- 'versionName', 'documentVersionInfo_versionName' - The version of the artifact associated with the document. For example,
-- \"Release 12, Update 6\". This value is unique across all versions of a
-- document, and can\'t be changed.
--
-- 'reviewStatus', 'documentVersionInfo_reviewStatus' - The current status of the approval review for the latest version of the
-- document.
--
-- 'createdDate', 'documentVersionInfo_createdDate' - The date the document was created.
--
-- 'documentFormat', 'documentVersionInfo_documentFormat' - The document format, either JSON or YAML.
--
-- 'name', 'documentVersionInfo_name' - The document name.
--
-- 'documentVersion', 'documentVersionInfo_documentVersion' - The document version.
--
-- 'displayName', 'documentVersionInfo_displayName' - The friendly name of the SSM document. This value can differ for each
-- version of the document. If you want to update this value, see
-- UpdateDocument.
--
-- 'statusInformation', 'documentVersionInfo_statusInformation' - A message returned by Amazon Web Services Systems Manager that explains
-- the @Status@ value. For example, a @Failed@ status might be explained by
-- the @StatusInformation@ message, \"The specified S3 bucket doesn\'t
-- exist. Verify that the URL of the S3 bucket is correct.\"
--
-- 'isDefaultVersion', 'documentVersionInfo_isDefaultVersion' - An identifier for the default version of the document.
newDocumentVersionInfo ::
  DocumentVersionInfo
newDocumentVersionInfo :: DocumentVersionInfo
newDocumentVersionInfo =
  DocumentVersionInfo' :: Maybe DocumentStatus
-> Maybe Text
-> Maybe ReviewStatus
-> Maybe POSIX
-> Maybe DocumentFormat
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> DocumentVersionInfo
DocumentVersionInfo'
    { $sel:status:DocumentVersionInfo' :: Maybe DocumentStatus
status = Maybe DocumentStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:versionName:DocumentVersionInfo' :: Maybe Text
versionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reviewStatus:DocumentVersionInfo' :: Maybe ReviewStatus
reviewStatus = Maybe ReviewStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:DocumentVersionInfo' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:documentFormat:DocumentVersionInfo' :: Maybe DocumentFormat
documentFormat = Maybe DocumentFormat
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DocumentVersionInfo' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:documentVersion:DocumentVersionInfo' :: Maybe Text
documentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:DocumentVersionInfo' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusInformation:DocumentVersionInfo' :: Maybe Text
statusInformation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isDefaultVersion:DocumentVersionInfo' :: Maybe Bool
isDefaultVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the SSM document, such as @Creating@, @Active@, @Failed@,
-- and @Deleting@.
documentVersionInfo_status :: Lens.Lens' DocumentVersionInfo (Prelude.Maybe DocumentStatus)
documentVersionInfo_status :: (Maybe DocumentStatus -> f (Maybe DocumentStatus))
-> DocumentVersionInfo -> f DocumentVersionInfo
documentVersionInfo_status = (DocumentVersionInfo -> Maybe DocumentStatus)
-> (DocumentVersionInfo
    -> Maybe DocumentStatus -> DocumentVersionInfo)
-> Lens
     DocumentVersionInfo
     DocumentVersionInfo
     (Maybe DocumentStatus)
     (Maybe DocumentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionInfo' {Maybe DocumentStatus
status :: Maybe DocumentStatus
$sel:status:DocumentVersionInfo' :: DocumentVersionInfo -> Maybe DocumentStatus
status} -> Maybe DocumentStatus
status) (\s :: DocumentVersionInfo
s@DocumentVersionInfo' {} Maybe DocumentStatus
a -> DocumentVersionInfo
s {$sel:status:DocumentVersionInfo' :: Maybe DocumentStatus
status = Maybe DocumentStatus
a} :: DocumentVersionInfo)

-- | The version of the artifact associated with the document. For example,
-- \"Release 12, Update 6\". This value is unique across all versions of a
-- document, and can\'t be changed.
documentVersionInfo_versionName :: Lens.Lens' DocumentVersionInfo (Prelude.Maybe Prelude.Text)
documentVersionInfo_versionName :: (Maybe Text -> f (Maybe Text))
-> DocumentVersionInfo -> f DocumentVersionInfo
documentVersionInfo_versionName = (DocumentVersionInfo -> Maybe Text)
-> (DocumentVersionInfo -> Maybe Text -> DocumentVersionInfo)
-> Lens
     DocumentVersionInfo DocumentVersionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionInfo' {Maybe Text
versionName :: Maybe Text
$sel:versionName:DocumentVersionInfo' :: DocumentVersionInfo -> Maybe Text
versionName} -> Maybe Text
versionName) (\s :: DocumentVersionInfo
s@DocumentVersionInfo' {} Maybe Text
a -> DocumentVersionInfo
s {$sel:versionName:DocumentVersionInfo' :: Maybe Text
versionName = Maybe Text
a} :: DocumentVersionInfo)

-- | The current status of the approval review for the latest version of the
-- document.
documentVersionInfo_reviewStatus :: Lens.Lens' DocumentVersionInfo (Prelude.Maybe ReviewStatus)
documentVersionInfo_reviewStatus :: (Maybe ReviewStatus -> f (Maybe ReviewStatus))
-> DocumentVersionInfo -> f DocumentVersionInfo
documentVersionInfo_reviewStatus = (DocumentVersionInfo -> Maybe ReviewStatus)
-> (DocumentVersionInfo
    -> Maybe ReviewStatus -> DocumentVersionInfo)
-> Lens
     DocumentVersionInfo
     DocumentVersionInfo
     (Maybe ReviewStatus)
     (Maybe ReviewStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionInfo' {Maybe ReviewStatus
reviewStatus :: Maybe ReviewStatus
$sel:reviewStatus:DocumentVersionInfo' :: DocumentVersionInfo -> Maybe ReviewStatus
reviewStatus} -> Maybe ReviewStatus
reviewStatus) (\s :: DocumentVersionInfo
s@DocumentVersionInfo' {} Maybe ReviewStatus
a -> DocumentVersionInfo
s {$sel:reviewStatus:DocumentVersionInfo' :: Maybe ReviewStatus
reviewStatus = Maybe ReviewStatus
a} :: DocumentVersionInfo)

-- | The date the document was created.
documentVersionInfo_createdDate :: Lens.Lens' DocumentVersionInfo (Prelude.Maybe Prelude.UTCTime)
documentVersionInfo_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentVersionInfo -> f DocumentVersionInfo
documentVersionInfo_createdDate = (DocumentVersionInfo -> Maybe POSIX)
-> (DocumentVersionInfo -> Maybe POSIX -> DocumentVersionInfo)
-> Lens
     DocumentVersionInfo DocumentVersionInfo (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionInfo' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:DocumentVersionInfo' :: DocumentVersionInfo -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: DocumentVersionInfo
s@DocumentVersionInfo' {} Maybe POSIX
a -> DocumentVersionInfo
s {$sel:createdDate:DocumentVersionInfo' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: DocumentVersionInfo) ((Maybe POSIX -> f (Maybe POSIX))
 -> DocumentVersionInfo -> f DocumentVersionInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentVersionInfo
-> f DocumentVersionInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The document format, either JSON or YAML.
documentVersionInfo_documentFormat :: Lens.Lens' DocumentVersionInfo (Prelude.Maybe DocumentFormat)
documentVersionInfo_documentFormat :: (Maybe DocumentFormat -> f (Maybe DocumentFormat))
-> DocumentVersionInfo -> f DocumentVersionInfo
documentVersionInfo_documentFormat = (DocumentVersionInfo -> Maybe DocumentFormat)
-> (DocumentVersionInfo
    -> Maybe DocumentFormat -> DocumentVersionInfo)
-> Lens
     DocumentVersionInfo
     DocumentVersionInfo
     (Maybe DocumentFormat)
     (Maybe DocumentFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionInfo' {Maybe DocumentFormat
documentFormat :: Maybe DocumentFormat
$sel:documentFormat:DocumentVersionInfo' :: DocumentVersionInfo -> Maybe DocumentFormat
documentFormat} -> Maybe DocumentFormat
documentFormat) (\s :: DocumentVersionInfo
s@DocumentVersionInfo' {} Maybe DocumentFormat
a -> DocumentVersionInfo
s {$sel:documentFormat:DocumentVersionInfo' :: Maybe DocumentFormat
documentFormat = Maybe DocumentFormat
a} :: DocumentVersionInfo)

-- | The document name.
documentVersionInfo_name :: Lens.Lens' DocumentVersionInfo (Prelude.Maybe Prelude.Text)
documentVersionInfo_name :: (Maybe Text -> f (Maybe Text))
-> DocumentVersionInfo -> f DocumentVersionInfo
documentVersionInfo_name = (DocumentVersionInfo -> Maybe Text)
-> (DocumentVersionInfo -> Maybe Text -> DocumentVersionInfo)
-> Lens
     DocumentVersionInfo DocumentVersionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionInfo' {Maybe Text
name :: Maybe Text
$sel:name:DocumentVersionInfo' :: DocumentVersionInfo -> Maybe Text
name} -> Maybe Text
name) (\s :: DocumentVersionInfo
s@DocumentVersionInfo' {} Maybe Text
a -> DocumentVersionInfo
s {$sel:name:DocumentVersionInfo' :: Maybe Text
name = Maybe Text
a} :: DocumentVersionInfo)

-- | The document version.
documentVersionInfo_documentVersion :: Lens.Lens' DocumentVersionInfo (Prelude.Maybe Prelude.Text)
documentVersionInfo_documentVersion :: (Maybe Text -> f (Maybe Text))
-> DocumentVersionInfo -> f DocumentVersionInfo
documentVersionInfo_documentVersion = (DocumentVersionInfo -> Maybe Text)
-> (DocumentVersionInfo -> Maybe Text -> DocumentVersionInfo)
-> Lens
     DocumentVersionInfo DocumentVersionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionInfo' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:DocumentVersionInfo' :: DocumentVersionInfo -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: DocumentVersionInfo
s@DocumentVersionInfo' {} Maybe Text
a -> DocumentVersionInfo
s {$sel:documentVersion:DocumentVersionInfo' :: Maybe Text
documentVersion = Maybe Text
a} :: DocumentVersionInfo)

-- | The friendly name of the SSM document. This value can differ for each
-- version of the document. If you want to update this value, see
-- UpdateDocument.
documentVersionInfo_displayName :: Lens.Lens' DocumentVersionInfo (Prelude.Maybe Prelude.Text)
documentVersionInfo_displayName :: (Maybe Text -> f (Maybe Text))
-> DocumentVersionInfo -> f DocumentVersionInfo
documentVersionInfo_displayName = (DocumentVersionInfo -> Maybe Text)
-> (DocumentVersionInfo -> Maybe Text -> DocumentVersionInfo)
-> Lens
     DocumentVersionInfo DocumentVersionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionInfo' {Maybe Text
displayName :: Maybe Text
$sel:displayName:DocumentVersionInfo' :: DocumentVersionInfo -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: DocumentVersionInfo
s@DocumentVersionInfo' {} Maybe Text
a -> DocumentVersionInfo
s {$sel:displayName:DocumentVersionInfo' :: Maybe Text
displayName = Maybe Text
a} :: DocumentVersionInfo)

-- | A message returned by Amazon Web Services Systems Manager that explains
-- the @Status@ value. For example, a @Failed@ status might be explained by
-- the @StatusInformation@ message, \"The specified S3 bucket doesn\'t
-- exist. Verify that the URL of the S3 bucket is correct.\"
documentVersionInfo_statusInformation :: Lens.Lens' DocumentVersionInfo (Prelude.Maybe Prelude.Text)
documentVersionInfo_statusInformation :: (Maybe Text -> f (Maybe Text))
-> DocumentVersionInfo -> f DocumentVersionInfo
documentVersionInfo_statusInformation = (DocumentVersionInfo -> Maybe Text)
-> (DocumentVersionInfo -> Maybe Text -> DocumentVersionInfo)
-> Lens
     DocumentVersionInfo DocumentVersionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionInfo' {Maybe Text
statusInformation :: Maybe Text
$sel:statusInformation:DocumentVersionInfo' :: DocumentVersionInfo -> Maybe Text
statusInformation} -> Maybe Text
statusInformation) (\s :: DocumentVersionInfo
s@DocumentVersionInfo' {} Maybe Text
a -> DocumentVersionInfo
s {$sel:statusInformation:DocumentVersionInfo' :: Maybe Text
statusInformation = Maybe Text
a} :: DocumentVersionInfo)

-- | An identifier for the default version of the document.
documentVersionInfo_isDefaultVersion :: Lens.Lens' DocumentVersionInfo (Prelude.Maybe Prelude.Bool)
documentVersionInfo_isDefaultVersion :: (Maybe Bool -> f (Maybe Bool))
-> DocumentVersionInfo -> f DocumentVersionInfo
documentVersionInfo_isDefaultVersion = (DocumentVersionInfo -> Maybe Bool)
-> (DocumentVersionInfo -> Maybe Bool -> DocumentVersionInfo)
-> Lens
     DocumentVersionInfo DocumentVersionInfo (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionInfo' {Maybe Bool
isDefaultVersion :: Maybe Bool
$sel:isDefaultVersion:DocumentVersionInfo' :: DocumentVersionInfo -> Maybe Bool
isDefaultVersion} -> Maybe Bool
isDefaultVersion) (\s :: DocumentVersionInfo
s@DocumentVersionInfo' {} Maybe Bool
a -> DocumentVersionInfo
s {$sel:isDefaultVersion:DocumentVersionInfo' :: Maybe Bool
isDefaultVersion = Maybe Bool
a} :: DocumentVersionInfo)

instance Core.FromJSON DocumentVersionInfo where
  parseJSON :: Value -> Parser DocumentVersionInfo
parseJSON =
    String
-> (Object -> Parser DocumentVersionInfo)
-> Value
-> Parser DocumentVersionInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DocumentVersionInfo"
      ( \Object
x ->
          Maybe DocumentStatus
-> Maybe Text
-> Maybe ReviewStatus
-> Maybe POSIX
-> Maybe DocumentFormat
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> DocumentVersionInfo
DocumentVersionInfo'
            (Maybe DocumentStatus
 -> Maybe Text
 -> Maybe ReviewStatus
 -> Maybe POSIX
 -> Maybe DocumentFormat
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> DocumentVersionInfo)
-> Parser (Maybe DocumentStatus)
-> Parser
     (Maybe Text
      -> Maybe ReviewStatus
      -> Maybe POSIX
      -> Maybe DocumentFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> DocumentVersionInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DocumentStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe ReviewStatus
   -> Maybe POSIX
   -> Maybe DocumentFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> DocumentVersionInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe ReviewStatus
      -> Maybe POSIX
      -> Maybe DocumentFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> DocumentVersionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VersionName")
            Parser
  (Maybe ReviewStatus
   -> Maybe POSIX
   -> Maybe DocumentFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> DocumentVersionInfo)
-> Parser (Maybe ReviewStatus)
-> Parser
     (Maybe POSIX
      -> Maybe DocumentFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> DocumentVersionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReviewStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReviewStatus")
            Parser
  (Maybe POSIX
   -> Maybe DocumentFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> DocumentVersionInfo)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe DocumentFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> DocumentVersionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedDate")
            Parser
  (Maybe DocumentFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> DocumentVersionInfo)
-> Parser (Maybe DocumentFormat)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> DocumentVersionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DocumentFormat)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DocumentFormat")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> DocumentVersionInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Bool -> DocumentVersionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Bool -> DocumentVersionInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Bool -> DocumentVersionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DocumentVersion")
            Parser
  (Maybe Text -> Maybe Text -> Maybe Bool -> DocumentVersionInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Bool -> DocumentVersionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisplayName")
            Parser (Maybe Text -> Maybe Bool -> DocumentVersionInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> DocumentVersionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatusInformation")
            Parser (Maybe Bool -> DocumentVersionInfo)
-> Parser (Maybe Bool) -> Parser DocumentVersionInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IsDefaultVersion")
      )

instance Prelude.Hashable DocumentVersionInfo

instance Prelude.NFData DocumentVersionInfo