{-# 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.IoT.GetPolicyVersion
(
GetPolicyVersion (..),
newGetPolicyVersion,
getPolicyVersion_policyName,
getPolicyVersion_policyVersionId,
GetPolicyVersionResponse (..),
newGetPolicyVersionResponse,
getPolicyVersionResponse_lastModifiedDate,
getPolicyVersionResponse_policyName,
getPolicyVersionResponse_policyDocument,
getPolicyVersionResponse_policyVersionId,
getPolicyVersionResponse_policyArn,
getPolicyVersionResponse_creationDate,
getPolicyVersionResponse_generationId,
getPolicyVersionResponse_isDefaultVersion,
getPolicyVersionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetPolicyVersion = GetPolicyVersion'
{
GetPolicyVersion -> Text
policyName :: Prelude.Text,
GetPolicyVersion -> Text
policyVersionId :: Prelude.Text
}
deriving (GetPolicyVersion -> GetPolicyVersion -> Bool
(GetPolicyVersion -> GetPolicyVersion -> Bool)
-> (GetPolicyVersion -> GetPolicyVersion -> Bool)
-> Eq GetPolicyVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPolicyVersion -> GetPolicyVersion -> Bool
$c/= :: GetPolicyVersion -> GetPolicyVersion -> Bool
== :: GetPolicyVersion -> GetPolicyVersion -> Bool
$c== :: GetPolicyVersion -> GetPolicyVersion -> Bool
Prelude.Eq, ReadPrec [GetPolicyVersion]
ReadPrec GetPolicyVersion
Int -> ReadS GetPolicyVersion
ReadS [GetPolicyVersion]
(Int -> ReadS GetPolicyVersion)
-> ReadS [GetPolicyVersion]
-> ReadPrec GetPolicyVersion
-> ReadPrec [GetPolicyVersion]
-> Read GetPolicyVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPolicyVersion]
$creadListPrec :: ReadPrec [GetPolicyVersion]
readPrec :: ReadPrec GetPolicyVersion
$creadPrec :: ReadPrec GetPolicyVersion
readList :: ReadS [GetPolicyVersion]
$creadList :: ReadS [GetPolicyVersion]
readsPrec :: Int -> ReadS GetPolicyVersion
$creadsPrec :: Int -> ReadS GetPolicyVersion
Prelude.Read, Int -> GetPolicyVersion -> ShowS
[GetPolicyVersion] -> ShowS
GetPolicyVersion -> String
(Int -> GetPolicyVersion -> ShowS)
-> (GetPolicyVersion -> String)
-> ([GetPolicyVersion] -> ShowS)
-> Show GetPolicyVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPolicyVersion] -> ShowS
$cshowList :: [GetPolicyVersion] -> ShowS
show :: GetPolicyVersion -> String
$cshow :: GetPolicyVersion -> String
showsPrec :: Int -> GetPolicyVersion -> ShowS
$cshowsPrec :: Int -> GetPolicyVersion -> ShowS
Prelude.Show, (forall x. GetPolicyVersion -> Rep GetPolicyVersion x)
-> (forall x. Rep GetPolicyVersion x -> GetPolicyVersion)
-> Generic GetPolicyVersion
forall x. Rep GetPolicyVersion x -> GetPolicyVersion
forall x. GetPolicyVersion -> Rep GetPolicyVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetPolicyVersion x -> GetPolicyVersion
$cfrom :: forall x. GetPolicyVersion -> Rep GetPolicyVersion x
Prelude.Generic)
newGetPolicyVersion ::
Prelude.Text ->
Prelude.Text ->
GetPolicyVersion
newGetPolicyVersion :: Text -> Text -> GetPolicyVersion
newGetPolicyVersion Text
pPolicyName_ Text
pPolicyVersionId_ =
GetPolicyVersion' :: Text -> Text -> GetPolicyVersion
GetPolicyVersion'
{ $sel:policyName:GetPolicyVersion' :: Text
policyName = Text
pPolicyName_,
$sel:policyVersionId:GetPolicyVersion' :: Text
policyVersionId = Text
pPolicyVersionId_
}
getPolicyVersion_policyName :: Lens.Lens' GetPolicyVersion Prelude.Text
getPolicyVersion_policyName :: (Text -> f Text) -> GetPolicyVersion -> f GetPolicyVersion
getPolicyVersion_policyName = (GetPolicyVersion -> Text)
-> (GetPolicyVersion -> Text -> GetPolicyVersion)
-> Lens GetPolicyVersion GetPolicyVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersion' {Text
policyName :: Text
$sel:policyName:GetPolicyVersion' :: GetPolicyVersion -> Text
policyName} -> Text
policyName) (\s :: GetPolicyVersion
s@GetPolicyVersion' {} Text
a -> GetPolicyVersion
s {$sel:policyName:GetPolicyVersion' :: Text
policyName = Text
a} :: GetPolicyVersion)
getPolicyVersion_policyVersionId :: Lens.Lens' GetPolicyVersion Prelude.Text
getPolicyVersion_policyVersionId :: (Text -> f Text) -> GetPolicyVersion -> f GetPolicyVersion
getPolicyVersion_policyVersionId = (GetPolicyVersion -> Text)
-> (GetPolicyVersion -> Text -> GetPolicyVersion)
-> Lens GetPolicyVersion GetPolicyVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersion' {Text
policyVersionId :: Text
$sel:policyVersionId:GetPolicyVersion' :: GetPolicyVersion -> Text
policyVersionId} -> Text
policyVersionId) (\s :: GetPolicyVersion
s@GetPolicyVersion' {} Text
a -> GetPolicyVersion
s {$sel:policyVersionId:GetPolicyVersion' :: Text
policyVersionId = Text
a} :: GetPolicyVersion)
instance Core.AWSRequest GetPolicyVersion where
type
AWSResponse GetPolicyVersion =
GetPolicyVersionResponse
request :: GetPolicyVersion -> Request GetPolicyVersion
request = Service -> GetPolicyVersion -> Request GetPolicyVersion
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetPolicyVersion
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetPolicyVersion)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetPolicyVersion))
-> Logger
-> Service
-> Proxy GetPolicyVersion
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetPolicyVersion)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse
GetPolicyVersionResponse'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastModifiedDate")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"policyName")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"policyDocument")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"policyVersionId")
Either
String
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe POSIX
-> Maybe Text -> Maybe Bool -> Int -> GetPolicyVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"policyArn")
Either
String
(Maybe POSIX
-> Maybe Text -> Maybe Bool -> Int -> GetPolicyVersionResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text -> Maybe Bool -> Int -> GetPolicyVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"creationDate")
Either
String
(Maybe Text -> Maybe Bool -> Int -> GetPolicyVersionResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Bool -> Int -> GetPolicyVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"generationId")
Either String (Maybe Bool -> Int -> GetPolicyVersionResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> GetPolicyVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"isDefaultVersion")
Either String (Int -> GetPolicyVersionResponse)
-> Either String Int -> Either String GetPolicyVersionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable GetPolicyVersion
instance Prelude.NFData GetPolicyVersion
instance Core.ToHeaders GetPolicyVersion where
toHeaders :: GetPolicyVersion -> ResponseHeaders
toHeaders = ResponseHeaders -> GetPolicyVersion -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath GetPolicyVersion where
toPath :: GetPolicyVersion -> ByteString
toPath GetPolicyVersion' {Text
policyVersionId :: Text
policyName :: Text
$sel:policyVersionId:GetPolicyVersion' :: GetPolicyVersion -> Text
$sel:policyName:GetPolicyVersion' :: GetPolicyVersion -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/policies/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
policyName,
ByteString
"/version/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
policyVersionId
]
instance Core.ToQuery GetPolicyVersion where
toQuery :: GetPolicyVersion -> QueryString
toQuery = QueryString -> GetPolicyVersion -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetPolicyVersionResponse = GetPolicyVersionResponse'
{
GetPolicyVersionResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
GetPolicyVersionResponse -> Maybe Text
policyName :: Prelude.Maybe Prelude.Text,
GetPolicyVersionResponse -> Maybe Text
policyDocument :: Prelude.Maybe Prelude.Text,
GetPolicyVersionResponse -> Maybe Text
policyVersionId :: Prelude.Maybe Prelude.Text,
GetPolicyVersionResponse -> Maybe Text
policyArn :: Prelude.Maybe Prelude.Text,
GetPolicyVersionResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
GetPolicyVersionResponse -> Maybe Text
generationId :: Prelude.Maybe Prelude.Text,
GetPolicyVersionResponse -> Maybe Bool
isDefaultVersion :: Prelude.Maybe Prelude.Bool,
GetPolicyVersionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetPolicyVersionResponse -> GetPolicyVersionResponse -> Bool
(GetPolicyVersionResponse -> GetPolicyVersionResponse -> Bool)
-> (GetPolicyVersionResponse -> GetPolicyVersionResponse -> Bool)
-> Eq GetPolicyVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPolicyVersionResponse -> GetPolicyVersionResponse -> Bool
$c/= :: GetPolicyVersionResponse -> GetPolicyVersionResponse -> Bool
== :: GetPolicyVersionResponse -> GetPolicyVersionResponse -> Bool
$c== :: GetPolicyVersionResponse -> GetPolicyVersionResponse -> Bool
Prelude.Eq, ReadPrec [GetPolicyVersionResponse]
ReadPrec GetPolicyVersionResponse
Int -> ReadS GetPolicyVersionResponse
ReadS [GetPolicyVersionResponse]
(Int -> ReadS GetPolicyVersionResponse)
-> ReadS [GetPolicyVersionResponse]
-> ReadPrec GetPolicyVersionResponse
-> ReadPrec [GetPolicyVersionResponse]
-> Read GetPolicyVersionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPolicyVersionResponse]
$creadListPrec :: ReadPrec [GetPolicyVersionResponse]
readPrec :: ReadPrec GetPolicyVersionResponse
$creadPrec :: ReadPrec GetPolicyVersionResponse
readList :: ReadS [GetPolicyVersionResponse]
$creadList :: ReadS [GetPolicyVersionResponse]
readsPrec :: Int -> ReadS GetPolicyVersionResponse
$creadsPrec :: Int -> ReadS GetPolicyVersionResponse
Prelude.Read, Int -> GetPolicyVersionResponse -> ShowS
[GetPolicyVersionResponse] -> ShowS
GetPolicyVersionResponse -> String
(Int -> GetPolicyVersionResponse -> ShowS)
-> (GetPolicyVersionResponse -> String)
-> ([GetPolicyVersionResponse] -> ShowS)
-> Show GetPolicyVersionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPolicyVersionResponse] -> ShowS
$cshowList :: [GetPolicyVersionResponse] -> ShowS
show :: GetPolicyVersionResponse -> String
$cshow :: GetPolicyVersionResponse -> String
showsPrec :: Int -> GetPolicyVersionResponse -> ShowS
$cshowsPrec :: Int -> GetPolicyVersionResponse -> ShowS
Prelude.Show, (forall x.
GetPolicyVersionResponse -> Rep GetPolicyVersionResponse x)
-> (forall x.
Rep GetPolicyVersionResponse x -> GetPolicyVersionResponse)
-> Generic GetPolicyVersionResponse
forall x.
Rep GetPolicyVersionResponse x -> GetPolicyVersionResponse
forall x.
GetPolicyVersionResponse -> Rep GetPolicyVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetPolicyVersionResponse x -> GetPolicyVersionResponse
$cfrom :: forall x.
GetPolicyVersionResponse -> Rep GetPolicyVersionResponse x
Prelude.Generic)
newGetPolicyVersionResponse ::
Prelude.Int ->
GetPolicyVersionResponse
newGetPolicyVersionResponse :: Int -> GetPolicyVersionResponse
newGetPolicyVersionResponse Int
pHttpStatus_ =
GetPolicyVersionResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> GetPolicyVersionResponse
GetPolicyVersionResponse'
{ $sel:lastModifiedDate:GetPolicyVersionResponse' :: Maybe POSIX
lastModifiedDate =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:policyName:GetPolicyVersionResponse' :: Maybe Text
policyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyDocument:GetPolicyVersionResponse' :: Maybe Text
policyDocument = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyVersionId:GetPolicyVersionResponse' :: Maybe Text
policyVersionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyArn:GetPolicyVersionResponse' :: Maybe Text
policyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:GetPolicyVersionResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:generationId:GetPolicyVersionResponse' :: Maybe Text
generationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isDefaultVersion:GetPolicyVersionResponse' :: Maybe Bool
isDefaultVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetPolicyVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getPolicyVersionResponse_lastModifiedDate :: Lens.Lens' GetPolicyVersionResponse (Prelude.Maybe Prelude.UTCTime)
getPolicyVersionResponse_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse
getPolicyVersionResponse_lastModifiedDate = (GetPolicyVersionResponse -> Maybe POSIX)
-> (GetPolicyVersionResponse
-> Maybe POSIX -> GetPolicyVersionResponse)
-> Lens
GetPolicyVersionResponse
GetPolicyVersionResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersionResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:GetPolicyVersionResponse' :: GetPolicyVersionResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: GetPolicyVersionResponse
s@GetPolicyVersionResponse' {} Maybe POSIX
a -> GetPolicyVersionResponse
s {$sel:lastModifiedDate:GetPolicyVersionResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: GetPolicyVersionResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetPolicyVersionResponse
-> f GetPolicyVersionResponse
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
getPolicyVersionResponse_policyName :: Lens.Lens' GetPolicyVersionResponse (Prelude.Maybe Prelude.Text)
getPolicyVersionResponse_policyName :: (Maybe Text -> f (Maybe Text))
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse
getPolicyVersionResponse_policyName = (GetPolicyVersionResponse -> Maybe Text)
-> (GetPolicyVersionResponse
-> Maybe Text -> GetPolicyVersionResponse)
-> Lens
GetPolicyVersionResponse
GetPolicyVersionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersionResponse' {Maybe Text
policyName :: Maybe Text
$sel:policyName:GetPolicyVersionResponse' :: GetPolicyVersionResponse -> Maybe Text
policyName} -> Maybe Text
policyName) (\s :: GetPolicyVersionResponse
s@GetPolicyVersionResponse' {} Maybe Text
a -> GetPolicyVersionResponse
s {$sel:policyName:GetPolicyVersionResponse' :: Maybe Text
policyName = Maybe Text
a} :: GetPolicyVersionResponse)
getPolicyVersionResponse_policyDocument :: Lens.Lens' GetPolicyVersionResponse (Prelude.Maybe Prelude.Text)
getPolicyVersionResponse_policyDocument :: (Maybe Text -> f (Maybe Text))
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse
getPolicyVersionResponse_policyDocument = (GetPolicyVersionResponse -> Maybe Text)
-> (GetPolicyVersionResponse
-> Maybe Text -> GetPolicyVersionResponse)
-> Lens
GetPolicyVersionResponse
GetPolicyVersionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersionResponse' {Maybe Text
policyDocument :: Maybe Text
$sel:policyDocument:GetPolicyVersionResponse' :: GetPolicyVersionResponse -> Maybe Text
policyDocument} -> Maybe Text
policyDocument) (\s :: GetPolicyVersionResponse
s@GetPolicyVersionResponse' {} Maybe Text
a -> GetPolicyVersionResponse
s {$sel:policyDocument:GetPolicyVersionResponse' :: Maybe Text
policyDocument = Maybe Text
a} :: GetPolicyVersionResponse)
getPolicyVersionResponse_policyVersionId :: Lens.Lens' GetPolicyVersionResponse (Prelude.Maybe Prelude.Text)
getPolicyVersionResponse_policyVersionId :: (Maybe Text -> f (Maybe Text))
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse
getPolicyVersionResponse_policyVersionId = (GetPolicyVersionResponse -> Maybe Text)
-> (GetPolicyVersionResponse
-> Maybe Text -> GetPolicyVersionResponse)
-> Lens
GetPolicyVersionResponse
GetPolicyVersionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersionResponse' {Maybe Text
policyVersionId :: Maybe Text
$sel:policyVersionId:GetPolicyVersionResponse' :: GetPolicyVersionResponse -> Maybe Text
policyVersionId} -> Maybe Text
policyVersionId) (\s :: GetPolicyVersionResponse
s@GetPolicyVersionResponse' {} Maybe Text
a -> GetPolicyVersionResponse
s {$sel:policyVersionId:GetPolicyVersionResponse' :: Maybe Text
policyVersionId = Maybe Text
a} :: GetPolicyVersionResponse)
getPolicyVersionResponse_policyArn :: Lens.Lens' GetPolicyVersionResponse (Prelude.Maybe Prelude.Text)
getPolicyVersionResponse_policyArn :: (Maybe Text -> f (Maybe Text))
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse
getPolicyVersionResponse_policyArn = (GetPolicyVersionResponse -> Maybe Text)
-> (GetPolicyVersionResponse
-> Maybe Text -> GetPolicyVersionResponse)
-> Lens
GetPolicyVersionResponse
GetPolicyVersionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersionResponse' {Maybe Text
policyArn :: Maybe Text
$sel:policyArn:GetPolicyVersionResponse' :: GetPolicyVersionResponse -> Maybe Text
policyArn} -> Maybe Text
policyArn) (\s :: GetPolicyVersionResponse
s@GetPolicyVersionResponse' {} Maybe Text
a -> GetPolicyVersionResponse
s {$sel:policyArn:GetPolicyVersionResponse' :: Maybe Text
policyArn = Maybe Text
a} :: GetPolicyVersionResponse)
getPolicyVersionResponse_creationDate :: Lens.Lens' GetPolicyVersionResponse (Prelude.Maybe Prelude.UTCTime)
getPolicyVersionResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse
getPolicyVersionResponse_creationDate = (GetPolicyVersionResponse -> Maybe POSIX)
-> (GetPolicyVersionResponse
-> Maybe POSIX -> GetPolicyVersionResponse)
-> Lens
GetPolicyVersionResponse
GetPolicyVersionResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersionResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:GetPolicyVersionResponse' :: GetPolicyVersionResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: GetPolicyVersionResponse
s@GetPolicyVersionResponse' {} Maybe POSIX
a -> GetPolicyVersionResponse
s {$sel:creationDate:GetPolicyVersionResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: GetPolicyVersionResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetPolicyVersionResponse
-> f GetPolicyVersionResponse
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
getPolicyVersionResponse_generationId :: Lens.Lens' GetPolicyVersionResponse (Prelude.Maybe Prelude.Text)
getPolicyVersionResponse_generationId :: (Maybe Text -> f (Maybe Text))
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse
getPolicyVersionResponse_generationId = (GetPolicyVersionResponse -> Maybe Text)
-> (GetPolicyVersionResponse
-> Maybe Text -> GetPolicyVersionResponse)
-> Lens
GetPolicyVersionResponse
GetPolicyVersionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersionResponse' {Maybe Text
generationId :: Maybe Text
$sel:generationId:GetPolicyVersionResponse' :: GetPolicyVersionResponse -> Maybe Text
generationId} -> Maybe Text
generationId) (\s :: GetPolicyVersionResponse
s@GetPolicyVersionResponse' {} Maybe Text
a -> GetPolicyVersionResponse
s {$sel:generationId:GetPolicyVersionResponse' :: Maybe Text
generationId = Maybe Text
a} :: GetPolicyVersionResponse)
getPolicyVersionResponse_isDefaultVersion :: Lens.Lens' GetPolicyVersionResponse (Prelude.Maybe Prelude.Bool)
getPolicyVersionResponse_isDefaultVersion :: (Maybe Bool -> f (Maybe Bool))
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse
getPolicyVersionResponse_isDefaultVersion = (GetPolicyVersionResponse -> Maybe Bool)
-> (GetPolicyVersionResponse
-> Maybe Bool -> GetPolicyVersionResponse)
-> Lens
GetPolicyVersionResponse
GetPolicyVersionResponse
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersionResponse' {Maybe Bool
isDefaultVersion :: Maybe Bool
$sel:isDefaultVersion:GetPolicyVersionResponse' :: GetPolicyVersionResponse -> Maybe Bool
isDefaultVersion} -> Maybe Bool
isDefaultVersion) (\s :: GetPolicyVersionResponse
s@GetPolicyVersionResponse' {} Maybe Bool
a -> GetPolicyVersionResponse
s {$sel:isDefaultVersion:GetPolicyVersionResponse' :: Maybe Bool
isDefaultVersion = Maybe Bool
a} :: GetPolicyVersionResponse)
getPolicyVersionResponse_httpStatus :: Lens.Lens' GetPolicyVersionResponse Prelude.Int
getPolicyVersionResponse_httpStatus :: (Int -> f Int)
-> GetPolicyVersionResponse -> f GetPolicyVersionResponse
getPolicyVersionResponse_httpStatus = (GetPolicyVersionResponse -> Int)
-> (GetPolicyVersionResponse -> Int -> GetPolicyVersionResponse)
-> Lens GetPolicyVersionResponse GetPolicyVersionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyVersionResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetPolicyVersionResponse' :: GetPolicyVersionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetPolicyVersionResponse
s@GetPolicyVersionResponse' {} Int
a -> GetPolicyVersionResponse
s {$sel:httpStatus:GetPolicyVersionResponse' :: Int
httpStatus = Int
a} :: GetPolicyVersionResponse)
instance Prelude.NFData GetPolicyVersionResponse