{-# 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.PutInsightSelectors
-- 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)
--
-- Lets you enable Insights event logging by specifying the Insights
-- selectors that you want to enable on an existing trail. You also use
-- @PutInsightSelectors@ to turn off Insights event logging, by passing an
-- empty list of insight types. The valid Insights event type in this
-- release is @ApiCallRateInsight@.
module Amazonka.CloudTrail.PutInsightSelectors
  ( -- * Creating a Request
    PutInsightSelectors (..),
    newPutInsightSelectors,

    -- * Request Lenses
    putInsightSelectors_trailName,
    putInsightSelectors_insightSelectors,

    -- * Destructuring the Response
    PutInsightSelectorsResponse (..),
    newPutInsightSelectorsResponse,

    -- * Response Lenses
    putInsightSelectorsResponse_trailARN,
    putInsightSelectorsResponse_insightSelectors,
    putInsightSelectorsResponse_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:/ 'newPutInsightSelectors' smart constructor.
data PutInsightSelectors = PutInsightSelectors'
  { -- | The name of the CloudTrail trail for which you want to change or add
    -- Insights selectors.
    PutInsightSelectors -> Text
trailName :: Prelude.Text,
    -- | A JSON string that contains the Insights types that you want to log on a
    -- trail. The valid Insights type in this release is @ApiCallRateInsight@.
    PutInsightSelectors -> [InsightSelector]
insightSelectors :: [InsightSelector]
  }
  deriving (PutInsightSelectors -> PutInsightSelectors -> Bool
(PutInsightSelectors -> PutInsightSelectors -> Bool)
-> (PutInsightSelectors -> PutInsightSelectors -> Bool)
-> Eq PutInsightSelectors
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutInsightSelectors -> PutInsightSelectors -> Bool
$c/= :: PutInsightSelectors -> PutInsightSelectors -> Bool
== :: PutInsightSelectors -> PutInsightSelectors -> Bool
$c== :: PutInsightSelectors -> PutInsightSelectors -> Bool
Prelude.Eq, ReadPrec [PutInsightSelectors]
ReadPrec PutInsightSelectors
Int -> ReadS PutInsightSelectors
ReadS [PutInsightSelectors]
(Int -> ReadS PutInsightSelectors)
-> ReadS [PutInsightSelectors]
-> ReadPrec PutInsightSelectors
-> ReadPrec [PutInsightSelectors]
-> Read PutInsightSelectors
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutInsightSelectors]
$creadListPrec :: ReadPrec [PutInsightSelectors]
readPrec :: ReadPrec PutInsightSelectors
$creadPrec :: ReadPrec PutInsightSelectors
readList :: ReadS [PutInsightSelectors]
$creadList :: ReadS [PutInsightSelectors]
readsPrec :: Int -> ReadS PutInsightSelectors
$creadsPrec :: Int -> ReadS PutInsightSelectors
Prelude.Read, Int -> PutInsightSelectors -> ShowS
[PutInsightSelectors] -> ShowS
PutInsightSelectors -> String
(Int -> PutInsightSelectors -> ShowS)
-> (PutInsightSelectors -> String)
-> ([PutInsightSelectors] -> ShowS)
-> Show PutInsightSelectors
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutInsightSelectors] -> ShowS
$cshowList :: [PutInsightSelectors] -> ShowS
show :: PutInsightSelectors -> String
$cshow :: PutInsightSelectors -> String
showsPrec :: Int -> PutInsightSelectors -> ShowS
$cshowsPrec :: Int -> PutInsightSelectors -> ShowS
Prelude.Show, (forall x. PutInsightSelectors -> Rep PutInsightSelectors x)
-> (forall x. Rep PutInsightSelectors x -> PutInsightSelectors)
-> Generic PutInsightSelectors
forall x. Rep PutInsightSelectors x -> PutInsightSelectors
forall x. PutInsightSelectors -> Rep PutInsightSelectors x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutInsightSelectors x -> PutInsightSelectors
$cfrom :: forall x. PutInsightSelectors -> Rep PutInsightSelectors x
Prelude.Generic)

-- |
-- Create a value of 'PutInsightSelectors' 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', 'putInsightSelectors_trailName' - The name of the CloudTrail trail for which you want to change or add
-- Insights selectors.
--
-- 'insightSelectors', 'putInsightSelectors_insightSelectors' - A JSON string that contains the Insights types that you want to log on a
-- trail. The valid Insights type in this release is @ApiCallRateInsight@.
newPutInsightSelectors ::
  -- | 'trailName'
  Prelude.Text ->
  PutInsightSelectors
newPutInsightSelectors :: Text -> PutInsightSelectors
newPutInsightSelectors Text
pTrailName_ =
  PutInsightSelectors' :: Text -> [InsightSelector] -> PutInsightSelectors
PutInsightSelectors'
    { $sel:trailName:PutInsightSelectors' :: Text
trailName = Text
pTrailName_,
      $sel:insightSelectors:PutInsightSelectors' :: [InsightSelector]
insightSelectors = [InsightSelector]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The name of the CloudTrail trail for which you want to change or add
-- Insights selectors.
putInsightSelectors_trailName :: Lens.Lens' PutInsightSelectors Prelude.Text
putInsightSelectors_trailName :: (Text -> f Text) -> PutInsightSelectors -> f PutInsightSelectors
putInsightSelectors_trailName = (PutInsightSelectors -> Text)
-> (PutInsightSelectors -> Text -> PutInsightSelectors)
-> Lens PutInsightSelectors PutInsightSelectors Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutInsightSelectors' {Text
trailName :: Text
$sel:trailName:PutInsightSelectors' :: PutInsightSelectors -> Text
trailName} -> Text
trailName) (\s :: PutInsightSelectors
s@PutInsightSelectors' {} Text
a -> PutInsightSelectors
s {$sel:trailName:PutInsightSelectors' :: Text
trailName = Text
a} :: PutInsightSelectors)

-- | A JSON string that contains the Insights types that you want to log on a
-- trail. The valid Insights type in this release is @ApiCallRateInsight@.
putInsightSelectors_insightSelectors :: Lens.Lens' PutInsightSelectors [InsightSelector]
putInsightSelectors_insightSelectors :: ([InsightSelector] -> f [InsightSelector])
-> PutInsightSelectors -> f PutInsightSelectors
putInsightSelectors_insightSelectors = (PutInsightSelectors -> [InsightSelector])
-> (PutInsightSelectors
    -> [InsightSelector] -> PutInsightSelectors)
-> Lens
     PutInsightSelectors
     PutInsightSelectors
     [InsightSelector]
     [InsightSelector]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutInsightSelectors' {[InsightSelector]
insightSelectors :: [InsightSelector]
$sel:insightSelectors:PutInsightSelectors' :: PutInsightSelectors -> [InsightSelector]
insightSelectors} -> [InsightSelector]
insightSelectors) (\s :: PutInsightSelectors
s@PutInsightSelectors' {} [InsightSelector]
a -> PutInsightSelectors
s {$sel:insightSelectors:PutInsightSelectors' :: [InsightSelector]
insightSelectors = [InsightSelector]
a} :: PutInsightSelectors) (([InsightSelector] -> f [InsightSelector])
 -> PutInsightSelectors -> f PutInsightSelectors)
-> (([InsightSelector] -> f [InsightSelector])
    -> [InsightSelector] -> f [InsightSelector])
-> ([InsightSelector] -> f [InsightSelector])
-> PutInsightSelectors
-> f PutInsightSelectors
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([InsightSelector] -> f [InsightSelector])
-> [InsightSelector] -> f [InsightSelector]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest PutInsightSelectors where
  type
    AWSResponse PutInsightSelectors =
      PutInsightSelectorsResponse
  request :: PutInsightSelectors -> Request PutInsightSelectors
request = Service -> PutInsightSelectors -> Request PutInsightSelectors
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutInsightSelectors
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutInsightSelectors)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse PutInsightSelectors))
-> Logger
-> Service
-> Proxy PutInsightSelectors
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutInsightSelectors)))
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 -> PutInsightSelectorsResponse
PutInsightSelectorsResponse'
            (Maybe Text
 -> Maybe [InsightSelector] -> Int -> PutInsightSelectorsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [InsightSelector] -> Int -> PutInsightSelectorsResponse)
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 -> PutInsightSelectorsResponse)
-> Either String (Maybe [InsightSelector])
-> Either String (Int -> PutInsightSelectorsResponse)
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 -> PutInsightSelectorsResponse)
-> Either String Int -> Either String PutInsightSelectorsResponse
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 PutInsightSelectors

instance Prelude.NFData PutInsightSelectors

instance Core.ToHeaders PutInsightSelectors where
  toHeaders :: PutInsightSelectors -> ResponseHeaders
toHeaders =
    ResponseHeaders -> PutInsightSelectors -> 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.PutInsightSelectors" ::
                          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 PutInsightSelectors where
  toJSON :: PutInsightSelectors -> Value
toJSON PutInsightSelectors' {[InsightSelector]
Text
insightSelectors :: [InsightSelector]
trailName :: Text
$sel:insightSelectors:PutInsightSelectors' :: PutInsightSelectors -> [InsightSelector]
$sel:trailName:PutInsightSelectors' :: PutInsightSelectors -> 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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"InsightSelectors" Text -> [InsightSelector] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [InsightSelector]
insightSelectors)
          ]
      )

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

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

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

-- |
-- Create a value of 'PutInsightSelectorsResponse' 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', 'putInsightSelectorsResponse_trailARN' - The Amazon Resource Name (ARN) of a trail for which you want to change
-- or add Insights selectors.
--
-- 'insightSelectors', 'putInsightSelectorsResponse_insightSelectors' - A JSON string that contains the Insights event types that you want to
-- log on a trail. The valid Insights type in this release is
-- @ApiCallRateInsight@.
--
-- 'httpStatus', 'putInsightSelectorsResponse_httpStatus' - The response's http status code.
newPutInsightSelectorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutInsightSelectorsResponse
newPutInsightSelectorsResponse :: Int -> PutInsightSelectorsResponse
newPutInsightSelectorsResponse Int
pHttpStatus_ =
  PutInsightSelectorsResponse' :: Maybe Text
-> Maybe [InsightSelector] -> Int -> PutInsightSelectorsResponse
PutInsightSelectorsResponse'
    { $sel:trailARN:PutInsightSelectorsResponse' :: Maybe Text
trailARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:insightSelectors:PutInsightSelectorsResponse' :: Maybe [InsightSelector]
insightSelectors = Maybe [InsightSelector]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutInsightSelectorsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | A JSON string that contains the Insights event types that you want to
-- log on a trail. The valid Insights type in this release is
-- @ApiCallRateInsight@.
putInsightSelectorsResponse_insightSelectors :: Lens.Lens' PutInsightSelectorsResponse (Prelude.Maybe [InsightSelector])
putInsightSelectorsResponse_insightSelectors :: (Maybe [InsightSelector] -> f (Maybe [InsightSelector]))
-> PutInsightSelectorsResponse -> f PutInsightSelectorsResponse
putInsightSelectorsResponse_insightSelectors = (PutInsightSelectorsResponse -> Maybe [InsightSelector])
-> (PutInsightSelectorsResponse
    -> Maybe [InsightSelector] -> PutInsightSelectorsResponse)
-> Lens
     PutInsightSelectorsResponse
     PutInsightSelectorsResponse
     (Maybe [InsightSelector])
     (Maybe [InsightSelector])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutInsightSelectorsResponse' {Maybe [InsightSelector]
insightSelectors :: Maybe [InsightSelector]
$sel:insightSelectors:PutInsightSelectorsResponse' :: PutInsightSelectorsResponse -> Maybe [InsightSelector]
insightSelectors} -> Maybe [InsightSelector]
insightSelectors) (\s :: PutInsightSelectorsResponse
s@PutInsightSelectorsResponse' {} Maybe [InsightSelector]
a -> PutInsightSelectorsResponse
s {$sel:insightSelectors:PutInsightSelectorsResponse' :: Maybe [InsightSelector]
insightSelectors = Maybe [InsightSelector]
a} :: PutInsightSelectorsResponse) ((Maybe [InsightSelector] -> f (Maybe [InsightSelector]))
 -> PutInsightSelectorsResponse -> f PutInsightSelectorsResponse)
-> ((Maybe [InsightSelector] -> f (Maybe [InsightSelector]))
    -> Maybe [InsightSelector] -> f (Maybe [InsightSelector]))
-> (Maybe [InsightSelector] -> f (Maybe [InsightSelector]))
-> PutInsightSelectorsResponse
-> f PutInsightSelectorsResponse
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.
putInsightSelectorsResponse_httpStatus :: Lens.Lens' PutInsightSelectorsResponse Prelude.Int
putInsightSelectorsResponse_httpStatus :: (Int -> f Int)
-> PutInsightSelectorsResponse -> f PutInsightSelectorsResponse
putInsightSelectorsResponse_httpStatus = (PutInsightSelectorsResponse -> Int)
-> (PutInsightSelectorsResponse
    -> Int -> PutInsightSelectorsResponse)
-> Lens
     PutInsightSelectorsResponse PutInsightSelectorsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutInsightSelectorsResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutInsightSelectorsResponse' :: PutInsightSelectorsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutInsightSelectorsResponse
s@PutInsightSelectorsResponse' {} Int
a -> PutInsightSelectorsResponse
s {$sel:httpStatus:PutInsightSelectorsResponse' :: Int
httpStatus = Int
a} :: PutInsightSelectorsResponse)

instance Prelude.NFData PutInsightSelectorsResponse