{-# 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.Kinesis.IncreaseStreamRetentionPeriod
(
IncreaseStreamRetentionPeriod (..),
newIncreaseStreamRetentionPeriod,
increaseStreamRetentionPeriod_streamName,
increaseStreamRetentionPeriod_retentionPeriodHours,
IncreaseStreamRetentionPeriodResponse (..),
newIncreaseStreamRetentionPeriodResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Kinesis.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 IncreaseStreamRetentionPeriod = IncreaseStreamRetentionPeriod'
{
IncreaseStreamRetentionPeriod -> Text
streamName :: Prelude.Text,
IncreaseStreamRetentionPeriod -> Int
retentionPeriodHours :: Prelude.Int
}
deriving (IncreaseStreamRetentionPeriod
-> IncreaseStreamRetentionPeriod -> Bool
(IncreaseStreamRetentionPeriod
-> IncreaseStreamRetentionPeriod -> Bool)
-> (IncreaseStreamRetentionPeriod
-> IncreaseStreamRetentionPeriod -> Bool)
-> Eq IncreaseStreamRetentionPeriod
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IncreaseStreamRetentionPeriod
-> IncreaseStreamRetentionPeriod -> Bool
$c/= :: IncreaseStreamRetentionPeriod
-> IncreaseStreamRetentionPeriod -> Bool
== :: IncreaseStreamRetentionPeriod
-> IncreaseStreamRetentionPeriod -> Bool
$c== :: IncreaseStreamRetentionPeriod
-> IncreaseStreamRetentionPeriod -> Bool
Prelude.Eq, ReadPrec [IncreaseStreamRetentionPeriod]
ReadPrec IncreaseStreamRetentionPeriod
Int -> ReadS IncreaseStreamRetentionPeriod
ReadS [IncreaseStreamRetentionPeriod]
(Int -> ReadS IncreaseStreamRetentionPeriod)
-> ReadS [IncreaseStreamRetentionPeriod]
-> ReadPrec IncreaseStreamRetentionPeriod
-> ReadPrec [IncreaseStreamRetentionPeriod]
-> Read IncreaseStreamRetentionPeriod
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IncreaseStreamRetentionPeriod]
$creadListPrec :: ReadPrec [IncreaseStreamRetentionPeriod]
readPrec :: ReadPrec IncreaseStreamRetentionPeriod
$creadPrec :: ReadPrec IncreaseStreamRetentionPeriod
readList :: ReadS [IncreaseStreamRetentionPeriod]
$creadList :: ReadS [IncreaseStreamRetentionPeriod]
readsPrec :: Int -> ReadS IncreaseStreamRetentionPeriod
$creadsPrec :: Int -> ReadS IncreaseStreamRetentionPeriod
Prelude.Read, Int -> IncreaseStreamRetentionPeriod -> ShowS
[IncreaseStreamRetentionPeriod] -> ShowS
IncreaseStreamRetentionPeriod -> String
(Int -> IncreaseStreamRetentionPeriod -> ShowS)
-> (IncreaseStreamRetentionPeriod -> String)
-> ([IncreaseStreamRetentionPeriod] -> ShowS)
-> Show IncreaseStreamRetentionPeriod
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IncreaseStreamRetentionPeriod] -> ShowS
$cshowList :: [IncreaseStreamRetentionPeriod] -> ShowS
show :: IncreaseStreamRetentionPeriod -> String
$cshow :: IncreaseStreamRetentionPeriod -> String
showsPrec :: Int -> IncreaseStreamRetentionPeriod -> ShowS
$cshowsPrec :: Int -> IncreaseStreamRetentionPeriod -> ShowS
Prelude.Show, (forall x.
IncreaseStreamRetentionPeriod
-> Rep IncreaseStreamRetentionPeriod x)
-> (forall x.
Rep IncreaseStreamRetentionPeriod x
-> IncreaseStreamRetentionPeriod)
-> Generic IncreaseStreamRetentionPeriod
forall x.
Rep IncreaseStreamRetentionPeriod x
-> IncreaseStreamRetentionPeriod
forall x.
IncreaseStreamRetentionPeriod
-> Rep IncreaseStreamRetentionPeriod x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IncreaseStreamRetentionPeriod x
-> IncreaseStreamRetentionPeriod
$cfrom :: forall x.
IncreaseStreamRetentionPeriod
-> Rep IncreaseStreamRetentionPeriod x
Prelude.Generic)
newIncreaseStreamRetentionPeriod ::
Prelude.Text ->
Prelude.Int ->
IncreaseStreamRetentionPeriod
newIncreaseStreamRetentionPeriod :: Text -> Int -> IncreaseStreamRetentionPeriod
newIncreaseStreamRetentionPeriod
Text
pStreamName_
Int
pRetentionPeriodHours_ =
IncreaseStreamRetentionPeriod' :: Text -> Int -> IncreaseStreamRetentionPeriod
IncreaseStreamRetentionPeriod'
{ $sel:streamName:IncreaseStreamRetentionPeriod' :: Text
streamName =
Text
pStreamName_,
$sel:retentionPeriodHours:IncreaseStreamRetentionPeriod' :: Int
retentionPeriodHours =
Int
pRetentionPeriodHours_
}
increaseStreamRetentionPeriod_streamName :: Lens.Lens' IncreaseStreamRetentionPeriod Prelude.Text
increaseStreamRetentionPeriod_streamName :: (Text -> f Text)
-> IncreaseStreamRetentionPeriod -> f IncreaseStreamRetentionPeriod
increaseStreamRetentionPeriod_streamName = (IncreaseStreamRetentionPeriod -> Text)
-> (IncreaseStreamRetentionPeriod
-> Text -> IncreaseStreamRetentionPeriod)
-> Lens
IncreaseStreamRetentionPeriod
IncreaseStreamRetentionPeriod
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseStreamRetentionPeriod' {Text
streamName :: Text
$sel:streamName:IncreaseStreamRetentionPeriod' :: IncreaseStreamRetentionPeriod -> Text
streamName} -> Text
streamName) (\s :: IncreaseStreamRetentionPeriod
s@IncreaseStreamRetentionPeriod' {} Text
a -> IncreaseStreamRetentionPeriod
s {$sel:streamName:IncreaseStreamRetentionPeriod' :: Text
streamName = Text
a} :: IncreaseStreamRetentionPeriod)
increaseStreamRetentionPeriod_retentionPeriodHours :: Lens.Lens' IncreaseStreamRetentionPeriod Prelude.Int
increaseStreamRetentionPeriod_retentionPeriodHours :: (Int -> f Int)
-> IncreaseStreamRetentionPeriod -> f IncreaseStreamRetentionPeriod
increaseStreamRetentionPeriod_retentionPeriodHours = (IncreaseStreamRetentionPeriod -> Int)
-> (IncreaseStreamRetentionPeriod
-> Int -> IncreaseStreamRetentionPeriod)
-> Lens
IncreaseStreamRetentionPeriod IncreaseStreamRetentionPeriod Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseStreamRetentionPeriod' {Int
retentionPeriodHours :: Int
$sel:retentionPeriodHours:IncreaseStreamRetentionPeriod' :: IncreaseStreamRetentionPeriod -> Int
retentionPeriodHours} -> Int
retentionPeriodHours) (\s :: IncreaseStreamRetentionPeriod
s@IncreaseStreamRetentionPeriod' {} Int
a -> IncreaseStreamRetentionPeriod
s {$sel:retentionPeriodHours:IncreaseStreamRetentionPeriod' :: Int
retentionPeriodHours = Int
a} :: IncreaseStreamRetentionPeriod)
instance
Core.AWSRequest
IncreaseStreamRetentionPeriod
where
type
AWSResponse IncreaseStreamRetentionPeriod =
IncreaseStreamRetentionPeriodResponse
request :: IncreaseStreamRetentionPeriod
-> Request IncreaseStreamRetentionPeriod
request = Service
-> IncreaseStreamRetentionPeriod
-> Request IncreaseStreamRetentionPeriod
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy IncreaseStreamRetentionPeriod
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse IncreaseStreamRetentionPeriod)))
response =
AWSResponse IncreaseStreamRetentionPeriod
-> Logger
-> Service
-> Proxy IncreaseStreamRetentionPeriod
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse IncreaseStreamRetentionPeriod)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse IncreaseStreamRetentionPeriod
IncreaseStreamRetentionPeriodResponse
IncreaseStreamRetentionPeriodResponse'
instance
Prelude.Hashable
IncreaseStreamRetentionPeriod
instance Prelude.NFData IncreaseStreamRetentionPeriod
instance Core.ToHeaders IncreaseStreamRetentionPeriod where
toHeaders :: IncreaseStreamRetentionPeriod -> [Header]
toHeaders =
[Header] -> IncreaseStreamRetentionPeriod -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"Kinesis_20131202.IncreaseStreamRetentionPeriod" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON IncreaseStreamRetentionPeriod where
toJSON :: IncreaseStreamRetentionPeriod -> Value
toJSON IncreaseStreamRetentionPeriod' {Int
Text
retentionPeriodHours :: Int
streamName :: Text
$sel:retentionPeriodHours:IncreaseStreamRetentionPeriod' :: IncreaseStreamRetentionPeriod -> Int
$sel:streamName:IncreaseStreamRetentionPeriod' :: IncreaseStreamRetentionPeriod -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StreamName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
streamName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"RetentionPeriodHours"
Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
retentionPeriodHours
)
]
)
instance Core.ToPath IncreaseStreamRetentionPeriod where
toPath :: IncreaseStreamRetentionPeriod -> ByteString
toPath = ByteString -> IncreaseStreamRetentionPeriod -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery IncreaseStreamRetentionPeriod where
toQuery :: IncreaseStreamRetentionPeriod -> QueryString
toQuery = QueryString -> IncreaseStreamRetentionPeriod -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data IncreaseStreamRetentionPeriodResponse = IncreaseStreamRetentionPeriodResponse'
{
}
deriving (IncreaseStreamRetentionPeriodResponse
-> IncreaseStreamRetentionPeriodResponse -> Bool
(IncreaseStreamRetentionPeriodResponse
-> IncreaseStreamRetentionPeriodResponse -> Bool)
-> (IncreaseStreamRetentionPeriodResponse
-> IncreaseStreamRetentionPeriodResponse -> Bool)
-> Eq IncreaseStreamRetentionPeriodResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IncreaseStreamRetentionPeriodResponse
-> IncreaseStreamRetentionPeriodResponse -> Bool
$c/= :: IncreaseStreamRetentionPeriodResponse
-> IncreaseStreamRetentionPeriodResponse -> Bool
== :: IncreaseStreamRetentionPeriodResponse
-> IncreaseStreamRetentionPeriodResponse -> Bool
$c== :: IncreaseStreamRetentionPeriodResponse
-> IncreaseStreamRetentionPeriodResponse -> Bool
Prelude.Eq, ReadPrec [IncreaseStreamRetentionPeriodResponse]
ReadPrec IncreaseStreamRetentionPeriodResponse
Int -> ReadS IncreaseStreamRetentionPeriodResponse
ReadS [IncreaseStreamRetentionPeriodResponse]
(Int -> ReadS IncreaseStreamRetentionPeriodResponse)
-> ReadS [IncreaseStreamRetentionPeriodResponse]
-> ReadPrec IncreaseStreamRetentionPeriodResponse
-> ReadPrec [IncreaseStreamRetentionPeriodResponse]
-> Read IncreaseStreamRetentionPeriodResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IncreaseStreamRetentionPeriodResponse]
$creadListPrec :: ReadPrec [IncreaseStreamRetentionPeriodResponse]
readPrec :: ReadPrec IncreaseStreamRetentionPeriodResponse
$creadPrec :: ReadPrec IncreaseStreamRetentionPeriodResponse
readList :: ReadS [IncreaseStreamRetentionPeriodResponse]
$creadList :: ReadS [IncreaseStreamRetentionPeriodResponse]
readsPrec :: Int -> ReadS IncreaseStreamRetentionPeriodResponse
$creadsPrec :: Int -> ReadS IncreaseStreamRetentionPeriodResponse
Prelude.Read, Int -> IncreaseStreamRetentionPeriodResponse -> ShowS
[IncreaseStreamRetentionPeriodResponse] -> ShowS
IncreaseStreamRetentionPeriodResponse -> String
(Int -> IncreaseStreamRetentionPeriodResponse -> ShowS)
-> (IncreaseStreamRetentionPeriodResponse -> String)
-> ([IncreaseStreamRetentionPeriodResponse] -> ShowS)
-> Show IncreaseStreamRetentionPeriodResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IncreaseStreamRetentionPeriodResponse] -> ShowS
$cshowList :: [IncreaseStreamRetentionPeriodResponse] -> ShowS
show :: IncreaseStreamRetentionPeriodResponse -> String
$cshow :: IncreaseStreamRetentionPeriodResponse -> String
showsPrec :: Int -> IncreaseStreamRetentionPeriodResponse -> ShowS
$cshowsPrec :: Int -> IncreaseStreamRetentionPeriodResponse -> ShowS
Prelude.Show, (forall x.
IncreaseStreamRetentionPeriodResponse
-> Rep IncreaseStreamRetentionPeriodResponse x)
-> (forall x.
Rep IncreaseStreamRetentionPeriodResponse x
-> IncreaseStreamRetentionPeriodResponse)
-> Generic IncreaseStreamRetentionPeriodResponse
forall x.
Rep IncreaseStreamRetentionPeriodResponse x
-> IncreaseStreamRetentionPeriodResponse
forall x.
IncreaseStreamRetentionPeriodResponse
-> Rep IncreaseStreamRetentionPeriodResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IncreaseStreamRetentionPeriodResponse x
-> IncreaseStreamRetentionPeriodResponse
$cfrom :: forall x.
IncreaseStreamRetentionPeriodResponse
-> Rep IncreaseStreamRetentionPeriodResponse x
Prelude.Generic)
newIncreaseStreamRetentionPeriodResponse ::
IncreaseStreamRetentionPeriodResponse
newIncreaseStreamRetentionPeriodResponse :: IncreaseStreamRetentionPeriodResponse
newIncreaseStreamRetentionPeriodResponse =
IncreaseStreamRetentionPeriodResponse
IncreaseStreamRetentionPeriodResponse'
instance
Prelude.NFData
IncreaseStreamRetentionPeriodResponse