{-# 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.ApplicationInsights.ListLogPatternSets
(
ListLogPatternSets (..),
newListLogPatternSets,
listLogPatternSets_maxResults,
listLogPatternSets_nextToken,
listLogPatternSets_resourceGroupName,
ListLogPatternSetsResponse (..),
newListLogPatternSetsResponse,
listLogPatternSetsResponse_logPatternSets,
listLogPatternSetsResponse_nextToken,
listLogPatternSetsResponse_resourceGroupName,
listLogPatternSetsResponse_httpStatus,
)
where
import Amazonka.ApplicationInsights.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListLogPatternSets = ListLogPatternSets'
{
ListLogPatternSets -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListLogPatternSets -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListLogPatternSets -> Text
resourceGroupName :: Prelude.Text
}
deriving (ListLogPatternSets -> ListLogPatternSets -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLogPatternSets -> ListLogPatternSets -> Bool
$c/= :: ListLogPatternSets -> ListLogPatternSets -> Bool
== :: ListLogPatternSets -> ListLogPatternSets -> Bool
$c== :: ListLogPatternSets -> ListLogPatternSets -> Bool
Prelude.Eq, ReadPrec [ListLogPatternSets]
ReadPrec ListLogPatternSets
Int -> ReadS ListLogPatternSets
ReadS [ListLogPatternSets]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLogPatternSets]
$creadListPrec :: ReadPrec [ListLogPatternSets]
readPrec :: ReadPrec ListLogPatternSets
$creadPrec :: ReadPrec ListLogPatternSets
readList :: ReadS [ListLogPatternSets]
$creadList :: ReadS [ListLogPatternSets]
readsPrec :: Int -> ReadS ListLogPatternSets
$creadsPrec :: Int -> ReadS ListLogPatternSets
Prelude.Read, Int -> ListLogPatternSets -> ShowS
[ListLogPatternSets] -> ShowS
ListLogPatternSets -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLogPatternSets] -> ShowS
$cshowList :: [ListLogPatternSets] -> ShowS
show :: ListLogPatternSets -> String
$cshow :: ListLogPatternSets -> String
showsPrec :: Int -> ListLogPatternSets -> ShowS
$cshowsPrec :: Int -> ListLogPatternSets -> ShowS
Prelude.Show, forall x. Rep ListLogPatternSets x -> ListLogPatternSets
forall x. ListLogPatternSets -> Rep ListLogPatternSets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListLogPatternSets x -> ListLogPatternSets
$cfrom :: forall x. ListLogPatternSets -> Rep ListLogPatternSets x
Prelude.Generic)
newListLogPatternSets ::
Prelude.Text ->
ListLogPatternSets
newListLogPatternSets :: Text -> ListLogPatternSets
newListLogPatternSets Text
pResourceGroupName_ =
ListLogPatternSets'
{ $sel:maxResults:ListLogPatternSets' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListLogPatternSets' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:resourceGroupName:ListLogPatternSets' :: Text
resourceGroupName = Text
pResourceGroupName_
}
listLogPatternSets_maxResults :: Lens.Lens' ListLogPatternSets (Prelude.Maybe Prelude.Natural)
listLogPatternSets_maxResults :: Lens' ListLogPatternSets (Maybe Natural)
listLogPatternSets_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternSets' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListLogPatternSets' :: ListLogPatternSets -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListLogPatternSets
s@ListLogPatternSets' {} Maybe Natural
a -> ListLogPatternSets
s {$sel:maxResults:ListLogPatternSets' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListLogPatternSets)
listLogPatternSets_nextToken :: Lens.Lens' ListLogPatternSets (Prelude.Maybe Prelude.Text)
listLogPatternSets_nextToken :: Lens' ListLogPatternSets (Maybe Text)
listLogPatternSets_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternSets' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLogPatternSets' :: ListLogPatternSets -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLogPatternSets
s@ListLogPatternSets' {} Maybe Text
a -> ListLogPatternSets
s {$sel:nextToken:ListLogPatternSets' :: Maybe Text
nextToken = Maybe Text
a} :: ListLogPatternSets)
listLogPatternSets_resourceGroupName :: Lens.Lens' ListLogPatternSets Prelude.Text
listLogPatternSets_resourceGroupName :: Lens' ListLogPatternSets Text
listLogPatternSets_resourceGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternSets' {Text
resourceGroupName :: Text
$sel:resourceGroupName:ListLogPatternSets' :: ListLogPatternSets -> Text
resourceGroupName} -> Text
resourceGroupName) (\s :: ListLogPatternSets
s@ListLogPatternSets' {} Text
a -> ListLogPatternSets
s {$sel:resourceGroupName:ListLogPatternSets' :: Text
resourceGroupName = Text
a} :: ListLogPatternSets)
instance Core.AWSRequest ListLogPatternSets where
type
AWSResponse ListLogPatternSets =
ListLogPatternSetsResponse
request :: (Service -> Service)
-> ListLogPatternSets -> Request ListLogPatternSets
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListLogPatternSets
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListLogPatternSets)))
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 Text -> Maybe Text -> Int -> ListLogPatternSetsResponse
ListLogPatternSetsResponse'
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
"LogPatternSets" 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.<*> (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
"ResourceGroupName")
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 ListLogPatternSets where
hashWithSalt :: Int -> ListLogPatternSets -> Int
hashWithSalt Int
_salt ListLogPatternSets' {Maybe Natural
Maybe Text
Text
resourceGroupName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceGroupName:ListLogPatternSets' :: ListLogPatternSets -> Text
$sel:nextToken:ListLogPatternSets' :: ListLogPatternSets -> Maybe Text
$sel:maxResults:ListLogPatternSets' :: ListLogPatternSets -> Maybe Natural
..} =
Int
_salt
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` Text
resourceGroupName
instance Prelude.NFData ListLogPatternSets where
rnf :: ListLogPatternSets -> ()
rnf ListLogPatternSets' {Maybe Natural
Maybe Text
Text
resourceGroupName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceGroupName:ListLogPatternSets' :: ListLogPatternSets -> Text
$sel:nextToken:ListLogPatternSets' :: ListLogPatternSets -> Maybe Text
$sel:maxResults:ListLogPatternSets' :: ListLogPatternSets -> Maybe Natural
..} =
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 Text
resourceGroupName
instance Data.ToHeaders ListLogPatternSets where
toHeaders :: ListLogPatternSets -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"EC2WindowsBarleyService.ListLogPatternSets" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON ListLogPatternSets where
toJSON :: ListLogPatternSets -> Value
toJSON ListLogPatternSets' {Maybe Natural
Maybe Text
Text
resourceGroupName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceGroupName:ListLogPatternSets' :: ListLogPatternSets -> Text
$sel:nextToken:ListLogPatternSets' :: ListLogPatternSets -> Maybe Text
$sel:maxResults:ListLogPatternSets' :: ListLogPatternSets -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
forall a. a -> Maybe a
Prelude.Just
(Key
"ResourceGroupName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
resourceGroupName)
]
)
instance Data.ToPath ListLogPatternSets where
toPath :: ListLogPatternSets -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ListLogPatternSets where
toQuery :: ListLogPatternSets -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ListLogPatternSetsResponse = ListLogPatternSetsResponse'
{
ListLogPatternSetsResponse -> Maybe [Text]
logPatternSets :: Prelude.Maybe [Prelude.Text],
ListLogPatternSetsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListLogPatternSetsResponse -> Maybe Text
resourceGroupName :: Prelude.Maybe Prelude.Text,
ListLogPatternSetsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListLogPatternSetsResponse -> ListLogPatternSetsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLogPatternSetsResponse -> ListLogPatternSetsResponse -> Bool
$c/= :: ListLogPatternSetsResponse -> ListLogPatternSetsResponse -> Bool
== :: ListLogPatternSetsResponse -> ListLogPatternSetsResponse -> Bool
$c== :: ListLogPatternSetsResponse -> ListLogPatternSetsResponse -> Bool
Prelude.Eq, ReadPrec [ListLogPatternSetsResponse]
ReadPrec ListLogPatternSetsResponse
Int -> ReadS ListLogPatternSetsResponse
ReadS [ListLogPatternSetsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLogPatternSetsResponse]
$creadListPrec :: ReadPrec [ListLogPatternSetsResponse]
readPrec :: ReadPrec ListLogPatternSetsResponse
$creadPrec :: ReadPrec ListLogPatternSetsResponse
readList :: ReadS [ListLogPatternSetsResponse]
$creadList :: ReadS [ListLogPatternSetsResponse]
readsPrec :: Int -> ReadS ListLogPatternSetsResponse
$creadsPrec :: Int -> ReadS ListLogPatternSetsResponse
Prelude.Read, Int -> ListLogPatternSetsResponse -> ShowS
[ListLogPatternSetsResponse] -> ShowS
ListLogPatternSetsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLogPatternSetsResponse] -> ShowS
$cshowList :: [ListLogPatternSetsResponse] -> ShowS
show :: ListLogPatternSetsResponse -> String
$cshow :: ListLogPatternSetsResponse -> String
showsPrec :: Int -> ListLogPatternSetsResponse -> ShowS
$cshowsPrec :: Int -> ListLogPatternSetsResponse -> ShowS
Prelude.Show, forall x.
Rep ListLogPatternSetsResponse x -> ListLogPatternSetsResponse
forall x.
ListLogPatternSetsResponse -> Rep ListLogPatternSetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListLogPatternSetsResponse x -> ListLogPatternSetsResponse
$cfrom :: forall x.
ListLogPatternSetsResponse -> Rep ListLogPatternSetsResponse x
Prelude.Generic)
newListLogPatternSetsResponse ::
Prelude.Int ->
ListLogPatternSetsResponse
newListLogPatternSetsResponse :: Int -> ListLogPatternSetsResponse
newListLogPatternSetsResponse Int
pHttpStatus_ =
ListLogPatternSetsResponse'
{ $sel:logPatternSets:ListLogPatternSetsResponse' :: Maybe [Text]
logPatternSets =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListLogPatternSetsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:resourceGroupName:ListLogPatternSetsResponse' :: Maybe Text
resourceGroupName = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListLogPatternSetsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listLogPatternSetsResponse_logPatternSets :: Lens.Lens' ListLogPatternSetsResponse (Prelude.Maybe [Prelude.Text])
listLogPatternSetsResponse_logPatternSets :: Lens' ListLogPatternSetsResponse (Maybe [Text])
listLogPatternSetsResponse_logPatternSets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternSetsResponse' {Maybe [Text]
logPatternSets :: Maybe [Text]
$sel:logPatternSets:ListLogPatternSetsResponse' :: ListLogPatternSetsResponse -> Maybe [Text]
logPatternSets} -> Maybe [Text]
logPatternSets) (\s :: ListLogPatternSetsResponse
s@ListLogPatternSetsResponse' {} Maybe [Text]
a -> ListLogPatternSetsResponse
s {$sel:logPatternSets:ListLogPatternSetsResponse' :: Maybe [Text]
logPatternSets = Maybe [Text]
a} :: ListLogPatternSetsResponse) 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
listLogPatternSetsResponse_nextToken :: Lens.Lens' ListLogPatternSetsResponse (Prelude.Maybe Prelude.Text)
listLogPatternSetsResponse_nextToken :: Lens' ListLogPatternSetsResponse (Maybe Text)
listLogPatternSetsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternSetsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLogPatternSetsResponse' :: ListLogPatternSetsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLogPatternSetsResponse
s@ListLogPatternSetsResponse' {} Maybe Text
a -> ListLogPatternSetsResponse
s {$sel:nextToken:ListLogPatternSetsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListLogPatternSetsResponse)
listLogPatternSetsResponse_resourceGroupName :: Lens.Lens' ListLogPatternSetsResponse (Prelude.Maybe Prelude.Text)
listLogPatternSetsResponse_resourceGroupName :: Lens' ListLogPatternSetsResponse (Maybe Text)
listLogPatternSetsResponse_resourceGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternSetsResponse' {Maybe Text
resourceGroupName :: Maybe Text
$sel:resourceGroupName:ListLogPatternSetsResponse' :: ListLogPatternSetsResponse -> Maybe Text
resourceGroupName} -> Maybe Text
resourceGroupName) (\s :: ListLogPatternSetsResponse
s@ListLogPatternSetsResponse' {} Maybe Text
a -> ListLogPatternSetsResponse
s {$sel:resourceGroupName:ListLogPatternSetsResponse' :: Maybe Text
resourceGroupName = Maybe Text
a} :: ListLogPatternSetsResponse)
listLogPatternSetsResponse_httpStatus :: Lens.Lens' ListLogPatternSetsResponse Prelude.Int
listLogPatternSetsResponse_httpStatus :: Lens' ListLogPatternSetsResponse Int
listLogPatternSetsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternSetsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListLogPatternSetsResponse' :: ListLogPatternSetsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListLogPatternSetsResponse
s@ListLogPatternSetsResponse' {} Int
a -> ListLogPatternSetsResponse
s {$sel:httpStatus:ListLogPatternSetsResponse' :: Int
httpStatus = Int
a} :: ListLogPatternSetsResponse)
instance Prelude.NFData ListLogPatternSetsResponse where
rnf :: ListLogPatternSetsResponse -> ()
rnf ListLogPatternSetsResponse' {Int
Maybe [Text]
Maybe Text
httpStatus :: Int
resourceGroupName :: Maybe Text
nextToken :: Maybe Text
logPatternSets :: Maybe [Text]
$sel:httpStatus:ListLogPatternSetsResponse' :: ListLogPatternSetsResponse -> Int
$sel:resourceGroupName:ListLogPatternSetsResponse' :: ListLogPatternSetsResponse -> Maybe Text
$sel:nextToken:ListLogPatternSetsResponse' :: ListLogPatternSetsResponse -> Maybe Text
$sel:logPatternSets:ListLogPatternSetsResponse' :: ListLogPatternSetsResponse -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
logPatternSets
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
resourceGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus