{-# 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.SSM.DescribePatchGroups
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all patch groups that have been registered with patch baselines.
--
-- This operation returns paginated results.
module Amazonka.SSM.DescribePatchGroups
  ( -- * Creating a Request
    DescribePatchGroups (..),
    newDescribePatchGroups,

    -- * Request Lenses
    describePatchGroups_filters,
    describePatchGroups_maxResults,
    describePatchGroups_nextToken,

    -- * Destructuring the Response
    DescribePatchGroupsResponse (..),
    newDescribePatchGroupsResponse,

    -- * Response Lenses
    describePatchGroupsResponse_mappings,
    describePatchGroupsResponse_nextToken,
    describePatchGroupsResponse_httpStatus,
  )
where

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
import Amazonka.SSM.Types

-- | /See:/ 'newDescribePatchGroups' smart constructor.
data DescribePatchGroups = DescribePatchGroups'
  { -- | Each element in the array is a structure containing a key-value pair.
    --
    -- Supported keys for @DescribePatchGroups@ include the following:
    --
    -- -   __@NAME_PREFIX@__
    --
    --     Sample values: @AWS-@ | @My-@.
    --
    -- -   __@OPERATING_SYSTEM@__
    --
    --     Sample values: @AMAZON_LINUX@ | @SUSE@ | @WINDOWS@
    DescribePatchGroups -> Maybe [PatchOrchestratorFilter]
filters :: Prelude.Maybe [PatchOrchestratorFilter],
    -- | The maximum number of patch groups to return (per page).
    DescribePatchGroups -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of items to return. (You received this token
    -- from a previous call.)
    DescribePatchGroups -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribePatchGroups -> DescribePatchGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePatchGroups -> DescribePatchGroups -> Bool
$c/= :: DescribePatchGroups -> DescribePatchGroups -> Bool
== :: DescribePatchGroups -> DescribePatchGroups -> Bool
$c== :: DescribePatchGroups -> DescribePatchGroups -> Bool
Prelude.Eq, ReadPrec [DescribePatchGroups]
ReadPrec DescribePatchGroups
Int -> ReadS DescribePatchGroups
ReadS [DescribePatchGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePatchGroups]
$creadListPrec :: ReadPrec [DescribePatchGroups]
readPrec :: ReadPrec DescribePatchGroups
$creadPrec :: ReadPrec DescribePatchGroups
readList :: ReadS [DescribePatchGroups]
$creadList :: ReadS [DescribePatchGroups]
readsPrec :: Int -> ReadS DescribePatchGroups
$creadsPrec :: Int -> ReadS DescribePatchGroups
Prelude.Read, Int -> DescribePatchGroups -> ShowS
[DescribePatchGroups] -> ShowS
DescribePatchGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePatchGroups] -> ShowS
$cshowList :: [DescribePatchGroups] -> ShowS
show :: DescribePatchGroups -> String
$cshow :: DescribePatchGroups -> String
showsPrec :: Int -> DescribePatchGroups -> ShowS
$cshowsPrec :: Int -> DescribePatchGroups -> ShowS
Prelude.Show, forall x. Rep DescribePatchGroups x -> DescribePatchGroups
forall x. DescribePatchGroups -> Rep DescribePatchGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribePatchGroups x -> DescribePatchGroups
$cfrom :: forall x. DescribePatchGroups -> Rep DescribePatchGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribePatchGroups' 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:
--
-- 'filters', 'describePatchGroups_filters' - Each element in the array is a structure containing a key-value pair.
--
-- Supported keys for @DescribePatchGroups@ include the following:
--
-- -   __@NAME_PREFIX@__
--
--     Sample values: @AWS-@ | @My-@.
--
-- -   __@OPERATING_SYSTEM@__
--
--     Sample values: @AMAZON_LINUX@ | @SUSE@ | @WINDOWS@
--
-- 'maxResults', 'describePatchGroups_maxResults' - The maximum number of patch groups to return (per page).
--
-- 'nextToken', 'describePatchGroups_nextToken' - The token for the next set of items to return. (You received this token
-- from a previous call.)
newDescribePatchGroups ::
  DescribePatchGroups
newDescribePatchGroups :: DescribePatchGroups
newDescribePatchGroups =
  DescribePatchGroups'
    { $sel:filters:DescribePatchGroups' :: Maybe [PatchOrchestratorFilter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribePatchGroups' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribePatchGroups' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Each element in the array is a structure containing a key-value pair.
--
-- Supported keys for @DescribePatchGroups@ include the following:
--
-- -   __@NAME_PREFIX@__
--
--     Sample values: @AWS-@ | @My-@.
--
-- -   __@OPERATING_SYSTEM@__
--
--     Sample values: @AMAZON_LINUX@ | @SUSE@ | @WINDOWS@
describePatchGroups_filters :: Lens.Lens' DescribePatchGroups (Prelude.Maybe [PatchOrchestratorFilter])
describePatchGroups_filters :: Lens' DescribePatchGroups (Maybe [PatchOrchestratorFilter])
describePatchGroups_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePatchGroups' {Maybe [PatchOrchestratorFilter]
filters :: Maybe [PatchOrchestratorFilter]
$sel:filters:DescribePatchGroups' :: DescribePatchGroups -> Maybe [PatchOrchestratorFilter]
filters} -> Maybe [PatchOrchestratorFilter]
filters) (\s :: DescribePatchGroups
s@DescribePatchGroups' {} Maybe [PatchOrchestratorFilter]
a -> DescribePatchGroups
s {$sel:filters:DescribePatchGroups' :: Maybe [PatchOrchestratorFilter]
filters = Maybe [PatchOrchestratorFilter]
a} :: DescribePatchGroups) 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

-- | The maximum number of patch groups to return (per page).
describePatchGroups_maxResults :: Lens.Lens' DescribePatchGroups (Prelude.Maybe Prelude.Natural)
describePatchGroups_maxResults :: Lens' DescribePatchGroups (Maybe Natural)
describePatchGroups_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePatchGroups' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribePatchGroups' :: DescribePatchGroups -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribePatchGroups
s@DescribePatchGroups' {} Maybe Natural
a -> DescribePatchGroups
s {$sel:maxResults:DescribePatchGroups' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribePatchGroups)

-- | The token for the next set of items to return. (You received this token
-- from a previous call.)
describePatchGroups_nextToken :: Lens.Lens' DescribePatchGroups (Prelude.Maybe Prelude.Text)
describePatchGroups_nextToken :: Lens' DescribePatchGroups (Maybe Text)
describePatchGroups_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePatchGroups' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribePatchGroups' :: DescribePatchGroups -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribePatchGroups
s@DescribePatchGroups' {} Maybe Text
a -> DescribePatchGroups
s {$sel:nextToken:DescribePatchGroups' :: Maybe Text
nextToken = Maybe Text
a} :: DescribePatchGroups)

instance Core.AWSPager DescribePatchGroups where
  page :: DescribePatchGroups
-> AWSResponse DescribePatchGroups -> Maybe DescribePatchGroups
page DescribePatchGroups
rq AWSResponse DescribePatchGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribePatchGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribePatchGroupsResponse (Maybe Text)
describePatchGroupsResponse_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 DescribePatchGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribePatchGroupsResponse
  (Maybe [PatchGroupPatchBaselineMapping])
describePatchGroupsResponse_mappings
            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.$ DescribePatchGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribePatchGroups (Maybe Text)
describePatchGroups_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribePatchGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribePatchGroupsResponse (Maybe Text)
describePatchGroupsResponse_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 DescribePatchGroups where
  type
    AWSResponse DescribePatchGroups =
      DescribePatchGroupsResponse
  request :: (Service -> Service)
-> DescribePatchGroups -> Request DescribePatchGroups
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 DescribePatchGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribePatchGroups)))
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 [PatchGroupPatchBaselineMapping]
-> Maybe Text -> Int -> DescribePatchGroupsResponse
DescribePatchGroupsResponse'
            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
"Mappings" 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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribePatchGroups where
  hashWithSalt :: Int -> DescribePatchGroups -> Int
