{-# 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.ListViolationEvents
(
ListViolationEvents (..),
newListViolationEvents,
listViolationEvents_behaviorCriteriaType,
listViolationEvents_listSuppressedAlerts,
listViolationEvents_maxResults,
listViolationEvents_nextToken,
listViolationEvents_securityProfileName,
listViolationEvents_thingName,
listViolationEvents_verificationState,
listViolationEvents_startTime,
listViolationEvents_endTime,
ListViolationEventsResponse (..),
newListViolationEventsResponse,
listViolationEventsResponse_nextToken,
listViolationEventsResponse_violationEvents,
listViolationEventsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoT.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListViolationEvents = ListViolationEvents'
{
ListViolationEvents -> Maybe BehaviorCriteriaType
behaviorCriteriaType :: Prelude.Maybe BehaviorCriteriaType,
ListViolationEvents -> Maybe Bool
listSuppressedAlerts :: Prelude.Maybe Prelude.Bool,
ListViolationEvents -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListViolationEvents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListViolationEvents -> Maybe Text
securityProfileName :: Prelude.Maybe Prelude.Text,
ListViolationEvents -> Maybe Text
thingName :: Prelude.Maybe Prelude.Text,
ListViolationEvents -> Maybe VerificationState
verificationState :: Prelude.Maybe VerificationState,
ListViolationEvents -> POSIX
startTime :: Data.POSIX,
ListViolationEvents -> POSIX
endTime :: Data.POSIX
}
deriving (ListViolationEvents -> ListViolationEvents -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListViolationEvents -> ListViolationEvents -> Bool
$c/= :: ListViolationEvents -> ListViolationEvents -> Bool
== :: ListViolationEvents -> ListViolationEvents -> Bool
$c== :: ListViolationEvents -> ListViolationEvents -> Bool
Prelude.Eq, ReadPrec [ListViolationEvents]
ReadPrec ListViolationEvents
Int -> ReadS ListViolationEvents
ReadS [ListViolationEvents]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListViolationEvents]
$creadListPrec :: ReadPrec [ListViolationEvents]
readPrec :: ReadPrec ListViolationEvents
$creadPrec :: ReadPrec ListViolationEvents
readList :: ReadS [ListViolationEvents]
$creadList :: ReadS [ListViolationEvents]
readsPrec :: Int -> ReadS ListViolationEvents
$creadsPrec :: Int -> ReadS ListViolationEvents
Prelude.Read, Int -> ListViolationEvents -> ShowS
[ListViolationEvents] -> ShowS
ListViolationEvents -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListViolationEvents] -> ShowS
$cshowList :: [ListViolationEvents] -> ShowS
show :: ListViolationEvents -> String
$cshow :: ListViolationEvents -> String
showsPrec :: Int -> ListViolationEvents -> ShowS
$cshowsPrec :: Int -> ListViolationEvents -> ShowS
Prelude.Show, forall x. Rep ListViolationEvents x -> ListViolationEvents
forall x. ListViolationEvents -> Rep ListViolationEvents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListViolationEvents x -> ListViolationEvents
$cfrom :: forall x. ListViolationEvents -> Rep ListViolationEvents x
Prelude.Generic)
newListViolationEvents ::
Prelude.UTCTime ->
Prelude.UTCTime ->
ListViolationEvents
newListViolationEvents :: UTCTime -> UTCTime -> ListViolationEvents
newListViolationEvents UTCTime
pStartTime_ UTCTime
pEndTime_ =
ListViolationEvents'
{ $sel:behaviorCriteriaType:ListViolationEvents' :: Maybe BehaviorCriteriaType
behaviorCriteriaType =
forall a. Maybe a
Prelude.Nothing,
$sel:listSuppressedAlerts:ListViolationEvents' :: Maybe Bool
listSuppressedAlerts = forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListViolationEvents' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListViolationEvents' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:securityProfileName:ListViolationEvents' :: Maybe Text
securityProfileName = forall a. Maybe a
Prelude.Nothing,
$sel:thingName:ListViolationEvents' :: Maybe Text
thingName = forall a. Maybe a
Prelude.Nothing,
$sel:verificationState:ListViolationEvents' :: Maybe VerificationState
verificationState = forall a. Maybe a
Prelude.Nothing,
$sel:startTime:ListViolationEvents' :: POSIX
startTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
$sel:endTime:ListViolationEvents' :: POSIX
endTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndTime_
}
listViolationEvents_behaviorCriteriaType :: Lens.Lens' ListViolationEvents (Prelude.Maybe BehaviorCriteriaType)
listViolationEvents_behaviorCriteriaType :: Lens' ListViolationEvents (Maybe BehaviorCriteriaType)
listViolationEvents_behaviorCriteriaType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEvents' {Maybe BehaviorCriteriaType
behaviorCriteriaType :: Maybe BehaviorCriteriaType
$sel:behaviorCriteriaType:ListViolationEvents' :: ListViolationEvents -> Maybe BehaviorCriteriaType
behaviorCriteriaType} -> Maybe BehaviorCriteriaType
behaviorCriteriaType) (\s :: ListViolationEvents
s@ListViolationEvents' {} Maybe BehaviorCriteriaType
a -> ListViolationEvents
s {$sel:behaviorCriteriaType:ListViolationEvents' :: Maybe BehaviorCriteriaType
behaviorCriteriaType = Maybe BehaviorCriteriaType
a} :: ListViolationEvents)
listViolationEvents_listSuppressedAlerts :: Lens.Lens' ListViolationEvents (Prelude.Maybe Prelude.Bool)
listViolationEvents_listSuppressedAlerts :: Lens' ListViolationEvents (Maybe Bool)
listViolationEvents_listSuppressedAlerts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEvents' {Maybe Bool
listSuppressedAlerts :: Maybe Bool
$sel:listSuppressedAlerts:ListViolationEvents' :: ListViolationEvents -> Maybe Bool
listSuppressedAlerts} -> Maybe Bool
listSuppressedAlerts) (\s :: ListViolationEvents
s@ListViolationEvents' {} Maybe Bool
a -> ListViolationEvents
s {$sel:listSuppressedAlerts:ListViolationEvents' :: Maybe Bool
listSuppressedAlerts = Maybe Bool
a} :: ListViolationEvents)
listViolationEvents_maxResults :: Lens.Lens' ListViolationEvents (Prelude.Maybe Prelude.Natural)
listViolationEvents_maxResults :: Lens' ListViolationEvents (Maybe Natural)
listViolationEvents_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEvents' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListViolationEvents' :: ListViolationEvents -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListViolationEvents
s@ListViolationEvents' {} Maybe Natural
a -> ListViolationEvents
s {$sel:maxResults:ListViolationEvents' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListViolationEvents)
listViolationEvents_nextToken :: Lens.Lens' ListViolationEvents (Prelude.Maybe Prelude.Text)
listViolationEvents_nextToken :: Lens' ListViolationEvents (Maybe Text)
listViolationEvents_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEvents' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListViolationEvents' :: ListViolationEvents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListViolationEvents
s@ListViolationEvents' {} Maybe Text
a -> ListViolationEvents
s {$sel:nextToken:ListViolationEvents' :: Maybe Text
nextToken = Maybe Text
a} :: ListViolationEvents)
listViolationEvents_securityProfileName :: Lens.Lens' ListViolationEvents (Prelude.Maybe Prelude.Text)
listViolationEvents_securityProfileName :: Lens' ListViolationEvents (Maybe Text)
listViolationEvents_securityProfileName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEvents' {Maybe Text
securityProfileName :: Maybe Text
$sel:securityProfileName:ListViolationEvents' :: ListViolationEvents -> Maybe Text
securityProfileName} -> Maybe Text
securityProfileName) (\s :: ListViolationEvents
s@ListViolationEvents' {} Maybe Text
a -> ListViolationEvents
s {$sel:securityProfileName:ListViolationEvents' :: Maybe Text
securityProfileName = Maybe Text
a} :: ListViolationEvents)
listViolationEvents_thingName :: Lens.Lens' ListViolationEvents (Prelude.Maybe Prelude.Text)
listViolationEvents_thingName :: Lens' ListViolationEvents (Maybe Text)
listViolationEvents_thingName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEvents' {Maybe Text
thingName :: Maybe Text
$sel:thingName:ListViolationEvents' :: ListViolationEvents -> Maybe Text
thingName} -> Maybe Text
thingName) (\s :: ListViolationEvents
s@ListViolationEvents' {} Maybe Text
a -> ListViolationEvents
s {$sel:thingName:ListViolationEvents' :: Maybe Text
thingName = Maybe Text
a} :: ListViolationEvents)
listViolationEvents_verificationState :: Lens.Lens' ListViolationEvents (Prelude.Maybe VerificationState)
listViolationEvents_verificationState :: Lens' ListViolationEvents (Maybe VerificationState)
listViolationEvents_verificationState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEvents' {Maybe VerificationState
verificationState :: Maybe VerificationState
$sel:verificationState:ListViolationEvents' :: ListViolationEvents -> Maybe VerificationState
verificationState} -> Maybe VerificationState
verificationState) (\s :: ListViolationEvents
s@ListViolationEvents' {} Maybe VerificationState
a -> ListViolationEvents
s {$sel:verificationState:ListViolationEvents' :: Maybe VerificationState
verificationState = Maybe VerificationState
a} :: ListViolationEvents)
listViolationEvents_startTime :: Lens.Lens' ListViolationEvents Prelude.UTCTime
listViolationEvents_startTime :: Lens' ListViolationEvents UTCTime
listViolationEvents_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEvents' {POSIX
startTime :: POSIX
$sel:startTime:ListViolationEvents' :: ListViolationEvents -> POSIX
startTime} -> POSIX
startTime) (\s :: ListViolationEvents
s@ListViolationEvents' {} POSIX
a -> ListViolationEvents
s {$sel:startTime:ListViolationEvents' :: POSIX
startTime = POSIX
a} :: ListViolationEvents) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
listViolationEvents_endTime :: Lens.Lens' ListViolationEvents Prelude.UTCTime
listViolationEvents_endTime :: Lens' ListViolationEvents UTCTime
listViolationEvents_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEvents' {POSIX
endTime :: POSIX
$sel:endTime:ListViolationEvents' :: ListViolationEvents -> POSIX
endTime} -> POSIX
endTime) (\s :: ListViolationEvents
s@ListViolationEvents' {} POSIX
a -> ListViolationEvents
s {$sel:endTime:ListViolationEvents' :: POSIX
endTime = POSIX
a} :: ListViolationEvents) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Core.AWSPager ListViolationEvents where
page :: ListViolationEvents
-> AWSResponse ListViolationEvents -> Maybe ListViolationEvents
page ListViolationEvents
rq AWSResponse ListViolationEvents
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListViolationEvents
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListViolationEventsResponse (Maybe Text)
listViolationEventsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListViolationEvents
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListViolationEventsResponse (Maybe [ViolationEvent])
listViolationEventsResponse_violationEvents
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
forall a. a -> Maybe a
Prelude.Just
forall a b. (a -> b) -> a -> b
Prelude.$ ListViolationEvents
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListViolationEvents (Maybe Text)
listViolationEvents_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListViolationEvents
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListViolationEventsResponse (Maybe Text)
listViolationEventsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListViolationEvents where
type
AWSResponse ListViolationEvents =
ListViolationEventsResponse
request :: (Service -> Service)
-> ListViolationEvents -> Request ListViolationEvents
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListViolationEvents
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListViolationEvents)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe [ViolationEvent] -> Int -> ListViolationEventsResponse
ListViolationEventsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"violationEvents"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListViolationEvents where
hashWithSalt :: Int -> ListViolationEvents -> Int
hashWithSalt Int
_salt ListViolationEvents' {Maybe Bool
Maybe Natural
Maybe Text
Maybe BehaviorCriteriaType
Maybe VerificationState
POSIX
endTime :: POSIX
startTime :: POSIX
verificationState :: Maybe VerificationState
thingName :: Maybe Text
securityProfileName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
listSuppressedAlerts :: Maybe Bool
behaviorCriteriaType :: Maybe BehaviorCriteriaType
$sel:endTime:ListViolationEvents' :: ListViolationEvents -> POSIX
$sel:startTime:ListViolationEvents' :: ListViolationEvents -> POSIX
$sel:verificationState:ListViolationEvents' :: ListViolationEvents -> Maybe VerificationState
$sel:thingName:ListViolationEvents' :: ListViolationEvents -> Maybe Text
$sel:securityProfileName:ListViolationEvents' :: ListViolationEvents -> Maybe Text
$sel:nextToken:ListViolationEvents' :: ListViolationEvents -> Maybe Text
$sel:maxResults:ListViolationEvents' :: ListViolationEvents -> Maybe Natural
$sel:listSuppressedAlerts:ListViolationEvents' :: ListViolationEvents -> Maybe Bool
$sel:behaviorCriteriaType:ListViolationEvents' :: ListViolationEvents -> Maybe BehaviorCriteriaType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BehaviorCriteriaType
behaviorCriteriaType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
listSuppressedAlerts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
securityProfileName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
thingName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VerificationState
verificationState
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
startTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
endTime
instance Prelude.NFData ListViolationEvents where
rnf :: ListViolationEvents -> ()
rnf ListViolationEvents' {Maybe Bool
Maybe Natural
Maybe Text
Maybe BehaviorCriteriaType
Maybe VerificationState
POSIX
endTime :: POSIX
startTime :: POSIX
verificationState :: Maybe VerificationState
thingName :: Maybe Text
securityProfileName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
listSuppressedAlerts :: Maybe Bool
behaviorCriteriaType :: Maybe BehaviorCriteriaType
$sel:endTime:ListViolationEvents' :: ListViolationEvents -> POSIX
$sel:startTime:ListViolationEvents' :: ListViolationEvents -> POSIX
$sel:verificationState:ListViolationEvents' :: ListViolationEvents -> Maybe VerificationState
$sel:thingName:ListViolationEvents' :: ListViolationEvents -> Maybe Text
$sel:securityProfileName:ListViolationEvents' :: ListViolationEvents -> Maybe Text
$sel:nextToken:ListViolationEvents' :: ListViolationEvents -> Maybe Text
$sel:maxResults:ListViolationEvents' :: ListViolationEvents -> Maybe Natural
$sel:listSuppressedAlerts:ListViolationEvents' :: ListViolationEvents -> Maybe Bool
$sel:behaviorCriteriaType:ListViolationEvents' :: ListViolationEvents -> Maybe BehaviorCriteriaType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe BehaviorCriteriaType
behaviorCriteriaType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
listSuppressedAlerts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
securityProfileName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
thingName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VerificationState
verificationState
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
startTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
endTime
instance Data.ToHeaders ListViolationEvents where
toHeaders :: ListViolationEvents -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ListViolationEvents where
toPath :: ListViolationEvents -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/violation-events"
instance Data.ToQuery ListViolationEvents where
toQuery :: ListViolationEvents -> QueryString
toQuery ListViolationEvents' {Maybe Bool
Maybe Natural
Maybe Text
Maybe BehaviorCriteriaType
Maybe VerificationState
POSIX
endTime :: POSIX
startTime :: POSIX
verificationState :: Maybe VerificationState
thingName :: Maybe Text
securityProfileName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
listSuppressedAlerts :: Maybe Bool
behaviorCriteriaType :: Maybe BehaviorCriteriaType
$sel:endTime:ListViolationEvents' :: ListViolationEvents -> POSIX
$sel:startTime:ListViolationEvents' :: ListViolationEvents -> POSIX
$sel:verificationState:ListViolationEvents' :: ListViolationEvents -> Maybe VerificationState
$sel:thingName:ListViolationEvents' :: ListViolationEvents -> Maybe Text
$sel:securityProfileName:ListViolationEvents' :: ListViolationEvents -> Maybe Text
$sel:nextToken:ListViolationEvents' :: ListViolationEvents -> Maybe Text
$sel:maxResults:ListViolationEvents' :: ListViolationEvents -> Maybe Natural
$sel:listSuppressedAlerts:ListViolationEvents' :: ListViolationEvents -> Maybe Bool
$sel:behaviorCriteriaType:ListViolationEvents' :: ListViolationEvents -> Maybe BehaviorCriteriaType
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"behaviorCriteriaType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe BehaviorCriteriaType
behaviorCriteriaType,
ByteString
"listSuppressedAlerts" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
listSuppressedAlerts,
ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
ByteString
"securityProfileName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
securityProfileName,
ByteString
"thingName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
thingName,
ByteString
"verificationState" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe VerificationState
verificationState,
ByteString
"startTime" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: POSIX
startTime,
ByteString
"endTime" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: POSIX
endTime
]
data ListViolationEventsResponse = ListViolationEventsResponse'
{
ListViolationEventsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListViolationEventsResponse -> Maybe [ViolationEvent]
violationEvents :: Prelude.Maybe [ViolationEvent],
ListViolationEventsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListViolationEventsResponse -> ListViolationEventsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListViolationEventsResponse -> ListViolationEventsResponse -> Bool
$c/= :: ListViolationEventsResponse -> ListViolationEventsResponse -> Bool
== :: ListViolationEventsResponse -> ListViolationEventsResponse -> Bool
$c== :: ListViolationEventsResponse -> ListViolationEventsResponse -> Bool
Prelude.Eq, ReadPrec [ListViolationEventsResponse]
ReadPrec ListViolationEventsResponse
Int -> ReadS ListViolationEventsResponse
ReadS [ListViolationEventsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListViolationEventsResponse]
$creadListPrec :: ReadPrec [ListViolationEventsResponse]
readPrec :: ReadPrec ListViolationEventsResponse
$creadPrec :: ReadPrec ListViolationEventsResponse
readList :: ReadS [ListViolationEventsResponse]
$creadList :: ReadS [ListViolationEventsResponse]
readsPrec :: Int -> ReadS ListViolationEventsResponse
$creadsPrec :: Int -> ReadS ListViolationEventsResponse
Prelude.Read, Int -> ListViolationEventsResponse -> ShowS
[ListViolationEventsResponse] -> ShowS
ListViolationEventsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListViolationEventsResponse] -> ShowS
$cshowList :: [ListViolationEventsResponse] -> ShowS
show :: ListViolationEventsResponse -> String
$cshow :: ListViolationEventsResponse -> String
showsPrec :: Int -> ListViolationEventsResponse -> ShowS
$cshowsPrec :: Int -> ListViolationEventsResponse -> ShowS
Prelude.Show, forall x.
Rep ListViolationEventsResponse x -> ListViolationEventsResponse
forall x.
ListViolationEventsResponse -> Rep ListViolationEventsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListViolationEventsResponse x -> ListViolationEventsResponse
$cfrom :: forall x.
ListViolationEventsResponse -> Rep ListViolationEventsResponse x
Prelude.Generic)
newListViolationEventsResponse ::
Prelude.Int ->
ListViolationEventsResponse
newListViolationEventsResponse :: Int -> ListViolationEventsResponse
newListViolationEventsResponse Int
pHttpStatus_ =
ListViolationEventsResponse'
{ $sel:nextToken:ListViolationEventsResponse' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:violationEvents:ListViolationEventsResponse' :: Maybe [ViolationEvent]
violationEvents = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListViolationEventsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listViolationEventsResponse_nextToken :: Lens.Lens' ListViolationEventsResponse (Prelude.Maybe Prelude.Text)
listViolationEventsResponse_nextToken :: Lens' ListViolationEventsResponse (Maybe Text)
listViolationEventsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEventsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListViolationEventsResponse' :: ListViolationEventsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListViolationEventsResponse
s@ListViolationEventsResponse' {} Maybe Text
a -> ListViolationEventsResponse
s {$sel:nextToken:ListViolationEventsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListViolationEventsResponse)
listViolationEventsResponse_violationEvents :: Lens.Lens' ListViolationEventsResponse (Prelude.Maybe [ViolationEvent])
listViolationEventsResponse_violationEvents :: Lens' ListViolationEventsResponse (Maybe [ViolationEvent])
listViolationEventsResponse_violationEvents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEventsResponse' {Maybe [ViolationEvent]
violationEvents :: Maybe [ViolationEvent]
$sel:violationEvents:ListViolationEventsResponse' :: ListViolationEventsResponse -> Maybe [ViolationEvent]
violationEvents} -> Maybe [ViolationEvent]
violationEvents) (\s :: ListViolationEventsResponse
s@ListViolationEventsResponse' {} Maybe [ViolationEvent]
a -> ListViolationEventsResponse
s {$sel:violationEvents:ListViolationEventsResponse' :: Maybe [ViolationEvent]
violationEvents = Maybe [ViolationEvent]
a} :: ListViolationEventsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listViolationEventsResponse_httpStatus :: Lens.Lens' ListViolationEventsResponse Prelude.Int
listViolationEventsResponse_httpStatus :: Lens' ListViolationEventsResponse Int
listViolationEventsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListViolationEventsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListViolationEventsResponse' :: ListViolationEventsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListViolationEventsResponse
s@ListViolationEventsResponse' {} Int
a -> ListViolationEventsResponse
s {$sel:httpStatus:ListViolationEventsResponse' :: Int
httpStatus = Int
a} :: ListViolationEventsResponse)
instance Prelude.NFData ListViolationEventsResponse where
rnf :: ListViolationEventsResponse -> ()
rnf ListViolationEventsResponse' {Int
Maybe [ViolationEvent]
Maybe Text
httpStatus :: Int
violationEvents :: Maybe [ViolationEvent]
nextToken :: Maybe Text
$sel:httpStatus:ListViolationEventsResponse' :: ListViolationEventsResponse -> Int
$sel:violationEvents:ListViolationEventsResponse' :: ListViolationEventsResponse -> Maybe [ViolationEvent]
$sel:nextToken:ListViolationEventsResponse' :: ListViolationEventsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ViolationEvent]
violationEvents
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus