{-# 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.SetLoggingOptions
(
SetLoggingOptions (..),
newSetLoggingOptions,
setLoggingOptions_loggingOptionsPayload,
SetLoggingOptionsResponse (..),
newSetLoggingOptionsResponse,
)
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 SetLoggingOptions = SetLoggingOptions'
{
SetLoggingOptions -> LoggingOptionsPayload
loggingOptionsPayload :: LoggingOptionsPayload
}
deriving (SetLoggingOptions -> SetLoggingOptions -> Bool
(SetLoggingOptions -> SetLoggingOptions -> Bool)
-> (SetLoggingOptions -> SetLoggingOptions -> Bool)
-> Eq SetLoggingOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetLoggingOptions -> SetLoggingOptions -> Bool
$c/= :: SetLoggingOptions -> SetLoggingOptions -> Bool
== :: SetLoggingOptions -> SetLoggingOptions -> Bool
$c== :: SetLoggingOptions -> SetLoggingOptions -> Bool
Prelude.Eq, ReadPrec [SetLoggingOptions]
ReadPrec SetLoggingOptions
Int -> ReadS SetLoggingOptions
ReadS [SetLoggingOptions]
(Int -> ReadS SetLoggingOptions)
-> ReadS [SetLoggingOptions]
-> ReadPrec SetLoggingOptions
-> ReadPrec [SetLoggingOptions]
-> Read SetLoggingOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetLoggingOptions]
$creadListPrec :: ReadPrec [SetLoggingOptions]
readPrec :: ReadPrec SetLoggingOptions
$creadPrec :: ReadPrec SetLoggingOptions
readList :: ReadS [SetLoggingOptions]
$creadList :: ReadS [SetLoggingOptions]
readsPrec :: Int -> ReadS SetLoggingOptions
$creadsPrec :: Int -> ReadS SetLoggingOptions
Prelude.Read, Int -> SetLoggingOptions -> ShowS
[SetLoggingOptions] -> ShowS
SetLoggingOptions -> String
(Int -> SetLoggingOptions -> ShowS)
-> (SetLoggingOptions -> String)
-> ([SetLoggingOptions] -> ShowS)
-> Show SetLoggingOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetLoggingOptions] -> ShowS
$cshowList :: [SetLoggingOptions] -> ShowS
show :: SetLoggingOptions -> String
$cshow :: SetLoggingOptions -> String
showsPrec :: Int -> SetLoggingOptions -> ShowS
$cshowsPrec :: Int -> SetLoggingOptions -> ShowS
Prelude.Show, (forall x. SetLoggingOptions -> Rep SetLoggingOptions x)
-> (forall x. Rep SetLoggingOptions x -> SetLoggingOptions)
-> Generic SetLoggingOptions
forall x. Rep SetLoggingOptions x -> SetLoggingOptions
forall x. SetLoggingOptions -> Rep SetLoggingOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SetLoggingOptions x -> SetLoggingOptions
$cfrom :: forall x. SetLoggingOptions -> Rep SetLoggingOptions x
Prelude.Generic)
newSetLoggingOptions ::
LoggingOptionsPayload ->
SetLoggingOptions
newSetLoggingOptions :: LoggingOptionsPayload -> SetLoggingOptions
newSetLoggingOptions LoggingOptionsPayload
pLoggingOptionsPayload_ =
SetLoggingOptions' :: LoggingOptionsPayload -> SetLoggingOptions
SetLoggingOptions'
{ $sel:loggingOptionsPayload:SetLoggingOptions' :: LoggingOptionsPayload
loggingOptionsPayload =
LoggingOptionsPayload
pLoggingOptionsPayload_
}
setLoggingOptions_loggingOptionsPayload :: Lens.Lens' SetLoggingOptions LoggingOptionsPayload
setLoggingOptions_loggingOptionsPayload :: (LoggingOptionsPayload -> f LoggingOptionsPayload)
-> SetLoggingOptions -> f SetLoggingOptions
setLoggingOptions_loggingOptionsPayload = (SetLoggingOptions -> LoggingOptionsPayload)
-> (SetLoggingOptions
-> LoggingOptionsPayload -> SetLoggingOptions)
-> Lens
SetLoggingOptions
SetLoggingOptions
LoggingOptionsPayload
LoggingOptionsPayload
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetLoggingOptions' {LoggingOptionsPayload
loggingOptionsPayload :: LoggingOptionsPayload
$sel:loggingOptionsPayload:SetLoggingOptions' :: SetLoggingOptions -> LoggingOptionsPayload
loggingOptionsPayload} -> LoggingOptionsPayload
loggingOptionsPayload) (\s :: SetLoggingOptions
s@SetLoggingOptions' {} LoggingOptionsPayload
a -> SetLoggingOptions
s {$sel:loggingOptionsPayload:SetLoggingOptions' :: LoggingOptionsPayload
loggingOptionsPayload = LoggingOptionsPayload
a} :: SetLoggingOptions)
instance Core.AWSRequest SetLoggingOptions where
type
AWSResponse SetLoggingOptions =
SetLoggingOptionsResponse
request :: SetLoggingOptions -> Request SetLoggingOptions
request = Service -> SetLoggingOptions -> Request SetLoggingOptions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy SetLoggingOptions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetLoggingOptions)))
response =
AWSResponse SetLoggingOptions
-> Logger
-> Service
-> Proxy SetLoggingOptions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetLoggingOptions)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse SetLoggingOptions
SetLoggingOptionsResponse
SetLoggingOptionsResponse'
instance Prelude.Hashable SetLoggingOptions
instance Prelude.NFData SetLoggingOptions
instance Core.ToHeaders SetLoggingOptions where
toHeaders :: SetLoggingOptions -> [Header]
toHeaders = [Header] -> SetLoggingOptions -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON SetLoggingOptions where
toJSON :: SetLoggingOptions -> Value
toJSON SetLoggingOptions' {LoggingOptionsPayload
loggingOptionsPayload :: LoggingOptionsPayload
$sel:loggingOptionsPayload:SetLoggingOptions' :: SetLoggingOptions -> LoggingOptionsPayload
..} =
[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
"loggingOptionsPayload"
Text -> LoggingOptionsPayload -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LoggingOptionsPayload
loggingOptionsPayload
)
]
)
instance Core.ToPath SetLoggingOptions where
toPath :: SetLoggingOptions -> ByteString
toPath = ByteString -> SetLoggingOptions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/loggingOptions"
instance Core.ToQuery SetLoggingOptions where
toQuery :: SetLoggingOptions -> QueryString
toQuery = QueryString -> SetLoggingOptions -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data SetLoggingOptionsResponse = SetLoggingOptionsResponse'
{
}
deriving (SetLoggingOptionsResponse -> SetLoggingOptionsResponse -> Bool
(SetLoggingOptionsResponse -> SetLoggingOptionsResponse -> Bool)
-> (SetLoggingOptionsResponse -> SetLoggingOptionsResponse -> Bool)
-> Eq SetLoggingOptionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetLoggingOptionsResponse -> SetLoggingOptionsResponse -> Bool
$c/= :: SetLoggingOptionsResponse -> SetLoggingOptionsResponse -> Bool
== :: SetLoggingOptionsResponse -> SetLoggingOptionsResponse -> Bool
$c== :: SetLoggingOptionsResponse -> SetLoggingOptionsResponse -> Bool
Prelude.Eq, ReadPrec [SetLoggingOptionsResponse]
ReadPrec SetLoggingOptionsResponse
Int -> ReadS SetLoggingOptionsResponse
ReadS [SetLoggingOptionsResponse]
(Int -> ReadS SetLoggingOptionsResponse)
-> ReadS [SetLoggingOptionsResponse]
-> ReadPrec SetLoggingOptionsResponse
-> ReadPrec [SetLoggingOptionsResponse]
-> Read SetLoggingOptionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetLoggingOptionsResponse]
$creadListPrec :: ReadPrec [SetLoggingOptionsResponse]
readPrec :: ReadPrec SetLoggingOptionsResponse
$creadPrec :: ReadPrec SetLoggingOptionsResponse
readList :: ReadS [SetLoggingOptionsResponse]
$creadList :: ReadS [SetLoggingOptionsResponse]
readsPrec :: Int -> ReadS SetLoggingOptionsResponse
$creadsPrec :: Int -> ReadS SetLoggingOptionsResponse
Prelude.Read, Int -> SetLoggingOptionsResponse -> ShowS
[SetLoggingOptionsResponse] -> ShowS
SetLoggingOptionsResponse -> String
(Int -> SetLoggingOptionsResponse -> ShowS)
-> (SetLoggingOptionsResponse -> String)
-> ([SetLoggingOptionsResponse] -> ShowS)
-> Show SetLoggingOptionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetLoggingOptionsResponse] -> ShowS
$cshowList :: [SetLoggingOptionsResponse] -> ShowS
show :: SetLoggingOptionsResponse -> String
$cshow :: SetLoggingOptionsResponse -> String
showsPrec :: Int -> SetLoggingOptionsResponse -> ShowS
$cshowsPrec :: Int -> SetLoggingOptionsResponse -> ShowS
Prelude.Show, (forall x.
SetLoggingOptionsResponse -> Rep SetLoggingOptionsResponse x)
-> (forall x.
Rep SetLoggingOptionsResponse x -> SetLoggingOptionsResponse)
-> Generic SetLoggingOptionsResponse
forall x.
Rep SetLoggingOptionsResponse x -> SetLoggingOptionsResponse
forall x.
SetLoggingOptionsResponse -> Rep SetLoggingOptionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetLoggingOptionsResponse x -> SetLoggingOptionsResponse
$cfrom :: forall x.
SetLoggingOptionsResponse -> Rep SetLoggingOptionsResponse x
Prelude.Generic)
newSetLoggingOptionsResponse ::
SetLoggingOptionsResponse
newSetLoggingOptionsResponse :: SetLoggingOptionsResponse
newSetLoggingOptionsResponse =
SetLoggingOptionsResponse
SetLoggingOptionsResponse'
instance Prelude.NFData SetLoggingOptionsResponse