{-# 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.ListLogPatterns
-- 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 patterns in the specific log @LogPatternSet@.
module Amazonka.ApplicationInsights.ListLogPatterns
  ( -- * Creating a Request
    ListLogPatterns (..),
    newListLogPatterns,

    -- * Request Lenses
    listLogPatterns_nextToken,
    listLogPatterns_patternSetName,
    listLogPatterns_maxResults,
    listLogPatterns_resourceGroupName,

    -- * Destructuring the Response
    ListLogPatternsResponse (..),
    newListLogPatternsResponse,

    -- * Response Lenses
    listLogPatternsResponse_resourceGroupName,
    listLogPatternsResponse_nextToken,
    listLogPatternsResponse_logPatterns,
    listLogPatternsResponse_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:/ 'newListLogPatterns' smart constructor.
data ListLogPatterns = ListLogPatterns'
  { -- | The token to request the next page of results.
    ListLogPatterns -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the log pattern set.
    ListLogPatterns -> Maybe Text
patternSetName :: 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.
    ListLogPatterns -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The name of the resource group.
    ListLogPatterns -> Text
resourceGroupName :: Prelude.Text
  }
  deriving (ListLogPatterns -> ListLogPatterns -> Bool
(ListLogPatterns -> ListLogPatterns -> Bool)
-> (ListLogPatterns -> ListLogPatterns -> Bool)
-> Eq ListLogPatterns
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLogPatterns -> ListLogPatterns -> Bool
$c/= :: ListLogPatterns -> ListLogPatterns -> Bool
== :: ListLogPatterns -> ListLogPatterns -> Bool
$c== :: ListLogPatterns -> ListLogPatterns -> Bool
Prelude.Eq, ReadPrec [ListLogPatterns]
ReadPrec ListLogPatterns
Int -> ReadS ListLogPatterns
ReadS [ListLogPatterns]
(Int -> ReadS ListLogPatterns)
-> ReadS [ListLogPatterns]
-> ReadPrec ListLogPatterns
-> ReadPrec [ListLogPatterns]
-> Read ListLogPatterns
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLogPatterns]
$creadListPrec :: ReadPrec [ListLogPatterns]
readPrec :: ReadPrec ListLogPatterns
$creadPrec :: ReadPrec ListLogPatterns
readList :: ReadS [ListLogPatterns]
$creadList :: ReadS [ListLogPatterns]
readsPrec :: Int -> ReadS ListLogPatterns
$creadsPrec :: Int -> ReadS ListLogPatterns
Prelude.Read, Int -> ListLogPatterns -> ShowS
[ListLogPatterns] -> ShowS
ListLogPatterns -> String
(Int -> ListLogPatterns -> ShowS)
-> (ListLogPatterns -> String)
-> ([ListLogPatterns] -> ShowS)
-> Show ListLogPatterns
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLogPatterns] -> ShowS
$cshowList :: [ListLogPatterns] -> ShowS
show :: ListLogPatterns -> String
$cshow :: ListLogPatterns -> String
showsPrec :: Int -> ListLogPatterns -> ShowS
$cshowsPrec :: Int -> ListLogPatterns -> ShowS
Prelude.Show, (forall x. ListLogPatterns -> Rep ListLogPatterns x)
-> (forall x. Rep ListLogPatterns x -> ListLogPatterns)
-> Generic ListLogPatterns
forall x. Rep ListLogPatterns x -> ListLogPatterns
forall x. ListLogPatterns -> Rep ListLogPatterns x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListLogPatterns x -> ListLogPatterns
$cfrom :: forall x. ListLogPatterns -> Rep ListLogPatterns x
Prelude.Generic)

-- |
-- Create a value of 'ListLogPatterns' 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', 'listLogPatterns_nextToken' - The token to request the next page of results.
--
-- 'patternSetName', 'listLogPatterns_patternSetName' - The name of the log pattern set.
--
-- 'maxResults', 'listLogPatterns_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', 'listLogPatterns_resourceGroupName' - The name of the resource group.
newListLogPatterns ::
  -- | 'resourceGroupName'
  Prelude.Text ->
  ListLogPatterns
newListLogPatterns :: Text -> ListLogPatterns
newListLogPatterns Text
pResourceGroupName_ =
  ListLogPatterns' :: Maybe Text
-> Maybe Text -> Maybe Natural -> Text -> ListLogPatterns
ListLogPatterns'
    { $sel:nextToken:ListLogPatterns' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:patternSetName:ListLogPatterns' :: Maybe Text
patternSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListLogPatterns' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceGroupName:ListLogPatterns' :: Text
resourceGroupName = Text
pResourceGroupName_
    }

-- | The token to request the next page of results.
listLogPatterns_nextToken :: Lens.Lens' ListLogPatterns (Prelude.Maybe Prelude.Text)
listLogPatterns_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListLogPatterns -> f ListLogPatterns
listLogPatterns_nextToken = (ListLogPatterns -> Maybe Text)
-> (ListLogPatterns -> Maybe Text -> ListLogPatterns)
-> Lens ListLogPatterns ListLogPatterns (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatterns' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLogPatterns' :: ListLogPatterns -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLogPatterns
s@ListLogPatterns' {} Maybe Text
a -> ListLogPatterns
s {$sel:nextToken:ListLogPatterns' :: Maybe Text
nextToken = Maybe Text
a} :: ListLogPatterns)

-- | The name of the log pattern set.
listLogPatterns_patternSetName :: Lens.Lens' ListLogPatterns (Prelude.Maybe Prelude.Text)
listLogPatterns_patternSetName :: (Maybe Text -> f (Maybe Text))
-> ListLogPatterns -> f ListLogPatterns
listLogPatterns_patternSetName = (ListLogPatterns -> Maybe Text)
-> (ListLogPatterns -> Maybe Text -> ListLogPatterns)
-> Lens ListLogPatterns ListLogPatterns (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatterns' {Maybe Text
patternSetName :: Maybe Text
$sel:patternSetName:ListLogPatterns' :: ListLogPatterns -> Maybe Text
patternSetName} -> Maybe Text
patternSetName) (\s :: ListLogPatterns
s@ListLogPatterns' {} Maybe Text
a -> ListLogPatterns
s {$sel:patternSetName:ListLogPatterns' :: Maybe Text
patternSetName = Maybe Text
a} :: ListLogPatterns)

-- | The maximum number of results to return in a single call. To retrieve
-- the remaining results, make another call with the returned @NextToken@
-- value.
listLogPatterns_maxResults :: Lens.Lens' ListLogPatterns (Prelude.Maybe Prelude.Natural)
listLogPatterns_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListLogPatterns -> f ListLogPatterns
listLogPatterns_maxResults = (ListLogPatterns -> Maybe Natural)
-> (ListLogPatterns -> Maybe Natural -> ListLogPatterns)
-> Lens
     ListLogPatterns ListLogPatterns (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatterns' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListLogPatterns' :: ListLogPatterns -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListLogPatterns
s@ListLogPatterns' {} Maybe Natural
a -> ListLogPatterns
s {$sel:maxResults:ListLogPatterns' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListLogPatterns)

-- | The name of the resource group.
listLogPatterns_resourceGroupName :: Lens.Lens' ListLogPatterns Prelude.Text
listLogPatterns_resourceGroupName :: (Text -> f Text) -> ListLogPatterns -> f ListLogPatterns
listLogPatterns_resourceGroupName = (ListLogPatterns -> Text)
-> (ListLogPatterns -> Text -> ListLogPatterns)
-> Lens ListLogPatterns ListLogPatterns Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatterns' {Text
resourceGroupName :: Text
$sel:resourceGroupName:ListLogPatterns' :: ListLogPatterns -> Text
resourceGroupName} -> Text
resourceGroupName) (\s :: ListLogPatterns
s@ListLogPatterns' {} Text
a -> ListLogPatterns
s {$sel:resourceGroupName:ListLogPatterns' :: Text
resourceGroupName = Text
a} :: ListLogPatterns)

instance Core.AWSRequest ListLogPatterns where
  type
    AWSResponse ListLogPatterns =
      ListLogPatternsResponse
  request :: ListLogPatterns -> Request ListLogPatterns
request = Service -> ListLogPatterns -> Request ListLogPatterns
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListLogPatterns
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListLogPatterns)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListLogPatterns))
-> Logger
-> Service
-> Proxy ListLogPatterns
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListLogPatterns)))
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 [LogPattern]
-> Int
-> ListLogPatternsResponse
ListLogPatternsResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe [LogPattern]
 -> Int
 -> ListLogPatternsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [LogPattern] -> Int -> ListLogPatternsResponse)
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 [LogPattern] -> Int -> ListLogPatternsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [LogPattern] -> Int -> ListLogPatternsResponse)
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 [LogPattern] -> Int -> ListLogPatternsResponse)
-> Either String (Maybe [LogPattern])
-> Either String (Int -> ListLogPatternsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [LogPattern]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LogPatterns" Either String (Maybe (Maybe [LogPattern]))
-> Maybe [LogPattern] -> Either String (Maybe [LogPattern])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [LogPattern]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListLogPatternsResponse)
-> Either String Int -> Either String ListLogPatternsResponse
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 ListLogPatterns

instance Prelude.NFData ListLogPatterns

instance Core.ToHeaders ListLogPatterns where
  toHeaders :: ListLogPatterns -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListLogPatterns -> 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.ListLogPatterns" ::
                          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 ListLogPatterns where
  toJSON :: ListLogPatterns -> Value
toJSON ListLogPatterns' {Maybe Natural
Maybe Text
Text
resourceGroupName :: Text
maxResults :: Maybe Natural
patternSetName :: Maybe Text
nextToken :: Maybe Text
$sel:resourceGroupName:ListLogPatterns' :: ListLogPatterns -> Text
$sel:maxResults:ListLogPatterns' :: ListLogPatterns -> Maybe Natural
$sel:patternSetName:ListLogPatterns' :: ListLogPatterns -> Maybe Text
$sel:nextToken:ListLogPatterns' :: ListLogPatterns -> 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
"PatternSetName" 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
patternSetName,
            (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 ListLogPatterns where
  toPath :: ListLogPatterns -> ByteString
toPath = ByteString -> ListLogPatterns -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListLogPatternsResponse' smart constructor.
data ListLogPatternsResponse = ListLogPatternsResponse'
  { -- | The name of the resource group.
    ListLogPatternsResponse -> 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.
    ListLogPatternsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The list of log patterns.
    ListLogPatternsResponse -> Maybe [LogPattern]
logPatterns :: Prelude.Maybe [LogPattern],
    -- | The response's http status code.
    ListLogPatternsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListLogPatternsResponse -> ListLogPatternsResponse -> Bool
(ListLogPatternsResponse -> ListLogPatternsResponse -> Bool)
-> (ListLogPatternsResponse -> ListLogPatternsResponse -> Bool)
-> Eq ListLogPatternsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLogPatternsResponse -> ListLogPatternsResponse -> Bool
$c/= :: ListLogPatternsResponse -> ListLogPatternsResponse -> Bool
== :: ListLogPatternsResponse -> ListLogPatternsResponse -> Bool
$c== :: ListLogPatternsResponse -> ListLogPatternsResponse -> Bool
Prelude.Eq, ReadPrec [ListLogPatternsResponse]
ReadPrec ListLogPatternsResponse
Int -> ReadS ListLogPatternsResponse
ReadS [ListLogPatternsResponse]
(Int -> ReadS ListLogPatternsResponse)
-> ReadS [ListLogPatternsResponse]
-> ReadPrec ListLogPatternsResponse
-> ReadPrec [ListLogPatternsResponse]
-> Read ListLogPatternsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLogPatternsResponse]
$creadListPrec :: ReadPrec [ListLogPatternsResponse]
readPrec :: ReadPrec ListLogPatternsResponse
$creadPrec :: ReadPrec ListLogPatternsResponse
readList :: ReadS [ListLogPatternsResponse]
$creadList :: ReadS [ListLogPatternsResponse]
readsPrec :: Int -> ReadS ListLogPatternsResponse
$creadsPrec :: Int -> ReadS ListLogPatternsResponse
Prelude.Read, Int -> ListLogPatternsResponse -> ShowS
[ListLogPatternsResponse] -> ShowS
ListLogPatternsResponse -> String
(Int -> ListLogPatternsResponse -> ShowS)
-> (ListLogPatternsResponse -> String)
-> ([ListLogPatternsResponse] -> ShowS)
-> Show ListLogPatternsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLogPatternsResponse] -> ShowS
$cshowList :: [ListLogPatternsResponse] -> ShowS
show :: ListLogPatternsResponse -> String
$cshow :: ListLogPatternsResponse -> String
showsPrec :: Int -> ListLogPatternsResponse -> ShowS
$cshowsPrec :: Int -> ListLogPatternsResponse -> ShowS
Prelude.Show, (forall x.
 ListLogPatternsResponse -> Rep ListLogPatternsResponse x)
-> (forall x.
    Rep ListLogPatternsResponse x -> ListLogPatternsResponse)
-> Generic ListLogPatternsResponse
forall x. Rep ListLogPatternsResponse x -> ListLogPatternsResponse
forall x. ListLogPatternsResponse -> Rep ListLogPatternsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListLogPatternsResponse x -> ListLogPatternsResponse
$cfrom :: forall x. ListLogPatternsResponse -> Rep ListLogPatternsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListLogPatternsResponse' 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', 'listLogPatternsResponse_resourceGroupName' - The name of the resource group.
--
-- 'nextToken', 'listLogPatternsResponse_nextToken' - The token used to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'logPatterns', 'listLogPatternsResponse_logPatterns' - The list of log patterns.
--
-- 'httpStatus', 'listLogPatternsResponse_httpStatus' - The response's http status code.
newListLogPatternsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListLogPatternsResponse
newListLogPatternsResponse :: Int -> ListLogPatternsResponse
newListLogPatternsResponse Int
pHttpStatus_ =
  ListLogPatternsResponse' :: Maybe Text
-> Maybe Text
-> Maybe [LogPattern]
-> Int
-> ListLogPatternsResponse
ListLogPatternsResponse'
    { $sel:resourceGroupName:ListLogPatternsResponse' :: Maybe Text
resourceGroupName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLogPatternsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logPatterns:ListLogPatternsResponse' :: Maybe [LogPattern]
logPatterns = Maybe [LogPattern]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListLogPatternsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the resource group.
listLogPatternsResponse_resourceGroupName :: Lens.Lens' ListLogPatternsResponse (Prelude.Maybe Prelude.Text)
listLogPatternsResponse_resourceGroupName :: (Maybe Text -> f (Maybe Text))
-> ListLogPatternsResponse -> f ListLogPatternsResponse
listLogPatternsResponse_resourceGroupName = (ListLogPatternsResponse -> Maybe Text)
-> (ListLogPatternsResponse
    -> Maybe Text -> ListLogPatternsResponse)
-> Lens
     ListLogPatternsResponse
     ListLogPatternsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternsResponse' {Maybe Text
resourceGroupName :: Maybe Text
$sel:resourceGroupName:ListLogPatternsResponse' :: ListLogPatternsResponse -> Maybe Text
resourceGroupName} -> Maybe Text
resourceGroupName) (\s :: ListLogPatternsResponse
s@ListLogPatternsResponse' {} Maybe Text
a -> ListLogPatternsResponse
s {$sel:resourceGroupName:ListLogPatternsResponse' :: Maybe Text
resourceGroupName = Maybe Text
a} :: ListLogPatternsResponse)

-- | The token used to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
listLogPatternsResponse_nextToken :: Lens.Lens' ListLogPatternsResponse (Prelude.Maybe Prelude.Text)
listLogPatternsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListLogPatternsResponse -> f ListLogPatternsResponse
listLogPatternsResponse_nextToken = (ListLogPatternsResponse -> Maybe Text)
-> (ListLogPatternsResponse
    -> Maybe Text -> ListLogPatternsResponse)
-> Lens
     ListLogPatternsResponse
     ListLogPatternsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLogPatternsResponse' :: ListLogPatternsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLogPatternsResponse
s@ListLogPatternsResponse' {} Maybe Text
a -> ListLogPatternsResponse
s {$sel:nextToken:ListLogPatternsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListLogPatternsResponse)

-- | The list of log patterns.
listLogPatternsResponse_logPatterns :: Lens.Lens' ListLogPatternsResponse (Prelude.Maybe [LogPattern])
listLogPatternsResponse_logPatterns :: (Maybe [LogPattern] -> f (Maybe [LogPattern]))
-> ListLogPatternsResponse -> f ListLogPatternsResponse
listLogPatternsResponse_logPatterns = (ListLogPatternsResponse -> Maybe [LogPattern])
-> (ListLogPatternsResponse
    -> Maybe [LogPattern] -> ListLogPatternsResponse)
-> Lens
     ListLogPatternsResponse
     ListLogPatternsResponse
     (Maybe [LogPattern])
     (Maybe [LogPattern])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternsResponse' {Maybe [LogPattern]
logPatterns :: Maybe [LogPattern]
$sel:logPatterns:ListLogPatternsResponse' :: ListLogPatternsResponse -> Maybe [LogPattern]
logPatterns} -> Maybe [LogPattern]
logPatterns) (\s :: ListLogPatternsResponse
s@ListLogPatternsResponse' {} Maybe [LogPattern]
a -> ListLogPatternsResponse
s {$sel:logPatterns:ListLogPatternsResponse' :: Maybe [LogPattern]
logPatterns = Maybe [LogPattern]
a} :: ListLogPatternsResponse) ((Maybe [LogPattern] -> f (Maybe [LogPattern]))
 -> ListLogPatternsResponse -> f ListLogPatternsResponse)
-> ((Maybe [LogPattern] -> f (Maybe [LogPattern]))
    -> Maybe [LogPattern] -> f (Maybe [LogPattern]))
-> (Maybe [LogPattern] -> f (Maybe [LogPattern]))
-> ListLogPatternsResponse
-> f ListLogPatternsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [LogPattern] [LogPattern] [LogPattern] [LogPattern]
-> Iso
     (Maybe [LogPattern])
     (Maybe [LogPattern])
     (Maybe [LogPattern])
     (Maybe [LogPattern])
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 [LogPattern] [LogPattern] [LogPattern] [LogPattern]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
listLogPatternsResponse_httpStatus :: Lens.Lens' ListLogPatternsResponse Prelude.Int
listLogPatternsResponse_httpStatus :: (Int -> f Int)
-> ListLogPatternsResponse -> f ListLogPatternsResponse
listLogPatternsResponse_httpStatus = (ListLogPatternsResponse -> Int)
-> (ListLogPatternsResponse -> Int -> ListLogPatternsResponse)
-> Lens ListLogPatternsResponse ListLogPatternsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLogPatternsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListLogPatternsResponse' :: ListLogPatternsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListLogPatternsResponse
s@ListLogPatternsResponse' {} Int
a -> ListLogPatternsResponse
s {$sel:httpStatus:ListLogPatternsResponse' :: Int
httpStatus = Int
a} :: ListLogPatternsResponse)

instance Prelude.NFData ListLogPatternsResponse