{-# 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.Backup.CreateReportPlan
(
CreateReportPlan (..),
newCreateReportPlan,
createReportPlan_idempotencyToken,
createReportPlan_reportPlanTags,
createReportPlan_reportPlanDescription,
createReportPlan_reportPlanName,
createReportPlan_reportDeliveryChannel,
createReportPlan_reportSetting,
CreateReportPlanResponse (..),
newCreateReportPlanResponse,
createReportPlanResponse_creationTime,
createReportPlanResponse_reportPlanName,
createReportPlanResponse_reportPlanArn,
createReportPlanResponse_httpStatus,
)
where
import Amazonka.Backup.Types
import qualified Amazonka.Core as Core
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 CreateReportPlan = CreateReportPlan'
{
CreateReportPlan -> Maybe Text
idempotencyToken :: Prelude.Maybe Prelude.Text,
CreateReportPlan -> Maybe (HashMap Text Text)
reportPlanTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateReportPlan -> Maybe Text
reportPlanDescription :: Prelude.Maybe Prelude.Text,
CreateReportPlan -> Text
reportPlanName :: Prelude.Text,
CreateReportPlan -> ReportDeliveryChannel
reportDeliveryChannel :: ReportDeliveryChannel,
CreateReportPlan -> ReportSetting
reportSetting :: ReportSetting
}
deriving (CreateReportPlan -> CreateReportPlan -> Bool
(CreateReportPlan -> CreateReportPlan -> Bool)
-> (CreateReportPlan -> CreateReportPlan -> Bool)
-> Eq CreateReportPlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateReportPlan -> CreateReportPlan -> Bool
$c/= :: CreateReportPlan -> CreateReportPlan -> Bool
== :: CreateReportPlan -> CreateReportPlan -> Bool
$c== :: CreateReportPlan -> CreateReportPlan -> Bool
Prelude.Eq, ReadPrec [CreateReportPlan]
ReadPrec CreateReportPlan
Int -> ReadS CreateReportPlan
ReadS [CreateReportPlan]
(Int -> ReadS CreateReportPlan)
-> ReadS [CreateReportPlan]
-> ReadPrec CreateReportPlan
-> ReadPrec [CreateReportPlan]
-> Read CreateReportPlan
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateReportPlan]
$creadListPrec :: ReadPrec [CreateReportPlan]
readPrec :: ReadPrec CreateReportPlan
$creadPrec :: ReadPrec CreateReportPlan
readList :: ReadS [CreateReportPlan]
$creadList :: ReadS [CreateReportPlan]
readsPrec :: Int -> ReadS CreateReportPlan
$creadsPrec :: Int -> ReadS CreateReportPlan
Prelude.Read, Int -> CreateReportPlan -> ShowS
[CreateReportPlan] -> ShowS
CreateReportPlan -> String
(Int -> CreateReportPlan -> ShowS)
-> (CreateReportPlan -> String)
-> ([CreateReportPlan] -> ShowS)
-> Show CreateReportPlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateReportPlan] -> ShowS
$cshowList :: [CreateReportPlan] -> ShowS
show :: CreateReportPlan -> String
$cshow :: CreateReportPlan -> String
showsPrec :: Int -> CreateReportPlan -> ShowS
$cshowsPrec :: Int -> CreateReportPlan -> ShowS
Prelude.Show, (forall x. CreateReportPlan -> Rep CreateReportPlan x)
-> (forall x. Rep CreateReportPlan x -> CreateReportPlan)
-> Generic CreateReportPlan
forall x. Rep CreateReportPlan x -> CreateReportPlan
forall x. CreateReportPlan -> Rep CreateReportPlan x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateReportPlan x -> CreateReportPlan
$cfrom :: forall x. CreateReportPlan -> Rep CreateReportPlan x
Prelude.Generic)
newCreateReportPlan ::
Prelude.Text ->
ReportDeliveryChannel ->
ReportSetting ->
CreateReportPlan
newCreateReportPlan :: Text -> ReportDeliveryChannel -> ReportSetting -> CreateReportPlan
newCreateReportPlan
Text
pReportPlanName_
ReportDeliveryChannel
pReportDeliveryChannel_
ReportSetting
pReportSetting_ =
CreateReportPlan' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Text
-> ReportDeliveryChannel
-> ReportSetting
-> CreateReportPlan
CreateReportPlan'
{ $sel:idempotencyToken:CreateReportPlan' :: Maybe Text
idempotencyToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reportPlanTags:CreateReportPlan' :: Maybe (HashMap Text Text)
reportPlanTags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:reportPlanDescription:CreateReportPlan' :: Maybe Text
reportPlanDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reportPlanName:CreateReportPlan' :: Text
reportPlanName = Text
pReportPlanName_,
$sel:reportDeliveryChannel:CreateReportPlan' :: ReportDeliveryChannel
reportDeliveryChannel = ReportDeliveryChannel
pReportDeliveryChannel_,
$sel:reportSetting:CreateReportPlan' :: ReportSetting
reportSetting = ReportSetting
pReportSetting_
}
createReportPlan_idempotencyToken :: Lens.Lens' CreateReportPlan (Prelude.Maybe Prelude.Text)
createReportPlan_idempotencyToken :: (Maybe Text -> f (Maybe Text))
-> CreateReportPlan -> f CreateReportPlan
createReportPlan_idempotencyToken = (CreateReportPlan -> Maybe Text)
-> (CreateReportPlan -> Maybe Text -> CreateReportPlan)
-> Lens CreateReportPlan CreateReportPlan (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReportPlan' {Maybe Text
idempotencyToken :: Maybe Text
$sel:idempotencyToken:CreateReportPlan' :: CreateReportPlan -> Maybe Text
idempotencyToken} -> Maybe Text
idempotencyToken) (\s :: CreateReportPlan
s@CreateReportPlan' {} Maybe Text
a -> CreateReportPlan
s {$sel:idempotencyToken:CreateReportPlan' :: Maybe Text
idempotencyToken = Maybe Text
a} :: CreateReportPlan)
createReportPlan_reportPlanTags :: Lens.Lens' CreateReportPlan (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createReportPlan_reportPlanTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateReportPlan -> f CreateReportPlan
createReportPlan_reportPlanTags = (CreateReportPlan -> Maybe (HashMap Text Text))
-> (CreateReportPlan
-> Maybe (HashMap Text Text) -> CreateReportPlan)
-> Lens
CreateReportPlan
CreateReportPlan
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReportPlan' {Maybe (HashMap Text Text)
reportPlanTags :: Maybe (HashMap Text Text)
$sel:reportPlanTags:CreateReportPlan' :: CreateReportPlan -> Maybe (HashMap Text Text)
reportPlanTags} -> Maybe (HashMap Text Text)
reportPlanTags) (\s :: CreateReportPlan
s@CreateReportPlan' {} Maybe (HashMap Text Text)
a -> CreateReportPlan
s {$sel:reportPlanTags:CreateReportPlan' :: Maybe (HashMap Text Text)
reportPlanTags = Maybe (HashMap Text Text)
a} :: CreateReportPlan) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateReportPlan -> f CreateReportPlan)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateReportPlan
-> f CreateReportPlan
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createReportPlan_reportPlanDescription :: Lens.Lens' CreateReportPlan (Prelude.Maybe Prelude.Text)
createReportPlan_reportPlanDescription :: (Maybe Text -> f (Maybe Text))
-> CreateReportPlan -> f CreateReportPlan
createReportPlan_reportPlanDescription = (CreateReportPlan -> Maybe Text)
-> (CreateReportPlan -> Maybe Text -> CreateReportPlan)
-> Lens CreateReportPlan CreateReportPlan (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReportPlan' {Maybe Text
reportPlanDescription :: Maybe Text
$sel:reportPlanDescription:CreateReportPlan' :: CreateReportPlan -> Maybe Text
reportPlanDescription} -> Maybe Text
reportPlanDescription) (\s :: CreateReportPlan
s@CreateReportPlan' {} Maybe Text
a -> CreateReportPlan
s {$sel:reportPlanDescription:CreateReportPlan' :: Maybe Text
reportPlanDescription = Maybe Text
a} :: CreateReportPlan)
createReportPlan_reportPlanName :: Lens.Lens' CreateReportPlan Prelude.Text
createReportPlan_reportPlanName :: (Text -> f Text) -> CreateReportPlan -> f CreateReportPlan
createReportPlan_reportPlanName = (CreateReportPlan -> Text)
-> (CreateReportPlan -> Text -> CreateReportPlan)
-> Lens CreateReportPlan CreateReportPlan Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReportPlan' {Text
reportPlanName :: Text
$sel:reportPlanName:CreateReportPlan' :: CreateReportPlan -> Text
reportPlanName} -> Text
reportPlanName) (\s :: CreateReportPlan
s@CreateReportPlan' {} Text
a -> CreateReportPlan
s {$sel:reportPlanName:CreateReportPlan' :: Text
reportPlanName = Text
a} :: CreateReportPlan)
createReportPlan_reportDeliveryChannel :: Lens.Lens' CreateReportPlan ReportDeliveryChannel
createReportPlan_reportDeliveryChannel :: (ReportDeliveryChannel -> f ReportDeliveryChannel)
-> CreateReportPlan -> f CreateReportPlan
createReportPlan_reportDeliveryChannel = (CreateReportPlan -> ReportDeliveryChannel)
-> (CreateReportPlan -> ReportDeliveryChannel -> CreateReportPlan)
-> Lens
CreateReportPlan
CreateReportPlan
ReportDeliveryChannel
ReportDeliveryChannel
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReportPlan' {ReportDeliveryChannel
reportDeliveryChannel :: ReportDeliveryChannel
$sel:reportDeliveryChannel:CreateReportPlan' :: CreateReportPlan -> ReportDeliveryChannel
reportDeliveryChannel} -> ReportDeliveryChannel
reportDeliveryChannel) (\s :: CreateReportPlan
s@CreateReportPlan' {} ReportDeliveryChannel
a -> CreateReportPlan
s {$sel:reportDeliveryChannel:CreateReportPlan' :: ReportDeliveryChannel
reportDeliveryChannel = ReportDeliveryChannel
a} :: CreateReportPlan)
createReportPlan_reportSetting :: Lens.Lens' CreateReportPlan ReportSetting
createReportPlan_reportSetting :: (ReportSetting -> f ReportSetting)
-> CreateReportPlan -> f CreateReportPlan
createReportPlan_reportSetting = (CreateReportPlan -> ReportSetting)
-> (CreateReportPlan -> ReportSetting -> CreateReportPlan)
-> Lens
CreateReportPlan CreateReportPlan ReportSetting ReportSetting
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReportPlan' {ReportSetting
reportSetting :: ReportSetting
$sel:reportSetting:CreateReportPlan' :: CreateReportPlan -> ReportSetting
reportSetting} -> ReportSetting
reportSetting) (\s :: CreateReportPlan
s@CreateReportPlan' {} ReportSetting
a -> CreateReportPlan
s {$sel:reportSetting:CreateReportPlan' :: ReportSetting
reportSetting = ReportSetting
a} :: CreateReportPlan)
instance Core.AWSRequest CreateReportPlan where
type
AWSResponse CreateReportPlan =
CreateReportPlanResponse
request :: CreateReportPlan -> Request CreateReportPlan
request = Service -> CreateReportPlan -> Request CreateReportPlan
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateReportPlan
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateReportPlan)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateReportPlan))
-> Logger
-> Service
-> Proxy CreateReportPlan
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateReportPlan)))
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 -> Int -> CreateReportPlanResponse
CreateReportPlanResponse'
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Int -> CreateReportPlanResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text -> Maybe Text -> Int -> CreateReportPlanResponse)
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
"CreationTime")
Either
String
(Maybe Text -> Maybe Text -> Int -> CreateReportPlanResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateReportPlanResponse)
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
"ReportPlanName")
Either String (Maybe Text -> Int -> CreateReportPlanResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateReportPlanResponse)
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
"ReportPlanArn")
Either String (Int -> CreateReportPlanResponse)
-> Either String Int -> Either String CreateReportPlanResponse
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 CreateReportPlan
instance Prelude.NFData CreateReportPlan
instance Core.ToHeaders CreateReportPlan where
toHeaders :: CreateReportPlan -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateReportPlan -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateReportPlan where
toJSON :: CreateReportPlan -> Value
toJSON CreateReportPlan' {Maybe Text
Maybe (HashMap Text Text)
Text
ReportDeliveryChannel
ReportSetting
reportSetting :: ReportSetting
reportDeliveryChannel :: ReportDeliveryChannel
reportPlanName :: Text
reportPlanDescription :: Maybe Text
reportPlanTags :: Maybe (HashMap Text Text)
idempotencyToken :: Maybe Text
$sel:reportSetting:CreateReportPlan' :: CreateReportPlan -> ReportSetting
$sel:reportDeliveryChannel:CreateReportPlan' :: CreateReportPlan -> ReportDeliveryChannel
$sel:reportPlanName:CreateReportPlan' :: CreateReportPlan -> Text
$sel:reportPlanDescription:CreateReportPlan' :: CreateReportPlan -> Maybe Text
$sel:reportPlanTags:CreateReportPlan' :: CreateReportPlan -> Maybe (HashMap Text Text)
$sel:idempotencyToken:CreateReportPlan' :: CreateReportPlan -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"IdempotencyToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
idempotencyToken,
(Text
"ReportPlanTags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
reportPlanTags,
(Text
"ReportPlanDescription" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
reportPlanDescription,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ReportPlanName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
reportPlanName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ReportDeliveryChannel"
Text -> ReportDeliveryChannel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ReportDeliveryChannel
reportDeliveryChannel
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ReportSetting" Text -> ReportSetting -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ReportSetting
reportSetting)
]
)
instance Core.ToPath CreateReportPlan where
toPath :: CreateReportPlan -> ByteString
toPath = ByteString -> CreateReportPlan -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/audit/report-plans"
instance Core.ToQuery CreateReportPlan where
toQuery :: CreateReportPlan -> QueryString
toQuery = QueryString -> CreateReportPlan -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateReportPlanResponse = CreateReportPlanResponse'
{
CreateReportPlanResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
CreateReportPlanResponse -> Maybe Text
reportPlanName :: Prelude.Maybe Prelude.Text,
CreateReportPlanResponse -> Maybe Text
reportPlanArn :: Prelude.Maybe Prelude.Text,
CreateReportPlanResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateReportPlanResponse -> CreateReportPlanResponse -> Bool
(CreateReportPlanResponse -> CreateReportPlanResponse -> Bool)
-> (CreateReportPlanResponse -> CreateReportPlanResponse -> Bool)
-> Eq CreateReportPlanResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateReportPlanResponse -> CreateReportPlanResponse -> Bool
$c/= :: CreateReportPlanResponse -> CreateReportPlanResponse -> Bool
== :: CreateReportPlanResponse -> CreateReportPlanResponse -> Bool
$c== :: CreateReportPlanResponse -> CreateReportPlanResponse -> Bool
Prelude.Eq, ReadPrec [CreateReportPlanResponse]
ReadPrec CreateReportPlanResponse
Int -> ReadS CreateReportPlanResponse
ReadS [CreateReportPlanResponse]
(Int -> ReadS CreateReportPlanResponse)
-> ReadS [CreateReportPlanResponse]
-> ReadPrec CreateReportPlanResponse
-> ReadPrec [CreateReportPlanResponse]
-> Read CreateReportPlanResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateReportPlanResponse]
$creadListPrec :: ReadPrec [CreateReportPlanResponse]
readPrec :: ReadPrec CreateReportPlanResponse
$creadPrec :: ReadPrec CreateReportPlanResponse
readList :: ReadS [CreateReportPlanResponse]
$creadList :: ReadS [CreateReportPlanResponse]
readsPrec :: Int -> ReadS CreateReportPlanResponse
$creadsPrec :: Int -> ReadS CreateReportPlanResponse
Prelude.Read, Int -> CreateReportPlanResponse -> ShowS
[CreateReportPlanResponse] -> ShowS
CreateReportPlanResponse -> String
(Int -> CreateReportPlanResponse -> ShowS)
-> (CreateReportPlanResponse -> String)
-> ([CreateReportPlanResponse] -> ShowS)
-> Show CreateReportPlanResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateReportPlanResponse] -> ShowS
$cshowList :: [CreateReportPlanResponse] -> ShowS
show :: CreateReportPlanResponse -> String
$cshow :: CreateReportPlanResponse -> String
showsPrec :: Int -> CreateReportPlanResponse -> ShowS
$cshowsPrec :: Int -> CreateReportPlanResponse -> ShowS
Prelude.Show, (forall x.
CreateReportPlanResponse -> Rep CreateReportPlanResponse x)
-> (forall x.
Rep CreateReportPlanResponse x -> CreateReportPlanResponse)
-> Generic CreateReportPlanResponse
forall x.
Rep CreateReportPlanResponse x -> CreateReportPlanResponse
forall x.
CreateReportPlanResponse -> Rep CreateReportPlanResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateReportPlanResponse x -> CreateReportPlanResponse
$cfrom :: forall x.
CreateReportPlanResponse -> Rep CreateReportPlanResponse x
Prelude.Generic)
newCreateReportPlanResponse ::
Prelude.Int ->
CreateReportPlanResponse
newCreateReportPlanResponse :: Int -> CreateReportPlanResponse
newCreateReportPlanResponse Int
pHttpStatus_ =
CreateReportPlanResponse' :: Maybe POSIX
-> Maybe Text -> Maybe Text -> Int -> CreateReportPlanResponse
CreateReportPlanResponse'
{ $sel:creationTime:CreateReportPlanResponse' :: Maybe POSIX
creationTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:reportPlanName:CreateReportPlanResponse' :: Maybe Text
reportPlanName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reportPlanArn:CreateReportPlanResponse' :: Maybe Text
reportPlanArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateReportPlanResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createReportPlanResponse_creationTime :: Lens.Lens' CreateReportPlanResponse (Prelude.Maybe Prelude.UTCTime)
createReportPlanResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateReportPlanResponse -> f CreateReportPlanResponse
createReportPlanResponse_creationTime = (CreateReportPlanResponse -> Maybe POSIX)
-> (CreateReportPlanResponse
-> Maybe POSIX -> CreateReportPlanResponse)
-> Lens
CreateReportPlanResponse
CreateReportPlanResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReportPlanResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:CreateReportPlanResponse' :: CreateReportPlanResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: CreateReportPlanResponse
s@CreateReportPlanResponse' {} Maybe POSIX
a -> CreateReportPlanResponse
s {$sel:creationTime:CreateReportPlanResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: CreateReportPlanResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateReportPlanResponse -> f CreateReportPlanResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateReportPlanResponse
-> f CreateReportPlanResponse
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
createReportPlanResponse_reportPlanName :: Lens.Lens' CreateReportPlanResponse (Prelude.Maybe Prelude.Text)
createReportPlanResponse_reportPlanName :: (Maybe Text -> f (Maybe Text))
-> CreateReportPlanResponse -> f CreateReportPlanResponse
createReportPlanResponse_reportPlanName = (CreateReportPlanResponse -> Maybe Text)
-> (CreateReportPlanResponse
-> Maybe Text -> CreateReportPlanResponse)
-> Lens
CreateReportPlanResponse
CreateReportPlanResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReportPlanResponse' {Maybe Text
reportPlanName :: Maybe Text
$sel:reportPlanName:CreateReportPlanResponse' :: CreateReportPlanResponse -> Maybe Text
reportPlanName} -> Maybe Text
reportPlanName) (\s :: CreateReportPlanResponse
s@CreateReportPlanResponse' {} Maybe Text
a -> CreateReportPlanResponse
s {$sel:reportPlanName:CreateReportPlanResponse' :: Maybe Text
reportPlanName = Maybe Text
a} :: CreateReportPlanResponse)
createReportPlanResponse_reportPlanArn :: Lens.Lens' CreateReportPlanResponse (Prelude.Maybe Prelude.Text)
createReportPlanResponse_reportPlanArn :: (Maybe Text -> f (Maybe Text))
-> CreateReportPlanResponse -> f CreateReportPlanResponse
createReportPlanResponse_reportPlanArn = (CreateReportPlanResponse -> Maybe Text)
-> (CreateReportPlanResponse
-> Maybe Text -> CreateReportPlanResponse)
-> Lens
CreateReportPlanResponse
CreateReportPlanResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReportPlanResponse' {Maybe Text
reportPlanArn :: Maybe Text
$sel:reportPlanArn:CreateReportPlanResponse' :: CreateReportPlanResponse -> Maybe Text
reportPlanArn} -> Maybe Text
reportPlanArn) (\s :: CreateReportPlanResponse
s@CreateReportPlanResponse' {} Maybe Text
a -> CreateReportPlanResponse
s {$sel:reportPlanArn:CreateReportPlanResponse' :: Maybe Text
reportPlanArn = Maybe Text
a} :: CreateReportPlanResponse)
createReportPlanResponse_httpStatus :: Lens.Lens' CreateReportPlanResponse Prelude.Int
createReportPlanResponse_httpStatus :: (Int -> f Int)
-> CreateReportPlanResponse -> f CreateReportPlanResponse
createReportPlanResponse_httpStatus = (CreateReportPlanResponse -> Int)
-> (CreateReportPlanResponse -> Int -> CreateReportPlanResponse)
-> Lens CreateReportPlanResponse CreateReportPlanResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReportPlanResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateReportPlanResponse' :: CreateReportPlanResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateReportPlanResponse
s@CreateReportPlanResponse' {} Int
a -> CreateReportPlanResponse
s {$sel:httpStatus:CreateReportPlanResponse' :: Int
httpStatus = Int
a} :: CreateReportPlanResponse)
instance Prelude.NFData CreateReportPlanResponse