{-# 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.GetThreatIntelSet
-- 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 ThreatIntelSet that is specified by the ThreatIntelSet ID.
module Amazonka.GuardDuty.GetThreatIntelSet
  ( -- * Creating a Request
    GetThreatIntelSet (..),
    newGetThreatIntelSet,

    -- * Request Lenses
    getThreatIntelSet_detectorId,
    getThreatIntelSet_threatIntelSetId,

    -- * Destructuring the Response
    GetThreatIntelSetResponse (..),
    newGetThreatIntelSetResponse,

    -- * Response Lenses
    getThreatIntelSetResponse_tags,
    getThreatIntelSetResponse_httpStatus,
    getThreatIntelSetResponse_name,
    getThreatIntelSetResponse_format,
    getThreatIntelSetResponse_location,
    getThreatIntelSetResponse_status,
  )
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:/ 'newGetThreatIntelSet' smart constructor.
data GetThreatIntelSet = GetThreatIntelSet'
  { -- | The unique ID of the detector that the threatIntelSet is associated
    -- with.
    GetThreatIntelSet -> Text
detectorId :: Prelude.Text,
    -- | The unique ID of the threatIntelSet that you want to get.
    GetThreatIntelSet -> Text
threatIntelSetId :: Prelude.Text
  }
  deriving (GetThreatIntelSet -> GetThreatIntelSet -> Bool
(GetThreatIntelSet -> GetThreatIntelSet -> Bool)
-> (GetThreatIntelSet -> GetThreatIntelSet -> Bool)
-> Eq GetThreatIntelSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetThreatIntelSet -> GetThreatIntelSet -> Bool
$c/= :: GetThreatIntelSet -> GetThreatIntelSet -> Bool
== :: GetThreatIntelSet -> GetThreatIntelSet -> Bool
$c== :: GetThreatIntelSet -> GetThreatIntelSet -> Bool
Prelude.Eq, ReadPrec [GetThreatIntelSet]
ReadPrec GetThreatIntelSet
Int -> ReadS GetThreatIntelSet
ReadS [GetThreatIntelSet]
(Int -> ReadS GetThreatIntelSet)
-> ReadS [GetThreatIntelSet]
-> ReadPrec GetThreatIntelSet
-> ReadPrec [GetThreatIntelSet]
-> Read GetThreatIntelSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetThreatIntelSet]
$creadListPrec :: ReadPrec [GetThreatIntelSet]
readPrec :: ReadPrec GetThreatIntelSet
$creadPrec :: ReadPrec GetThreatIntelSet
readList :: ReadS [GetThreatIntelSet]
$creadList :: ReadS [GetThreatIntelSet]
readsPrec :: Int -> ReadS GetThreatIntelSet
$creadsPrec :: Int -> ReadS GetThreatIntelSet
Prelude.Read, Int -> GetThreatIntelSet -> ShowS
[GetThreatIntelSet] -> ShowS
GetThreatIntelSet -> String
(Int -> GetThreatIntelSet -> ShowS)
-> (GetThreatIntelSet -> String)
-> ([GetThreatIntelSet] -> ShowS)
-> Show GetThreatIntelSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetThreatIntelSet] -> ShowS
$cshowList :: [GetThreatIntelSet] -> ShowS
show :: GetThreatIntelSet -> String
$cshow :: GetThreatIntelSet -> String
showsPrec :: Int -> GetThreatIntelSet -> ShowS
$cshowsPrec :: Int -> GetThreatIntelSet -> ShowS
Prelude.Show, (forall x. GetThreatIntelSet -> Rep GetThreatIntelSet x)
-> (forall x. Rep GetThreatIntelSet x -> GetThreatIntelSet)
-> Generic GetThreatIntelSet
forall x. Rep GetThreatIntelSet x -> GetThreatIntelSet
forall x. GetThreatIntelSet -> Rep GetThreatIntelSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetThreatIntelSet x -> GetThreatIntelSet
$cfrom :: forall x. GetThreatIntelSet -> Rep GetThreatIntelSet x
Prelude.Generic)

-- |
-- Create a value of 'GetThreatIntelSet' 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:
--
-- 'detectorId', 'getThreatIntelSet_detectorId' - The unique ID of the detector that the threatIntelSet is associated
-- with.
--
-- 'threatIntelSetId', 'getThreatIntelSet_threatIntelSetId' - The unique ID of the threatIntelSet that you want to get.
newGetThreatIntelSet ::
  -- | 'detectorId'
  Prelude.Text ->
  -- | 'threatIntelSetId'
  Prelude.Text ->
  GetThreatIntelSet
newGetThreatIntelSet :: Text -> Text -> GetThreatIntelSet
newGetThreatIntelSet Text
pDetectorId_ Text
pThreatIntelSetId_ =
  GetThreatIntelSet' :: Text -> Text -> GetThreatIntelSet
GetThreatIntelSet'
    { $sel:detectorId:GetThreatIntelSet' :: Text
detectorId = Text
pDetectorId_,
      $sel:threatIntelSetId:GetThreatIntelSet' :: Text
threatIntelSetId = Text
pThreatIntelSetId_
    }

-- | The unique ID of the detector that the threatIntelSet is associated
-- with.
getThreatIntelSet_detectorId :: Lens.Lens' GetThreatIntelSet Prelude.Text
getThreatIntelSet_detectorId :: (Text -> f Text) -> GetThreatIntelSet -> f GetThreatIntelSet
getThreatIntelSet_detectorId = (GetThreatIntelSet -> Text)
-> (GetThreatIntelSet -> Text -> GetThreatIntelSet)
-> Lens GetThreatIntelSet GetThreatIntelSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetThreatIntelSet' {Text
detectorId :: Text
$sel:detectorId:GetThreatIntelSet' :: GetThreatIntelSet -> Text
detectorId} -> Text
detectorId) (\s :: GetThreatIntelSet
s@GetThreatIntelSet' {} Text
a -> GetThreatIntelSet
s {$sel:detectorId:GetThreatIntelSet' :: Text
detectorId = Text
a} :: GetThreatIntelSet)

-- | The unique ID of the threatIntelSet that you want to get.
getThreatIntelSet_threatIntelSetId :: Lens.Lens' GetThreatIntelSet Prelude.Text
getThreatIntelSet_threatIntelSetId :: (Text -> f Text) -> GetThreatIntelSet -> f GetThreatIntelSet
getThreatIntelSet_threatIntelSetId = (GetThreatIntelSet -> Text)
-> (GetThreatIntelSet -> Text -> GetThreatIntelSet)
-> Lens GetThreatIntelSet GetThreatIntelSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetThreatIntelSet' {Text
threatIntelSetId :: Text
$sel:threatIntelSetId:GetThreatIntelSet' :: GetThreatIntelSet -> Text
threatIntelSetId} -> Text
threatIntelSetId) (\s :: GetThreatIntelSet
s@GetThreatIntelSet' {} Text
a -> GetThreatIntelSet
s {$sel:threatIntelSetId:GetThreatIntelSet' :: Text
threatIntelSetId = Text
a} :: GetThreatIntelSet)

instance Core.AWSRequest GetThreatIntelSet where
  type
    AWSResponse GetThreatIntelSet =
      GetThreatIntelSetResponse
  request :: GetThreatIntelSet -> Request GetThreatIntelSet
