{-# 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 #-}
module Amazonka.SSM.GetDocument
(
GetDocument (..),
newGetDocument,
getDocument_documentFormat,
getDocument_documentVersion,
getDocument_versionName,
getDocument_name,
GetDocumentResponse (..),
newGetDocumentResponse,
getDocumentResponse_attachmentsContent,
getDocumentResponse_content,
getDocumentResponse_createdDate,
getDocumentResponse_displayName,
getDocumentResponse_documentFormat,
getDocumentResponse_documentType,
getDocumentResponse_documentVersion,
getDocumentResponse_name,
getDocumentResponse_requires,
getDocumentResponse_reviewStatus,
getDocumentResponse_status,
getDocumentResponse_statusInformation,
getDocumentResponse_versionName,
getDocumentResponse_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
data GetDocument = GetDocument'
{
GetDocument -> Maybe DocumentFormat
documentFormat :: Prelude.Maybe DocumentFormat,
GetDocument -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
GetDocument -> Maybe Text
versionName :: Prelude.Maybe Prelude.Text,
GetDocument -> Text
name :: Prelude.Text
}
deriving (GetDocument -> GetDocument -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDocument -> GetDocument -> Bool
$c/= :: GetDocument -> GetDocument -> Bool
== :: GetDocument -> GetDocument -> Bool
$c== :: GetDocument -> GetDocument -> Bool
Prelude.Eq, ReadPrec [GetDocument]
ReadPrec GetDocument
Int -> ReadS GetDocument
ReadS [GetDocument]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDocument]
$creadListPrec :: ReadPrec [GetDocument]
readPrec :: ReadPrec GetDocument
$creadPrec :: ReadPrec GetDocument
readList :: ReadS [GetDocument]
$creadList :: ReadS [GetDocument]
readsPrec :: Int -> ReadS GetDocument
$creadsPrec :: Int -> ReadS GetDocument
Prelude.Read, Int -> GetDocument -> ShowS
[GetDocument] -> ShowS
GetDocument -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDocument] -> ShowS
$cshowList :: [GetDocument] -> ShowS
show :: GetDocument -> String
$cshow :: GetDocument -> String
showsPrec :: Int -> GetDocument -> ShowS
$cshowsPrec :: Int -> GetDocument -> ShowS
Prelude.Show, forall x. Rep GetDocument x -> GetDocument
forall x. GetDocument -> Rep GetDocument x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDocument x -> GetDocument
$cfrom :: forall x. GetDocument -> Rep GetDocument x
Prelude.Generic)
newGetDocument ::
Prelude.Text ->
GetDocument
newGetDocument :: Text -> GetDocument
newGetDocument Text
pName_ =
GetDocument'
{ $sel:documentFormat:GetDocument' :: Maybe DocumentFormat
documentFormat = forall a. Maybe a
Prelude.Nothing,
$sel:documentVersion:GetDocument' :: Maybe Text
documentVersion = forall a. Maybe a
Prelude.Nothing,
$sel:versionName:GetDocument' :: Maybe Text
versionName = forall a. Maybe a
Prelude.Nothing,
$sel:name:GetDocument' :: Text
name = Text
pName_
}
getDocument_documentFormat :: Lens.Lens' GetDocument (Prelude.Maybe DocumentFormat)
getDocument_documentFormat :: Lens' GetDocument (Maybe DocumentFormat)
getDocument_documentFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocument' {Maybe DocumentFormat
documentFormat :: Maybe DocumentFormat
$sel:documentFormat:GetDocument' :: GetDocument -> Maybe DocumentFormat
documentFormat} -> Maybe DocumentFormat
documentFormat) (\s :: GetDocument
s@GetDocument' {} Maybe DocumentFormat
a -> GetDocument
s {$sel:documentFormat:GetDocument' :: Maybe DocumentFormat
documentFormat = Maybe DocumentFormat
a} :: GetDocument)
getDocument_documentVersion :: Lens.Lens' GetDocument (Prelude.Maybe Prelude.Text)
getDocument_documentVersion :: Lens' GetDocument (Maybe Text)
getDocument_documentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocument' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:GetDocument' :: GetDocument -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: GetDocument
s@GetDocument' {} Maybe Text
a -> GetDocument
s {$sel:documentVersion:GetDocument' :: Maybe Text
documentVersion = Maybe Text
a} :: GetDocument)
getDocument_versionName :: Lens.Lens' GetDocument (Prelude.Maybe Prelude.Text)
getDocument_versionName :: Lens' GetDocument (Maybe Text)
getDocument_versionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocument' {Maybe Text
versionName :: Maybe Text
$sel:versionName:GetDocument' :: GetDocument -> Maybe Text
versionName} -> Maybe Text
versionName) (\s :: GetDocument
s@GetDocument' {} Maybe Text
a -> GetDocument
s {$sel:versionName:GetDocument' :: Maybe Text
versionName = Maybe Text
a} :: GetDocument)
getDocument_name :: Lens.Lens' GetDocument Prelude.Text
getDocument_name :: Lens' GetDocument Text
getDocument_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocument' {Text
name :: Text
$sel:name:GetDocument' :: GetDocument -> Text
name} -> Text
name) (\s :: GetDocument
s@GetDocument' {} Text
a -> GetDocument
s {$sel:name:GetDocument' :: Text
name = Text
a} :: GetDocument)
instance Core.AWSRequest GetDocument where
type AWSResponse GetDocument = GetDocumentResponse
request :: (Service -> Service) -> GetDocument -> Request GetDocument
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 GetDocument
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDocument)))
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 [AttachmentContent]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe DocumentFormat
-> Maybe DocumentType
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty DocumentRequires)
-> Maybe ReviewStatus
-> Maybe DocumentStatus
-> Maybe Text
-> Maybe Text
-> Int
-> GetDocumentResponse
GetDocumentResponse'
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
"AttachmentsContent"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Content")
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
"CreatedDate")
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
"DisplayName")
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
"DocumentFormat")
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
"DocumentType")
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
"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
"Requires")
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
"ReviewStatus")
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
"Status")
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
"StatusInformation")
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
"VersionName")
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 GetDocument where
hashWithSalt :: Int -> GetDocument -> Int
hashWithSalt Int
_salt GetDocument' {Maybe Text
Maybe DocumentFormat
Text
name :: Text
versionName :: Maybe Text
documentVersion :: Maybe Text
documentFormat :: Maybe DocumentFormat
$sel:name:GetDocument' :: GetDocument -> Text
$sel:versionName:GetDocument' :: GetDocument -> Maybe Text
$sel:documentVersion:GetDocument' :: GetDocument -> Maybe Text
$sel:documentFormat:GetDocument' :: GetDocument -> Maybe DocumentFormat
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DocumentFormat
documentFormat
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
documentVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
versionName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData GetDocument where
rnf :: GetDocument -> ()
rnf GetDocument' {Maybe Text
Maybe DocumentFormat
Text
name :: Text
versionName :: Maybe Text
documentVersion :: Maybe Text
documentFormat :: Maybe DocumentFormat
$sel:name:GetDocument' :: GetDocument -> Text
$sel:versionName:GetDocument' :: GetDocument -> Maybe Text
$sel:documentVersion:GetDocument' :: GetDocument -> Maybe Text
$sel:documentFormat:GetDocument' :: GetDocument -> Maybe DocumentFormat
..} =
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 Text
documentVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
versionName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
instance Data.ToHeaders GetDocument where
toHeaders :: GetDocument -> 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.GetDocument" :: 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 GetDocument where
toJSON :: GetDocument -> Value
toJSON GetDocument' {Maybe Text
Maybe DocumentFormat
Text
name :: Text
versionName :: Maybe Text
documentVersion :: Maybe Text
documentFormat :: Maybe DocumentFormat
$sel:name:GetDocument' :: GetDocument -> Text
$sel:versionName:GetDocument' :: GetDocument -> Maybe Text
$sel:documentVersion:GetDocument' :: GetDocument -> Maybe Text
$sel:documentFormat:GetDocument' :: GetDocument -> Maybe DocumentFormat
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"DocumentFormat" 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 DocumentFormat
documentFormat,
(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
"VersionName" 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
versionName,
forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
]
)
instance Data.ToPath GetDocument where
toPath :: GetDocument -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetDocument where
toQuery :: GetDocument -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetDocumentResponse = GetDocumentResponse'
{
GetDocumentResponse -> Maybe [AttachmentContent]
attachmentsContent :: Prelude.Maybe [AttachmentContent],
GetDocumentResponse -> Maybe Text
content :: Prelude.Maybe Prelude.Text,
GetDocumentResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Data.POSIX,
GetDocumentResponse -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
GetDocumentResponse -> Maybe DocumentFormat
documentFormat :: Prelude.Maybe DocumentFormat,
GetDocumentResponse -> Maybe DocumentType
documentType :: Prelude.Maybe DocumentType,
GetDocumentResponse -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
GetDocumentResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
GetDocumentResponse -> Maybe (NonEmpty DocumentRequires)
requires :: Prelude.Maybe (Prelude.NonEmpty DocumentRequires),
GetDocumentResponse -> Maybe ReviewStatus
reviewStatus :: Prelude.Maybe ReviewStatus,
GetDocumentResponse -> Maybe DocumentStatus
status :: Prelude.Maybe DocumentStatus,
GetDocumentResponse -> Maybe Text
statusInformation :: Prelude.Maybe Prelude.Text,
GetDocumentResponse -> Maybe Text
versionName :: Prelude.Maybe Prelude.Text,
GetDocumentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetDocumentResponse -> GetDocumentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDocumentResponse -> GetDocumentResponse -> Bool
$c/= :: GetDocumentResponse -> GetDocumentResponse -> Bool
== :: GetDocumentResponse -> GetDocumentResponse -> Bool
$c== :: GetDocumentResponse -> GetDocumentResponse -> Bool
Prelude.Eq, ReadPrec [GetDocumentResponse]
ReadPrec GetDocumentResponse
Int -> ReadS GetDocumentResponse
ReadS [GetDocumentResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDocumentResponse]
$creadListPrec :: ReadPrec [GetDocumentResponse]
readPrec :: ReadPrec GetDocumentResponse
$creadPrec :: ReadPrec GetDocumentResponse
readList :: ReadS [GetDocumentResponse]
$creadList :: ReadS [GetDocumentResponse]
readsPrec :: Int -> ReadS GetDocumentResponse
$creadsPrec :: Int -> ReadS GetDocumentResponse
Prelude.Read, Int -> GetDocumentResponse -> ShowS
[GetDocumentResponse] -> ShowS
GetDocumentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDocumentResponse] -> ShowS
$cshowList :: [GetDocumentResponse] -> ShowS
show :: GetDocumentResponse -> String
$cshow :: GetDocumentResponse -> String
showsPrec :: Int -> GetDocumentResponse -> ShowS
$cshowsPrec :: Int -> GetDocumentResponse -> ShowS
Prelude.Show, forall x. Rep GetDocumentResponse x -> GetDocumentResponse
forall x. GetDocumentResponse -> Rep GetDocumentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDocumentResponse x -> GetDocumentResponse
$cfrom :: forall x. GetDocumentResponse -> Rep GetDocumentResponse x
Prelude.Generic)
newGetDocumentResponse ::
Prelude.Int ->
GetDocumentResponse
newGetDocumentResponse :: Int -> GetDocumentResponse
newGetDocumentResponse Int
pHttpStatus_ =
GetDocumentResponse'
{ $sel:attachmentsContent:GetDocumentResponse' :: Maybe [AttachmentContent]
attachmentsContent =
forall a. Maybe a
Prelude.Nothing,
$sel:content:GetDocumentResponse' :: Maybe Text
content = forall a. Maybe a
Prelude.Nothing,
$sel:createdDate:GetDocumentResponse' :: Maybe POSIX
createdDate = forall a. Maybe a
Prelude.Nothing,
$sel:displayName:GetDocumentResponse' :: Maybe Text
displayName = forall a. Maybe a
Prelude.Nothing,
$sel:documentFormat:GetDocumentResponse' :: Maybe DocumentFormat
documentFormat = forall a. Maybe a
Prelude.Nothing,
$sel:documentType:GetDocumentResponse' :: Maybe DocumentType
documentType = forall a. Maybe a
Prelude.Nothing,
$sel:documentVersion:GetDocumentResponse' :: Maybe Text
documentVersion = forall a. Maybe a
Prelude.Nothing,
$sel:name:GetDocumentResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:requires:GetDocumentResponse' :: Maybe (NonEmpty DocumentRequires)
requires = forall a. Maybe a
Prelude.Nothing,
$sel:reviewStatus:GetDocumentResponse' :: Maybe ReviewStatus
reviewStatus = forall a. Maybe a
Prelude.Nothing,
$sel:status:GetDocumentResponse' :: Maybe DocumentStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:statusInformation:GetDocumentResponse' :: Maybe Text
statusInformation = forall a. Maybe a
Prelude.Nothing,
$sel:versionName:GetDocumentResponse' :: Maybe Text
versionName = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetDocumentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getDocumentResponse_attachmentsContent :: Lens.Lens' GetDocumentResponse (Prelude.Maybe [AttachmentContent])
getDocumentResponse_attachmentsContent :: Lens' GetDocumentResponse (Maybe [AttachmentContent])
getDocumentResponse_attachmentsContent = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe [AttachmentContent]
attachmentsContent :: Maybe [AttachmentContent]
$sel:attachmentsContent:GetDocumentResponse' :: GetDocumentResponse -> Maybe [AttachmentContent]
attachmentsContent} -> Maybe [AttachmentContent]
attachmentsContent) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe [AttachmentContent]
a -> GetDocumentResponse
s {$sel:attachmentsContent:GetDocumentResponse' :: Maybe [AttachmentContent]
attachmentsContent = Maybe [AttachmentContent]
a} :: GetDocumentResponse) 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
getDocumentResponse_content :: Lens.Lens' GetDocumentResponse (Prelude.Maybe Prelude.Text)
getDocumentResponse_content :: Lens' GetDocumentResponse (Maybe Text)
getDocumentResponse_content = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe Text
content :: Maybe Text
$sel:content:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
content} -> Maybe Text
content) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe Text
a -> GetDocumentResponse
s {$sel:content:GetDocumentResponse' :: Maybe Text
content = Maybe Text
a} :: GetDocumentResponse)
getDocumentResponse_createdDate :: Lens.Lens' GetDocumentResponse (Prelude.Maybe Prelude.UTCTime)
getDocumentResponse_createdDate :: Lens' GetDocumentResponse (Maybe UTCTime)
getDocumentResponse_createdDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:GetDocumentResponse' :: GetDocumentResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe POSIX
a -> GetDocumentResponse
s {$sel:createdDate:GetDocumentResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: GetDocumentResponse) 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
getDocumentResponse_displayName :: Lens.Lens' GetDocumentResponse (Prelude.Maybe Prelude.Text)
getDocumentResponse_displayName :: Lens' GetDocumentResponse (Maybe Text)
getDocumentResponse_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe Text
displayName :: Maybe Text
$sel:displayName:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe Text
a -> GetDocumentResponse
s {$sel:displayName:GetDocumentResponse' :: Maybe Text
displayName = Maybe Text
a} :: GetDocumentResponse)
getDocumentResponse_documentFormat :: Lens.Lens' GetDocumentResponse (Prelude.Maybe DocumentFormat)
getDocumentResponse_documentFormat :: Lens' GetDocumentResponse (Maybe DocumentFormat)
getDocumentResponse_documentFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe DocumentFormat
documentFormat :: Maybe DocumentFormat
$sel:documentFormat:GetDocumentResponse' :: GetDocumentResponse -> Maybe DocumentFormat
documentFormat} -> Maybe DocumentFormat
documentFormat) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe DocumentFormat
a -> GetDocumentResponse
s {$sel:documentFormat:GetDocumentResponse' :: Maybe DocumentFormat
documentFormat = Maybe DocumentFormat
a} :: GetDocumentResponse)
getDocumentResponse_documentType :: Lens.Lens' GetDocumentResponse (Prelude.Maybe DocumentType)
getDocumentResponse_documentType :: Lens' GetDocumentResponse (Maybe DocumentType)
getDocumentResponse_documentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe DocumentType
documentType :: Maybe DocumentType
$sel:documentType:GetDocumentResponse' :: GetDocumentResponse -> Maybe DocumentType
documentType} -> Maybe DocumentType
documentType) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe DocumentType
a -> GetDocumentResponse
s {$sel:documentType:GetDocumentResponse' :: Maybe DocumentType
documentType = Maybe DocumentType
a} :: GetDocumentResponse)
getDocumentResponse_documentVersion :: Lens.Lens' GetDocumentResponse (Prelude.Maybe Prelude.Text)
getDocumentResponse_documentVersion :: Lens' GetDocumentResponse (Maybe Text)
getDocumentResponse_documentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe Text
a -> GetDocumentResponse
s {$sel:documentVersion:GetDocumentResponse' :: Maybe Text
documentVersion = Maybe Text
a} :: GetDocumentResponse)
getDocumentResponse_name :: Lens.Lens' GetDocumentResponse (Prelude.Maybe Prelude.Text)
getDocumentResponse_name :: Lens' GetDocumentResponse (Maybe Text)
getDocumentResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe Text
a -> GetDocumentResponse
s {$sel:name:GetDocumentResponse' :: Maybe Text
name = Maybe Text
a} :: GetDocumentResponse)
getDocumentResponse_requires :: Lens.Lens' GetDocumentResponse (Prelude.Maybe (Prelude.NonEmpty DocumentRequires))
getDocumentResponse_requires :: Lens' GetDocumentResponse (Maybe (NonEmpty DocumentRequires))
getDocumentResponse_requires = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe (NonEmpty DocumentRequires)
requires :: Maybe (NonEmpty DocumentRequires)
$sel:requires:GetDocumentResponse' :: GetDocumentResponse -> Maybe (NonEmpty DocumentRequires)
requires} -> Maybe (NonEmpty DocumentRequires)
requires) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe (NonEmpty DocumentRequires)
a -> GetDocumentResponse
s {$sel:requires:GetDocumentResponse' :: Maybe (NonEmpty DocumentRequires)
requires = Maybe (NonEmpty DocumentRequires)
a} :: GetDocumentResponse) 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
getDocumentResponse_reviewStatus :: Lens.Lens' GetDocumentResponse (Prelude.Maybe ReviewStatus)
getDocumentResponse_reviewStatus :: Lens' GetDocumentResponse (Maybe ReviewStatus)
getDocumentResponse_reviewStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe ReviewStatus
reviewStatus :: Maybe ReviewStatus
$sel:reviewStatus:GetDocumentResponse' :: GetDocumentResponse -> Maybe ReviewStatus
reviewStatus} -> Maybe ReviewStatus
reviewStatus) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe ReviewStatus
a -> GetDocumentResponse
s {$sel:reviewStatus:GetDocumentResponse' :: Maybe ReviewStatus
reviewStatus = Maybe ReviewStatus
a} :: GetDocumentResponse)
getDocumentResponse_status :: Lens.Lens' GetDocumentResponse (Prelude.Maybe DocumentStatus)
getDocumentResponse_status :: Lens' GetDocumentResponse (Maybe DocumentStatus)
getDocumentResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe DocumentStatus
status :: Maybe DocumentStatus
$sel:status:GetDocumentResponse' :: GetDocumentResponse -> Maybe DocumentStatus
status} -> Maybe DocumentStatus
status) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe DocumentStatus
a -> GetDocumentResponse
s {$sel:status:GetDocumentResponse' :: Maybe DocumentStatus
status = Maybe DocumentStatus
a} :: GetDocumentResponse)
getDocumentResponse_statusInformation :: Lens.Lens' GetDocumentResponse (Prelude.Maybe Prelude.Text)
getDocumentResponse_statusInformation :: Lens' GetDocumentResponse (Maybe Text)
getDocumentResponse_statusInformation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe Text
statusInformation :: Maybe Text
$sel:statusInformation:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
statusInformation} -> Maybe Text
statusInformation) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe Text
a -> GetDocumentResponse
s {$sel:statusInformation:GetDocumentResponse' :: Maybe Text
statusInformation = Maybe Text
a} :: GetDocumentResponse)
getDocumentResponse_versionName :: Lens.Lens' GetDocumentResponse (Prelude.Maybe Prelude.Text)
getDocumentResponse_versionName :: Lens' GetDocumentResponse (Maybe Text)
getDocumentResponse_versionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Maybe Text
versionName :: Maybe Text
$sel:versionName:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
versionName} -> Maybe Text
versionName) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Maybe Text
a -> GetDocumentResponse
s {$sel:versionName:GetDocumentResponse' :: Maybe Text
versionName = Maybe Text
a} :: GetDocumentResponse)
getDocumentResponse_httpStatus :: Lens.Lens' GetDocumentResponse Prelude.Int
getDocumentResponse_httpStatus :: Lens' GetDocumentResponse Int
getDocumentResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDocumentResponse' :: GetDocumentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDocumentResponse
s@GetDocumentResponse' {} Int
a -> GetDocumentResponse
s {$sel:httpStatus:GetDocumentResponse' :: Int
httpStatus = Int
a} :: GetDocumentResponse)
instance Prelude.NFData GetDocumentResponse where
rnf :: GetDocumentResponse -> ()
rnf GetDocumentResponse' {Int
Maybe [AttachmentContent]
Maybe (NonEmpty DocumentRequires)
Maybe Text
Maybe POSIX
Maybe DocumentFormat
Maybe DocumentStatus
Maybe DocumentType
Maybe ReviewStatus
httpStatus :: Int
versionName :: Maybe Text
statusInformation :: Maybe Text
status :: Maybe DocumentStatus
reviewStatus :: Maybe ReviewStatus
requires :: Maybe (NonEmpty DocumentRequires)
name :: Maybe Text
documentVersion :: Maybe Text
documentType :: Maybe DocumentType
documentFormat :: Maybe DocumentFormat
displayName :: Maybe Text
createdDate :: Maybe POSIX
content :: Maybe Text
attachmentsContent :: Maybe [AttachmentContent]
$sel:httpStatus:GetDocumentResponse' :: GetDocumentResponse -> Int
$sel:versionName:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
$sel:statusInformation:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
$sel:status:GetDocumentResponse' :: GetDocumentResponse -> Maybe DocumentStatus
$sel:reviewStatus:GetDocumentResponse' :: GetDocumentResponse -> Maybe ReviewStatus
$sel:requires:GetDocumentResponse' :: GetDocumentResponse -> Maybe (NonEmpty DocumentRequires)
$sel:name:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
$sel:documentVersion:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
$sel:documentType:GetDocumentResponse' :: GetDocumentResponse -> Maybe DocumentType
$sel:documentFormat:GetDocumentResponse' :: GetDocumentResponse -> Maybe DocumentFormat
$sel:displayName:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
$sel:createdDate:GetDocumentResponse' :: GetDocumentResponse -> Maybe POSIX
$sel:content:GetDocumentResponse' :: GetDocumentResponse -> Maybe Text
$sel:attachmentsContent:GetDocumentResponse' :: GetDocumentResponse -> Maybe [AttachmentContent]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [AttachmentContent]
attachmentsContent
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
content
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 (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 DocumentStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusInformation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
versionName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus