{-# 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.DocumentIdentifier
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SSM.Types.DocumentIdentifier 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 Amazonka.SSM.Types.DocumentFormat
import Amazonka.SSM.Types.DocumentRequires
import Amazonka.SSM.Types.DocumentType
import Amazonka.SSM.Types.PlatformType
import Amazonka.SSM.Types.ReviewStatus
import Amazonka.SSM.Types.Tag

-- | Describes the name of a SSM document.
--
-- /See:/ 'newDocumentIdentifier' smart constructor.
data DocumentIdentifier = DocumentIdentifier'
  { -- | The user in your organization who created the document.
    DocumentIdentifier -> Maybe Text
author :: Prelude.Maybe Prelude.Text,
    -- | The date the SSM document was created.
    DocumentIdentifier -> Maybe POSIX
createdDate :: Prelude.Maybe Data.POSIX,
    -- | An optional field where you can specify a friendly name for the SSM
    -- document. This value can differ for each version of the document. If you
    -- want to update this value, see UpdateDocument.
    DocumentIdentifier -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The document format, either JSON or YAML.
    DocumentIdentifier -> Maybe DocumentFormat
documentFormat :: Prelude.Maybe DocumentFormat,
    -- | The document type.
    DocumentIdentifier -> Maybe DocumentType
documentType :: Prelude.Maybe DocumentType,
    -- | The document version.
    DocumentIdentifier -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the SSM document.
    DocumentIdentifier -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services user account that created the document.
    DocumentIdentifier -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    -- | The operating system platform.
    DocumentIdentifier -> Maybe [PlatformType]
platformTypes :: Prelude.Maybe [PlatformType],
    -- | A list of SSM documents required by a document. For example, an
    -- @ApplicationConfiguration@ document requires an
    -- @ApplicationConfigurationSchema@ document.
    DocumentIdentifier -> Maybe (NonEmpty DocumentRequires)
requires :: Prelude.Maybe (Prelude.NonEmpty DocumentRequires),
    -- | The current status of a document review.
    DocumentIdentifier -> Maybe ReviewStatus
reviewStatus :: Prelude.Maybe ReviewStatus,
    -- | The schema version.
    DocumentIdentifier -> Maybe Text
schemaVersion :: Prelude.Maybe Prelude.Text,
    -- | The tags, or metadata, that have been applied to the document.
    DocumentIdentifier -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The target type which defines the kinds of resources the document can
    -- run on. For example, @\/AWS::EC2::Instance@. For a list of valid
    -- resource types, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html Amazon Web Services resource and property types reference>
    -- in the /CloudFormation User Guide/.
    DocumentIdentifier -> Maybe Text
targetType :: Prelude.Maybe Prelude.Text,
    -- | An optional field specifying 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.
    DocumentIdentifier -> Maybe Text
versionName :: Prelude.Maybe Prelude.Text
  }
  deriving (DocumentIdentifier -> DocumentIdentifier -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentIdentifier -> DocumentIdentifier -> Bool
$c/= :: DocumentIdentifier -> DocumentIdentifier -> Bool
== :: DocumentIdentifier -> DocumentIdentifier -> Bool
$c== :: DocumentIdentifier -> DocumentIdentifier -> Bool
Prelude.Eq, ReadPrec [DocumentIdentifier]
ReadPrec DocumentIdentifier
Int -> ReadS DocumentIdentifier
ReadS [DocumentIdentifier]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DocumentIdentifier]
$creadListPrec :: ReadPrec [DocumentIdentifier]
readPrec :: ReadPrec DocumentIdentifier
$creadPrec :: ReadPrec DocumentIdentifier
readList :: ReadS [DocumentIdentifier]
$creadList :: ReadS [DocumentIdentifier]
readsPrec :: Int -> ReadS DocumentIdentifier
$creadsPrec :: Int -> ReadS DocumentIdentifier
Prelude.Read, Int -> DocumentIdentifier -> ShowS
[DocumentIdentifier] -> ShowS
DocumentIdentifier -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentIdentifier] -> ShowS
$cshowList :: [DocumentIdentifier] -> ShowS
show :: DocumentIdentifier -> String
$cshow :: DocumentIdentifier -> String
showsPrec :: Int -> DocumentIdentifier -> ShowS
$cshowsPrec :: Int -> DocumentIdentifier -> ShowS
Prelude.Show, forall x. Rep DocumentIdentifier x -> DocumentIdentifier
forall x. DocumentIdentifier -> Rep DocumentIdentifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DocumentIdentifier x -> DocumentIdentifier
$cfrom :: forall x. DocumentIdentifier -> Rep DocumentIdentifier x
Prelude.Generic)

-- |
-- Create a value of 'DocumentIdentifier' 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', 'documentIdentifier_author' - The user in your organization who created the document.
--
-- 'createdDate', 'documentIdentifier_createdDate' - The date the SSM document was created.
--
-- 'displayName', 'documentIdentifier_displayName' - An optional field where you can specify a friendly name for the SSM
-- document. This value can differ for each version of the document. If you
-- want to update this value, see UpdateDocument.
--
-- 'documentFormat', 'documentIdentifier_documentFormat' - The document format, either JSON or YAML.
--
-- 'documentType', 'documentIdentifier_documentType' - The document type.
--
-- 'documentVersion', 'documentIdentifier_documentVersion' - The document version.
--
-- 'name', 'documentIdentifier_name' - The name of the SSM document.
--
-- 'owner', 'documentIdentifier_owner' - The Amazon Web Services user account that created the document.
--
-- 'platformTypes', 'documentIdentifier_platformTypes' - The operating system platform.
--
-- 'requires', 'documentIdentifier_requires' - A list of SSM documents required by a document. For example, an
-- @ApplicationConfiguration@ document requires an
-- @ApplicationConfigurationSchema@ document.
--
-- 'reviewStatus', 'documentIdentifier_reviewStatus' - The current status of a document review.
--
-- 'schemaVersion', 'documentIdentifier_schemaVersion' - The schema version.
--
-- 'tags', 'documentIdentifier_tags' - The tags, or metadata, that have been applied to the document.
--
-- 'targetType', 'documentIdentifier_targetType' - The target type which defines the kinds of resources the document can
-- run on. For example, @\/AWS::EC2::Instance@. For a list of valid
-- resource types, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html Amazon Web Services resource and property types reference>
-- in the /CloudFormation User Guide/.
--
-- 'versionName', 'documentIdentifier_versionName' - An optional field specifying 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.
newDocumentIdentifier ::
  DocumentIdentifier
newDocumentIdentifier :: DocumentIdentifier
newDocumentIdentifier =
  DocumentIdentifier'
    { $sel:author:DocumentIdentifier' :: Maybe Text
author = forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:DocumentIdentifier' :: Maybe POSIX
createdDate = forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:DocumentIdentifier' :: Maybe Text
displayName = forall a. Maybe a
Prelude.Nothing,
      $sel:documentFormat:DocumentIdentifier' :: Maybe DocumentFormat
documentFormat = forall a. Maybe a
Prelude.Nothing,
      $sel:documentType:DocumentIdentifier' :: Maybe DocumentType
documentType = forall a. Maybe a
Prelude.Nothing,
      $sel:documentVersion:DocumentIdentifier' :: Maybe Text
documentVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:name:DocumentIdentifier' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:owner:DocumentIdentifier' :: Maybe Text
owner = forall a. Maybe a
Prelude.Nothing,
      $sel:platformTypes:DocumentIdentifier' :: Maybe [PlatformType]
platformTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:requires:DocumentIdentifier' :: Maybe (NonEmpty DocumentRequires)
requires = forall a. Maybe a
Prelude.Nothing,
      $sel:reviewStatus:DocumentIdentifier' :: Maybe ReviewStatus
reviewStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaVersion:DocumentIdentifier' :: Maybe Text
schemaVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DocumentIdentifier' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:targetType:DocumentIdentifier' :: Maybe Text
targetType = forall a. Maybe a
Prelude.Nothing,
      $sel:versionName:DocumentIdentifier' :: Maybe Text
versionName = forall a. Maybe a
Prelude.Nothing
    }

-- | The user in your organization who created the document.
documentIdentifier_author :: Lens.Lens' DocumentIdentifier (Prelude.Maybe Prelude.Text)
documentIdentifier_author :: Lens' DocumentIdentifier (Maybe Text)
documentIdentifier_author = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe Text
author :: Maybe Text
$sel:author:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
author} -> Maybe Text
author) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe Text
a -> DocumentIdentifier
s {$sel:author:DocumentIdentifier' :: Maybe Text
author = Maybe Text
a} :: DocumentIdentifier)

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

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

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

-- | The document type.
documentIdentifier_documentType :: Lens.Lens' DocumentIdentifier (Prelude.Maybe DocumentType)
documentIdentifier_documentType :: Lens' DocumentIdentifier (Maybe DocumentType)
documentIdentifier_documentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe DocumentType
documentType :: Maybe DocumentType
$sel:documentType:DocumentIdentifier' :: DocumentIdentifier -> Maybe DocumentType
documentType} -> Maybe DocumentType
documentType) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe DocumentType
a -> DocumentIdentifier
s {$sel:documentType:DocumentIdentifier' :: Maybe DocumentType
documentType = Maybe DocumentType
a} :: DocumentIdentifier)

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

-- | The name of the SSM document.
documentIdentifier_name :: Lens.Lens' DocumentIdentifier (Prelude.Maybe Prelude.Text)
documentIdentifier_name :: Lens' DocumentIdentifier (Maybe Text)
documentIdentifier_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe Text
name :: Maybe Text
$sel:name:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
name} -> Maybe Text
name) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe Text
a -> DocumentIdentifier
s {$sel:name:DocumentIdentifier' :: Maybe Text
name = Maybe Text
a} :: DocumentIdentifier)

-- | The Amazon Web Services user account that created the document.
documentIdentifier_owner :: Lens.Lens' DocumentIdentifier (Prelude.Maybe Prelude.Text)
documentIdentifier_owner :: Lens' DocumentIdentifier (Maybe Text)
documentIdentifier_owner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe Text
owner :: Maybe Text
$sel:owner:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
owner} -> Maybe Text
owner) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe Text
a -> DocumentIdentifier
s {$sel:owner:DocumentIdentifier' :: Maybe Text
owner = Maybe Text
a} :: DocumentIdentifier)

-- | The operating system platform.
documentIdentifier_platformTypes :: Lens.Lens' DocumentIdentifier (Prelude.Maybe [PlatformType])
documentIdentifier_platformTypes :: Lens' DocumentIdentifier (Maybe [PlatformType])
documentIdentifier_platformTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe [PlatformType]
platformTypes :: Maybe [PlatformType]
$sel:platformTypes:DocumentIdentifier' :: DocumentIdentifier -> Maybe [PlatformType]
platformTypes} -> Maybe [PlatformType]
platformTypes) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe [PlatformType]
a -> DocumentIdentifier
s {$sel:platformTypes:DocumentIdentifier' :: Maybe [PlatformType]
platformTypes = Maybe [PlatformType]
a} :: DocumentIdentifier) 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

-- | A list of SSM documents required by a document. For example, an
-- @ApplicationConfiguration@ document requires an
-- @ApplicationConfigurationSchema@ document.
documentIdentifier_requires :: Lens.Lens' DocumentIdentifier (Prelude.Maybe (Prelude.NonEmpty DocumentRequires))
documentIdentifier_requires :: Lens' DocumentIdentifier (Maybe (NonEmpty DocumentRequires))
documentIdentifier_requires = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe (NonEmpty DocumentRequires)
requires :: Maybe (NonEmpty DocumentRequires)
$sel:requires:DocumentIdentifier' :: DocumentIdentifier -> Maybe (NonEmpty DocumentRequires)
requires} -> Maybe (NonEmpty DocumentRequires)
requires) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe (NonEmpty DocumentRequires)
a -> DocumentIdentifier
s {$sel:requires:DocumentIdentifier' :: Maybe (NonEmpty DocumentRequires)
requires = Maybe (NonEmpty DocumentRequires)
a} :: DocumentIdentifier) 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 current status of a document review.
documentIdentifier_reviewStatus :: Lens.Lens' DocumentIdentifier (Prelude.Maybe ReviewStatus)
documentIdentifier_reviewStatus :: Lens' DocumentIdentifier (Maybe ReviewStatus)
documentIdentifier_reviewStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe ReviewStatus
reviewStatus :: Maybe ReviewStatus
$sel:reviewStatus:DocumentIdentifier' :: DocumentIdentifier -> Maybe ReviewStatus
reviewStatus} -> Maybe ReviewStatus
reviewStatus) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe ReviewStatus
a -> DocumentIdentifier
s {$sel:reviewStatus:DocumentIdentifier' :: Maybe ReviewStatus
reviewStatus = Maybe ReviewStatus
a} :: DocumentIdentifier)

-- | The schema version.
documentIdentifier_schemaVersion :: Lens.Lens' DocumentIdentifier (Prelude.Maybe Prelude.Text)
documentIdentifier_schemaVersion :: Lens' DocumentIdentifier (Maybe Text)
documentIdentifier_schemaVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe Text
schemaVersion :: Maybe Text
$sel:schemaVersion:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
schemaVersion} -> Maybe Text
schemaVersion) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe Text
a -> DocumentIdentifier
s {$sel:schemaVersion:DocumentIdentifier' :: Maybe Text
schemaVersion = Maybe Text
a} :: DocumentIdentifier)

-- | The tags, or metadata, that have been applied to the document.
documentIdentifier_tags :: Lens.Lens' DocumentIdentifier (Prelude.Maybe [Tag])
documentIdentifier_tags :: Lens' DocumentIdentifier (Maybe [Tag])
documentIdentifier_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:DocumentIdentifier' :: DocumentIdentifier -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe [Tag]
a -> DocumentIdentifier
s {$sel:tags:DocumentIdentifier' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: DocumentIdentifier) 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 target type which defines the kinds of resources the document can
-- run on. For example, @\/AWS::EC2::Instance@. For a list of valid
-- resource types, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html Amazon Web Services resource and property types reference>
-- in the /CloudFormation User Guide/.
documentIdentifier_targetType :: Lens.Lens' DocumentIdentifier (Prelude.Maybe Prelude.Text)
documentIdentifier_targetType :: Lens' DocumentIdentifier (Maybe Text)
documentIdentifier_targetType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe Text
targetType :: Maybe Text
$sel:targetType:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
targetType} -> Maybe Text
targetType) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe Text
a -> DocumentIdentifier
s {$sel:targetType:DocumentIdentifier' :: Maybe Text
targetType = Maybe Text
a} :: DocumentIdentifier)

-- | An optional field specifying 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.
documentIdentifier_versionName :: Lens.Lens' DocumentIdentifier (Prelude.Maybe Prelude.Text)
documentIdentifier_versionName :: Lens' DocumentIdentifier (Maybe Text)
documentIdentifier_versionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentIdentifier' {Maybe Text
versionName :: Maybe Text
$sel:versionName:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
versionName} -> Maybe Text
versionName) (\s :: DocumentIdentifier
s@DocumentIdentifier' {} Maybe Text
a -> DocumentIdentifier
s {$sel:versionName:DocumentIdentifier' :: Maybe Text
versionName = Maybe Text
a} :: DocumentIdentifier)

instance Data.FromJSON DocumentIdentifier where
  parseJSON :: Value -> Parser DocumentIdentifier
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"DocumentIdentifier"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe DocumentFormat
-> Maybe DocumentType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [PlatformType]
-> Maybe (NonEmpty DocumentRequires)
-> Maybe ReviewStatus
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Text
-> DocumentIdentifier
DocumentIdentifier'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (Maybe a)
Data..:? Key
"CreatedDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DisplayName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DocumentFormat")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DocumentType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (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 -> Parser (Maybe a)
Data..:? Key
"Owner")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PlatformTypes" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Requires")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReviewStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SchemaVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TargetType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VersionName")
      )

instance Prelude.Hashable DocumentIdentifier where
  hashWithSalt :: Int -> DocumentIdentifier -> Int