request = Service -> GetThreatIntelSet -> Request GetThreatIntelSet
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetThreatIntelSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetThreatIntelSet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetThreatIntelSet))
-> Logger
-> Service
-> Proxy GetThreatIntelSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetThreatIntelSet)))
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 (HashMap Text Text)
-> Int
-> Text
-> ThreatIntelSetFormat
-> Text
-> ThreatIntelSetStatus
-> GetThreatIntelSetResponse
GetThreatIntelSetResponse'
            (Maybe (HashMap Text Text)
 -> Int
 -> Text
 -> ThreatIntelSetFormat
 -> Text
 -> ThreatIntelSetStatus
 -> GetThreatIntelSetResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Int
      -> Text
      -> ThreatIntelSetFormat
      -> Text
      -> ThreatIntelSetStatus
      -> GetThreatIntelSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Int
   -> Text
   -> ThreatIntelSetFormat
   -> Text
   -> ThreatIntelSetStatus
   -> GetThreatIntelSetResponse)
-> Either String Int
-> Either
     String
     (Text
      -> ThreatIntelSetFormat
      -> Text
      -> ThreatIntelSetStatus
      -> GetThreatIntelSetResponse)
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))
            Either
  String
  (Text
   -> ThreatIntelSetFormat
   -> Text
   -> ThreatIntelSetStatus
   -> GetThreatIntelSetResponse)
-> Either String Text
-> Either
     String
     (ThreatIntelSetFormat
      -> Text -> ThreatIntelSetStatus -> GetThreatIntelSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"name")
            Either
  String
  (ThreatIntelSetFormat
   -> Text -> ThreatIntelSetStatus -> GetThreatIntelSetResponse)
-> Either String ThreatIntelSetFormat
-> Either
     String (Text -> ThreatIntelSetStatus -> GetThreatIntelSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ThreatIntelSetFormat
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"format")
            Either
  String (Text -> ThreatIntelSetStatus -> GetThreatIntelSetResponse)
-> Either String Text
-> Either
     String (ThreatIntelSetStatus -> GetThreatIntelSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"location")
            Either String (ThreatIntelSetStatus -> GetThreatIntelSetResponse)
-> Either String ThreatIntelSetStatus
-> Either String GetThreatIntelSetResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ThreatIntelSetStatus
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"status")
      )

instance Prelude.Hashable GetThreatIntelSet

instance Prelude.NFData GetThreatIntelSet

instance Core.ToHeaders GetThreatIntelSet where
  toHeaders :: GetThreatIntelSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetThreatIntelSet -> 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.ToPath GetThreatIntelSet where
  toPath :: GetThreatIntelSet -> ByteString
toPath GetThreatIntelSet' {Text
threatIntelSetId :: Text
detectorId :: Text
$sel:threatIntelSetId:GetThreatIntelSet' :: GetThreatIntelSet -> Text
$sel:detectorId:GetThreatIntelSet' :: GetThreatIntelSet -> 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 GetThreatIntelSet where
  toQuery :: GetThreatIntelSet -> QueryString
toQuery = QueryString -> GetThreatIntelSet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetThreatIntelSetResponse' smart constructor.
data GetThreatIntelSetResponse = GetThreatIntelSetResponse'
  { -- | The tags of the threat list resource.
    GetThreatIntelSetResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    GetThreatIntelSetResponse -> Int
httpStatus :: Prelude.Int,
    -- | A user-friendly ThreatIntelSet name displayed in all findings that are
    -- generated by activity that involves IP addresses included in this
    -- ThreatIntelSet.
    GetThreatIntelSetResponse -> Text
name :: Prelude.Text,
    -- | The format of the threatIntelSet.
    GetThreatIntelSetResponse -> ThreatIntelSetFormat
format :: ThreatIntelSetFormat,
    -- | The URI of the file that contains the ThreatIntelSet. For example:
    -- https:\/\/s3.us-west-2.amazonaws.com\/my-bucket\/my-object-key.
    GetThreatIntelSetResponse -> Text
location :: Prelude.Text,
    -- | The status of threatIntelSet file uploaded.
    GetThreatIntelSetResponse -> ThreatIntelSetStatus
status :: ThreatIntelSetStatus
  }
  deriving (GetThreatIntelSetResponse -> GetThreatIntelSetResponse -> Bool
(GetThreatIntelSetResponse -> GetThreatIntelSetResponse -> Bool)
-> (GetThreatIntelSetResponse -> GetThreatIntelSetResponse -> Bool)
-> Eq GetThreatIntelSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetThreatIntelSetResponse -> GetThreatIntelSetResponse -> Bool
$c/= :: GetThreatIntelSetResponse -> GetThreatIntelSetResponse -> Bool
== :: GetThreatIntelSetResponse -> GetThreatIntelSetResponse -> Bool
$c== :: GetThreatIntelSetResponse -> GetThreatIntelSetResponse -> Bool
Prelude.Eq, ReadPrec [GetThreatIntelSetResponse]
ReadPrec GetThreatIntelSetResponse
Int -> ReadS GetThreatIntelSetResponse
ReadS [GetThreatIntelSetResponse]
(Int -> ReadS GetThreatIntelSetResponse)
-> ReadS [GetThreatIntelSetResponse]
-> ReadPrec GetThreatIntelSetResponse
-> ReadPrec [GetThreatIntelSetResponse]
-> Read GetThreatIntelSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetThreatIntelSetResponse]
$creadListPrec :: ReadPrec [GetThreatIntelSetResponse]
readPrec :: ReadPrec GetThreatIntelSetResponse
$creadPrec :: ReadPrec GetThreatIntelSetResponse
readList :: ReadS [GetThreatIntelSetResponse]
$creadList :: ReadS [GetThreatIntelSetResponse]
readsPrec :: Int -> ReadS GetThreatIntelSetResponse
$creadsPrec :: Int -> ReadS GetThreatIntelSetResponse
Prelude.Read, Int -> GetThreatIntelSetResponse -> ShowS
[GetThreatIntelSetResponse] -> ShowS
GetThreatIntelSetResponse -> String
(Int -> GetThreatIntelSetResponse -> ShowS)
-> (GetThreatIntelSetResponse -> String)
-> ([GetThreatIntelSetResponse] -> ShowS)
-> Show GetThreatIntelSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetThreatIntelSetResponse] -> ShowS
$cshowList :: [GetThreatIntelSetResponse] -> ShowS
show :: GetThreatIntelSetResponse -> String
$cshow :: GetThreatIntelSetResponse -> String
showsPrec :: Int -> GetThreatIntelSetResponse -> ShowS
$cshowsPrec :: Int -> GetThreatIntelSetResponse -> ShowS
Prelude.Show, (forall x.
 GetThreatIntelSetResponse -> Rep GetThreatIntelSetResponse x)
-> (forall x.
    Rep GetThreatIntelSetResponse x -> GetThreatIntelSetResponse)
-> Generic GetThreatIntelSetResponse
forall x.
Rep GetThreatIntelSetResponse x -> GetThreatIntelSetResponse
forall x.
GetThreatIntelSetResponse -> Rep GetThreatIntelSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetThreatIntelSetResponse x -> GetThreatIntelSetResponse
$cfrom :: forall x.
GetThreatIntelSetResponse -> Rep GetThreatIntelSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetThreatIntelSetResponse' 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:
--
-- 'tags', 'getThreatIntelSetResponse_tags' - The tags of the threat list resource.
--
-- 'httpStatus', 'getThreatIntelSetResponse_httpStatus' - The response's http status code.
--
-- 'name', 'getThreatIntelSetResponse_name' - A user-friendly ThreatIntelSet name displayed in all findings that are
-- generated by activity that involves IP addresses included in this
-- ThreatIntelSet.
--
-- 'format', 'getThreatIntelSetResponse_format' - The format of the threatIntelSet.
--
-- 'location', 'getThreatIntelSetResponse_location' - The URI of the file that contains the ThreatIntelSet. For example:
-- https:\/\/s3.us-west-2.amazonaws.com\/my-bucket\/my-object-key.
--
-- 'status', 'getThreatIntelSetResponse_status' - The status of threatIntelSet file uploaded.
newGetThreatIntelSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'name'
  Prelude.Text ->
  -- | 'format'
  ThreatIntelSetFormat ->
  -- | 'location'
  Prelude.Text ->
  -- | 'status'
  ThreatIntelSetStatus ->
  GetThreatIntelSetResponse
