{-# 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.EMR.ListSecurityConfigurations
-- 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)
--
-- Lists all the security configurations visible to this account, providing
-- their creation dates and times, and their names. This call returns a
-- maximum of 50 clusters per call, but returns a marker to track the
-- paging of the cluster list across multiple ListSecurityConfigurations
-- calls.
--
-- This operation returns paginated results.
module Amazonka.EMR.ListSecurityConfigurations
  ( -- * Creating a Request
    ListSecurityConfigurations (..),
    newListSecurityConfigurations,

    -- * Request Lenses
    listSecurityConfigurations_marker,

    -- * Destructuring the Response
    ListSecurityConfigurationsResponse (..),
    newListSecurityConfigurationsResponse,

    -- * Response Lenses
    listSecurityConfigurationsResponse_securityConfigurations,
    listSecurityConfigurationsResponse_marker,
    listSecurityConfigurationsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.EMR.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:/ 'newListSecurityConfigurations' smart constructor.
data ListSecurityConfigurations = ListSecurityConfigurations'
  { -- | The pagination token that indicates the set of results to retrieve.
    ListSecurityConfigurations -> Maybe Text
marker :: Prelude.Maybe Prelude.Text
  }
  deriving (ListSecurityConfigurations -> ListSecurityConfigurations -> Bool
(ListSecurityConfigurations -> ListSecurityConfigurations -> Bool)
-> (ListSecurityConfigurations
    -> ListSecurityConfigurations -> Bool)
-> Eq ListSecurityConfigurations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSecurityConfigurations -> ListSecurityConfigurations -> Bool
$c/= :: ListSecurityConfigurations -> ListSecurityConfigurations -> Bool
== :: ListSecurityConfigurations -> ListSecurityConfigurations -> Bool
$c== :: ListSecurityConfigurations -> ListSecurityConfigurations -> Bool
Prelude.Eq, ReadPrec [ListSecurityConfigurations]
ReadPrec ListSecurityConfigurations
Int -> ReadS ListSecurityConfigurations
ReadS [ListSecurityConfigurations]
(Int -> ReadS ListSecurityConfigurations)
-> ReadS [ListSecurityConfigurations]
-> ReadPrec ListSecurityConfigurations
-> ReadPrec [ListSecurityConfigurations]
-> Read ListSecurityConfigurations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSecurityConfigurations]
$creadListPrec :: ReadPrec [ListSecurityConfigurations]
readPrec :: ReadPrec ListSecurityConfigurations
$creadPrec :: ReadPrec ListSecurityConfigurations
readList :: ReadS [ListSecurityConfigurations]
$creadList :: ReadS [ListSecurityConfigurations]
readsPrec :: Int -> ReadS ListSecurityConfigurations
$creadsPrec :: Int -> ReadS ListSecurityConfigurations
Prelude.Read, Int -> ListSecurityConfigurations -> ShowS
[ListSecurityConfigurations] -> ShowS
ListSecurityConfigurations -> String
(Int -> ListSecurityConfigurations -> ShowS)
-> (ListSecurityConfigurations -> String)
-> ([ListSecurityConfigurations] -> ShowS)
-> Show ListSecurityConfigurations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSecurityConfigurations] -> ShowS
$cshowList :: [ListSecurityConfigurations] -> ShowS
show :: ListSecurityConfigurations -> String
$cshow :: ListSecurityConfigurations -> String
showsPrec :: Int -> ListSecurityConfigurations -> ShowS
$cshowsPrec :: Int -> ListSecurityConfigurations -> ShowS
Prelude.Show, (forall x.
 ListSecurityConfigurations -> Rep ListSecurityConfigurations x)
-> (forall x.
    Rep ListSecurityConfigurations x -> ListSecurityConfigurations)
-> Generic ListSecurityConfigurations
forall x.
Rep ListSecurityConfigurations x -> ListSecurityConfigurations
forall x.
ListSecurityConfigurations -> Rep ListSecurityConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSecurityConfigurations x -> ListSecurityConfigurations
$cfrom :: forall x.
ListSecurityConfigurations -> Rep ListSecurityConfigurations x
Prelude.Generic)

-- |
-- Create a value of 'ListSecurityConfigurations' 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:
--
-- 'marker', 'listSecurityConfigurations_marker' - The pagination token that indicates the set of results to retrieve.
newListSecurityConfigurations ::
  ListSecurityConfigurations
newListSecurityConfigurations :: ListSecurityConfigurations
newListSecurityConfigurations =
  ListSecurityConfigurations' :: Maybe Text -> ListSecurityConfigurations
ListSecurityConfigurations'
    { $sel:marker:ListSecurityConfigurations' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The pagination token that indicates the set of results to retrieve.
listSecurityConfigurations_marker :: Lens.Lens' ListSecurityConfigurations (Prelude.Maybe Prelude.Text)
listSecurityConfigurations_marker :: (Maybe Text -> f (Maybe Text))
-> ListSecurityConfigurations -> f ListSecurityConfigurations
listSecurityConfigurations_marker = (ListSecurityConfigurations -> Maybe Text)
-> (ListSecurityConfigurations
    -> Maybe Text -> ListSecurityConfigurations)
-> Lens
     ListSecurityConfigurations
     ListSecurityConfigurations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityConfigurations' {Maybe Text
marker :: Maybe Text
$sel:marker:ListSecurityConfigurations' :: ListSecurityConfigurations -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListSecurityConfigurations
s@ListSecurityConfigurations' {} Maybe Text
a -> ListSecurityConfigurations
s {$sel:marker:ListSecurityConfigurations' :: Maybe Text
marker = Maybe Text
a} :: ListSecurityConfigurations)

instance Core.AWSPager ListSecurityConfigurations where
  page :: ListSecurityConfigurations
-> AWSResponse ListSecurityConfigurations
-> Maybe ListSecurityConfigurations
page ListSecurityConfigurations
rq AWSResponse ListSecurityConfigurations
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSecurityConfigurations
ListSecurityConfigurationsResponse
rs
            ListSecurityConfigurationsResponse
-> Getting (First Text) ListSecurityConfigurationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSecurityConfigurationsResponse
-> Const (First Text) ListSecurityConfigurationsResponse
Lens' ListSecurityConfigurationsResponse (Maybe Text)
listSecurityConfigurationsResponse_marker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListSecurityConfigurationsResponse
 -> Const (First Text) ListSecurityConfigurationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSecurityConfigurationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListSecurityConfigurations
forall a. Maybe a
Prelude.Nothing
    | Maybe [SecurityConfigurationSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSecurityConfigurations
ListSecurityConfigurationsResponse
rs
            ListSecurityConfigurationsResponse
-> Getting
     (First [SecurityConfigurationSummary])
     ListSecurityConfigurationsResponse
     [SecurityConfigurationSummary]
-> Maybe [SecurityConfigurationSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [SecurityConfigurationSummary]
 -> Const
      (First [SecurityConfigurationSummary])
      (Maybe [SecurityConfigurationSummary]))
-> ListSecurityConfigurationsResponse
-> Const
     (First [SecurityConfigurationSummary])
     ListSecurityConfigurationsResponse
Lens'
  ListSecurityConfigurationsResponse
  (Maybe [SecurityConfigurationSummary])
listSecurityConfigurationsResponse_securityConfigurations
              ((Maybe [SecurityConfigurationSummary]
  -> Const
       (First [SecurityConfigurationSummary])
       (Maybe [SecurityConfigurationSummary]))
 -> ListSecurityConfigurationsResponse
 -> Const
      (First [SecurityConfigurationSummary])
      ListSecurityConfigurationsResponse)
-> (([SecurityConfigurationSummary]
     -> Const
          (First [SecurityConfigurationSummary])
          [SecurityConfigurationSummary])
    -> Maybe [SecurityConfigurationSummary]
    -> Const
         (First [SecurityConfigurationSummary])
         (Maybe [SecurityConfigurationSummary]))
-> Getting
     (First [SecurityConfigurationSummary])
     ListSecurityConfigurationsResponse
     [SecurityConfigurationSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([SecurityConfigurationSummary]
 -> Const
      (First [SecurityConfigurationSummary])
      [SecurityConfigurationSummary])
-> Maybe [SecurityConfigurationSummary]
-> Const
     (First [SecurityConfigurationSummary])
     (Maybe [SecurityConfigurationSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListSecurityConfigurations
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListSecurityConfigurations -> Maybe ListSecurityConfigurations
forall a. a -> Maybe a
Prelude.Just (ListSecurityConfigurations -> Maybe ListSecurityConfigurations)
-> ListSecurityConfigurations -> Maybe ListSecurityConfigurations
forall a b. (a -> b) -> a -> b
Prelude.$
        ListSecurityConfigurations
rq
          ListSecurityConfigurations
-> (ListSecurityConfigurations -> ListSecurityConfigurations)
-> ListSecurityConfigurations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListSecurityConfigurations
-> Identity ListSecurityConfigurations
Lens
  ListSecurityConfigurations
  ListSecurityConfigurations
  (Maybe Text)
  (Maybe Text)
listSecurityConfigurations_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListSecurityConfigurations
 -> Identity ListSecurityConfigurations)
-> Maybe Text
-> ListSecurityConfigurations
-> ListSecurityConfigurations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSecurityConfigurations
ListSecurityConfigurationsResponse
rs
          ListSecurityConfigurationsResponse
-> Getting (First Text) ListSecurityConfigurationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSecurityConfigurationsResponse
-> Const (First Text) ListSecurityConfigurationsResponse
Lens' ListSecurityConfigurationsResponse (Maybe Text)
listSecurityConfigurationsResponse_marker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListSecurityConfigurationsResponse
 -> Const (First Text) ListSecurityConfigurationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSecurityConfigurationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.NFData ListSecurityConfigurations

instance Core.ToHeaders ListSecurityConfigurations where
  toHeaders :: ListSecurityConfigurations -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListSecurityConfigurations -> 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
"ElasticMapReduce.ListSecurityConfigurations" ::
                          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 ListSecurityConfigurations where
  toJSON :: ListSecurityConfigurations -> Value
toJSON ListSecurityConfigurations' {Maybe Text
marker :: Maybe Text
$sel:marker:ListSecurityConfigurations' :: ListSecurityConfigurations -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Text
"Marker" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
marker]
      )

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

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

-- | /See:/ 'newListSecurityConfigurationsResponse' smart constructor.
data ListSecurityConfigurationsResponse = ListSecurityConfigurationsResponse'
  { -- | The creation date and time, and name, of each security configuration.
    ListSecurityConfigurationsResponse
-> Maybe [SecurityConfigurationSummary]
securityConfigurations :: Prelude.Maybe [SecurityConfigurationSummary],
    -- | A pagination token that indicates the next set of results to retrieve.
    -- Include the marker in the next ListSecurityConfiguration call to
    -- retrieve the next page of results, if required.
    ListSecurityConfigurationsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListSecurityConfigurationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSecurityConfigurationsResponse
-> ListSecurityConfigurationsResponse -> Bool
(ListSecurityConfigurationsResponse
 -> ListSecurityConfigurationsResponse -> Bool)
-> (ListSecurityConfigurationsResponse
    -> ListSecurityConfigurationsResponse -> Bool)
-> Eq ListSecurityConfigurationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSecurityConfigurationsResponse
-> ListSecurityConfigurationsResponse -> Bool
$c/= :: ListSecurityConfigurationsResponse
-> ListSecurityConfigurationsResponse -> Bool
== :: ListSecurityConfigurationsResponse
-> ListSecurityConfigurationsResponse -> Bool
$c== :: ListSecurityConfigurationsResponse
-> ListSecurityConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [ListSecurityConfigurationsResponse]
ReadPrec ListSecurityConfigurationsResponse
Int -> ReadS ListSecurityConfigurationsResponse
ReadS [ListSecurityConfigurationsResponse]
(Int -> ReadS ListSecurityConfigurationsResponse)
-> ReadS [ListSecurityConfigurationsResponse]
-> ReadPrec ListSecurityConfigurationsResponse
-> ReadPrec [ListSecurityConfigurationsResponse]
-> Read ListSecurityConfigurationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSecurityConfigurationsResponse]
$creadListPrec :: ReadPrec [ListSecurityConfigurationsResponse]
readPrec :: ReadPrec ListSecurityConfigurationsResponse
$creadPrec :: ReadPrec ListSecurityConfigurationsResponse
readList :: ReadS [ListSecurityConfigurationsResponse]
$creadList :: ReadS [ListSecurityConfigurationsResponse]
readsPrec :: Int -> ReadS ListSecurityConfigurationsResponse
$creadsPrec :: Int -> ReadS ListSecurityConfigurationsResponse
Prelude.Read, Int -> ListSecurityConfigurationsResponse -> ShowS
[ListSecurityConfigurationsResponse] -> ShowS
ListSecurityConfigurationsResponse -> String
(Int -> ListSecurityConfigurationsResponse -> ShowS)
-> (ListSecurityConfigurationsResponse -> String)
-> ([ListSecurityConfigurationsResponse] -> ShowS)
-> Show ListSecurityConfigurationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSecurityConfigurationsResponse] -> ShowS
$cshowList :: [ListSecurityConfigurationsResponse] -> ShowS
show :: ListSecurityConfigurationsResponse -> String
$cshow :: ListSecurityConfigurationsResponse -> String
showsPrec :: Int -> ListSecurityConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> ListSecurityConfigurationsResponse -> ShowS
Prelude.Show, (forall x.
 ListSecurityConfigurationsResponse
 -> Rep ListSecurityConfigurationsResponse x)
-> (forall x.
    Rep ListSecurityConfigurationsResponse x
    -> ListSecurityConfigurationsResponse)
-> Generic ListSecurityConfigurationsResponse
forall x.
Rep ListSecurityConfigurationsResponse x
-> ListSecurityConfigurationsResponse
forall x.
ListSecurityConfigurationsResponse
-> Rep ListSecurityConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSecurityConfigurationsResponse x
-> ListSecurityConfigurationsResponse
$cfrom :: forall x.
ListSecurityConfigurationsResponse
-> Rep ListSecurityConfigurationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSecurityConfigurationsResponse' 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:
--
-- 'securityConfigurations', 'listSecurityConfigurationsResponse_securityConfigurations' - The creation date and time, and name, of each security configuration.
--
-- 'marker', 'listSecurityConfigurationsResponse_marker' - A pagination token that indicates the next set of results to retrieve.
-- Include the marker in the next ListSecurityConfiguration call to
-- retrieve the next page of results, if required.
--
-- 'httpStatus', 'listSecurityConfigurationsResponse_httpStatus' - The response's http status code.
newListSecurityConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSecurityConfigurationsResponse
newListSecurityConfigurationsResponse :: Int -> ListSecurityConfigurationsResponse
newListSecurityConfigurationsResponse Int
pHttpStatus_ =
  ListSecurityConfigurationsResponse' :: Maybe [SecurityConfigurationSummary]
-> Maybe Text -> Int -> ListSecurityConfigurationsResponse
ListSecurityConfigurationsResponse'
    { $sel:securityConfigurations:ListSecurityConfigurationsResponse' :: Maybe [SecurityConfigurationSummary]
securityConfigurations =
        Maybe [SecurityConfigurationSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListSecurityConfigurationsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSecurityConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The creation date and time, and name, of each security configuration.
listSecurityConfigurationsResponse_securityConfigurations :: Lens.Lens' ListSecurityConfigurationsResponse (Prelude.Maybe [SecurityConfigurationSummary])
listSecurityConfigurationsResponse_securityConfigurations :: (Maybe [SecurityConfigurationSummary]
 -> f (Maybe [SecurityConfigurationSummary]))
-> ListSecurityConfigurationsResponse
-> f ListSecurityConfigurationsResponse
listSecurityConfigurationsResponse_securityConfigurations = (ListSecurityConfigurationsResponse
 -> Maybe [SecurityConfigurationSummary])
-> (ListSecurityConfigurationsResponse
    -> Maybe [SecurityConfigurationSummary]
    -> ListSecurityConfigurationsResponse)
-> Lens'
     ListSecurityConfigurationsResponse
     (Maybe [SecurityConfigurationSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityConfigurationsResponse' {Maybe [SecurityConfigurationSummary]
securityConfigurations :: Maybe [SecurityConfigurationSummary]
$sel:securityConfigurations:ListSecurityConfigurationsResponse' :: ListSecurityConfigurationsResponse
-> Maybe [SecurityConfigurationSummary]
securityConfigurations} -> Maybe [SecurityConfigurationSummary]
securityConfigurations) (\s :: ListSecurityConfigurationsResponse
s@ListSecurityConfigurationsResponse' {} Maybe [SecurityConfigurationSummary]
a -> ListSecurityConfigurationsResponse
s {$sel:securityConfigurations:ListSecurityConfigurationsResponse' :: Maybe [SecurityConfigurationSummary]
securityConfigurations = Maybe [SecurityConfigurationSummary]
a} :: ListSecurityConfigurationsResponse) ((Maybe [SecurityConfigurationSummary]
  -> f (Maybe [SecurityConfigurationSummary]))
 -> ListSecurityConfigurationsResponse
 -> f ListSecurityConfigurationsResponse)
-> ((Maybe [SecurityConfigurationSummary]
     -> f (Maybe [SecurityConfigurationSummary]))
    -> Maybe [SecurityConfigurationSummary]
    -> f (Maybe [SecurityConfigurationSummary]))
-> (Maybe [SecurityConfigurationSummary]
    -> f (Maybe [SecurityConfigurationSummary]))
-> ListSecurityConfigurationsResponse
-> f ListSecurityConfigurationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SecurityConfigurationSummary]
  [SecurityConfigurationSummary]
  [SecurityConfigurationSummary]
  [SecurityConfigurationSummary]
-> Iso
     (Maybe [SecurityConfigurationSummary])
     (Maybe [SecurityConfigurationSummary])
     (Maybe [SecurityConfigurationSummary])
     (Maybe [SecurityConfigurationSummary])
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
  [SecurityConfigurationSummary]
  [SecurityConfigurationSummary]
  [SecurityConfigurationSummary]
  [SecurityConfigurationSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A pagination token that indicates the next set of results to retrieve.
-- Include the marker in the next ListSecurityConfiguration call to
-- retrieve the next page of results, if required.
listSecurityConfigurationsResponse_marker :: Lens.Lens' ListSecurityConfigurationsResponse (Prelude.Maybe Prelude.Text)
listSecurityConfigurationsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> ListSecurityConfigurationsResponse
-> f ListSecurityConfigurationsResponse
listSecurityConfigurationsResponse_marker = (ListSecurityConfigurationsResponse -> Maybe Text)
-> (ListSecurityConfigurationsResponse
    -> Maybe Text -> ListSecurityConfigurationsResponse)
-> Lens' ListSecurityConfigurationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityConfigurationsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListSecurityConfigurationsResponse' :: ListSecurityConfigurationsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListSecurityConfigurationsResponse
s@ListSecurityConfigurationsResponse' {} Maybe Text
a -> ListSecurityConfigurationsResponse
s {$sel:marker:ListSecurityConfigurationsResponse' :: Maybe Text
marker = Maybe Text
a} :: ListSecurityConfigurationsResponse)

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

instance
  Prelude.NFData
    ListSecurityConfigurationsResponse