{-# 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.AlexaBusiness.CreateBusinessReportSchedule
(
CreateBusinessReportSchedule (..),
newCreateBusinessReportSchedule,
createBusinessReportSchedule_s3KeyPrefix,
createBusinessReportSchedule_recurrence,
createBusinessReportSchedule_scheduleName,
createBusinessReportSchedule_clientRequestToken,
createBusinessReportSchedule_s3BucketName,
createBusinessReportSchedule_tags,
createBusinessReportSchedule_format,
createBusinessReportSchedule_contentRange,
CreateBusinessReportScheduleResponse (..),
newCreateBusinessReportScheduleResponse,
createBusinessReportScheduleResponse_scheduleArn,
createBusinessReportScheduleResponse_httpStatus,
)
where
import Amazonka.AlexaBusiness.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 CreateBusinessReportSchedule = CreateBusinessReportSchedule'
{
CreateBusinessReportSchedule -> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
CreateBusinessReportSchedule -> Maybe BusinessReportRecurrence
recurrence :: Prelude.Maybe BusinessReportRecurrence,
CreateBusinessReportSchedule -> Maybe Text
scheduleName :: Prelude.Maybe Prelude.Text,
CreateBusinessReportSchedule -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
CreateBusinessReportSchedule -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text,
CreateBusinessReportSchedule -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateBusinessReportSchedule -> BusinessReportFormat
format :: BusinessReportFormat,
CreateBusinessReportSchedule -> BusinessReportContentRange
contentRange :: BusinessReportContentRange
}
deriving (CreateBusinessReportSchedule
-> CreateBusinessReportSchedule -> Bool
(CreateBusinessReportSchedule
-> CreateBusinessReportSchedule -> Bool)
-> (CreateBusinessReportSchedule
-> CreateBusinessReportSchedule -> Bool)
-> Eq CreateBusinessReportSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBusinessReportSchedule
-> CreateBusinessReportSchedule -> Bool
$c/= :: CreateBusinessReportSchedule
-> CreateBusinessReportSchedule -> Bool
== :: CreateBusinessReportSchedule
-> CreateBusinessReportSchedule -> Bool
$c== :: CreateBusinessReportSchedule
-> CreateBusinessReportSchedule -> Bool
Prelude.Eq, ReadPrec [CreateBusinessReportSchedule]
ReadPrec CreateBusinessReportSchedule
Int -> ReadS CreateBusinessReportSchedule
ReadS [CreateBusinessReportSchedule]
(Int -> ReadS CreateBusinessReportSchedule)
-> ReadS [CreateBusinessReportSchedule]
-> ReadPrec CreateBusinessReportSchedule
-> ReadPrec [CreateBusinessReportSchedule]
-> Read CreateBusinessReportSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBusinessReportSchedule]
$creadListPrec :: ReadPrec [CreateBusinessReportSchedule]
readPrec :: ReadPrec CreateBusinessReportSchedule
$creadPrec :: ReadPrec CreateBusinessReportSchedule
readList :: ReadS [CreateBusinessReportSchedule]
$creadList :: ReadS [CreateBusinessReportSchedule]
readsPrec :: Int -> ReadS CreateBusinessReportSchedule
$creadsPrec :: Int -> ReadS CreateBusinessReportSchedule
Prelude.Read, Int -> CreateBusinessReportSchedule -> ShowS
[CreateBusinessReportSchedule] -> ShowS
CreateBusinessReportSchedule -> String
(Int -> CreateBusinessReportSchedule -> ShowS)
-> (CreateBusinessReportSchedule -> String)
-> ([CreateBusinessReportSchedule] -> ShowS)
-> Show CreateBusinessReportSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBusinessReportSchedule] -> ShowS
$cshowList :: [CreateBusinessReportSchedule] -> ShowS
show :: CreateBusinessReportSchedule -> String
$cshow :: CreateBusinessReportSchedule -> String
showsPrec :: Int -> CreateBusinessReportSchedule -> ShowS
$cshowsPrec :: Int -> CreateBusinessReportSchedule -> ShowS
Prelude.Show, (forall x.
CreateBusinessReportSchedule -> Rep CreateBusinessReportSchedule x)
-> (forall x.
Rep CreateBusinessReportSchedule x -> CreateBusinessReportSchedule)
-> Generic CreateBusinessReportSchedule
forall x.
Rep CreateBusinessReportSchedule x -> CreateBusinessReportSchedule
forall x.
CreateBusinessReportSchedule -> Rep CreateBusinessReportSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateBusinessReportSchedule x -> CreateBusinessReportSchedule
$cfrom :: forall x.
CreateBusinessReportSchedule -> Rep CreateBusinessReportSchedule x
Prelude.Generic)
newCreateBusinessReportSchedule ::
BusinessReportFormat ->
BusinessReportContentRange ->
CreateBusinessReportSchedule
newCreateBusinessReportSchedule :: BusinessReportFormat
-> BusinessReportContentRange -> CreateBusinessReportSchedule
newCreateBusinessReportSchedule
BusinessReportFormat
pFormat_
BusinessReportContentRange
pContentRange_ =
CreateBusinessReportSchedule' :: Maybe Text
-> Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> BusinessReportFormat
-> BusinessReportContentRange
-> CreateBusinessReportSchedule
CreateBusinessReportSchedule'
{ $sel:s3KeyPrefix:CreateBusinessReportSchedule' :: Maybe Text
s3KeyPrefix =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recurrence:CreateBusinessReportSchedule' :: Maybe BusinessReportRecurrence
recurrence = Maybe BusinessReportRecurrence
forall a. Maybe a
Prelude.Nothing,
$sel:scheduleName:CreateBusinessReportSchedule' :: Maybe Text
scheduleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:CreateBusinessReportSchedule' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3BucketName:CreateBusinessReportSchedule' :: Maybe Text
s3BucketName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateBusinessReportSchedule' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:format:CreateBusinessReportSchedule' :: BusinessReportFormat
format = BusinessReportFormat
pFormat_,
$sel:contentRange:CreateBusinessReportSchedule' :: BusinessReportContentRange
contentRange = BusinessReportContentRange
pContentRange_
}
createBusinessReportSchedule_s3KeyPrefix :: Lens.Lens' CreateBusinessReportSchedule (Prelude.Maybe Prelude.Text)
createBusinessReportSchedule_s3KeyPrefix :: (Maybe Text -> f (Maybe Text))
-> CreateBusinessReportSchedule -> f CreateBusinessReportSchedule
createBusinessReportSchedule_s3KeyPrefix = (CreateBusinessReportSchedule -> Maybe Text)
-> (CreateBusinessReportSchedule
-> Maybe Text -> CreateBusinessReportSchedule)
-> Lens
CreateBusinessReportSchedule
CreateBusinessReportSchedule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBusinessReportSchedule' {Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3KeyPrefix:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe Text
s3KeyPrefix} -> Maybe Text
s3KeyPrefix) (\s :: CreateBusinessReportSchedule
s@CreateBusinessReportSchedule' {} Maybe Text
a -> CreateBusinessReportSchedule
s {$sel:s3KeyPrefix:CreateBusinessReportSchedule' :: Maybe Text
s3KeyPrefix = Maybe Text
a} :: CreateBusinessReportSchedule)
createBusinessReportSchedule_recurrence :: Lens.Lens' CreateBusinessReportSchedule (Prelude.Maybe BusinessReportRecurrence)
createBusinessReportSchedule_recurrence :: (Maybe BusinessReportRecurrence
-> f (Maybe BusinessReportRecurrence))
-> CreateBusinessReportSchedule -> f CreateBusinessReportSchedule
createBusinessReportSchedule_recurrence = (CreateBusinessReportSchedule -> Maybe BusinessReportRecurrence)
-> (CreateBusinessReportSchedule
-> Maybe BusinessReportRecurrence -> CreateBusinessReportSchedule)
-> Lens
CreateBusinessReportSchedule
CreateBusinessReportSchedule
(Maybe BusinessReportRecurrence)
(Maybe BusinessReportRecurrence)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBusinessReportSchedule' {Maybe BusinessReportRecurrence
recurrence :: Maybe BusinessReportRecurrence
$sel:recurrence:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe BusinessReportRecurrence
recurrence} -> Maybe BusinessReportRecurrence
recurrence) (\s :: CreateBusinessReportSchedule
s@CreateBusinessReportSchedule' {} Maybe BusinessReportRecurrence
a -> CreateBusinessReportSchedule
s {$sel:recurrence:CreateBusinessReportSchedule' :: Maybe BusinessReportRecurrence
recurrence = Maybe BusinessReportRecurrence
a} :: CreateBusinessReportSchedule)
createBusinessReportSchedule_scheduleName :: Lens.Lens' CreateBusinessReportSchedule (Prelude.Maybe Prelude.Text)
createBusinessReportSchedule_scheduleName :: (Maybe Text -> f (Maybe Text))
-> CreateBusinessReportSchedule -> f CreateBusinessReportSchedule
createBusinessReportSchedule_scheduleName = (CreateBusinessReportSchedule -> Maybe Text)
-> (CreateBusinessReportSchedule
-> Maybe Text -> CreateBusinessReportSchedule)
-> Lens
CreateBusinessReportSchedule
CreateBusinessReportSchedule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBusinessReportSchedule' {Maybe Text
scheduleName :: Maybe Text
$sel:scheduleName:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe Text
scheduleName} -> Maybe Text
scheduleName) (\s :: CreateBusinessReportSchedule
s@CreateBusinessReportSchedule' {} Maybe Text
a -> CreateBusinessReportSchedule
s {$sel:scheduleName:CreateBusinessReportSchedule' :: Maybe Text
scheduleName = Maybe Text
a} :: CreateBusinessReportSchedule)
createBusinessReportSchedule_clientRequestToken :: Lens.Lens' CreateBusinessReportSchedule (Prelude.Maybe Prelude.Text)
createBusinessReportSchedule_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CreateBusinessReportSchedule -> f CreateBusinessReportSchedule
createBusinessReportSchedule_clientRequestToken = (CreateBusinessReportSchedule -> Maybe Text)
-> (CreateBusinessReportSchedule
-> Maybe Text -> CreateBusinessReportSchedule)
-> Lens
CreateBusinessReportSchedule
CreateBusinessReportSchedule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBusinessReportSchedule' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateBusinessReportSchedule
s@CreateBusinessReportSchedule' {} Maybe Text
a -> CreateBusinessReportSchedule
s {$sel:clientRequestToken:CreateBusinessReportSchedule' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateBusinessReportSchedule)
createBusinessReportSchedule_s3BucketName :: Lens.Lens' CreateBusinessReportSchedule (Prelude.Maybe Prelude.Text)
createBusinessReportSchedule_s3BucketName :: (Maybe Text -> f (Maybe Text))
-> CreateBusinessReportSchedule -> f CreateBusinessReportSchedule
createBusinessReportSchedule_s3BucketName = (CreateBusinessReportSchedule -> Maybe Text)
-> (CreateBusinessReportSchedule
-> Maybe Text -> CreateBusinessReportSchedule)
-> Lens
CreateBusinessReportSchedule
CreateBusinessReportSchedule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBusinessReportSchedule' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: CreateBusinessReportSchedule
s@CreateBusinessReportSchedule' {} Maybe Text
a -> CreateBusinessReportSchedule
s {$sel:s3BucketName:CreateBusinessReportSchedule' :: Maybe Text
s3BucketName = Maybe Text
a} :: CreateBusinessReportSchedule)
createBusinessReportSchedule_tags :: Lens.Lens' CreateBusinessReportSchedule (Prelude.Maybe [Tag])
createBusinessReportSchedule_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateBusinessReportSchedule -> f CreateBusinessReportSchedule
createBusinessReportSchedule_tags = (CreateBusinessReportSchedule -> Maybe [Tag])
-> (CreateBusinessReportSchedule
-> Maybe [Tag] -> CreateBusinessReportSchedule)
-> Lens
CreateBusinessReportSchedule
CreateBusinessReportSchedule
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBusinessReportSchedule' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateBusinessReportSchedule
s@CreateBusinessReportSchedule' {} Maybe [Tag]
a -> CreateBusinessReportSchedule
s {$sel:tags:CreateBusinessReportSchedule' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateBusinessReportSchedule) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateBusinessReportSchedule -> f CreateBusinessReportSchedule)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateBusinessReportSchedule
-> f CreateBusinessReportSchedule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createBusinessReportSchedule_format :: Lens.Lens' CreateBusinessReportSchedule BusinessReportFormat
createBusinessReportSchedule_format :: (BusinessReportFormat -> f BusinessReportFormat)
-> CreateBusinessReportSchedule -> f CreateBusinessReportSchedule
createBusinessReportSchedule_format = (CreateBusinessReportSchedule -> BusinessReportFormat)
-> (CreateBusinessReportSchedule
-> BusinessReportFormat -> CreateBusinessReportSchedule)
-> Lens
CreateBusinessReportSchedule
CreateBusinessReportSchedule
BusinessReportFormat
BusinessReportFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBusinessReportSchedule' {BusinessReportFormat
format :: BusinessReportFormat
$sel:format:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> BusinessReportFormat
format} -> BusinessReportFormat
format) (\s :: CreateBusinessReportSchedule
s@CreateBusinessReportSchedule' {} BusinessReportFormat
a -> CreateBusinessReportSchedule
s {$sel:format:CreateBusinessReportSchedule' :: BusinessReportFormat
format = BusinessReportFormat
a} :: CreateBusinessReportSchedule)
createBusinessReportSchedule_contentRange :: Lens.Lens' CreateBusinessReportSchedule BusinessReportContentRange
createBusinessReportSchedule_contentRange :: (BusinessReportContentRange -> f BusinessReportContentRange)
-> CreateBusinessReportSchedule -> f CreateBusinessReportSchedule
createBusinessReportSchedule_contentRange = (CreateBusinessReportSchedule -> BusinessReportContentRange)
-> (CreateBusinessReportSchedule
-> BusinessReportContentRange -> CreateBusinessReportSchedule)
-> Lens
CreateBusinessReportSchedule
CreateBusinessReportSchedule
BusinessReportContentRange
BusinessReportContentRange
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBusinessReportSchedule' {BusinessReportContentRange
contentRange :: BusinessReportContentRange
$sel:contentRange:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> BusinessReportContentRange
contentRange} -> BusinessReportContentRange
contentRange) (\s :: CreateBusinessReportSchedule
s@CreateBusinessReportSchedule' {} BusinessReportContentRange
a -> CreateBusinessReportSchedule
s {$sel:contentRange:CreateBusinessReportSchedule' :: BusinessReportContentRange
contentRange = BusinessReportContentRange
a} :: CreateBusinessReportSchedule)
instance Core.AWSRequest CreateBusinessReportSchedule where
type
AWSResponse CreateBusinessReportSchedule =
CreateBusinessReportScheduleResponse
request :: CreateBusinessReportSchedule
-> Request CreateBusinessReportSchedule
request = Service
-> CreateBusinessReportSchedule
-> Request CreateBusinessReportSchedule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateBusinessReportSchedule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateBusinessReportSchedule)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateBusinessReportSchedule))
-> Logger
-> Service
-> Proxy CreateBusinessReportSchedule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateBusinessReportSchedule)))
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 Text -> Int -> CreateBusinessReportScheduleResponse
CreateBusinessReportScheduleResponse'
(Maybe Text -> Int -> CreateBusinessReportScheduleResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateBusinessReportScheduleResponse)
forall (f :: * -> *) a b. Functor 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
"ScheduleArn")
Either String (Int -> CreateBusinessReportScheduleResponse)
-> Either String Int
-> Either String CreateBusinessReportScheduleResponse
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
CreateBusinessReportSchedule
instance Prelude.NFData CreateBusinessReportSchedule
instance Core.ToHeaders CreateBusinessReportSchedule where
toHeaders :: CreateBusinessReportSchedule -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateBusinessReportSchedule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AlexaForBusiness.CreateBusinessReportSchedule" ::
Prelude.ByteString
),
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 CreateBusinessReportSchedule where
toJSON :: CreateBusinessReportSchedule -> Value
toJSON CreateBusinessReportSchedule' {Maybe [Tag]
Maybe Text
Maybe BusinessReportRecurrence
BusinessReportFormat
BusinessReportContentRange
contentRange :: BusinessReportContentRange
format :: BusinessReportFormat
tags :: Maybe [Tag]
s3BucketName :: Maybe Text
clientRequestToken :: Maybe Text
scheduleName :: Maybe Text
recurrence :: Maybe BusinessReportRecurrence
s3KeyPrefix :: Maybe Text
$sel:contentRange:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> BusinessReportContentRange
$sel:format:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> BusinessReportFormat
$sel:tags:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe [Tag]
$sel:s3BucketName:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe Text
$sel:clientRequestToken:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe Text
$sel:scheduleName:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe Text
$sel:recurrence:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe BusinessReportRecurrence
$sel:s3KeyPrefix:CreateBusinessReportSchedule' :: CreateBusinessReportSchedule -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"S3KeyPrefix" 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
s3KeyPrefix,
(Text
"Recurrence" Text -> BusinessReportRecurrence -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BusinessReportRecurrence -> Pair)
-> Maybe BusinessReportRecurrence -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BusinessReportRecurrence
recurrence,
(Text
"ScheduleName" 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
scheduleName,
(Text
"ClientRequestToken" 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
clientRequestToken,
(Text
"S3BucketName" 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
s3BucketName,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Format" Text -> BusinessReportFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= BusinessReportFormat
format),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ContentRange" Text -> BusinessReportContentRange -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= BusinessReportContentRange
contentRange)
]
)
instance Core.ToPath CreateBusinessReportSchedule where
toPath :: CreateBusinessReportSchedule -> ByteString
toPath = ByteString -> CreateBusinessReportSchedule -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateBusinessReportSchedule where
toQuery :: CreateBusinessReportSchedule -> QueryString
toQuery = QueryString -> CreateBusinessReportSchedule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateBusinessReportScheduleResponse = CreateBusinessReportScheduleResponse'
{
CreateBusinessReportScheduleResponse -> Maybe Text
scheduleArn :: Prelude.Maybe Prelude.Text,
CreateBusinessReportScheduleResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateBusinessReportScheduleResponse
-> CreateBusinessReportScheduleResponse -> Bool
(CreateBusinessReportScheduleResponse
-> CreateBusinessReportScheduleResponse -> Bool)
-> (CreateBusinessReportScheduleResponse
-> CreateBusinessReportScheduleResponse -> Bool)
-> Eq CreateBusinessReportScheduleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBusinessReportScheduleResponse
-> CreateBusinessReportScheduleResponse -> Bool
$c/= :: CreateBusinessReportScheduleResponse
-> CreateBusinessReportScheduleResponse -> Bool
== :: CreateBusinessReportScheduleResponse
-> CreateBusinessReportScheduleResponse -> Bool
$c== :: CreateBusinessReportScheduleResponse
-> CreateBusinessReportScheduleResponse -> Bool
Prelude.Eq, ReadPrec [CreateBusinessReportScheduleResponse]
ReadPrec CreateBusinessReportScheduleResponse
Int -> ReadS CreateBusinessReportScheduleResponse
ReadS [CreateBusinessReportScheduleResponse]
(Int -> ReadS CreateBusinessReportScheduleResponse)
-> ReadS [CreateBusinessReportScheduleResponse]
-> ReadPrec CreateBusinessReportScheduleResponse
-> ReadPrec [CreateBusinessReportScheduleResponse]
-> Read CreateBusinessReportScheduleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBusinessReportScheduleResponse]
$creadListPrec :: ReadPrec [CreateBusinessReportScheduleResponse]
readPrec :: ReadPrec CreateBusinessReportScheduleResponse
$creadPrec :: ReadPrec CreateBusinessReportScheduleResponse
readList :: ReadS [CreateBusinessReportScheduleResponse]
$creadList :: ReadS [CreateBusinessReportScheduleResponse]
readsPrec :: Int -> ReadS CreateBusinessReportScheduleResponse
$creadsPrec :: Int -> ReadS CreateBusinessReportScheduleResponse
Prelude.Read, Int -> CreateBusinessReportScheduleResponse -> ShowS
[CreateBusinessReportScheduleResponse] -> ShowS
CreateBusinessReportScheduleResponse -> String
(Int -> CreateBusinessReportScheduleResponse -> ShowS)
-> (CreateBusinessReportScheduleResponse -> String)
-> ([CreateBusinessReportScheduleResponse] -> ShowS)
-> Show CreateBusinessReportScheduleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBusinessReportScheduleResponse] -> ShowS
$cshowList :: [CreateBusinessReportScheduleResponse] -> ShowS
show :: CreateBusinessReportScheduleResponse -> String
$cshow :: CreateBusinessReportScheduleResponse -> String
showsPrec :: Int -> CreateBusinessReportScheduleResponse -> ShowS
$cshowsPrec :: Int -> CreateBusinessReportScheduleResponse -> ShowS
Prelude.Show, (forall x.
CreateBusinessReportScheduleResponse
-> Rep CreateBusinessReportScheduleResponse x)
-> (forall x.
Rep CreateBusinessReportScheduleResponse x
-> CreateBusinessReportScheduleResponse)
-> Generic CreateBusinessReportScheduleResponse
forall x.
Rep CreateBusinessReportScheduleResponse x
-> CreateBusinessReportScheduleResponse
forall x.
CreateBusinessReportScheduleResponse
-> Rep CreateBusinessReportScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateBusinessReportScheduleResponse x
-> CreateBusinessReportScheduleResponse
$cfrom :: forall x.
CreateBusinessReportScheduleResponse
-> Rep CreateBusinessReportScheduleResponse x
Prelude.Generic)
newCreateBusinessReportScheduleResponse ::
Prelude.Int ->
CreateBusinessReportScheduleResponse
newCreateBusinessReportScheduleResponse :: Int -> CreateBusinessReportScheduleResponse
newCreateBusinessReportScheduleResponse Int
pHttpStatus_ =
CreateBusinessReportScheduleResponse' :: Maybe Text -> Int -> CreateBusinessReportScheduleResponse
CreateBusinessReportScheduleResponse'
{ $sel:scheduleArn:CreateBusinessReportScheduleResponse' :: Maybe Text
scheduleArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateBusinessReportScheduleResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createBusinessReportScheduleResponse_scheduleArn :: Lens.Lens' CreateBusinessReportScheduleResponse (Prelude.Maybe Prelude.Text)
createBusinessReportScheduleResponse_scheduleArn :: (Maybe Text -> f (Maybe Text))
-> CreateBusinessReportScheduleResponse
-> f CreateBusinessReportScheduleResponse
createBusinessReportScheduleResponse_scheduleArn = (CreateBusinessReportScheduleResponse -> Maybe Text)
-> (CreateBusinessReportScheduleResponse
-> Maybe Text -> CreateBusinessReportScheduleResponse)
-> Lens
CreateBusinessReportScheduleResponse
CreateBusinessReportScheduleResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBusinessReportScheduleResponse' {Maybe Text
scheduleArn :: Maybe Text
$sel:scheduleArn:CreateBusinessReportScheduleResponse' :: CreateBusinessReportScheduleResponse -> Maybe Text
scheduleArn} -> Maybe Text
scheduleArn) (\s :: CreateBusinessReportScheduleResponse
s@CreateBusinessReportScheduleResponse' {} Maybe Text
a -> CreateBusinessReportScheduleResponse
s {$sel:scheduleArn:CreateBusinessReportScheduleResponse' :: Maybe Text
scheduleArn = Maybe Text
a} :: CreateBusinessReportScheduleResponse)
createBusinessReportScheduleResponse_httpStatus :: Lens.Lens' CreateBusinessReportScheduleResponse Prelude.Int
createBusinessReportScheduleResponse_httpStatus :: (Int -> f Int)
-> CreateBusinessReportScheduleResponse
-> f CreateBusinessReportScheduleResponse
createBusinessReportScheduleResponse_httpStatus = (CreateBusinessReportScheduleResponse -> Int)
-> (CreateBusinessReportScheduleResponse
-> Int -> CreateBusinessReportScheduleResponse)
-> Lens
CreateBusinessReportScheduleResponse
CreateBusinessReportScheduleResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBusinessReportScheduleResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateBusinessReportScheduleResponse' :: CreateBusinessReportScheduleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateBusinessReportScheduleResponse
s@CreateBusinessReportScheduleResponse' {} Int
a -> CreateBusinessReportScheduleResponse
s {$sel:httpStatus:CreateBusinessReportScheduleResponse' :: Int
httpStatus = Int
a} :: CreateBusinessReportScheduleResponse)
instance
Prelude.NFData
CreateBusinessReportScheduleResponse