hashWithSalt Int
_salt DescribePatchGroups' {Maybe Natural
Maybe [PatchOrchestratorFilter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [PatchOrchestratorFilter]
$sel:nextToken:DescribePatchGroups' :: DescribePatchGroups -> Maybe Text
$sel:maxResults:DescribePatchGroups' :: DescribePatchGroups -> Maybe Natural
$sel:filters:DescribePatchGroups' :: DescribePatchGroups -> Maybe [PatchOrchestratorFilter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [PatchOrchestratorFilter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData DescribePatchGroups where
  rnf :: DescribePatchGroups -> ()
rnf DescribePatchGroups' {Maybe Natural
Maybe [PatchOrchestratorFilter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [PatchOrchestratorFilter]
$sel:nextToken:DescribePatchGroups' :: DescribePatchGroups -> Maybe Text
$sel:maxResults:DescribePatchGroups' :: DescribePatchGroups -> Maybe Natural
$sel:filters:DescribePatchGroups' :: DescribePatchGroups -> Maybe [PatchOrchestratorFilter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [PatchOrchestratorFilter]
filters
      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

instance Data.ToHeaders DescribePatchGroups where
  toHeaders :: DescribePatchGroups -> 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
"AmazonSSM.DescribePatchGroups" ::
                          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 DescribePatchGroups where
  toJSON :: DescribePatchGroups -> Value
toJSON DescribePatchGroups' {Maybe Natural
Maybe [PatchOrchestratorFilter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [PatchOrchestratorFilter]
$sel:nextToken:DescribePatchGroups' :: DescribePatchGroups -> Maybe Text
$sel:maxResults:DescribePatchGroups' :: DescribePatchGroups -> Maybe Natural
$sel:filters:DescribePatchGroups' :: DescribePatchGroups -> Maybe [PatchOrchestratorFilter]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filters" 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 [PatchOrchestratorFilter]
filters,
            (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
          ]
      )

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

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

-- | /See:/ 'newDescribePatchGroupsResponse' smart constructor.
data DescribePatchGroupsResponse = DescribePatchGroupsResponse'
  { -- | Each entry in the array contains:
    --
    -- -   @PatchGroup@: string (between 1 and 256 characters. Regex:
    --     @^([\\p{L}\\p{Z}\\p{N}_.:\/=+\\-\@]*)$)@
    --
    -- -   @PatchBaselineIdentity@: A @PatchBaselineIdentity@ element.
    DescribePatchGroupsResponse
-> Maybe [PatchGroupPatchBaselineMapping]
mappings :: Prelude.Maybe [PatchGroupPatchBaselineMapping],
    -- | The token to use when requesting the next set of items. If there are no
    -- additional items to return, the string is empty.
    DescribePatchGroupsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribePatchGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribePatchGroupsResponse -> DescribePatchGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePatchGroupsResponse -> DescribePatchGroupsResponse -> Bool
$c/= :: DescribePatchGroupsResponse -> DescribePatchGroupsResponse -> Bool
== :: DescribePatchGroupsResponse -> DescribePatchGroupsResponse -> Bool
$c== :: DescribePatchGroupsResponse -> DescribePatchGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribePatchGroupsResponse]
ReadPrec DescribePatchGroupsResponse
Int -> ReadS DescribePatchGroupsResponse
ReadS [DescribePatchGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePatchGroupsResponse]
$creadListPrec :: ReadPrec [DescribePatchGroupsResponse]
readPrec :: ReadPrec DescribePatchGroupsResponse
$creadPrec :: ReadPrec DescribePatchGroupsResponse
readList :: ReadS [DescribePatchGroupsResponse]
$creadList :: ReadS [DescribePatchGroupsResponse]
readsPrec :: Int -> ReadS DescribePatchGroupsResponse
$creadsPrec :: Int -> ReadS DescribePatchGroupsResponse
Prelude.Read, Int -> DescribePatchGroupsResponse -> ShowS
[DescribePatchGroupsResponse] -> ShowS
DescribePatchGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePatchGroupsResponse] -> ShowS
$cshowList :: [DescribePatchGroupsResponse] -> ShowS
show :: DescribePatchGroupsResponse -> String
$cshow :: DescribePatchGroupsResponse -> String
showsPrec :: Int -> DescribePatchGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribePatchGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribePatchGroupsResponse x -> DescribePatchGroupsResponse
forall x.
DescribePatchGroupsResponse -> Rep DescribePatchGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePatchGroupsResponse x -> DescribePatchGroupsResponse
$cfrom :: forall x.
DescribePatchGroupsResponse -> Rep DescribePatchGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribePatchGroupsResponse' 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:
--
-- 'mappings', 'describePatchGroupsResponse_mappings' - Each entry in the array contains:
--
-- -   @PatchGroup@: string (between 1 and 256 characters. Regex:
--     @^([\\p{L}\\p{Z}\\p{N}_.:\/=+\\-\@]*)$)@
--
-- -   @PatchBaselineIdentity@: A @PatchBaselineIdentity@ element.
--
-- 'nextToken', 'describePatchGroupsResponse_nextToken' - The token to use when requesting the next set of items. If there are no
-- additional items to return, the string is empty.
--
-- 'httpStatus', 'describePatchGroupsResponse_httpStatus' - The response's http status code.
newDescribePatchGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribePatchGroupsResponse
newDescribePatchGroupsResponse :: Int -> DescribePatchGroupsResponse
newDescribePatchGroupsResponse Int
pHttpStatus_ =
  DescribePatchGroupsResponse'
    { $sel:mappings:DescribePatchGroupsResponse' :: Maybe [PatchGroupPatchBaselineMapping]
mappings =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribePatchGroupsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribePatchGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Each entry in the array contains:
--
-- -   @PatchGroup@: string (between 1 and 256 characters. Regex:
--     @^([\\p{L}\\p{Z}\\p{N}_.:\/=+\\-\@]*)$)@
--
-- -   @PatchBaselineIdentity@: A @PatchBaselineIdentity@ element.
describePatchGroupsResponse_mappings :: Lens.Lens' DescribePatchGroupsResponse (Prelude.Maybe [PatchGroupPatchBaselineMapping])
describePatchGroupsResponse_mappings :: Lens'
  DescribePatchGroupsResponse
  (Maybe [PatchGroupPatchBaselineMapping])
describePatchGroupsResponse_mappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePatchGroupsResponse' {Maybe [PatchGroupPatchBaselineMapping]
mappings :: Maybe [PatchGroupPatchBaselineMapping]
$sel:mappings:DescribePatchGroupsResponse' :: DescribePatchGroupsResponse
-> Maybe [PatchGroupPatchBaselineMapping]
mappings} -> Maybe [PatchGroupPatchBaselineMapping]
mappings) (\s :: DescribePatchGroupsResponse
s@DescribePatchGroupsResponse' {} Maybe [PatchGroupPatchBaselineMapping]
a -> DescribePatchGroupsResponse
s {$sel:mappings:DescribePatchGroupsResponse' :: Maybe [PatchGroupPatchBaselineMapping]
mappings = Maybe [PatchGroupPatchBaselineMapping]
a} :: DescribePatchGroupsResponse) 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

-- | The token to use when requesting the next set of items. If there are no
-- additional items to return, the string is empty.
describePatchGroupsResponse_nextToken :: Lens.Lens' DescribePatchGroupsResponse (Prelude.Maybe Prelude.Text)
describePatchGroupsResponse_nextToken :: Lens' DescribePatchGroupsResponse (Maybe Text)
describePatchGroupsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePatchGroupsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribePatchGroupsResponse' :: DescribePatchGroupsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribePatchGroupsResponse
s@DescribePatchGroupsResponse' {} Maybe Text
a -> DescribePatchGroupsResponse
s {$sel:nextToken:DescribePatchGroupsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribePatchGroupsResponse)

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

instance Prelude.NFData DescribePatchGroupsResponse where
  rnf :: DescribePatchGroupsResponse -> ()
rnf DescribePatchGroupsResponse' {Int
Maybe [PatchGroupPatchBaselineMapping]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
mappings :: Maybe [PatchGroupPatchBaselineMapping]
$sel:httpStatus:DescribePatchGroupsResponse' :: DescribePatchGroupsResponse -> Int
$sel:nextToken:DescribePatchGroupsResponse' :: DescribePatchGroupsResponse -> Maybe Text
$sel:mappings:DescribePatchGroupsResponse' :: DescribePatchGroupsResponse
-> Maybe [PatchGroupPatchBaselineMapping]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [PatchGroupPatchBaselineMapping]
mappings
      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 Int
httpStatus