newGetThreatIntelSetResponse :: Int
-> Text
-> ThreatIntelSetFormat
-> Text
-> ThreatIntelSetStatus
-> GetThreatIntelSetResponse
newGetThreatIntelSetResponse
  Int
pHttpStatus_
  Text
pName_
  ThreatIntelSetFormat
pFormat_
  Text
pLocation_
  ThreatIntelSetStatus
pStatus_ =
    GetThreatIntelSetResponse' :: Maybe (HashMap Text Text)
-> Int
-> Text
-> ThreatIntelSetFormat
-> Text
-> ThreatIntelSetStatus
-> GetThreatIntelSetResponse
GetThreatIntelSetResponse'
      { $sel:tags:GetThreatIntelSetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetThreatIntelSetResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:name:GetThreatIntelSetResponse' :: Text
name = Text
pName_,
        $sel:format:GetThreatIntelSetResponse' :: ThreatIntelSetFormat
format = ThreatIntelSetFormat
pFormat_,
        $sel:location:GetThreatIntelSetResponse' :: Text
location = Text
pLocation_,
        $sel:status:GetThreatIntelSetResponse' :: ThreatIntelSetStatus
status = ThreatIntelSetStatus
pStatus_
      }

-- | The tags of the threat list resource.
getThreatIntelSetResponse_tags :: Lens.Lens' GetThreatIntelSetResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getThreatIntelSetResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetThreatIntelSetResponse -> f GetThreatIntelSetResponse
getThreatIntelSetResponse_tags = (GetThreatIntelSetResponse -> Maybe (HashMap Text Text))
-> (GetThreatIntelSetResponse
    -> Maybe (HashMap Text Text) -> GetThreatIntelSetResponse)
-> Lens
     GetThreatIntelSetResponse
     GetThreatIntelSetResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetThreatIntelSetResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetThreatIntelSetResponse' :: GetThreatIntelSetResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetThreatIntelSetResponse
s@GetThreatIntelSetResponse' {} Maybe (HashMap Text Text)
a -> GetThreatIntelSetResponse
s {$sel:tags:GetThreatIntelSetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetThreatIntelSetResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetThreatIntelSetResponse -> f GetThreatIntelSetResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetThreatIntelSetResponse
-> f GetThreatIntelSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | A user-friendly ThreatIntelSet name displayed in all findings that are
-- generated by activity that involves IP addresses included in this
-- ThreatIntelSet.
getThreatIntelSetResponse_name :: Lens.Lens' GetThreatIntelSetResponse Prelude.Text
getThreatIntelSetResponse_name :: (Text -> f Text)
-> GetThreatIntelSetResponse -> f GetThreatIntelSetResponse
getThreatIntelSetResponse_name = (GetThreatIntelSetResponse -> Text)
-> (GetThreatIntelSetResponse -> Text -> GetThreatIntelSetResponse)
-> Lens
     GetThreatIntelSetResponse GetThreatIntelSetResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetThreatIntelSetResponse' {Text
name :: Text
$sel:name:GetThreatIntelSetResponse' :: GetThreatIntelSetResponse -> Text
name} -> Text
name) (\s :: GetThreatIntelSetResponse
s@GetThreatIntelSetResponse' {} Text
a -> GetThreatIntelSetResponse
s {$sel:name:GetThreatIntelSetResponse' :: Text
name = Text
a} :: GetThreatIntelSetResponse)

