{-# 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.IoTWireless.ResetResourceLogLevel
(
ResetResourceLogLevel (..),
newResetResourceLogLevel,
resetResourceLogLevel_resourceIdentifier,
resetResourceLogLevel_resourceType,
ResetResourceLogLevelResponse (..),
newResetResourceLogLevelResponse,
resetResourceLogLevelResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoTWireless.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 ResetResourceLogLevel = ResetResourceLogLevel'
{ ResetResourceLogLevel -> Text
resourceIdentifier :: Prelude.Text,
ResetResourceLogLevel -> Text
resourceType :: Prelude.Text
}
deriving (ResetResourceLogLevel -> ResetResourceLogLevel -> Bool
(ResetResourceLogLevel -> ResetResourceLogLevel -> Bool)
-> (ResetResourceLogLevel -> ResetResourceLogLevel -> Bool)
-> Eq ResetResourceLogLevel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResetResourceLogLevel -> ResetResourceLogLevel -> Bool
$c/= :: ResetResourceLogLevel -> ResetResourceLogLevel -> Bool
== :: ResetResourceLogLevel -> ResetResourceLogLevel -> Bool
$c== :: ResetResourceLogLevel -> ResetResourceLogLevel -> Bool
Prelude.Eq, ReadPrec [ResetResourceLogLevel]
ReadPrec ResetResourceLogLevel
Int -> ReadS ResetResourceLogLevel
ReadS [ResetResourceLogLevel]
(Int -> ReadS ResetResourceLogLevel)
-> ReadS [ResetResourceLogLevel]
-> ReadPrec ResetResourceLogLevel
-> ReadPrec [ResetResourceLogLevel]
-> Read ResetResourceLogLevel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResetResourceLogLevel]
$creadListPrec :: ReadPrec [ResetResourceLogLevel]
readPrec :: ReadPrec ResetResourceLogLevel
$creadPrec :: ReadPrec ResetResourceLogLevel
readList :: ReadS [ResetResourceLogLevel]
$creadList :: ReadS [ResetResourceLogLevel]
readsPrec :: Int -> ReadS ResetResourceLogLevel
$creadsPrec :: Int -> ReadS ResetResourceLogLevel
Prelude.Read, Int -> ResetResourceLogLevel -> ShowS
[ResetResourceLogLevel] -> ShowS
ResetResourceLogLevel -> String
(Int -> ResetResourceLogLevel -> ShowS)
-> (ResetResourceLogLevel -> String)
-> ([ResetResourceLogLevel] -> ShowS)
-> Show ResetResourceLogLevel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResetResourceLogLevel] -> ShowS
$cshowList :: [ResetResourceLogLevel] -> ShowS
show :: ResetResourceLogLevel -> String
$cshow :: ResetResourceLogLevel -> String
showsPrec :: Int -> ResetResourceLogLevel -> ShowS
$cshowsPrec :: Int -> ResetResourceLogLevel -> ShowS
Prelude.Show, (forall x. ResetResourceLogLevel -> Rep ResetResourceLogLevel x)
-> (forall x. Rep ResetResourceLogLevel x -> ResetResourceLogLevel)
-> Generic ResetResourceLogLevel
forall x. Rep ResetResourceLogLevel x -> ResetResourceLogLevel
forall x. ResetResourceLogLevel -> Rep ResetResourceLogLevel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResetResourceLogLevel x -> ResetResourceLogLevel
$cfrom :: forall x. ResetResourceLogLevel -> Rep ResetResourceLogLevel x
Prelude.Generic)
newResetResourceLogLevel ::
Prelude.Text ->
Prelude.Text ->
ResetResourceLogLevel
newResetResourceLogLevel :: Text -> Text -> ResetResourceLogLevel
newResetResourceLogLevel
Text
pResourceIdentifier_
Text
pResourceType_ =
ResetResourceLogLevel' :: Text -> Text -> ResetResourceLogLevel
ResetResourceLogLevel'
{ $sel:resourceIdentifier:ResetResourceLogLevel' :: Text
resourceIdentifier =
Text
pResourceIdentifier_,
$sel:resourceType:ResetResourceLogLevel' :: Text
resourceType = Text
pResourceType_
}
resetResourceLogLevel_resourceIdentifier :: Lens.Lens' ResetResourceLogLevel Prelude.Text
resetResourceLogLevel_resourceIdentifier :: (Text -> f Text)
-> ResetResourceLogLevel -> f ResetResourceLogLevel
resetResourceLogLevel_resourceIdentifier = (ResetResourceLogLevel -> Text)
-> (ResetResourceLogLevel -> Text -> ResetResourceLogLevel)
-> Lens ResetResourceLogLevel ResetResourceLogLevel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetResourceLogLevel' {Text
resourceIdentifier :: Text
$sel:resourceIdentifier:ResetResourceLogLevel' :: ResetResourceLogLevel -> Text
resourceIdentifier} -> Text
resourceIdentifier) (\s :: ResetResourceLogLevel
s@ResetResourceLogLevel' {} Text
a -> ResetResourceLogLevel
s {$sel:resourceIdentifier:ResetResourceLogLevel' :: Text
resourceIdentifier = Text
a} :: ResetResourceLogLevel)
resetResourceLogLevel_resourceType :: Lens.Lens' ResetResourceLogLevel Prelude.Text
resetResourceLogLevel_resourceType :: (Text -> f Text)
-> ResetResourceLogLevel -> f ResetResourceLogLevel
resetResourceLogLevel_resourceType = (ResetResourceLogLevel -> Text)
-> (ResetResourceLogLevel -> Text -> ResetResourceLogLevel)
-> Lens ResetResourceLogLevel ResetResourceLogLevel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetResourceLogLevel' {Text
resourceType :: Text
$sel:resourceType:ResetResourceLogLevel' :: ResetResourceLogLevel -> Text
resourceType} -> Text
resourceType) (\s :: ResetResourceLogLevel
s@ResetResourceLogLevel' {} Text
a -> ResetResourceLogLevel
s {$sel:resourceType:ResetResourceLogLevel' :: Text
resourceType = Text
a} :: ResetResourceLogLevel)
instance Core.AWSRequest ResetResourceLogLevel where
type
AWSResponse ResetResourceLogLevel =
ResetResourceLogLevelResponse
request :: ResetResourceLogLevel -> Request ResetResourceLogLevel
request = Service -> ResetResourceLogLevel -> Request ResetResourceLogLevel
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy ResetResourceLogLevel
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResetResourceLogLevel)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse ResetResourceLogLevel))
-> Logger
-> Service
-> Proxy ResetResourceLogLevel
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResetResourceLogLevel)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> ResetResourceLogLevelResponse
ResetResourceLogLevelResponse'
(Int -> ResetResourceLogLevelResponse)
-> Either String Int -> Either String ResetResourceLogLevelResponse
forall (f :: * -> *) a b. Functor 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 ResetResourceLogLevel
instance Prelude.NFData ResetResourceLogLevel
instance Core.ToHeaders ResetResourceLogLevel where
toHeaders :: ResetResourceLogLevel -> ResponseHeaders
toHeaders = ResponseHeaders -> ResetResourceLogLevel -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ResetResourceLogLevel where
toPath :: ResetResourceLogLevel -> ByteString
toPath ResetResourceLogLevel' {Text
resourceType :: Text
resourceIdentifier :: Text
$sel:resourceType:ResetResourceLogLevel' :: ResetResourceLogLevel -> Text
$sel:resourceIdentifier:ResetResourceLogLevel' :: ResetResourceLogLevel -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/log-levels/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
resourceIdentifier]
instance Core.ToQuery ResetResourceLogLevel where
toQuery :: ResetResourceLogLevel -> QueryString
toQuery ResetResourceLogLevel' {Text
resourceType :: Text
resourceIdentifier :: Text
$sel:resourceType:ResetResourceLogLevel' :: ResetResourceLogLevel -> Text
$sel:resourceIdentifier:ResetResourceLogLevel' :: ResetResourceLogLevel -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"resourceType" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
resourceType]
data ResetResourceLogLevelResponse = ResetResourceLogLevelResponse'
{
ResetResourceLogLevelResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ResetResourceLogLevelResponse
-> ResetResourceLogLevelResponse -> Bool
(ResetResourceLogLevelResponse
-> ResetResourceLogLevelResponse -> Bool)
-> (ResetResourceLogLevelResponse
-> ResetResourceLogLevelResponse -> Bool)
-> Eq ResetResourceLogLevelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResetResourceLogLevelResponse
-> ResetResourceLogLevelResponse -> Bool
$c/= :: ResetResourceLogLevelResponse
-> ResetResourceLogLevelResponse -> Bool
== :: ResetResourceLogLevelResponse
-> ResetResourceLogLevelResponse -> Bool
$c== :: ResetResourceLogLevelResponse
-> ResetResourceLogLevelResponse -> Bool
Prelude.Eq, ReadPrec [ResetResourceLogLevelResponse]
ReadPrec ResetResourceLogLevelResponse
Int -> ReadS ResetResourceLogLevelResponse
ReadS [ResetResourceLogLevelResponse]
(Int -> ReadS ResetResourceLogLevelResponse)
-> ReadS [ResetResourceLogLevelResponse]
-> ReadPrec ResetResourceLogLevelResponse
-> ReadPrec [ResetResourceLogLevelResponse]
-> Read ResetResourceLogLevelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResetResourceLogLevelResponse]
$creadListPrec :: ReadPrec [ResetResourceLogLevelResponse]
readPrec :: ReadPrec ResetResourceLogLevelResponse
$creadPrec :: ReadPrec ResetResourceLogLevelResponse
readList :: ReadS [ResetResourceLogLevelResponse]
$creadList :: ReadS [ResetResourceLogLevelResponse]
readsPrec :: Int -> ReadS ResetResourceLogLevelResponse
$creadsPrec :: Int -> ReadS ResetResourceLogLevelResponse
Prelude.Read, Int -> ResetResourceLogLevelResponse -> ShowS
[ResetResourceLogLevelResponse] -> ShowS
ResetResourceLogLevelResponse -> String
(Int -> ResetResourceLogLevelResponse -> ShowS)
-> (ResetResourceLogLevelResponse -> String)
-> ([ResetResourceLogLevelResponse] -> ShowS)
-> Show ResetResourceLogLevelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResetResourceLogLevelResponse] -> ShowS
$cshowList :: [ResetResourceLogLevelResponse] -> ShowS
show :: ResetResourceLogLevelResponse -> String
$cshow :: ResetResourceLogLevelResponse -> String
showsPrec :: Int -> ResetResourceLogLevelResponse -> ShowS
$cshowsPrec :: Int -> ResetResourceLogLevelResponse -> ShowS
Prelude.Show, (forall x.
ResetResourceLogLevelResponse
-> Rep ResetResourceLogLevelResponse x)
-> (forall x.
Rep ResetResourceLogLevelResponse x
-> ResetResourceLogLevelResponse)
-> Generic ResetResourceLogLevelResponse
forall x.
Rep ResetResourceLogLevelResponse x
-> ResetResourceLogLevelResponse
forall x.
ResetResourceLogLevelResponse
-> Rep ResetResourceLogLevelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResetResourceLogLevelResponse x
-> ResetResourceLogLevelResponse
$cfrom :: forall x.
ResetResourceLogLevelResponse
-> Rep ResetResourceLogLevelResponse x
Prelude.Generic)
newResetResourceLogLevelResponse ::
Prelude.Int ->
ResetResourceLogLevelResponse
newResetResourceLogLevelResponse :: Int -> ResetResourceLogLevelResponse
newResetResourceLogLevelResponse Int
pHttpStatus_ =
ResetResourceLogLevelResponse' :: Int -> ResetResourceLogLevelResponse
ResetResourceLogLevelResponse'
{ $sel:httpStatus:ResetResourceLogLevelResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
resetResourceLogLevelResponse_httpStatus :: Lens.Lens' ResetResourceLogLevelResponse Prelude.Int
resetResourceLogLevelResponse_httpStatus :: (Int -> f Int)
-> ResetResourceLogLevelResponse -> f ResetResourceLogLevelResponse
resetResourceLogLevelResponse_httpStatus = (ResetResourceLogLevelResponse -> Int)
-> (ResetResourceLogLevelResponse
-> Int -> ResetResourceLogLevelResponse)
-> Lens
ResetResourceLogLevelResponse ResetResourceLogLevelResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetResourceLogLevelResponse' {Int
httpStatus :: Int
$sel:httpStatus:ResetResourceLogLevelResponse' :: ResetResourceLogLevelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ResetResourceLogLevelResponse
s@ResetResourceLogLevelResponse' {} Int
a -> ResetResourceLogLevelResponse
s {$sel:httpStatus:ResetResourceLogLevelResponse' :: Int
httpStatus = Int
a} :: ResetResourceLogLevelResponse)
instance Prelude.NFData ResetResourceLogLevelResponse