hashWithSalt Int
_salt DocumentIdentifier' {Maybe [PlatformType]
Maybe [Tag]
Maybe (NonEmpty DocumentRequires)
Maybe Text
Maybe POSIX
Maybe DocumentFormat
Maybe DocumentType
Maybe ReviewStatus
versionName :: Maybe Text
targetType :: Maybe Text
tags :: Maybe [Tag]
schemaVersion :: Maybe Text
reviewStatus :: Maybe ReviewStatus
requires :: Maybe (NonEmpty DocumentRequires)
platformTypes :: Maybe [PlatformType]
owner :: Maybe Text
name :: Maybe Text
documentVersion :: Maybe Text
documentType :: Maybe DocumentType
documentFormat :: Maybe DocumentFormat
displayName :: Maybe Text
createdDate :: Maybe POSIX
author :: Maybe Text
$sel:versionName:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:targetType:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:tags:DocumentIdentifier' :: DocumentIdentifier -> Maybe [Tag]
$sel:schemaVersion:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:reviewStatus:DocumentIdentifier' :: DocumentIdentifier -> Maybe ReviewStatus
$sel:requires:DocumentIdentifier' :: DocumentIdentifier -> Maybe (NonEmpty DocumentRequires)
$sel:platformTypes:DocumentIdentifier' :: DocumentIdentifier -> Maybe [PlatformType]
$sel:owner:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:name:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:documentVersion:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:documentType:DocumentIdentifier' :: DocumentIdentifier -> Maybe DocumentType
$sel:documentFormat:DocumentIdentifier' :: DocumentIdentifier -> Maybe DocumentFormat
$sel:displayName:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:createdDate:DocumentIdentifier' :: DocumentIdentifier -> Maybe POSIX
$sel:author:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
author
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
displayName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DocumentFormat
documentFormat
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DocumentType
documentType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
documentVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
owner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [PlatformType]
platformTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty DocumentRequires)
requires
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReviewStatus
reviewStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
schemaVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
targetType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
versionName

instance Prelude.NFData DocumentIdentifier where
  rnf :: DocumentIdentifier -> ()
rnf DocumentIdentifier' {Maybe [PlatformType]
Maybe [Tag]
Maybe (NonEmpty DocumentRequires)
Maybe Text
Maybe POSIX
Maybe DocumentFormat
Maybe DocumentType
Maybe ReviewStatus
versionName :: Maybe Text
targetType :: Maybe Text
tags :: Maybe [Tag]
schemaVersion :: Maybe Text
reviewStatus :: Maybe ReviewStatus
requires :: Maybe (NonEmpty DocumentRequires)
platformTypes :: Maybe [PlatformType]
owner :: Maybe Text
name :: Maybe Text
documentVersion :: Maybe Text
documentType :: Maybe DocumentType
documentFormat :: Maybe DocumentFormat
displayName :: Maybe Text
createdDate :: Maybe POSIX
author :: Maybe Text
$sel:versionName:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:targetType:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:tags:DocumentIdentifier' :: DocumentIdentifier -> Maybe [Tag]
$sel:schemaVersion:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:reviewStatus:DocumentIdentifier' :: DocumentIdentifier -> Maybe ReviewStatus
$sel:requires:DocumentIdentifier' :: DocumentIdentifier -> Maybe (NonEmpty DocumentRequires)
$sel:platformTypes:DocumentIdentifier' :: DocumentIdentifier -> Maybe [PlatformType]
$sel:owner:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:name:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:documentVersion:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:documentType:DocumentIdentifier' :: DocumentIdentifier -> Maybe DocumentType
$sel:documentFormat:DocumentIdentifier' :: DocumentIdentifier -> Maybe DocumentFormat
$sel:displayName:DocumentIdentifier' :: DocumentIdentifier -> Maybe Text
$sel:createdDate:DocumentIdentifier' :: DocumentIdentifier -> Maybe POSIX
$sel:author:DocumentIdentifier' :: DocumentIdentifier -> 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 POSIX
createdDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
displayName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DocumentFormat
documentFormat
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DocumentType
documentType
      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 Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
owner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PlatformType]
platformTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty DocumentRequires)
requires
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReviewStatus
reviewStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
targetType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
versionName