{-# 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.GuardDuty.UpdateThreatIntelSet
-- 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)
--
-- Updates the ThreatIntelSet specified by the ThreatIntelSet ID.
module Amazonka.GuardDuty.UpdateThreatIntelSet
  ( -- * Creating a Request
    UpdateThreatIntelSet (..),
    newUpdateThreatIntelSet,

    -- * Request Lenses
    updateThreatIntelSet_location,
    updateThreatIntelSet_activate,
    updateThreatIntelSet_name,
    updateThreatIntelSet_detectorId,
    updateThreatIntelSet_threatIntelSetId,

    -- * Destructuring the Response
    UpdateThreatIntelSetResponse (..),
    newUpdateThreatIntelSetResponse,

    -- * Response Lenses
    updateThreatIntelSetResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.GuardDuty.Types
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:/ 'newUpdateThreatIntelSet' smart constructor.
data UpdateThreatIntelSet = UpdateThreatIntelSet'
  { -- | The updated URI of the file that contains the ThreateIntelSet.
    UpdateThreatIntelSet -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
    -- | The updated Boolean value that specifies whether the ThreateIntelSet is
    -- active or not.
    UpdateThreatIntelSet -> Maybe Bool
activate :: Prelude.Maybe Prelude.Bool,
    -- | The unique ID that specifies the ThreatIntelSet that you want to update.
    UpdateThreatIntelSet -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The detectorID that specifies the GuardDuty service whose ThreatIntelSet
    -- you want to update.
    UpdateThreatIntelSet -> Text
detectorId :: Prelude.Text,
    -- | The unique ID that specifies the ThreatIntelSet that you want to update.
    UpdateThreatIntelSet -> Text
threatIntelSetId :: Prelude.Text
  }
  deriving (UpdateThreatIntelSet -> UpdateThreatIntelSet -> Bool
(UpdateThreatIntelSet -> UpdateThreatIntelSet -> Bool)
-> (UpdateThreatIntelSet -> UpdateThreatIntelSet -> Bool)
-> Eq UpdateThreatIntelSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateThreatIntelSet -> UpdateThreatIntelSet -> Bool
$c/= :: UpdateThreatIntelSet -> UpdateThreatIntelSet -> Bool
== :: UpdateThreatIntelSet -> UpdateThreatIntelSet -> Bool
$c== :: UpdateThreatIntelSet -> UpdateThreatIntelSet -> Bool
Prelude.Eq, ReadPrec [UpdateThreatIntelSet]
ReadPrec UpdateThreatIntelSet
Int -> ReadS UpdateThreatIntelSet
ReadS [UpdateThreatIntelSet]
(Int -> ReadS UpdateThreatIntelSet)
-> ReadS [UpdateThreatIntelSet]
-> ReadPrec UpdateThreatIntelSet
-> ReadPrec [UpdateThreatIntelSet]
-> Read UpdateThreatIntelSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateThreatIntelSet]
$creadListPrec :: ReadPrec [UpdateThreatIntelSet]
readPrec :: ReadPrec UpdateThreatIntelSet
$creadPrec :: ReadPrec UpdateThreatIntelSet
readList :: ReadS [UpdateThreatIntelSet]
$creadList :: ReadS [UpdateThreatIntelSet]
readsPrec :: Int -> ReadS UpdateThreatIntelSet
$creadsPrec :: Int -> ReadS UpdateThreatIntelSet
Prelude.Read, Int -> UpdateThreatIntelSet -> ShowS
[UpdateThreatIntelSet] -> ShowS
UpdateThreatIntelSet -> String
(Int -> UpdateThreatIntelSet -> ShowS)
-> (UpdateThreatIntelSet -> String)
-> ([UpdateThreatIntelSet] -> ShowS)
-> Show UpdateThreatIntelSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateThreatIntelSet] -> ShowS
$cshowList :: [UpdateThreatIntelSet] -> ShowS
show :: UpdateThreatIntelSet -> String
$cshow :: UpdateThreatIntelSet -> String
showsPrec :: Int -> UpdateThreatIntelSet -> ShowS
$cshowsPrec :: Int -> UpdateThreatIntelSet -> ShowS
Prelude.Show, (forall x. UpdateThreatIntelSet -> Rep UpdateThreatIntelSet x)
-> (forall x. Rep UpdateThreatIntelSet x -> UpdateThreatIntelSet)
-> Generic UpdateThreatIntelSet
forall x. Rep UpdateThreatIntelSet x -> UpdateThreatIntelSet
forall x. UpdateThreatIntelSet -> Rep UpdateThreatIntelSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateThreatIntelSet x -> UpdateThreatIntelSet
$cfrom :: forall x. UpdateThreatIntelSet -> Rep UpdateThreatIntelSet x
Prelude.Generic)

-- |
-- Create a value of 'UpdateThreatIntelSet' 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:
--
-- 'location', 'updateThreatIntelSet_location' - The updated URI of the file that contains the ThreateIntelSet.
--
-- 'activate', 'updateThreatIntelSet_activate' - The updated Boolean value that specifies whether the ThreateIntelSet is
-- active or not.
--
-- 'name', 'updateThreatIntelSet_name' - The unique ID that specifies the ThreatIntelSet that you want to update.
--
-- 'detectorId', 'updateThreatIntelSet_detectorId' - The detectorID that specifies the GuardDuty service whose ThreatIntelSet
-- you want to update.
--
-- 'threatIntelSetId', 'updateThreatIntelSet_threatIntelSetId' - The unique ID that specifies the ThreatIntelSet that you want to update.
newUpdateThreatIntelSet ::
  -- | 'detectorId'
  Prelude.Text ->
  -- | 'threatIntelSetId'
  Prelude.Text ->
  UpdateThreatIntelSet
newUpdateThreatIntelSet :: Text -> Text -> UpdateThreatIntelSet
newUpdateThreatIntelSet
  Text
pDetectorId_
  Text
pThreatIntelSetId_ =
    UpdateThreatIntelSet' :: Maybe Text
-> Maybe Bool -> Maybe Text -> Text -> Text -> UpdateThreatIntelSet
UpdateThreatIntelSet'
      { $sel:location:UpdateThreatIntelSet' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:activate:UpdateThreatIntelSet' :: Maybe Bool
activate = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:name:UpdateThreatIntelSet' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:detectorId:UpdateThreatIntelSet' :: Text
detectorId = Text
pDetectorId_,
        $sel:threatIntelSetId:UpdateThreatIntelSet' :: Text
threatIntelSetId = Text
pThreatIntelSetId_
      }

-- | The updated URI of the file that contains the ThreateIntelSet.
updateThreatIntelSet_location :: Lens.Lens' UpdateThreatIntelSet (Prelude.Maybe Prelude.Text)
updateThreatIntelSet_location :: (Maybe Text -> f (Maybe Text))
-> UpdateThreatIntelSet -> f UpdateThreatIntelSet
updateThreatIntelSet_location = (UpdateThreatIntelSet -> Maybe Text)
-> (UpdateThreatIntelSet -> Maybe Text -> UpdateThreatIntelSet)
-> Lens
     UpdateThreatIntelSet UpdateThreatIntelSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThreatIntelSet' {Maybe Text
location :: Maybe Text
$sel:location:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Maybe Text
location} -> Maybe Text
location) (\s :: UpdateThreatIntelSet
s@UpdateThreatIntelSet' {} Maybe Text
a -> UpdateThreatIntelSet
s {$sel:location:UpdateThreatIntelSet' :: Maybe Text
location = Maybe Text
a} :: UpdateThreatIntelSet)

-- | The updated Boolean value that specifies whether the ThreateIntelSet is
-- active or not.
updateThreatIntelSet_activate :: Lens.Lens' UpdateThreatIntelSet (Prelude.Maybe Prelude.Bool)
updateThreatIntelSet_activate :: (Maybe Bool -> f (Maybe Bool))
-> UpdateThreatIntelSet -> f UpdateThreatIntelSet
updateThreatIntelSet_activate = (UpdateThreatIntelSet -> Maybe Bool)
-> (UpdateThreatIntelSet -> Maybe Bool -> UpdateThreatIntelSet)
-> Lens
     UpdateThreatIntelSet UpdateThreatIntelSet (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThreatIntelSet' {Maybe Bool
activate :: Maybe Bool
$sel:activate:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Maybe Bool
activate} -> Maybe Bool
activate) (\s :: UpdateThreatIntelSet
s@UpdateThreatIntelSet' {} Maybe Bool
a -> UpdateThreatIntelSet
s {$sel:activate:UpdateThreatIntelSet' :: Maybe Bool
activate = Maybe Bool
a} :: UpdateThreatIntelSet)

-- | The unique ID that specifies the ThreatIntelSet that you want to update.
updateThreatIntelSet_name :: Lens.Lens' UpdateThreatIntelSet (Prelude.Maybe Prelude.Text)
updateThreatIntelSet_name :: (Maybe Text -> f (Maybe Text))
-> UpdateThreatIntelSet -> f UpdateThreatIntelSet
updateThreatIntelSet_name = (UpdateThreatIntelSet -> Maybe Text)
-> (UpdateThreatIntelSet -> Maybe Text -> UpdateThreatIntelSet)
-> Lens
     UpdateThreatIntelSet UpdateThreatIntelSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThreatIntelSet' {Maybe Text
name :: Maybe Text
$sel:name:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateThreatIntelSet
s@UpdateThreatIntelSet' {} Maybe Text
a -> UpdateThreatIntelSet
s {$sel:name:UpdateThreatIntelSet' :: Maybe Text
name = Maybe Text
a} :: UpdateThreatIntelSet)

-- | The detectorID that specifies the GuardDuty service whose ThreatIntelSet
-- you want to update.
updateThreatIntelSet_detectorId :: Lens.Lens' UpdateThreatIntelSet Prelude.Text
updateThreatIntelSet_detectorId :: (Text -> f Text) -> UpdateThreatIntelSet -> f UpdateThreatIntelSet
updateThreatIntelSet_detectorId = (UpdateThreatIntelSet -> Text)
-> (UpdateThreatIntelSet -> Text -> UpdateThreatIntelSet)
-> Lens UpdateThreatIntelSet UpdateThreatIntelSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThreatIntelSet' {Text
detectorId :: Text
$sel:detectorId:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Text
detectorId} -> Text
detectorId) (\s :: UpdateThreatIntelSet
s@UpdateThreatIntelSet' {} Text
a -> UpdateThreatIntelSet
s {$sel:detectorId:UpdateThreatIntelSet' :: Text
detectorId = Text
a} :: UpdateThreatIntelSet)

-- | The unique ID that specifies the ThreatIntelSet that you want to update.
updateThreatIntelSet_threatIntelSetId :: Lens.Lens' UpdateThreatIntelSet Prelude.Text
updateThreatIntelSet_threatIntelSetId :: (Text -> f Text) -> UpdateThreatIntelSet -> f UpdateThreatIntelSet
updateThreatIntelSet_threatIntelSetId = (UpdateThreatIntelSet -> Text)
-> (UpdateThreatIntelSet -> Text -> UpdateThreatIntelSet)
-> Lens UpdateThreatIntelSet UpdateThreatIntelSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThreatIntelSet' {Text
threatIntelSetId :: Text
$sel:threatIntelSetId:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Text
threatIntelSetId} -> Text
threatIntelSetId) (\s :: UpdateThreatIntelSet
s@UpdateThreatIntelSet' {} Text
a -> UpdateThreatIntelSet
s {$sel:threatIntelSetId:UpdateThreatIntelSet' :: Text
threatIntelSetId = Text
a} :: UpdateThreatIntelSet)

instance Core.AWSRequest UpdateThreatIntelSet where
  type
    AWSResponse UpdateThreatIntelSet =
      UpdateThreatIntelSetResponse
  request :: UpdateThreatIntelSet -> Request UpdateThreatIntelSet
request = Service -> UpdateThreatIntelSet -> Request UpdateThreatIntelSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateThreatIntelSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateThreatIntelSet)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse UpdateThreatIntelSet))
-> Logger
-> Service
-> Proxy UpdateThreatIntelSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateThreatIntelSet)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateThreatIntelSetResponse
UpdateThreatIntelSetResponse'
            (Int -> UpdateThreatIntelSetResponse)
-> Either String Int -> Either String UpdateThreatIntelSetResponse
forall (f :: * -> *) a b. Functor 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 UpdateThreatIntelSet

instance Prelude.NFData UpdateThreatIntelSet

instance Core.ToHeaders UpdateThreatIntelSet where
  toHeaders :: UpdateThreatIntelSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateThreatIntelSet -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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 UpdateThreatIntelSet where
  toJSON :: UpdateThreatIntelSet -> Value
toJSON UpdateThreatIntelSet' {Maybe Bool
Maybe Text
Text
threatIntelSetId :: Text
detectorId :: Text
name :: Maybe Text
activate :: Maybe Bool
location :: Maybe Text
$sel:threatIntelSetId:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Text
$sel:detectorId:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Text
$sel:name:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Maybe Text
$sel:activate:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Maybe Bool
$sel:location:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"location" 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
location,
            (Text
"activate" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
activate,
            (Text
"name" 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
name
          ]
      )

instance Core.ToPath UpdateThreatIntelSet where
  toPath :: UpdateThreatIntelSet -> ByteString
toPath UpdateThreatIntelSet' {Maybe Bool
Maybe Text
Text
threatIntelSetId :: Text
detectorId :: Text
name :: Maybe Text
activate :: Maybe Bool
location :: Maybe Text
$sel:threatIntelSetId:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Text
$sel:detectorId:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Text
$sel:name:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Maybe Text
$sel:activate:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Maybe Bool
$sel:location:UpdateThreatIntelSet' :: UpdateThreatIntelSet -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/detector/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
detectorId,
        ByteString
"/threatintelset/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
threatIntelSetId
      ]

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

-- | /See:/ 'newUpdateThreatIntelSetResponse' smart constructor.
data UpdateThreatIntelSetResponse = UpdateThreatIntelSetResponse'
  { -- | The response's http status code.
    UpdateThreatIntelSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateThreatIntelSetResponse
-> UpdateThreatIntelSetResponse -> Bool
(UpdateThreatIntelSetResponse
 -> UpdateThreatIntelSetResponse -> Bool)
-> (UpdateThreatIntelSetResponse
    -> UpdateThreatIntelSetResponse -> Bool)
-> Eq UpdateThreatIntelSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateThreatIntelSetResponse
-> UpdateThreatIntelSetResponse -> Bool
$c/= :: UpdateThreatIntelSetResponse
-> UpdateThreatIntelSetResponse -> Bool
== :: UpdateThreatIntelSetResponse
-> UpdateThreatIntelSetResponse -> Bool
$c== :: UpdateThreatIntelSetResponse
-> UpdateThreatIntelSetResponse -> Bool
Prelude.Eq, ReadPrec [UpdateThreatIntelSetResponse]
ReadPrec UpdateThreatIntelSetResponse
Int -> ReadS UpdateThreatIntelSetResponse
ReadS [UpdateThreatIntelSetResponse]
(Int -> ReadS UpdateThreatIntelSetResponse)
-> ReadS [UpdateThreatIntelSetResponse]
-> ReadPrec UpdateThreatIntelSetResponse
-> ReadPrec [UpdateThreatIntelSetResponse]
-> Read UpdateThreatIntelSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateThreatIntelSetResponse]
$creadListPrec :: ReadPrec [UpdateThreatIntelSetResponse]
readPrec :: ReadPrec UpdateThreatIntelSetResponse
$creadPrec :: ReadPrec UpdateThreatIntelSetResponse
readList :: ReadS [UpdateThreatIntelSetResponse]
$creadList :: ReadS [UpdateThreatIntelSetResponse]
readsPrec :: Int -> ReadS UpdateThreatIntelSetResponse
$creadsPrec :: Int -> ReadS UpdateThreatIntelSetResponse
Prelude.Read, Int -> UpdateThreatIntelSetResponse -> ShowS
[UpdateThreatIntelSetResponse] -> ShowS
UpdateThreatIntelSetResponse -> String
(Int -> UpdateThreatIntelSetResponse -> ShowS)
-> (UpdateThreatIntelSetResponse -> String)
-> ([UpdateThreatIntelSetResponse] -> ShowS)
-> Show UpdateThreatIntelSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateThreatIntelSetResponse] -> ShowS
$cshowList :: [UpdateThreatIntelSetResponse] -> ShowS
show :: UpdateThreatIntelSetResponse -> String
$cshow :: UpdateThreatIntelSetResponse -> String
showsPrec :: Int -> UpdateThreatIntelSetResponse -> ShowS
$cshowsPrec :: Int -> UpdateThreatIntelSetResponse -> ShowS
Prelude.Show, (forall x.
 UpdateThreatIntelSetResponse -> Rep UpdateThreatIntelSetResponse x)
-> (forall x.
    Rep UpdateThreatIntelSetResponse x -> UpdateThreatIntelSetResponse)
-> Generic UpdateThreatIntelSetResponse
forall x.
Rep UpdateThreatIntelSetResponse x -> UpdateThreatIntelSetResponse
forall x.
UpdateThreatIntelSetResponse -> Rep UpdateThreatIntelSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateThreatIntelSetResponse x -> UpdateThreatIntelSetResponse
$cfrom :: forall x.
UpdateThreatIntelSetResponse -> Rep UpdateThreatIntelSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateThreatIntelSetResponse' 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:
--
-- 'httpStatus', 'updateThreatIntelSetResponse_httpStatus' - The response's http status code.
newUpdateThreatIntelSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateThreatIntelSetResponse
newUpdateThreatIntelSetResponse :: Int -> UpdateThreatIntelSetResponse
newUpdateThreatIntelSetResponse Int
pHttpStatus_ =
  UpdateThreatIntelSetResponse' :: Int -> UpdateThreatIntelSetResponse
UpdateThreatIntelSetResponse'
    { $sel:httpStatus:UpdateThreatIntelSetResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance Prelude.NFData UpdateThreatIntelSetResponse