-- | The format of the threatIntelSet.
getThreatIntelSetResponse_format :: Lens.Lens' GetThreatIntelSetResponse ThreatIntelSetFormat
getThreatIntelSetResponse_format :: (ThreatIntelSetFormat -> f ThreatIntelSetFormat)
-> GetThreatIntelSetResponse -> f GetThreatIntelSetResponse
getThreatIntelSetResponse_format = (GetThreatIntelSetResponse -> ThreatIntelSetFormat)
-> (GetThreatIntelSetResponse
    -> ThreatIntelSetFormat -> GetThreatIntelSetResponse)
-> Lens
     GetThreatIntelSetResponse
     GetThreatIntelSetResponse
     ThreatIntelSetFormat
     ThreatIntelSetFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetThreatIntelSetResponse' {ThreatIntelSetFormat
format :: ThreatIntelSetFormat
$sel:format:GetThreatIntelSetResponse' :: GetThreatIntelSetResponse -> ThreatIntelSetFormat
format} -> ThreatIntelSetFormat
format) (\s :: GetThreatIntelSetResponse
s@GetThreatIntelSetResponse' {} ThreatIntelSetFormat
a -> GetThreatIntelSetResponse
s {$sel:format:GetThreatIntelSetResponse' :: ThreatIntelSetFormat
format = ThreatIntelSetFormat
a} :: GetThreatIntelSetResponse)

-- | The URI of the file that contains the ThreatIntelSet. For example:
-- https:\/\/s3.us-west-2.amazonaws.com\/my-bucket\/my-object-key.
getThreatIntelSetResponse_location :: Lens.Lens' GetThreatIntelSetResponse Prelude.Text
getThreatIntelSetResponse_location :: (Text -> f Text)
-> GetThreatIntelSetResponse -> f GetThreatIntelSetResponse
getThreatIntelSetResponse_location = (GetThreatIntelSetResponse -> Text)
-> (GetThreatIntelSetResponse -> Text -> GetThreatIntelSetResponse)
-> Lens
     GetThreatIntelSetResponse GetThreatIntelSetResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetThreatIntelSetResponse' {Text
location :: Text
$sel:location:GetThreatIntelSetResponse' :: GetThreatIntelSetResponse -> Text
location} -> Text
location) (\s :: GetThreatIntelSetResponse
s@GetThreatIntelSetResponse' {} Text
a -> GetThreatIntelSetResponse
s {$sel:location:GetThreatIntelSetResponse' :: Text
location = Text
a} :: GetThreatIntelSetResponse)

-- | The status of threatIntelSet file uploaded.
getThreatIntelSetResponse_status :: Lens.Lens' GetThreatIntelSetResponse ThreatIntelSetStatus
getThreatIntelSetResponse_status :: (ThreatIntelSetStatus -> f ThreatIntelSetStatus)
-> GetThreatIntelSetResponse -> f GetThreatIntelSetResponse
getThreatIntelSetResponse_status = (GetThreatIntelSetResponse -> ThreatIntelSetStatus)
-> (GetThreatIntelSetResponse
    -> ThreatIntelSetStatus -> GetThreatIntelSetResponse)
-> Lens
     GetThreatIntelSetResponse
     GetThreatIntelSetResponse
     ThreatIntelSetStatus
     ThreatIntelSetStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetThreatIntelSetResponse' {ThreatIntelSetStatus
status :: ThreatIntelSetStatus
$sel:status:GetThreatIntelSetResponse' :: GetThreatIntelSetResponse -> ThreatIntelSetStatus
status} -> ThreatIntelSetStatus
status) (\s :: GetThreatIntelSetResponse
s@GetThreatIntelSetResponse' {} ThreatIntelSetStatus
a -> GetThreatIntelSetResponse
s {$sel:status:GetThreatIntelSetResponse' :: ThreatIntelSetStatus
status = ThreatIntelSetStatus
a} :: GetThreatIntelSetResponse)

instance Prelude.NFData GetThreatIntelSetResponse