{-# 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.GetPatchBaselineForPatchGroup
-- 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)
--
-- Retrieves the patch baseline that should be used for the specified patch
-- group.
module Amazonka.SSM.GetPatchBaselineForPatchGroup
  ( -- * Creating a Request
    GetPatchBaselineForPatchGroup (..),
    newGetPatchBaselineForPatchGroup,

    -- * Request Lenses
    getPatchBaselineForPatchGroup_operatingSystem,
    getPatchBaselineForPatchGroup_patchGroup,

    -- * Destructuring the Response
    GetPatchBaselineForPatchGroupResponse (..),
    newGetPatchBaselineForPatchGroupResponse,

    -- * Response Lenses
    getPatchBaselineForPatchGroupResponse_operatingSystem,
    getPatchBaselineForPatchGroupResponse_baselineId,
    getPatchBaselineForPatchGroupResponse_patchGroup,
    getPatchBaselineForPatchGroupResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetPatchBaselineForPatchGroup' smart constructor.
data GetPatchBaselineForPatchGroup = GetPatchBaselineForPatchGroup'
  { -- | Returns he operating system rule specified for patch groups using the
    -- patch baseline.
    GetPatchBaselineForPatchGroup -> Maybe OperatingSystem
operatingSystem :: Prelude.Maybe OperatingSystem,
    -- | The name of the patch group whose patch baseline should be retrieved.
    GetPatchBaselineForPatchGroup -> Text
patchGroup :: Prelude.Text
  }
  deriving (GetPatchBaselineForPatchGroup
-> GetPatchBaselineForPatchGroup -> Bool
(GetPatchBaselineForPatchGroup
 -> GetPatchBaselineForPatchGroup -> Bool)
-> (GetPatchBaselineForPatchGroup
    -> GetPatchBaselineForPatchGroup -> Bool)
-> Eq GetPatchBaselineForPatchGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPatchBaselineForPatchGroup
-> GetPatchBaselineForPatchGroup -> Bool
$c/= :: GetPatchBaselineForPatchGroup
-> GetPatchBaselineForPatchGroup -> Bool
== :: GetPatchBaselineForPatchGroup
-> GetPatchBaselineForPatchGroup -> Bool
$c== :: GetPatchBaselineForPatchGroup
-> GetPatchBaselineForPatchGroup -> Bool
Prelude.Eq, ReadPrec [GetPatchBaselineForPatchGroup]
ReadPrec GetPatchBaselineForPatchGroup
Int -> ReadS GetPatchBaselineForPatchGroup
ReadS [GetPatchBaselineForPatchGroup]
(Int -> ReadS GetPatchBaselineForPatchGroup)
-> ReadS [GetPatchBaselineForPatchGroup]
-> ReadPrec GetPatchBaselineForPatchGroup
-> ReadPrec [GetPatchBaselineForPatchGroup]
-> Read GetPatchBaselineForPatchGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPatchBaselineForPatchGroup]
$creadListPrec :: ReadPrec [GetPatchBaselineForPatchGroup]
readPrec :: ReadPrec GetPatchBaselineForPatchGroup
$creadPrec :: ReadPrec GetPatchBaselineForPatchGroup
readList :: ReadS [GetPatchBaselineForPatchGroup]
$creadList :: ReadS [GetPatchBaselineForPatchGroup]
readsPrec :: Int -> ReadS GetPatchBaselineForPatchGroup
$creadsPrec :: Int -> ReadS GetPatchBaselineForPatchGroup
Prelude.Read, Int -> GetPatchBaselineForPatchGroup -> ShowS
[GetPatchBaselineForPatchGroup] -> ShowS
GetPatchBaselineForPatchGroup -> String
(Int -> GetPatchBaselineForPatchGroup -> ShowS)
-> (GetPatchBaselineForPatchGroup -> String)
-> ([GetPatchBaselineForPatchGroup] -> ShowS)
-> Show GetPatchBaselineForPatchGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPatchBaselineForPatchGroup] -> ShowS
$cshowList :: [GetPatchBaselineForPatchGroup] -> ShowS
show :: GetPatchBaselineForPatchGroup -> String
$cshow :: GetPatchBaselineForPatchGroup -> String
showsPrec :: Int -> GetPatchBaselineForPatchGroup -> ShowS
$cshowsPrec :: Int -> GetPatchBaselineForPatchGroup -> ShowS
Prelude.Show, (forall x.
 GetPatchBaselineForPatchGroup
 -> Rep GetPatchBaselineForPatchGroup x)
-> (forall x.
    Rep GetPatchBaselineForPatchGroup x
    -> GetPatchBaselineForPatchGroup)
-> Generic GetPatchBaselineForPatchGroup
forall x.
Rep GetPatchBaselineForPatchGroup x
-> GetPatchBaselineForPatchGroup
forall x.
GetPatchBaselineForPatchGroup
-> Rep GetPatchBaselineForPatchGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetPatchBaselineForPatchGroup x
-> GetPatchBaselineForPatchGroup
$cfrom :: forall x.
GetPatchBaselineForPatchGroup
-> Rep GetPatchBaselineForPatchGroup x
Prelude.Generic)

-- |
-- Create a value of 'GetPatchBaselineForPatchGroup' 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:
--
-- 'operatingSystem', 'getPatchBaselineForPatchGroup_operatingSystem' - Returns he operating system rule specified for patch groups using the
-- patch baseline.
--
-- 'patchGroup', 'getPatchBaselineForPatchGroup_patchGroup' - The name of the patch group whose patch baseline should be retrieved.
newGetPatchBaselineForPatchGroup ::
  -- | 'patchGroup'
  Prelude.Text ->
  GetPatchBaselineForPatchGroup
newGetPatchBaselineForPatchGroup :: Text -> GetPatchBaselineForPatchGroup
newGetPatchBaselineForPatchGroup Text
pPatchGroup_ =
  GetPatchBaselineForPatchGroup' :: Maybe OperatingSystem -> Text -> GetPatchBaselineForPatchGroup
GetPatchBaselineForPatchGroup'
    { $sel:operatingSystem:GetPatchBaselineForPatchGroup' :: Maybe OperatingSystem
operatingSystem =
        Maybe OperatingSystem
forall a. Maybe a
Prelude.Nothing,
      $sel:patchGroup:GetPatchBaselineForPatchGroup' :: Text
patchGroup = Text
pPatchGroup_
    }

-- | Returns he operating system rule specified for patch groups using the
-- patch baseline.
getPatchBaselineForPatchGroup_operatingSystem :: Lens.Lens' GetPatchBaselineForPatchGroup (Prelude.Maybe OperatingSystem)
getPatchBaselineForPatchGroup_operatingSystem :: (Maybe OperatingSystem -> f (Maybe OperatingSystem))
-> GetPatchBaselineForPatchGroup -> f GetPatchBaselineForPatchGroup
getPatchBaselineForPatchGroup_operatingSystem = (GetPatchBaselineForPatchGroup -> Maybe OperatingSystem)
-> (GetPatchBaselineForPatchGroup
    -> Maybe OperatingSystem -> GetPatchBaselineForPatchGroup)
-> Lens
     GetPatchBaselineForPatchGroup
     GetPatchBaselineForPatchGroup
     (Maybe OperatingSystem)
     (Maybe OperatingSystem)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPatchBaselineForPatchGroup' {Maybe OperatingSystem
operatingSystem :: Maybe OperatingSystem
$sel:operatingSystem:GetPatchBaselineForPatchGroup' :: GetPatchBaselineForPatchGroup -> Maybe OperatingSystem
operatingSystem} -> Maybe OperatingSystem
operatingSystem) (\s :: GetPatchBaselineForPatchGroup
s@GetPatchBaselineForPatchGroup' {} Maybe OperatingSystem
a -> GetPatchBaselineForPatchGroup
s {$sel:operatingSystem:GetPatchBaselineForPatchGroup' :: Maybe OperatingSystem
operatingSystem = Maybe OperatingSystem
a} :: GetPatchBaselineForPatchGroup)

-- | The name of the patch group whose patch baseline should be retrieved.
getPatchBaselineForPatchGroup_patchGroup :: Lens.Lens' GetPatchBaselineForPatchGroup Prelude.Text
getPatchBaselineForPatchGroup_patchGroup :: (Text -> f Text)
-> GetPatchBaselineForPatchGroup -> f GetPatchBaselineForPatchGroup
getPatchBaselineForPatchGroup_patchGroup = (GetPatchBaselineForPatchGroup -> Text)
-> (GetPatchBaselineForPatchGroup
    -> Text -> GetPatchBaselineForPatchGroup)
-> Lens
     GetPatchBaselineForPatchGroup
     GetPatchBaselineForPatchGroup
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPatchBaselineForPatchGroup' {Text
patchGroup :: Text
$sel:patchGroup:GetPatchBaselineForPatchGroup' :: GetPatchBaselineForPatchGroup -> Text
patchGroup} -> Text
patchGroup) (\s :: GetPatchBaselineForPatchGroup
s@GetPatchBaselineForPatchGroup' {} Text
a -> GetPatchBaselineForPatchGroup
s {$sel:patchGroup:GetPatchBaselineForPatchGroup' :: Text
patchGroup = Text
a} :: GetPatchBaselineForPatchGroup)

instance
  Core.AWSRequest
    GetPatchBaselineForPatchGroup
  where
  type
    AWSResponse GetPatchBaselineForPatchGroup =
      GetPatchBaselineForPatchGroupResponse
  request :: GetPatchBaselineForPatchGroup
-> Request GetPatchBaselineForPatchGroup
request = Service
-> GetPatchBaselineForPatchGroup
-> Request GetPatchBaselineForPatchGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetPatchBaselineForPatchGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetPatchBaselineForPatchGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetPatchBaselineForPatchGroup))
-> Logger
-> Service
-> Proxy GetPatchBaselineForPatchGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetPatchBaselineForPatchGroup)))
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 OperatingSystem
-> Maybe Text
-> Maybe Text
-> Int
-> GetPatchBaselineForPatchGroupResponse
GetPatchBaselineForPatchGroupResponse'
            (Maybe OperatingSystem
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> GetPatchBaselineForPatchGroupResponse)
-> Either String (Maybe OperatingSystem)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> GetPatchBaselineForPatchGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe OperatingSystem)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"OperatingSystem")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> GetPatchBaselineForPatchGroupResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> GetPatchBaselineForPatchGroupResponse)
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
"BaselineId")
            Either
  String (Maybe Text -> Int -> GetPatchBaselineForPatchGroupResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetPatchBaselineForPatchGroupResponse)
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
"PatchGroup")
            Either String (Int -> GetPatchBaselineForPatchGroupResponse)
-> Either String Int
-> Either String GetPatchBaselineForPatchGroupResponse
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
    GetPatchBaselineForPatchGroup

instance Prelude.NFData GetPatchBaselineForPatchGroup

instance Core.ToHeaders GetPatchBaselineForPatchGroup where
  toHeaders :: GetPatchBaselineForPatchGroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetPatchBaselineForPatchGroup -> 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
"AmazonSSM.GetPatchBaselineForPatchGroup" ::
                          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 GetPatchBaselineForPatchGroup where
  toJSON :: GetPatchBaselineForPatchGroup -> Value
toJSON GetPatchBaselineForPatchGroup' {Maybe OperatingSystem
Text
patchGroup :: Text
operatingSystem :: Maybe OperatingSystem
$sel:patchGroup:GetPatchBaselineForPatchGroup' :: GetPatchBaselineForPatchGroup -> Text
$sel:operatingSystem:GetPatchBaselineForPatchGroup' :: GetPatchBaselineForPatchGroup -> Maybe OperatingSystem
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"OperatingSystem" Text -> OperatingSystem -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (OperatingSystem -> Pair) -> Maybe OperatingSystem -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OperatingSystem
operatingSystem,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PatchGroup" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
patchGroup)
          ]
      )

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

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

-- | /See:/ 'newGetPatchBaselineForPatchGroupResponse' smart constructor.
data GetPatchBaselineForPatchGroupResponse = GetPatchBaselineForPatchGroupResponse'
  { -- | The operating system rule specified for patch groups using the patch
    -- baseline.
    GetPatchBaselineForPatchGroupResponse -> Maybe OperatingSystem
operatingSystem :: Prelude.Maybe OperatingSystem,
    -- | The ID of the patch baseline that should be used for the patch group.
    GetPatchBaselineForPatchGroupResponse -> Maybe Text
baselineId :: Prelude.Maybe Prelude.Text,
    -- | The name of the patch group.
    GetPatchBaselineForPatchGroupResponse -> Maybe Text
patchGroup :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetPatchBaselineForPatchGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetPatchBaselineForPatchGroupResponse
-> GetPatchBaselineForPatchGroupResponse -> Bool
(GetPatchBaselineForPatchGroupResponse
 -> GetPatchBaselineForPatchGroupResponse -> Bool)
-> (GetPatchBaselineForPatchGroupResponse
    -> GetPatchBaselineForPatchGroupResponse -> Bool)
-> Eq GetPatchBaselineForPatchGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPatchBaselineForPatchGroupResponse
-> GetPatchBaselineForPatchGroupResponse -> Bool
$c/= :: GetPatchBaselineForPatchGroupResponse
-> GetPatchBaselineForPatchGroupResponse -> Bool
== :: GetPatchBaselineForPatchGroupResponse
-> GetPatchBaselineForPatchGroupResponse -> Bool
$c== :: GetPatchBaselineForPatchGroupResponse
-> GetPatchBaselineForPatchGroupResponse -> Bool
Prelude.Eq, ReadPrec [GetPatchBaselineForPatchGroupResponse]
ReadPrec GetPatchBaselineForPatchGroupResponse
Int -> ReadS GetPatchBaselineForPatchGroupResponse
ReadS [GetPatchBaselineForPatchGroupResponse]
(Int -> ReadS GetPatchBaselineForPatchGroupResponse)
-> ReadS [GetPatchBaselineForPatchGroupResponse]
-> ReadPrec GetPatchBaselineForPatchGroupResponse
-> ReadPrec [GetPatchBaselineForPatchGroupResponse]
-> Read GetPatchBaselineForPatchGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPatchBaselineForPatchGroupResponse]
$creadListPrec :: ReadPrec [GetPatchBaselineForPatchGroupResponse]
readPrec :: ReadPrec GetPatchBaselineForPatchGroupResponse
$creadPrec :: ReadPrec GetPatchBaselineForPatchGroupResponse
readList :: ReadS [GetPatchBaselineForPatchGroupResponse]
$creadList :: ReadS [GetPatchBaselineForPatchGroupResponse]
readsPrec :: Int -> ReadS GetPatchBaselineForPatchGroupResponse
$creadsPrec :: Int -> ReadS GetPatchBaselineForPatchGroupResponse
Prelude.Read, Int -> GetPatchBaselineForPatchGroupResponse -> ShowS
[GetPatchBaselineForPatchGroupResponse] -> ShowS
GetPatchBaselineForPatchGroupResponse -> String
(Int -> GetPatchBaselineForPatchGroupResponse -> ShowS)
-> (GetPatchBaselineForPatchGroupResponse -> String)
-> ([GetPatchBaselineForPatchGroupResponse] -> ShowS)
-> Show GetPatchBaselineForPatchGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPatchBaselineForPatchGroupResponse] -> ShowS
$cshowList :: [GetPatchBaselineForPatchGroupResponse] -> ShowS
show :: GetPatchBaselineForPatchGroupResponse -> String
$cshow :: GetPatchBaselineForPatchGroupResponse -> String
showsPrec :: Int -> GetPatchBaselineForPatchGroupResponse -> ShowS
$cshowsPrec :: Int -> GetPatchBaselineForPatchGroupResponse -> ShowS
Prelude.Show, (forall x.
 GetPatchBaselineForPatchGroupResponse
 -> Rep GetPatchBaselineForPatchGroupResponse x)
-> (forall x.
    Rep GetPatchBaselineForPatchGroupResponse x
    -> GetPatchBaselineForPatchGroupResponse)
-> Generic GetPatchBaselineForPatchGroupResponse
forall x.
Rep GetPatchBaselineForPatchGroupResponse x
-> GetPatchBaselineForPatchGroupResponse
forall x.
GetPatchBaselineForPatchGroupResponse
-> Rep GetPatchBaselineForPatchGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetPatchBaselineForPatchGroupResponse x
-> GetPatchBaselineForPatchGroupResponse
$cfrom :: forall x.
GetPatchBaselineForPatchGroupResponse
-> Rep GetPatchBaselineForPatchGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetPatchBaselineForPatchGroupResponse' 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:
--
-- 'operatingSystem', 'getPatchBaselineForPatchGroupResponse_operatingSystem' - The operating system rule specified for patch groups using the patch
-- baseline.
--
-- 'baselineId', 'getPatchBaselineForPatchGroupResponse_baselineId' - The ID of the patch baseline that should be used for the patch group.
--
-- 'patchGroup', 'getPatchBaselineForPatchGroupResponse_patchGroup' - The name of the patch group.
--
-- 'httpStatus', 'getPatchBaselineForPatchGroupResponse_httpStatus' - The response's http status code.
newGetPatchBaselineForPatchGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetPatchBaselineForPatchGroupResponse
newGetPatchBaselineForPatchGroupResponse :: Int -> GetPatchBaselineForPatchGroupResponse
newGetPatchBaselineForPatchGroupResponse Int
pHttpStatus_ =
  GetPatchBaselineForPatchGroupResponse' :: Maybe OperatingSystem
-> Maybe Text
-> Maybe Text
-> Int
-> GetPatchBaselineForPatchGroupResponse
GetPatchBaselineForPatchGroupResponse'
    { $sel:operatingSystem:GetPatchBaselineForPatchGroupResponse' :: Maybe OperatingSystem
operatingSystem =
        Maybe OperatingSystem
forall a. Maybe a
Prelude.Nothing,
      $sel:baselineId:GetPatchBaselineForPatchGroupResponse' :: Maybe Text
baselineId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:patchGroup:GetPatchBaselineForPatchGroupResponse' :: Maybe Text
patchGroup = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetPatchBaselineForPatchGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The operating system rule specified for patch groups using the patch
-- baseline.
getPatchBaselineForPatchGroupResponse_operatingSystem :: Lens.Lens' GetPatchBaselineForPatchGroupResponse (Prelude.Maybe OperatingSystem)
getPatchBaselineForPatchGroupResponse_operatingSystem :: (Maybe OperatingSystem -> f (Maybe OperatingSystem))
-> GetPatchBaselineForPatchGroupResponse
-> f GetPatchBaselineForPatchGroupResponse
getPatchBaselineForPatchGroupResponse_operatingSystem = (GetPatchBaselineForPatchGroupResponse -> Maybe OperatingSystem)
-> (GetPatchBaselineForPatchGroupResponse
    -> Maybe OperatingSystem -> GetPatchBaselineForPatchGroupResponse)
-> Lens
     GetPatchBaselineForPatchGroupResponse
     GetPatchBaselineForPatchGroupResponse
     (Maybe OperatingSystem)
     (Maybe OperatingSystem)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPatchBaselineForPatchGroupResponse' {Maybe OperatingSystem
operatingSystem :: Maybe OperatingSystem
$sel:operatingSystem:GetPatchBaselineForPatchGroupResponse' :: GetPatchBaselineForPatchGroupResponse -> Maybe OperatingSystem
operatingSystem} -> Maybe OperatingSystem
operatingSystem) (\s :: GetPatchBaselineForPatchGroupResponse
s@GetPatchBaselineForPatchGroupResponse' {} Maybe OperatingSystem
a -> GetPatchBaselineForPatchGroupResponse
s {$sel:operatingSystem:GetPatchBaselineForPatchGroupResponse' :: Maybe OperatingSystem
operatingSystem = Maybe OperatingSystem
a} :: GetPatchBaselineForPatchGroupResponse)

-- | The ID of the patch baseline that should be used for the patch group.
getPatchBaselineForPatchGroupResponse_baselineId :: Lens.Lens' GetPatchBaselineForPatchGroupResponse (Prelude.Maybe Prelude.Text)
getPatchBaselineForPatchGroupResponse_baselineId :: (Maybe Text -> f (Maybe Text))
-> GetPatchBaselineForPatchGroupResponse
-> f GetPatchBaselineForPatchGroupResponse
getPatchBaselineForPatchGroupResponse_baselineId = (GetPatchBaselineForPatchGroupResponse -> Maybe Text)
-> (GetPatchBaselineForPatchGroupResponse
    -> Maybe Text -> GetPatchBaselineForPatchGroupResponse)
-> Lens
     GetPatchBaselineForPatchGroupResponse
     GetPatchBaselineForPatchGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPatchBaselineForPatchGroupResponse' {Maybe Text
baselineId :: Maybe Text
$sel:baselineId:GetPatchBaselineForPatchGroupResponse' :: GetPatchBaselineForPatchGroupResponse -> Maybe Text
baselineId} -> Maybe Text
baselineId) (\s :: GetPatchBaselineForPatchGroupResponse
s@GetPatchBaselineForPatchGroupResponse' {} Maybe Text
a -> GetPatchBaselineForPatchGroupResponse
s {$sel:baselineId:GetPatchBaselineForPatchGroupResponse' :: Maybe Text
baselineId = Maybe Text
a} :: GetPatchBaselineForPatchGroupResponse)

-- | The name of the patch group.
getPatchBaselineForPatchGroupResponse_patchGroup :: Lens.Lens' GetPatchBaselineForPatchGroupResponse (Prelude.Maybe Prelude.Text)
getPatchBaselineForPatchGroupResponse_patchGroup :: (Maybe Text -> f (Maybe Text))
-> GetPatchBaselineForPatchGroupResponse
-> f GetPatchBaselineForPatchGroupResponse
getPatchBaselineForPatchGroupResponse_patchGroup = (GetPatchBaselineForPatchGroupResponse -> Maybe Text)
-> (GetPatchBaselineForPatchGroupResponse
    -> Maybe Text -> GetPatchBaselineForPatchGroupResponse)
-> Lens
     GetPatchBaselineForPatchGroupResponse
     GetPatchBaselineForPatchGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPatchBaselineForPatchGroupResponse' {Maybe Text
patchGroup :: Maybe Text
$sel:patchGroup:GetPatchBaselineForPatchGroupResponse' :: GetPatchBaselineForPatchGroupResponse -> Maybe Text
patchGroup} -> Maybe Text
patchGroup) (\s :: GetPatchBaselineForPatchGroupResponse
s@GetPatchBaselineForPatchGroupResponse' {} Maybe Text
a -> GetPatchBaselineForPatchGroupResponse
s {$sel:patchGroup:GetPatchBaselineForPatchGroupResponse' :: Maybe Text
patchGroup = Maybe Text
a} :: GetPatchBaselineForPatchGroupResponse)

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

instance
  Prelude.NFData
    GetPatchBaselineForPatchGroupResponse