{-# 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.GetEventSelectors
-- 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 event selectors that you configured for
-- your trail. The information returned for your event selectors includes
-- the following:
--
-- -   If your event selector includes read-only events, write-only events,
--     or all events. This applies to both management events and data
--     events.
--
-- -   If your event selector includes management events.
--
-- -   If your event selector includes data events, the resources on which
--     you are logging data events.
--
-- For more information, see
-- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html Logging Data and Management Events for Trails>
-- in the /CloudTrail User Guide/.
module Amazonka.CloudTrail.GetEventSelectors
  ( -- * Creating a Request
    GetEventSelectors (..),
    newGetEventSelectors,

    -- * Request Lenses
    getEventSelectors_trailName,

    -- * Destructuring the Response
    GetEventSelectorsResponse (..),
    newGetEventSelectorsResponse,

    -- * Response Lenses
    getEventSelectorsResponse_trailARN,
    getEventSelectorsResponse_eventSelectors,
    getEventSelectorsResponse_advancedEventSelectors,
    getEventSelectorsResponse_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:/ 'newGetEventSelectors' smart constructor.
data GetEventSelectors = GetEventSelectors'
  { -- | 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@
    GetEventSelectors -> Text
trailName :: Prelude.Text
  }
  deriving (GetEventSelectors -> GetEventSelectors -> Bool
(GetEventSelectors -> GetEventSelectors -> Bool)
-> (GetEventSelectors -> GetEventSelectors -> Bool)
-> Eq GetEventSelectors
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEventSelectors -> GetEventSelectors -> Bool
$c/= :: GetEventSelectors -> GetEventSelectors -> Bool
== :: GetEventSelectors -> GetEventSelectors -> Bool
$c== :: GetEventSelectors -> GetEventSelectors -> Bool
Prelude.Eq, ReadPrec [GetEventSelectors]
ReadPrec GetEventSelectors
Int -> ReadS GetEventSelectors
ReadS [GetEventSelectors]
(Int -> ReadS GetEventSelectors)
-> ReadS [GetEventSelectors]
-> ReadPrec GetEventSelectors
-> ReadPrec [GetEventSelectors]
-> Read GetEventSelectors
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEventSelectors]
$creadListPrec :: ReadPrec [GetEventSelectors]
readPrec :: ReadPrec GetEventSelectors
$creadPrec :: ReadPrec GetEventSelectors
readList :: ReadS [GetEventSelectors]
$creadList :: ReadS [GetEventSelectors]
readsPrec :: Int -> ReadS GetEventSelectors
$creadsPrec :: Int -> ReadS GetEventSelectors
Prelude.Read, Int -> GetEventSelectors -> ShowS
[GetEventSelectors] -> ShowS
GetEventSelectors -> String
(Int -> GetEventSelectors -> ShowS)
-> (GetEventSelectors -> String)
-> ([GetEventSelectors] -> ShowS)
-> Show GetEventSelectors
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEventSelectors] -> ShowS
$cshowList :: [GetEventSelectors] -> ShowS
show :: GetEventSelectors -> String
$cshow :: GetEventSelectors -> String
showsPrec :: Int -> GetEventSelectors -> ShowS
$cshowsPrec :: Int -> GetEventSelectors -> ShowS
Prelude.Show, (forall x. GetEventSelectors -> Rep GetEventSelectors x)
-> (forall x. Rep GetEventSelectors x -> GetEventSelectors)
-> Generic GetEventSelectors
forall x. Rep GetEventSelectors x -> GetEventSelectors
forall x. GetEventSelectors -> Rep GetEventSelectors x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetEventSelectors x -> GetEventSelectors
$cfrom :: forall x. GetEventSelectors -> Rep GetEventSelectors x
Prelude.Generic)

-- |
-- Create a value of 'GetEventSelectors' 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', 'getEventSelectors_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@
newGetEventSelectors ::
  -- | 'trailName'
  Prelude.Text ->
  GetEventSelectors
newGetEventSelectors :: Text -> GetEventSelectors
newGetEventSelectors Text
pTrailName_ =
  GetEventSelectors' :: Text -> GetEventSelectors
GetEventSelectors' {$sel:trailName:GetEventSelectors' :: 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@
getEventSelectors_trailName :: Lens.Lens' GetEventSelectors Prelude.Text
getEventSelectors_trailName :: (Text -> f Text) -> GetEventSelectors -> f GetEventSelectors
getEventSelectors_trailName = (GetEventSelectors -> Text)
-> (GetEventSelectors -> Text -> GetEventSelectors)
-> Lens GetEventSelectors GetEventSelectors Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventSelectors' {Text
trailName :: Text
$sel:trailName:GetEventSelectors' :: GetEventSelectors -> Text
trailName} -> Text
trailName) (\s :: GetEventSelectors
s@GetEventSelectors' {} Text
a -> GetEventSelectors
s {$sel:trailName:GetEventSelectors' :: Text
trailName = Text
a} :: GetEventSelectors)

instance Core.AWSRequest GetEventSelectors where
  type
    AWSResponse GetEventSelectors =
      GetEventSelectorsResponse
  request :: GetEventSelectors -> Request GetEventSelectors
request = Service -> GetEventSelectors -> Request GetEventSelectors
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetEventSelectors
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetEventSelectors)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetEventSelectors))
-> Logger
-> Service
-> Proxy GetEventSelectors
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetEventSelectors)))
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 [EventSelector]
-> Maybe [AdvancedEventSelector]
-> Int
-> GetEventSelectorsResponse
GetEventSelectorsResponse'
            (Maybe Text
 -> Maybe [EventSelector]
 -> Maybe [AdvancedEventSelector]
 -> Int
 -> GetEventSelectorsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [EventSelector]
      -> Maybe [AdvancedEventSelector]
      -> Int
      -> GetEventSelectorsResponse)
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 [EventSelector]
   -> Maybe [AdvancedEventSelector]
   -> Int
   -> GetEventSelectorsResponse)
-> Either String (Maybe [EventSelector])
-> Either
     String
     (Maybe [AdvancedEventSelector] -> Int -> GetEventSelectorsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [EventSelector]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EventSelectors" Either String (Maybe (Maybe [EventSelector]))
-> Maybe [EventSelector] -> Either String (Maybe [EventSelector])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EventSelector]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe [AdvancedEventSelector] -> Int -> GetEventSelectorsResponse)
-> Either String (Maybe [AdvancedEventSelector])
-> Either String (Int -> GetEventSelectorsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [AdvancedEventSelector]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AdvancedEventSelectors"
                            Either String (Maybe (Maybe [AdvancedEventSelector]))
-> Maybe [AdvancedEventSelector]
-> Either String (Maybe [AdvancedEventSelector])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AdvancedEventSelector]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> GetEventSelectorsResponse)
-> Either String Int -> Either String GetEventSelectorsResponse
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 GetEventSelectors

instance Prelude.NFData GetEventSelectors

instance Core.ToHeaders GetEventSelectors where
  toHeaders :: GetEventSelectors -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetEventSelectors -> 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.GetEventSelectors" ::
                          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 GetEventSelectors where
  toJSON :: GetEventSelectors -> Value
toJSON GetEventSelectors' {Text
trailName :: Text
$sel:trailName:GetEventSelectors' :: GetEventSelectors -> 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 GetEventSelectors where
  toPath :: GetEventSelectors -> ByteString
toPath = ByteString -> GetEventSelectors -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newGetEventSelectorsResponse' smart constructor.
data GetEventSelectorsResponse = GetEventSelectorsResponse'
  { -- | The specified trail ARN that has the event selectors.
    GetEventSelectorsResponse -> Maybe Text
trailARN :: Prelude.Maybe Prelude.Text,
    -- | The event selectors that are configured for the trail.
    GetEventSelectorsResponse -> Maybe [EventSelector]
eventSelectors :: Prelude.Maybe [EventSelector],
    -- | The advanced event selectors that are configured for the trail.
    GetEventSelectorsResponse -> Maybe [AdvancedEventSelector]
advancedEventSelectors :: Prelude.Maybe [AdvancedEventSelector],
    -- | The response's http status code.
    GetEventSelectorsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetEventSelectorsResponse -> GetEventSelectorsResponse -> Bool
(GetEventSelectorsResponse -> GetEventSelectorsResponse -> Bool)
-> (GetEventSelectorsResponse -> GetEventSelectorsResponse -> Bool)
-> Eq GetEventSelectorsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEventSelectorsResponse -> GetEventSelectorsResponse -> Bool
$c/= :: GetEventSelectorsResponse -> GetEventSelectorsResponse -> Bool
== :: GetEventSelectorsResponse -> GetEventSelectorsResponse -> Bool
$c== :: GetEventSelectorsResponse -> GetEventSelectorsResponse -> Bool
Prelude.Eq, ReadPrec [GetEventSelectorsResponse]
ReadPrec GetEventSelectorsResponse
Int -> ReadS GetEventSelectorsResponse
ReadS [GetEventSelectorsResponse]
(Int -> ReadS GetEventSelectorsResponse)
-> ReadS [GetEventSelectorsResponse]
-> ReadPrec GetEventSelectorsResponse
-> ReadPrec [GetEventSelectorsResponse]
-> Read GetEventSelectorsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEventSelectorsResponse]
$creadListPrec :: ReadPrec [GetEventSelectorsResponse]
readPrec :: ReadPrec GetEventSelectorsResponse
$creadPrec :: ReadPrec GetEventSelectorsResponse
readList :: ReadS [GetEventSelectorsResponse]
$creadList :: ReadS [GetEventSelectorsResponse]
readsPrec :: Int -> ReadS GetEventSelectorsResponse
$creadsPrec :: Int -> ReadS GetEventSelectorsResponse
Prelude.Read, Int -> GetEventSelectorsResponse -> ShowS
[GetEventSelectorsResponse] -> ShowS
GetEventSelectorsResponse -> String
(Int -> GetEventSelectorsResponse -> ShowS)
-> (GetEventSelectorsResponse -> String)
-> ([GetEventSelectorsResponse] -> ShowS)
-> Show GetEventSelectorsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEventSelectorsResponse] -> ShowS
$cshowList :: [GetEventSelectorsResponse] -> ShowS
show :: GetEventSelectorsResponse -> String
$cshow :: GetEventSelectorsResponse -> String
showsPrec :: Int -> GetEventSelectorsResponse -> ShowS
$cshowsPrec :: Int -> GetEventSelectorsResponse -> ShowS
Prelude.Show, (forall x.
 GetEventSelectorsResponse -> Rep GetEventSelectorsResponse x)
-> (forall x.
    Rep GetEventSelectorsResponse x -> GetEventSelectorsResponse)
-> Generic GetEventSelectorsResponse
forall x.
Rep GetEventSelectorsResponse x -> GetEventSelectorsResponse
forall x.
GetEventSelectorsResponse -> Rep GetEventSelectorsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetEventSelectorsResponse x -> GetEventSelectorsResponse
$cfrom :: forall x.
GetEventSelectorsResponse -> Rep GetEventSelectorsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetEventSelectorsResponse' 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', 'getEventSelectorsResponse_trailARN' - The specified trail ARN that has the event selectors.
--
-- 'eventSelectors', 'getEventSelectorsResponse_eventSelectors' - The event selectors that are configured for the trail.
--
-- 'advancedEventSelectors', 'getEventSelectorsResponse_advancedEventSelectors' - The advanced event selectors that are configured for the trail.
--
-- 'httpStatus', 'getEventSelectorsResponse_httpStatus' - The response's http status code.
newGetEventSelectorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetEventSelectorsResponse
newGetEventSelectorsResponse :: Int -> GetEventSelectorsResponse
newGetEventSelectorsResponse Int
pHttpStatus_ =
  GetEventSelectorsResponse' :: Maybe Text
-> Maybe [EventSelector]
-> Maybe [AdvancedEventSelector]
-> Int
-> GetEventSelectorsResponse
GetEventSelectorsResponse'
    { $sel:trailARN:GetEventSelectorsResponse' :: Maybe Text
trailARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eventSelectors:GetEventSelectorsResponse' :: Maybe [EventSelector]
eventSelectors = Maybe [EventSelector]
forall a. Maybe a
Prelude.Nothing,
      $sel:advancedEventSelectors:GetEventSelectorsResponse' :: Maybe [AdvancedEventSelector]
advancedEventSelectors = Maybe [AdvancedEventSelector]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetEventSelectorsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The specified trail ARN that has the event selectors.
getEventSelectorsResponse_trailARN :: Lens.Lens' GetEventSelectorsResponse (Prelude.Maybe Prelude.Text)
getEventSelectorsResponse_trailARN :: (Maybe Text -> f (Maybe Text))
-> GetEventSelectorsResponse -> f GetEventSelectorsResponse
getEventSelectorsResponse_trailARN = (GetEventSelectorsResponse -> Maybe Text)
-> (GetEventSelectorsResponse
    -> Maybe Text -> GetEventSelectorsResponse)
-> Lens
     GetEventSelectorsResponse
     GetEventSelectorsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventSelectorsResponse' {Maybe Text
trailARN :: Maybe Text
$sel:trailARN:GetEventSelectorsResponse' :: GetEventSelectorsResponse -> Maybe Text
trailARN} -> Maybe Text
trailARN) (\s :: GetEventSelectorsResponse
s@GetEventSelectorsResponse' {} Maybe Text
a -> GetEventSelectorsResponse
s {$sel:trailARN:GetEventSelectorsResponse' :: Maybe Text
trailARN = Maybe Text
a} :: GetEventSelectorsResponse)

-- | The event selectors that are configured for the trail.
getEventSelectorsResponse_eventSelectors :: Lens.Lens' GetEventSelectorsResponse (Prelude.Maybe [EventSelector])
getEventSelectorsResponse_eventSelectors :: (Maybe [EventSelector] -> f (Maybe [EventSelector]))
-> GetEventSelectorsResponse -> f GetEventSelectorsResponse
getEventSelectorsResponse_eventSelectors = (GetEventSelectorsResponse -> Maybe [EventSelector])
-> (GetEventSelectorsResponse
    -> Maybe [EventSelector] -> GetEventSelectorsResponse)
-> Lens
     GetEventSelectorsResponse
     GetEventSelectorsResponse
     (Maybe [EventSelector])
     (Maybe [EventSelector])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventSelectorsResponse' {Maybe [EventSelector]
eventSelectors :: Maybe [EventSelector]
$sel:eventSelectors:GetEventSelectorsResponse' :: GetEventSelectorsResponse -> Maybe [EventSelector]
eventSelectors} -> Maybe [EventSelector]
eventSelectors) (\s :: GetEventSelectorsResponse
s@GetEventSelectorsResponse' {} Maybe [EventSelector]
a -> GetEventSelectorsResponse
s {$sel:eventSelectors:GetEventSelectorsResponse' :: Maybe [EventSelector]
eventSelectors = Maybe [EventSelector]
a} :: GetEventSelectorsResponse) ((Maybe [EventSelector] -> f (Maybe [EventSelector]))
 -> GetEventSelectorsResponse -> f GetEventSelectorsResponse)
-> ((Maybe [EventSelector] -> f (Maybe [EventSelector]))
    -> Maybe [EventSelector] -> f (Maybe [EventSelector]))
-> (Maybe [EventSelector] -> f (Maybe [EventSelector]))
-> GetEventSelectorsResponse
-> f GetEventSelectorsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EventSelector] [EventSelector] [EventSelector] [EventSelector]
-> Iso
     (Maybe [EventSelector])
     (Maybe [EventSelector])
     (Maybe [EventSelector])
     (Maybe [EventSelector])
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
  [EventSelector] [EventSelector] [EventSelector] [EventSelector]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The advanced event selectors that are configured for the trail.
getEventSelectorsResponse_advancedEventSelectors :: Lens.Lens' GetEventSelectorsResponse (Prelude.Maybe [AdvancedEventSelector])
getEventSelectorsResponse_advancedEventSelectors :: (Maybe [AdvancedEventSelector]
 -> f (Maybe [AdvancedEventSelector]))
-> GetEventSelectorsResponse -> f GetEventSelectorsResponse
getEventSelectorsResponse_advancedEventSelectors = (GetEventSelectorsResponse -> Maybe [AdvancedEventSelector])
-> (GetEventSelectorsResponse
    -> Maybe [AdvancedEventSelector] -> GetEventSelectorsResponse)
-> Lens
     GetEventSelectorsResponse
     GetEventSelectorsResponse
     (Maybe [AdvancedEventSelector])
     (Maybe [AdvancedEventSelector])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventSelectorsResponse' {Maybe [AdvancedEventSelector]
advancedEventSelectors :: Maybe [AdvancedEventSelector]
$sel:advancedEventSelectors:GetEventSelectorsResponse' :: GetEventSelectorsResponse -> Maybe [AdvancedEventSelector]
advancedEventSelectors} -> Maybe [AdvancedEventSelector]
advancedEventSelectors) (\s :: GetEventSelectorsResponse
s@GetEventSelectorsResponse' {} Maybe [AdvancedEventSelector]
a -> GetEventSelectorsResponse
s {$sel:advancedEventSelectors:GetEventSelectorsResponse' :: Maybe [AdvancedEventSelector]
advancedEventSelectors = Maybe [AdvancedEventSelector]
a} :: GetEventSelectorsResponse) ((Maybe [AdvancedEventSelector]
  -> f (Maybe [AdvancedEventSelector]))
 -> GetEventSelectorsResponse -> f GetEventSelectorsResponse)
-> ((Maybe [AdvancedEventSelector]
     -> f (Maybe [AdvancedEventSelector]))
    -> Maybe [AdvancedEventSelector]
    -> f (Maybe [AdvancedEventSelector]))
-> (Maybe [AdvancedEventSelector]
    -> f (Maybe [AdvancedEventSelector]))
-> GetEventSelectorsResponse
-> f GetEventSelectorsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AdvancedEventSelector]
  [AdvancedEventSelector]
  [AdvancedEventSelector]
  [AdvancedEventSelector]
-> Iso
     (Maybe [AdvancedEventSelector])
     (Maybe [AdvancedEventSelector])
     (Maybe [AdvancedEventSelector])
     (Maybe [AdvancedEventSelector])
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
  [AdvancedEventSelector]
  [AdvancedEventSelector]
  [AdvancedEventSelector]
  [AdvancedEventSelector]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetEventSelectorsResponse