{-# 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.CloudTrail.GetInsightSelectors
-- 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)
--
-- Describes the settings for the Insights event selectors that you
-- configured for your trail. @GetInsightSelectors@ shows if CloudTrail
-- Insights event logging is enabled on the trail, and if it is, which
-- insight types are enabled. If you run @GetInsightSelectors@ on a trail
-- that does not have Insights events enabled, the operation throws the
-- exception @InsightNotEnabledException@
--
-- For more information, see
-- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html Logging CloudTrail Insights Events for Trails>
-- in the /CloudTrail User Guide/.
module Amazonka.CloudTrail.GetInsightSelectors
  ( -- * Creating a Request
    GetInsightSelectors (..),
    newGetInsightSelectors,

    -- * Request Lenses
    getInsightSelectors_trailName,

    -- * Destructuring the Response
    GetInsightSelectorsResponse (..),
    newGetInsightSelectorsResponse,

    -- * Response Lenses
    getInsightSelectorsResponse_trailARN,
    getInsightSelectorsResponse_insightSelectors,
    getInsightSelectorsResponse_httpStatus,
  )
where

import Amazonka.CloudTrail.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetInsightSelectors' smart constructor.
data GetInsightSelectors = GetInsightSelectors'
  { -- | Specifies the name of the trail or trail ARN. If you specify a trail
    -- name, the string must meet the following requirements:
    --
    -- -   Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
    --     underscores (_), or dashes (-)
    --
    -- -   Start with a letter or number, and end with a letter or number
    --
    -- -   Be between 3 and 128 characters
    --
    -- -   Have no adjacent periods, underscores or dashes. Names like
    --     @my-_namespace@ and @my--namespace@ are not valid.
    --
    -- -   Not be in IP address format (for example, 192.168.5.4)
    --
    -- If you specify a trail ARN, it must be in the format:
    --
    -- @arn:aws:cloudtrail:us-east-2:123456789012:trail\/MyTrail@
    GetInsightSelectors -> Text
trailName :: Prelude.Text
  }
  deriving (GetInsightSelectors -> GetInsightSelectors -> Bool
(GetInsightSelectors -> GetInsightSelectors -> Bool)
-> (GetInsightSelectors -> GetInsightSelectors -> Bool)
-> Eq GetInsightSelectors
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetInsightSelectors -> GetInsightSelectors -> Bool
$c/= :: GetInsightSelectors -> GetInsightSelectors -> Bool
== :: GetInsightSelectors -> GetInsightSelectors -> Bool
$c== :: GetInsightSelectors -> GetInsightSelectors -> Bool
Prelude.Eq, ReadPrec [GetInsightSelectors]
ReadPrec GetInsightSelectors
Int -> ReadS GetInsightSelectors
ReadS [GetInsightSelectors]
(Int -> ReadS GetInsightSelectors)
-> ReadS [GetInsightSelectors]
-> ReadPrec GetInsightSelectors
-> ReadPrec [GetInsightSelectors]
-> Read GetInsightSelectors
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetInsightSelectors]
$creadListPrec :: ReadPrec [GetInsightSelectors]
readPrec :: ReadPrec GetInsightSelectors
$creadPrec :: ReadPrec GetInsightSelectors
readList :: ReadS [GetInsightSelectors]
$creadList :: ReadS [GetInsightSelectors]
readsPrec :: Int -> ReadS GetInsightSelectors
$creadsPrec :: Int -> ReadS GetInsightSelectors
Prelude.Read, Int -> GetInsightSelectors -> ShowS
[GetInsightSelectors] -> ShowS
GetInsightSelectors -> String
(Int -> GetInsightSelectors -> ShowS)
-> (GetInsightSelectors -> String)
-> ([GetInsightSelectors] -> ShowS)
-> Show GetInsightSelectors
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetInsightSelectors] -> ShowS
$cshowList :: [GetInsightSelectors] -> ShowS
show :: GetInsightSelectors -> String
$cshow :: GetInsightSelectors -> String
showsPrec :: Int -> GetInsightSelectors -> ShowS
$cshowsPrec :: Int -> GetInsightSelectors -> ShowS
Prelude.Show, (forall x. GetInsightSelectors -> Rep GetInsightSelectors x)
-> (forall x. Rep GetInsightSelectors x -> GetInsightSelectors)
-> Generic GetInsightSelectors
forall x. Rep GetInsightSelectors x -> GetInsightSelectors
forall x. GetInsightSelectors -> Rep GetInsightSelectors x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetInsightSelectors x -> GetInsightSelectors
$cfrom :: forall x. GetInsightSelectors -> Rep GetInsightSelectors x
Prelude.Generic)

-- |
-- Create a value of 'GetInsightSelectors' 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:
--
-- 'trailName', 'getInsightSelectors_trailName' - Specifies the name of the trail or trail ARN. If you specify a trail
-- name, the string must meet the following requirements:
--
-- -   Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
--     underscores (_), or dashes (-)
--
-- -   Start with a letter or number, and end with a letter or number
--
-- -   Be between 3 and 128 characters
--
-- -   Have no adjacent periods, underscores or dashes. Names like
--     @my-_namespace@ and @my--namespace@ are not valid.
--
-- -   Not be in IP address format (for example, 192.168.5.4)
--
-- If you specify a trail ARN, it must be in the format:
--
-- @arn:aws:cloudtrail:us-east-2:123456789012:trail\/MyTrail@
newGetInsightSelectors ::
  -- | 'trailName'
  Prelude.Text ->
  GetInsightSelectors
newGetInsightSelectors :: Text -> GetInsightSelectors
newGetInsightSelectors Text
pTrailName_ =
  GetInsightSelectors' :: Text -> GetInsightSelectors
GetInsightSelectors' {$sel:trailName:GetInsightSelectors' :: Text
trailName = Text
pTrailName_}

-- | Specifies the name of the trail or trail ARN. If you specify a trail
-- name, the string must meet the following requirements:
--
-- -   Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
--     underscores (_), or dashes (-)
--
-- -   Start with a letter or number, and end with a letter or number
--
-- -   Be between 3 and 128 characters
--
-- -   Have no adjacent periods, underscores or dashes. Names like
--     @my-_namespace@ and @my--namespace@ are not valid.
--
-- -   Not be in IP address format (for example, 192.168.5.4)
--
-- If you specify a trail ARN, it must be in the format:
--
-- @arn:aws:cloudtrail:us-east-2:123456789012:trail\/MyTrail@
getInsightSelectors_trailName :: Lens.Lens' GetInsightSelectors Prelude.Text
getInsightSelectors_trailName :: (Text -> f Text) -> GetInsightSelectors -> f GetInsightSelectors
getInsightSelectors_trailName = (GetInsightSelectors -> Text)
-> (GetInsightSelectors -> Text -> GetInsightSelectors)
-> Lens GetInsightSelectors GetInsightSelectors Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightSelectors' {Text
trailName :: Text
$sel:trailName:GetInsightSelectors' :: GetInsightSelectors -> Text
trailName} -> Text
trailName) (\s :: GetInsightSelectors
s@GetInsightSelectors' {} Text
a -> GetInsightSelectors
s {$sel:trailName:GetInsightSelectors' :: Text
trailName = Text
a} :: GetInsightSelectors)

instance Core.AWSRequest GetInsightSelectors where
  type
    AWSResponse GetInsightSelectors =
      GetInsightSelectorsResponse
  request :: GetInsightSelectors -> Request GetInsightSelectors
request = Service -> GetInsightSelectors -> Request GetInsightSelectors
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetInsightSelectors
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetInsightSelectors)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetInsightSelectors))
-> Logger
-> Service
-> Proxy GetInsightSelectors
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetInsightSelectors)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [InsightSelector] -> Int -> GetInsightSelectorsResponse
GetInsightSelectorsResponse'
            (Maybe Text
 -> Maybe [InsightSelector] -> Int -> GetInsightSelectorsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [InsightSelector] -> Int -> GetInsightSelectorsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TrailARN")
            Either
  String
  (Maybe [InsightSelector] -> Int -> GetInsightSelectorsResponse)
-> Either String (Maybe [InsightSelector])
-> Either String (Int -> GetInsightSelectorsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [InsightSelector]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"InsightSelectors"
                            Either String (Maybe (Maybe [InsightSelector]))
-> Maybe [InsightSelector]
-> Either String (Maybe [InsightSelector])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [InsightSelector]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> GetInsightSelectorsResponse)
-> Either String Int -> Either String GetInsightSelectorsResponse
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 GetInsightSelectors

instance Prelude.NFData GetInsightSelectors

instance Core.ToHeaders GetInsightSelectors where
  toHeaders :: GetInsightSelectors -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetInsightSelectors -> 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
"com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.GetInsightSelectors" ::
                          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 GetInsightSelectors where
  toJSON :: GetInsightSelectors -> Value
toJSON GetInsightSelectors' {Text
trailName :: Text
$sel:trailName:GetInsightSelectors' :: GetInsightSelectors -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TrailName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
trailName)]
      )

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

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

-- | /See:/ 'newGetInsightSelectorsResponse' smart constructor.
data GetInsightSelectorsResponse = GetInsightSelectorsResponse'
  { -- | The Amazon Resource Name (ARN) of a trail for which you want to get
    -- Insights selectors.
    GetInsightSelectorsResponse -> Maybe Text
trailARN :: Prelude.Maybe Prelude.Text,
    -- | A JSON string that contains the insight types you want to log on a
    -- trail. In this release, only @ApiCallRateInsight@ is supported as an
    -- insight type.
    GetInsightSelectorsResponse -> Maybe [InsightSelector]
insightSelectors :: Prelude.Maybe [InsightSelector],
    -- | The response's http status code.
    GetInsightSelectorsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetInsightSelectorsResponse -> GetInsightSelectorsResponse -> Bool
(GetInsightSelectorsResponse
 -> GetInsightSelectorsResponse -> Bool)
-> (GetInsightSelectorsResponse
    -> GetInsightSelectorsResponse -> Bool)
-> Eq GetInsightSelectorsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetInsightSelectorsResponse -> GetInsightSelectorsResponse -> Bool
$c/= :: GetInsightSelectorsResponse -> GetInsightSelectorsResponse -> Bool
== :: GetInsightSelectorsResponse -> GetInsightSelectorsResponse -> Bool
$c== :: GetInsightSelectorsResponse -> GetInsightSelectorsResponse -> Bool
Prelude.Eq, ReadPrec [GetInsightSelectorsResponse]
ReadPrec GetInsightSelectorsResponse
Int -> ReadS GetInsightSelectorsResponse
ReadS [GetInsightSelectorsResponse]
(Int -> ReadS GetInsightSelectorsResponse)
-> ReadS [GetInsightSelectorsResponse]
-> ReadPrec GetInsightSelectorsResponse
-> ReadPrec [GetInsightSelectorsResponse]
-> Read GetInsightSelectorsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetInsightSelectorsResponse]
$creadListPrec :: ReadPrec [GetInsightSelectorsResponse]
readPrec :: ReadPrec GetInsightSelectorsResponse
$creadPrec :: ReadPrec GetInsightSelectorsResponse
readList :: ReadS [GetInsightSelectorsResponse]
$creadList :: ReadS [GetInsightSelectorsResponse]
readsPrec :: Int -> ReadS GetInsightSelectorsResponse
$creadsPrec :: Int -> ReadS GetInsightSelectorsResponse
Prelude.Read, Int -> GetInsightSelectorsResponse -> ShowS
[GetInsightSelectorsResponse] -> ShowS
GetInsightSelectorsResponse -> String
(Int -> GetInsightSelectorsResponse -> ShowS)
-> (GetInsightSelectorsResponse -> String)
-> ([GetInsightSelectorsResponse] -> ShowS)
-> Show GetInsightSelectorsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetInsightSelectorsResponse] -> ShowS
$cshowList :: [GetInsightSelectorsResponse] -> ShowS
show :: GetInsightSelectorsResponse -> String
$cshow :: GetInsightSelectorsResponse -> String
showsPrec :: Int -> GetInsightSelectorsResponse -> ShowS
$cshowsPrec :: Int -> GetInsightSelectorsResponse -> ShowS
Prelude.Show, (forall x.
 GetInsightSelectorsResponse -> Rep GetInsightSelectorsResponse x)
-> (forall x.
    Rep GetInsightSelectorsResponse x -> GetInsightSelectorsResponse)
-> Generic GetInsightSelectorsResponse
forall x.
Rep GetInsightSelectorsResponse x -> GetInsightSelectorsResponse
forall x.
GetInsightSelectorsResponse -> Rep GetInsightSelectorsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetInsightSelectorsResponse x -> GetInsightSelectorsResponse
$cfrom :: forall x.
GetInsightSelectorsResponse -> Rep GetInsightSelectorsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetInsightSelectorsResponse' 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:
--
-- 'trailARN', 'getInsightSelectorsResponse_trailARN' - The Amazon Resource Name (ARN) of a trail for which you want to get
-- Insights selectors.
--
-- 'insightSelectors', 'getInsightSelectorsResponse_insightSelectors' - A JSON string that contains the insight types you want to log on a
-- trail. In this release, only @ApiCallRateInsight@ is supported as an
-- insight type.
--
-- 'httpStatus', 'getInsightSelectorsResponse_httpStatus' - The response's http status code.
newGetInsightSelectorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetInsightSelectorsResponse
newGetInsightSelectorsResponse :: Int -> GetInsightSelectorsResponse
newGetInsightSelectorsResponse Int
pHttpStatus_ =
  GetInsightSelectorsResponse' :: Maybe Text
-> Maybe [InsightSelector] -> Int -> GetInsightSelectorsResponse
GetInsightSelectorsResponse'
    { $sel:trailARN:GetInsightSelectorsResponse' :: Maybe Text
trailARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:insightSelectors:GetInsightSelectorsResponse' :: Maybe [InsightSelector]
insightSelectors = Maybe [InsightSelector]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetInsightSelectorsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of a trail for which you want to get
-- Insights selectors.
getInsightSelectorsResponse_trailARN :: Lens.Lens' GetInsightSelectorsResponse (Prelude.Maybe Prelude.Text)
getInsightSelectorsResponse_trailARN :: (Maybe Text -> f (Maybe Text))
-> GetInsightSelectorsResponse -> f GetInsightSelectorsResponse
getInsightSelectorsResponse_trailARN = (GetInsightSelectorsResponse -> Maybe Text)
-> (GetInsightSelectorsResponse
    -> Maybe Text -> GetInsightSelectorsResponse)
-> Lens
     GetInsightSelectorsResponse
     GetInsightSelectorsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightSelectorsResponse' {Maybe Text
trailARN :: Maybe Text
$sel:trailARN:GetInsightSelectorsResponse' :: GetInsightSelectorsResponse -> Maybe Text
trailARN} -> Maybe Text
trailARN) (\s :: GetInsightSelectorsResponse
s@GetInsightSelectorsResponse' {} Maybe Text
a -> GetInsightSelectorsResponse
s {$sel:trailARN:GetInsightSelectorsResponse' :: Maybe Text
trailARN = Maybe Text
a} :: GetInsightSelectorsResponse)

-- | A JSON string that contains the insight types you want to log on a
-- trail. In this release, only @ApiCallRateInsight@ is supported as an
-- insight type.
getInsightSelectorsResponse_insightSelectors :: Lens.Lens' GetInsightSelectorsResponse (Prelude.Maybe [InsightSelector])
getInsightSelectorsResponse_insightSelectors :: (Maybe [InsightSelector] -> f (Maybe [InsightSelector]))
-> GetInsightSelectorsResponse -> f GetInsightSelectorsResponse
getInsightSelectorsResponse_insightSelectors = (GetInsightSelectorsResponse -> Maybe [InsightSelector])
-> (GetInsightSelectorsResponse
    -> Maybe [InsightSelector] -> GetInsightSelectorsResponse)
-> Lens
     GetInsightSelectorsResponse
     GetInsightSelectorsResponse
     (Maybe [InsightSelector])
     (Maybe [InsightSelector])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightSelectorsResponse' {Maybe [InsightSelector]
insightSelectors :: Maybe [InsightSelector]
$sel:insightSelectors:GetInsightSelectorsResponse' :: GetInsightSelectorsResponse -> Maybe [InsightSelector]
insightSelectors} -> Maybe [InsightSelector]
insightSelectors) (\s :: GetInsightSelectorsResponse
s@GetInsightSelectorsResponse' {} Maybe [InsightSelector]
a -> GetInsightSelectorsResponse
s {$sel:insightSelectors:GetInsightSelectorsResponse' :: Maybe [InsightSelector]
insightSelectors = Maybe [InsightSelector]
a} :: GetInsightSelectorsResponse) ((Maybe [InsightSelector] -> f (Maybe [InsightSelector]))
 -> GetInsightSelectorsResponse -> f GetInsightSelectorsResponse)
-> ((Maybe [InsightSelector] -> f (Maybe [InsightSelector]))
    -> Maybe [InsightSelector] -> f (Maybe [InsightSelector]))
-> (Maybe [InsightSelector] -> f (Maybe [InsightSelector]))
-> GetInsightSelectorsResponse
-> f GetInsightSelectorsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InsightSelector]
  [InsightSelector]
  [InsightSelector]
  [InsightSelector]
-> Iso
     (Maybe [InsightSelector])
     (Maybe [InsightSelector])
     (Maybe [InsightSelector])
     (Maybe [InsightSelector])
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
  [InsightSelector]
  [InsightSelector]
  [InsightSelector]
  [InsightSelector]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetInsightSelectorsResponse