{-# 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.GetPolicy
(
GetPolicy (..),
newGetPolicy,
getPolicy_policyName,
GetPolicyResponse (..),
newGetPolicyResponse,
getPolicyResponse_lastModifiedDate,
getPolicyResponse_policyName,
getPolicyResponse_policyDocument,
getPolicyResponse_defaultVersionId,
getPolicyResponse_policyArn,
getPolicyResponse_creationDate,
getPolicyResponse_generationId,
getPolicyResponse_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 GetPolicy = GetPolicy'
{
GetPolicy -> Text
policyName :: Prelude.Text
}
deriving (GetPolicy -> GetPolicy -> Bool
(GetPolicy -> GetPolicy -> Bool)
-> (GetPolicy -> GetPolicy -> Bool) -> Eq GetPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPolicy -> GetPolicy -> Bool
$c/= :: GetPolicy -> GetPolicy -> Bool
== :: GetPolicy -> GetPolicy -> Bool
$c== :: GetPolicy -> GetPolicy -> Bool
Prelude.Eq, ReadPrec [GetPolicy]
ReadPrec GetPolicy
Int -> ReadS GetPolicy
ReadS [GetPolicy]
(Int -> ReadS GetPolicy)
-> ReadS [GetPolicy]
-> ReadPrec GetPolicy
-> ReadPrec [GetPolicy]
-> Read GetPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPolicy]
$creadListPrec :: ReadPrec [GetPolicy]
readPrec :: ReadPrec GetPolicy
$creadPrec :: ReadPrec GetPolicy
readList :: ReadS [GetPolicy]
$creadList :: ReadS [GetPolicy]
readsPrec :: Int -> ReadS GetPolicy
$creadsPrec :: Int -> ReadS GetPolicy
Prelude.Read, Int -> GetPolicy -> ShowS
[GetPolicy] -> ShowS
GetPolicy -> String
(Int -> GetPolicy -> ShowS)
-> (GetPolicy -> String)
-> ([GetPolicy] -> ShowS)
-> Show GetPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPolicy] -> ShowS
$cshowList :: [GetPolicy] -> ShowS
show :: GetPolicy -> String
$cshow :: GetPolicy -> String
showsPrec :: Int -> GetPolicy -> ShowS
$cshowsPrec :: Int -> GetPolicy -> ShowS
Prelude.Show, (forall x. GetPolicy -> Rep GetPolicy x)
-> (forall x. Rep GetPolicy x -> GetPolicy) -> Generic GetPolicy
forall x. Rep GetPolicy x -> GetPolicy
forall x. GetPolicy -> Rep GetPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetPolicy x -> GetPolicy
$cfrom :: forall x. GetPolicy -> Rep GetPolicy x
Prelude.Generic)
newGetPolicy ::
Prelude.Text ->
GetPolicy
newGetPolicy :: Text -> GetPolicy
newGetPolicy Text
pPolicyName_ =
GetPolicy' :: Text -> GetPolicy
GetPolicy' {$sel:policyName:GetPolicy' :: Text
policyName = Text
pPolicyName_}
getPolicy_policyName :: Lens.Lens' GetPolicy Prelude.Text
getPolicy_policyName :: (Text -> f Text) -> GetPolicy -> f GetPolicy
getPolicy_policyName = (GetPolicy -> Text)
-> (GetPolicy -> Text -> GetPolicy)
-> Lens GetPolicy GetPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicy' {Text
policyName :: Text
$sel:policyName:GetPolicy' :: GetPolicy -> Text
policyName} -> Text
policyName) (\s :: GetPolicy
s@GetPolicy' {} Text
a -> GetPolicy
s {$sel:policyName:GetPolicy' :: Text
policyName = Text
a} :: GetPolicy)
instance Core.AWSRequest GetPolicy where
type AWSResponse GetPolicy = GetPolicyResponse
request :: GetPolicy -> Request GetPolicy
request = Service -> GetPolicy -> Request GetPolicy
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetPolicy
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetPolicy)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetPolicy))
-> Logger
-> Service
-> Proxy GetPolicy
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetPolicy)))
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
-> Int
-> GetPolicyResponse
GetPolicyResponse'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> GetPolicyResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> GetPolicyResponse)
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
-> Int
-> GetPolicyResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> GetPolicyResponse)
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
-> Int
-> GetPolicyResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> GetPolicyResponse)
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
-> Int
-> GetPolicyResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe POSIX -> Maybe Text -> Int -> GetPolicyResponse)
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
"defaultVersionId")
Either
String
(Maybe Text
-> Maybe POSIX -> Maybe Text -> Int -> GetPolicyResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe POSIX -> Maybe Text -> Int -> GetPolicyResponse)
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 -> Int -> GetPolicyResponse)
-> Either String (Maybe POSIX)
-> Either String (Maybe Text -> Int -> GetPolicyResponse)
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 -> Int -> GetPolicyResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetPolicyResponse)
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 (Int -> GetPolicyResponse)
-> Either String Int -> Either String GetPolicyResponse
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 GetPolicy
instance Prelude.NFData GetPolicy
instance Core.ToHeaders GetPolicy where
toHeaders :: GetPolicy -> ResponseHeaders
toHeaders = ResponseHeaders -> GetPolicy -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath GetPolicy where
toPath :: GetPolicy -> ByteString
toPath GetPolicy' {Text
policyName :: Text
$sel:policyName:GetPolicy' :: GetPolicy -> 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]
instance Core.ToQuery GetPolicy where
toQuery :: GetPolicy -> QueryString
toQuery = QueryString -> GetPolicy -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetPolicyResponse = GetPolicyResponse'
{
GetPolicyResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
GetPolicyResponse -> Maybe Text
policyName :: Prelude.Maybe Prelude.Text,
GetPolicyResponse -> Maybe Text
policyDocument :: Prelude.Maybe Prelude.Text,
GetPolicyResponse -> Maybe Text
defaultVersionId :: Prelude.Maybe Prelude.Text,
GetPolicyResponse -> Maybe Text
policyArn :: Prelude.Maybe Prelude.Text,
GetPolicyResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
GetPolicyResponse -> Maybe Text
generationId :: Prelude.Maybe Prelude.Text,
GetPolicyResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetPolicyResponse -> GetPolicyResponse -> Bool
(GetPolicyResponse -> GetPolicyResponse -> Bool)
-> (GetPolicyResponse -> GetPolicyResponse -> Bool)
-> Eq GetPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPolicyResponse -> GetPolicyResponse -> Bool
$c/= :: GetPolicyResponse -> GetPolicyResponse -> Bool
== :: GetPolicyResponse -> GetPolicyResponse -> Bool
$c== :: GetPolicyResponse -> GetPolicyResponse -> Bool
Prelude.Eq, ReadPrec [GetPolicyResponse]
ReadPrec GetPolicyResponse
Int -> ReadS GetPolicyResponse
ReadS [GetPolicyResponse]
(Int -> ReadS GetPolicyResponse)
-> ReadS [GetPolicyResponse]
-> ReadPrec GetPolicyResponse
-> ReadPrec [GetPolicyResponse]
-> Read GetPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPolicyResponse]
$creadListPrec :: ReadPrec [GetPolicyResponse]
readPrec :: ReadPrec GetPolicyResponse
$creadPrec :: ReadPrec GetPolicyResponse
readList :: ReadS [GetPolicyResponse]
$creadList :: ReadS [GetPolicyResponse]
readsPrec :: Int -> ReadS GetPolicyResponse
$creadsPrec :: Int -> ReadS GetPolicyResponse
Prelude.Read, Int -> GetPolicyResponse -> ShowS
[GetPolicyResponse] -> ShowS
GetPolicyResponse -> String
(Int -> GetPolicyResponse -> ShowS)
-> (GetPolicyResponse -> String)
-> ([GetPolicyResponse] -> ShowS)
-> Show GetPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPolicyResponse] -> ShowS
$cshowList :: [GetPolicyResponse] -> ShowS
show :: GetPolicyResponse -> String
$cshow :: GetPolicyResponse -> String
showsPrec :: Int -> GetPolicyResponse -> ShowS
$cshowsPrec :: Int -> GetPolicyResponse -> ShowS
Prelude.Show, (forall x. GetPolicyResponse -> Rep GetPolicyResponse x)
-> (forall x. Rep GetPolicyResponse x -> GetPolicyResponse)
-> Generic GetPolicyResponse
forall x. Rep GetPolicyResponse x -> GetPolicyResponse
forall x. GetPolicyResponse -> Rep GetPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetPolicyResponse x -> GetPolicyResponse
$cfrom :: forall x. GetPolicyResponse -> Rep GetPolicyResponse x
Prelude.Generic)
newGetPolicyResponse ::
Prelude.Int ->
GetPolicyResponse
newGetPolicyResponse :: Int -> GetPolicyResponse
newGetPolicyResponse Int
pHttpStatus_ =
GetPolicyResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> GetPolicyResponse
GetPolicyResponse'
{ $sel:lastModifiedDate:GetPolicyResponse' :: Maybe POSIX
lastModifiedDate =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:policyName:GetPolicyResponse' :: Maybe Text
policyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyDocument:GetPolicyResponse' :: Maybe Text
policyDocument = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultVersionId:GetPolicyResponse' :: Maybe Text
defaultVersionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyArn:GetPolicyResponse' :: Maybe Text
policyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:GetPolicyResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:generationId:GetPolicyResponse' :: Maybe Text
generationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getPolicyResponse_lastModifiedDate :: Lens.Lens' GetPolicyResponse (Prelude.Maybe Prelude.UTCTime)
getPolicyResponse_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetPolicyResponse -> f GetPolicyResponse
getPolicyResponse_lastModifiedDate = (GetPolicyResponse -> Maybe POSIX)
-> (GetPolicyResponse -> Maybe POSIX -> GetPolicyResponse)
-> Lens
GetPolicyResponse GetPolicyResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:GetPolicyResponse' :: GetPolicyResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: GetPolicyResponse
s@GetPolicyResponse' {} Maybe POSIX
a -> GetPolicyResponse
s {$sel:lastModifiedDate:GetPolicyResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: GetPolicyResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> GetPolicyResponse -> f GetPolicyResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetPolicyResponse
-> f GetPolicyResponse
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
getPolicyResponse_policyName :: Lens.Lens' GetPolicyResponse (Prelude.Maybe Prelude.Text)
getPolicyResponse_policyName :: (Maybe Text -> f (Maybe Text))
-> GetPolicyResponse -> f GetPolicyResponse
getPolicyResponse_policyName = (GetPolicyResponse -> Maybe Text)
-> (GetPolicyResponse -> Maybe Text -> GetPolicyResponse)
-> Lens
GetPolicyResponse GetPolicyResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyResponse' {Maybe Text
policyName :: Maybe Text
$sel:policyName:GetPolicyResponse' :: GetPolicyResponse -> Maybe Text
policyName} -> Maybe Text
policyName) (\s :: GetPolicyResponse
s@GetPolicyResponse' {} Maybe Text
a -> GetPolicyResponse
s {$sel:policyName:GetPolicyResponse' :: Maybe Text
policyName = Maybe Text
a} :: GetPolicyResponse)
getPolicyResponse_policyDocument :: Lens.Lens' GetPolicyResponse (Prelude.Maybe Prelude.Text)
getPolicyResponse_policyDocument :: (Maybe Text -> f (Maybe Text))
-> GetPolicyResponse -> f GetPolicyResponse
getPolicyResponse_policyDocument = (GetPolicyResponse -> Maybe Text)
-> (GetPolicyResponse -> Maybe Text -> GetPolicyResponse)
-> Lens
GetPolicyResponse GetPolicyResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyResponse' {Maybe Text
policyDocument :: Maybe Text
$sel:policyDocument:GetPolicyResponse' :: GetPolicyResponse -> Maybe Text
policyDocument} -> Maybe Text
policyDocument) (\s :: GetPolicyResponse
s@GetPolicyResponse' {} Maybe Text
a -> GetPolicyResponse
s {$sel:policyDocument:GetPolicyResponse' :: Maybe Text
policyDocument = Maybe Text
a} :: GetPolicyResponse)
getPolicyResponse_defaultVersionId :: Lens.Lens' GetPolicyResponse (Prelude.Maybe Prelude.Text)
getPolicyResponse_defaultVersionId :: (Maybe Text -> f (Maybe Text))
-> GetPolicyResponse -> f GetPolicyResponse
getPolicyResponse_defaultVersionId = (GetPolicyResponse -> Maybe Text)
-> (GetPolicyResponse -> Maybe Text -> GetPolicyResponse)
-> Lens
GetPolicyResponse GetPolicyResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyResponse' {Maybe Text
defaultVersionId :: Maybe Text
$sel:defaultVersionId:GetPolicyResponse' :: GetPolicyResponse -> Maybe Text
defaultVersionId} -> Maybe Text
defaultVersionId) (\s :: GetPolicyResponse
s@GetPolicyResponse' {} Maybe Text
a -> GetPolicyResponse
s {$sel:defaultVersionId:GetPolicyResponse' :: Maybe Text
defaultVersionId = Maybe Text
a} :: GetPolicyResponse)
getPolicyResponse_policyArn :: Lens.Lens' GetPolicyResponse (Prelude.Maybe Prelude.Text)
getPolicyResponse_policyArn :: (Maybe Text -> f (Maybe Text))
-> GetPolicyResponse -> f GetPolicyResponse
getPolicyResponse_policyArn = (GetPolicyResponse -> Maybe Text)
-> (GetPolicyResponse -> Maybe Text -> GetPolicyResponse)
-> Lens
GetPolicyResponse GetPolicyResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyResponse' {Maybe Text
policyArn :: Maybe Text
$sel:policyArn:GetPolicyResponse' :: GetPolicyResponse -> Maybe Text
policyArn} -> Maybe Text
policyArn) (\s :: GetPolicyResponse
s@GetPolicyResponse' {} Maybe Text
a -> GetPolicyResponse
s {$sel:policyArn:GetPolicyResponse' :: Maybe Text
policyArn = Maybe Text
a} :: GetPolicyResponse)
getPolicyResponse_creationDate :: Lens.Lens' GetPolicyResponse (Prelude.Maybe Prelude.UTCTime)
getPolicyResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetPolicyResponse -> f GetPolicyResponse
getPolicyResponse_creationDate = (GetPolicyResponse -> Maybe POSIX)
-> (GetPolicyResponse -> Maybe POSIX -> GetPolicyResponse)
-> Lens
GetPolicyResponse GetPolicyResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:GetPolicyResponse' :: GetPolicyResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: GetPolicyResponse
s@GetPolicyResponse' {} Maybe POSIX
a -> GetPolicyResponse
s {$sel:creationDate:GetPolicyResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: GetPolicyResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> GetPolicyResponse -> f GetPolicyResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetPolicyResponse
-> f GetPolicyResponse
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
getPolicyResponse_generationId :: Lens.Lens' GetPolicyResponse (Prelude.Maybe Prelude.Text)
getPolicyResponse_generationId :: (Maybe Text -> f (Maybe Text))
-> GetPolicyResponse -> f GetPolicyResponse
getPolicyResponse_generationId = (GetPolicyResponse -> Maybe Text)
-> (GetPolicyResponse -> Maybe Text -> GetPolicyResponse)
-> Lens
GetPolicyResponse GetPolicyResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyResponse' {Maybe Text
generationId :: Maybe Text
$sel:generationId:GetPolicyResponse' :: GetPolicyResponse -> Maybe Text
generationId} -> Maybe Text
generationId) (\s :: GetPolicyResponse
s@GetPolicyResponse' {} Maybe Text
a -> GetPolicyResponse
s {$sel:generationId:GetPolicyResponse' :: Maybe Text
generationId = Maybe Text
a} :: GetPolicyResponse)
getPolicyResponse_httpStatus :: Lens.Lens' GetPolicyResponse Prelude.Int
getPolicyResponse_httpStatus :: (Int -> f Int) -> GetPolicyResponse -> f GetPolicyResponse
getPolicyResponse_httpStatus = (GetPolicyResponse -> Int)
-> (GetPolicyResponse -> Int -> GetPolicyResponse)
-> Lens GetPolicyResponse GetPolicyResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetPolicyResponse' :: GetPolicyResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetPolicyResponse
s@GetPolicyResponse' {} Int
a -> GetPolicyResponse
s {$sel:httpStatus:GetPolicyResponse' :: Int
httpStatus = Int
a} :: GetPolicyResponse)
instance Prelude.NFData GetPolicyResponse