{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ApplicationInsights.ListLogPatternSets
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the log pattern sets in the specific application.
module Amazonka.ApplicationInsights.ListLogPatternSets
  ( -- * Creating a Request
    ListLogPatternSets (..),
    newListLogPatternSets,

    -- * Request Lenses
    listLogPatternSets_nextToken,
    listLogPatternSets_maxResults,
    listLogPatternSets_resourceGroupName,

    -- * Destructuring the Response
    ListLogPatternSetsResponse (..),
    newListLogPatternSetsResponse,

    -- * Response Lenses
    listLogPatternSetsResponse_resourceGroupName,
    listLogPatternSetsResponse_nextToken,
    listLogPatternSetsResponse_logPatternSets,
    listLogPatternSetsResponse_httpStatus,
  )
where

import Amazonka.ApplicationInsights.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListLogPatternSets' smart constructor.
data ListLogPatternSets = ListLogPatternSets'
  { -- | The token to request the next page of results.
    ListLogPatternSets -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in a single call. To retrieve
    -- the remaining results, make another call with the returned @NextToken@
    -- value.
    ListLogPatternSets -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The name of the resource group.
    ListLogPatternSets -> Text
resourceGroupName :: Prelude.Text
  }
  deriving (ListLogPatternSets -> ListLogPatternSets -> Bool
(ListLogPatternSets -> ListLogPatternSets -> Bool)
-> (ListLogPatternSets -> ListLogPatternSets -> Bool)
-> Eq ListLogPatternSets
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]
(Int -> ReadS ListLogPatternSets)
-> ReadS [ListLogPatternSets]
-> ReadPrec ListLogPatternSets
-> ReadPrec [ListLogPatternSets]
-> Read 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
(Int -> ListLogPatternSets -> ShowS)
-> (ListLogPatternSets -> String)
-> ([ListLogPatternSets] -> ShowS)
-> Show ListLogPatternSets
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. ListLogPatternSets -> Rep ListLogPatternSets x)
-> (forall x. Rep ListLogPatternSets x -> ListLogPatternSets)
-> Generic ListLogPatternSets
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)

-- |
-- Create a value of 'ListLogPatternSets' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listLogPatternSets_nextToken' - The token to request the next page of results.
--
-- 'maxResults', 'listLogPatternSets_maxResults' - The maximum number of results to return in a single call. To retrieve
-- the remaining results, make another call with the returned @NextToken@
-- value.
--
-- 'resourceGroupName', 'listLogPatternSets_resourceGroupName' - The name of the resource group.
newListLogPatternSets ::
  -- | 'resourceGroupName'
  Prelude.Text ->
  ListLogPatternSets
newListLogPatternSets :: Text -> ListLogPatternSets
newListLogPatternSets Text
pResourceGroupName_ =
  ListLogPatternSets' :: Maybe Text -> Maybe Natural -> Text -> ListLogPatternSets
ListLogPatternSets'
    { $sel:nextToken:ListLogPatternSets' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListLogPatternSets' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceGroupName:ListLogPatternSets' :: Text
resourceGroupName = Text
pResourceGroupName_
    }

-- | The token to request the next page of results.
listLogPatternSets_nextToken :: Lens.Lens' ListLogPatternSets (Prelude.Maybe Prelude.Text)
listLogPatternSets_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListLogPatternSets -> f ListLogPatternSets
listLogPatternSets_nextToken = (ListLogPatternSets -> Maybe Text)
-> (ListLogPatternSets -> Maybe Text -> ListLogPatternSets)
-> Lens
     ListLogPatternSets ListLogPatternSets (Maybe Text) (Maybe Text)
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)

-- | The maximum number of results to return in a single call. To retrieve
-- the remaining results, make another call with the returned @NextToken@
-- value.
listLogPatternSets_maxResults :: Lens.Lens' ListLogPatternSets (Prelude.Maybe Prelude.Natural)
listLogPatternSets_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListLogPatternSets -> f ListLogPatternSets
listLogPatternSets_maxResults = (ListLogPatternSets -> Maybe Natural)
-> (ListLogPatternSets -> Maybe Natural -> ListLogPatternSets)
-> Lens
     ListLogPatternSets
     ListLogPatternSets
     (Maybe Natural)
     (Maybe Natural)
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)

-- | The name of the resource group.
listLogPatternSets_resourceGroupName :: Lens.Lens' ListLogPatternSets Prelude.Text
listLogPatternSets_resourceGroupName :: (Text -> f Text) -> ListLogPatternSets -> f ListLogPatternSets
listLogPatternSets_resourceGroupName = (ListLogPatternSets -> Text)
-> (ListLogPatternSets -> Text -> ListLogPatternSets)
-> Lens ListLogPatternSets ListLogPatternSets Text Text
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 :: ListLogPatternSets -> Request ListLogPatternSets
request = Service -> ListLogPatternSets -> Request ListLogPatternSets
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListLogPatternSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListLogPatternSets)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListLogPatternSets))
-> Logger
-> Service
-> Proxy ListLogPatternSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListLogPatternSets)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> 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'
            (Maybe Text
 -> Maybe Text -> Maybe [Text] -> Int -> ListLogPatternSetsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe [Text] -> Int -> ListLogPatternSetsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResourceGroupName")
            Either
  String
  (Maybe Text -> Maybe [Text] -> Int -> ListLogPatternSetsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [Text] -> Int -> ListLogPatternSetsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Maybe [Text] -> Int -> ListLogPatternSetsResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> ListLogPatternSetsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LogPatternSets" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListLogPatternSetsResponse)
-> Either String Int -> Either String ListLogPatternSetsResponse
forall (f :: * -> *) a b. Applicative f => 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 ListLogPatternSets

instance Prelude.NFData ListLogPatternSets

instance Core.ToHeaders ListLogPatternSets where
  toHeaders :: ListLogPatternSets -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListLogPatternSets -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"EC2WindowsBarleyService.ListLogPatternSets" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON ListLogPatternSets where
  toJSON :: ListLogPatternSets -> Value
toJSON ListLogPatternSets' {Maybe Natural
Maybe Text
Text
resourceGroupName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:resourceGroupName:ListLogPatternSets' :: ListLogPatternSets -> Text
$sel:maxResults:ListLogPatternSets' :: ListLogPatternSets -> Maybe Natural
$sel:nextToken:ListLogPatternSets' :: ListLogPatternSets -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ResourceGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceGroupName)
          ]
      )

instance Core.ToPath ListLogPatternSets where
  toPath :: ListLogPatternSets -> ByteString
toPath = ByteString -> ListLogPatternSets -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery ListLogPatternSets where
  toQuery :: ListLogPatternSets -> QueryString
toQuery = QueryString -> ListLogPatternSets -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListLogPatternSetsResponse' smart constructor.
data ListLogPatternSetsResponse = ListLogPatternSetsResponse'
  { -- | The name of the resource group.
    ListLogPatternSetsResponse -> Maybe Text
resourceGroupName :: Prelude.Maybe Prelude.Text,
    -- | The token used to retrieve the next page of results. This value is
    -- @null@ when there are no more results to return.
    ListLogPatternSetsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The list of log pattern sets.
    ListLogPatternSetsResponse -> Maybe [Text]
logPatternSets :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    ListLogPatternSetsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListLogPatternSetsResponse -> ListLogPatternSetsResponse -> Bool
(ListLogPatternSetsResponse -> ListLogPatternSetsResponse -> Bool)
-> (ListLogPatternSetsResponse
    -> ListLogPatternSetsResponse -> Bool)
-> Eq ListLogPatternSetsResponse
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]
(Int -> ReadS ListLogPatternSetsResponse)
-> ReadS [ListLogPatternSetsResponse]
-> ReadPrec ListLogPatternSetsResponse
-> ReadPrec [ListLogPatternSetsResponse]
-> Read 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
(Int -> ListLogPatternSetsResponse -> ShowS)
-> (ListLogPatternSetsResponse -> String)
-> ([ListLogPatternSetsResponse] -> ShowS)
-> Show ListLogPatternSetsResponse
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.
 ListLogPatternSetsResponse -> Rep ListLogPatternSetsResponse x)
-> (forall x.
    Rep ListLogPatternSetsResponse x -> ListLogPatternSetsResponse)
-> Generic ListLogPatternSetsResponse
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)

-- |
-- Create a value of 'ListLogPatternSetsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'resourceGroupName', 'listLogPatternSetsResponse_resourceGroupName' - The name of the resource group.
--
-- 'nextToken', 'listLogPatternSetsResponse_nextToken' - The token used to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'logPatternSets', 'listLogPatternSetsResponse_logPatternSets' - The list of log pattern sets.
--
-- 'httpStatus', 'listLogPatternSetsResponse_httpStatus' - The response's http status code.
newListLogPatternSetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListLogPatternSetsResponse
newListLogPatternSetsResponse :: Int -> ListLogPatternSetsResponse
newListLogPatternSetsResponse Int
pHttpStatus_ =
  ListLogPatternSetsResponse' :: Maybe Text
-> Maybe Text -> Maybe [Text] -> Int -> ListLogPatternSetsResponse
ListLogPatternSetsResponse'
    { $sel:resourceGroupName:ListLogPatternSetsResponse' :: Maybe Text
resourceGroupName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLogPatternSetsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logPatternSets:ListLogPatternSetsResponse' :: Maybe [Text]
logPatternSets = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListLogPatternSetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the resource group.
listLogPatternSetsResponse_resourceGroupName :: Lens.Lens' ListLogPatternSetsResponse (Prelude.Maybe Prelude.Text)
listLogPatternSetsResponse_resourceGroupName :: (Maybe Text -> f (Maybe Text))
-> ListLogPatternSetsResponse -> f ListLogPatternSetsResponse
listLogPatternSetsResponse_resourceGroupName = (ListLogPatternSetsResponse -> Maybe Text)
-> (ListLogPatternSetsResponse
    -> Maybe Text -> ListLogPatternSetsResponse)
-> Lens
     ListLogPatternSetsResponse
     ListLogPatternSetsResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | The token used to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
listLogPatternSetsResponse_nextToken :: Lens.Lens' ListLogPatternSetsResponse (Prelude.Maybe Prelude.Text)
listLogPatternSetsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListLogPatternSetsResponse -> f ListLogPatternSetsResponse
listLogPatternSetsResponse_nextToken = (ListLogPatternSetsResponse -> Maybe Text)
-> (ListLogPatternSetsResponse
    -> Maybe Text -> ListLogPatternSetsResponse)
-> Lens
     ListLogPatternSetsResponse
     ListLogPatternSetsResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | The list of log pattern sets.
listLogPatternSetsResponse_logPatternSets :: Lens.Lens' ListLogPatternSetsResponse (Prelude.Maybe [Prelude.Text])
listLogPatternSetsResponse_logPatternSets :: (Maybe [Text] -> f (Maybe [Text]))
-> ListLogPatternSetsResponse -> f ListLogPatternSetsResponse
listLogPatternSetsResponse_logPatternSets = (ListLogPatternSetsResponse -> Maybe [Text])
-> (ListLogPatternSetsResponse
    -> Maybe [Text] -> ListLogPatternSetsResponse)
-> Lens
     ListLogPatternSetsResponse
     ListLogPatternSetsResponse
     (Maybe [Text])
     (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListLogPatternSetsResponse -> f ListLogPatternSetsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListLogPatternSetsResponse
-> f ListLogPatternSetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
listLogPatternSetsResponse_httpStatus :: Lens.Lens' ListLogPatternSetsResponse Prelude.Int
listLogPatternSetsResponse_httpStatus :: (Int -> f Int)
-> ListLogPatternSetsResponse -> f ListLogPatternSetsResponse
listLogPatternSetsResponse_httpStatus = (ListLogPatternSetsResponse -> Int)
-> (ListLogPatternSetsResponse
    -> Int -> ListLogPatternSetsResponse)
-> Lens
     ListLogPatternSetsResponse ListLogPatternSetsResponse Int Int
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