{-# 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.ELB.DescribeLoadBalancerPolicies
-- 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 specified policies.
--
-- If you specify a load balancer name, the action returns the descriptions
-- of all policies created for the load balancer. If you specify a policy
-- name associated with your load balancer, the action returns the
-- description of that policy. If you don\'t specify a load balancer name,
-- the action returns descriptions of the specified sample policies, or
-- descriptions of all sample policies. The names of the sample policies
-- have the @ELBSample-@ prefix.
module Amazonka.ELB.DescribeLoadBalancerPolicies
  ( -- * Creating a Request
    DescribeLoadBalancerPolicies (..),
    newDescribeLoadBalancerPolicies,

    -- * Request Lenses
    describeLoadBalancerPolicies_policyNames,
    describeLoadBalancerPolicies_loadBalancerName,

    -- * Destructuring the Response
    DescribeLoadBalancerPoliciesResponse (..),
    newDescribeLoadBalancerPoliciesResponse,

    -- * Response Lenses
    describeLoadBalancerPoliciesResponse_policyDescriptions,
    describeLoadBalancerPoliciesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ELB.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

-- | Contains the parameters for DescribeLoadBalancerPolicies.
--
-- /See:/ 'newDescribeLoadBalancerPolicies' smart constructor.
data DescribeLoadBalancerPolicies = DescribeLoadBalancerPolicies'
  { -- | The names of the policies.
    DescribeLoadBalancerPolicies -> Maybe [Text]
policyNames :: Prelude.Maybe [Prelude.Text],
    -- | The name of the load balancer.
    DescribeLoadBalancerPolicies -> Maybe Text
loadBalancerName :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeLoadBalancerPolicies
-> DescribeLoadBalancerPolicies -> Bool
(DescribeLoadBalancerPolicies
 -> DescribeLoadBalancerPolicies -> Bool)
-> (DescribeLoadBalancerPolicies
    -> DescribeLoadBalancerPolicies -> Bool)
-> Eq DescribeLoadBalancerPolicies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLoadBalancerPolicies
-> DescribeLoadBalancerPolicies -> Bool
$c/= :: DescribeLoadBalancerPolicies
-> DescribeLoadBalancerPolicies -> Bool
== :: DescribeLoadBalancerPolicies
-> DescribeLoadBalancerPolicies -> Bool
$c== :: DescribeLoadBalancerPolicies
-> DescribeLoadBalancerPolicies -> Bool
Prelude.Eq, ReadPrec [DescribeLoadBalancerPolicies]
ReadPrec DescribeLoadBalancerPolicies
Int -> ReadS DescribeLoadBalancerPolicies
ReadS [DescribeLoadBalancerPolicies]
(Int -> ReadS DescribeLoadBalancerPolicies)
-> ReadS [DescribeLoadBalancerPolicies]
-> ReadPrec DescribeLoadBalancerPolicies
-> ReadPrec [DescribeLoadBalancerPolicies]
-> Read DescribeLoadBalancerPolicies
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLoadBalancerPolicies]
$creadListPrec :: ReadPrec [DescribeLoadBalancerPolicies]
readPrec :: ReadPrec DescribeLoadBalancerPolicies
$creadPrec :: ReadPrec DescribeLoadBalancerPolicies
readList :: ReadS [DescribeLoadBalancerPolicies]
$creadList :: ReadS [DescribeLoadBalancerPolicies]
readsPrec :: Int -> ReadS DescribeLoadBalancerPolicies
$creadsPrec :: Int -> ReadS DescribeLoadBalancerPolicies
Prelude.Read, Int -> DescribeLoadBalancerPolicies -> ShowS
[DescribeLoadBalancerPolicies] -> ShowS
DescribeLoadBalancerPolicies -> String
(Int -> DescribeLoadBalancerPolicies -> ShowS)
-> (DescribeLoadBalancerPolicies -> String)
-> ([DescribeLoadBalancerPolicies] -> ShowS)
-> Show DescribeLoadBalancerPolicies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLoadBalancerPolicies] -> ShowS
$cshowList :: [DescribeLoadBalancerPolicies] -> ShowS
show :: DescribeLoadBalancerPolicies -> String
$cshow :: DescribeLoadBalancerPolicies -> String
showsPrec :: Int -> DescribeLoadBalancerPolicies -> ShowS
$cshowsPrec :: Int -> DescribeLoadBalancerPolicies -> ShowS
Prelude.Show, (forall x.
 DescribeLoadBalancerPolicies -> Rep DescribeLoadBalancerPolicies x)
-> (forall x.
    Rep DescribeLoadBalancerPolicies x -> DescribeLoadBalancerPolicies)
-> Generic DescribeLoadBalancerPolicies
forall x.
Rep DescribeLoadBalancerPolicies x -> DescribeLoadBalancerPolicies
forall x.
DescribeLoadBalancerPolicies -> Rep DescribeLoadBalancerPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeLoadBalancerPolicies x -> DescribeLoadBalancerPolicies
$cfrom :: forall x.
DescribeLoadBalancerPolicies -> Rep DescribeLoadBalancerPolicies x
Prelude.Generic)

-- |
-- Create a value of 'DescribeLoadBalancerPolicies' 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:
--
-- 'policyNames', 'describeLoadBalancerPolicies_policyNames' - The names of the policies.
--
-- 'loadBalancerName', 'describeLoadBalancerPolicies_loadBalancerName' - The name of the load balancer.
newDescribeLoadBalancerPolicies ::
  DescribeLoadBalancerPolicies
newDescribeLoadBalancerPolicies :: DescribeLoadBalancerPolicies
newDescribeLoadBalancerPolicies =
  DescribeLoadBalancerPolicies' :: Maybe [Text] -> Maybe Text -> DescribeLoadBalancerPolicies
DescribeLoadBalancerPolicies'
    { $sel:policyNames:DescribeLoadBalancerPolicies' :: Maybe [Text]
policyNames =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:loadBalancerName:DescribeLoadBalancerPolicies' :: Maybe Text
loadBalancerName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The names of the policies.
describeLoadBalancerPolicies_policyNames :: Lens.Lens' DescribeLoadBalancerPolicies (Prelude.Maybe [Prelude.Text])
describeLoadBalancerPolicies_policyNames :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeLoadBalancerPolicies -> f DescribeLoadBalancerPolicies
describeLoadBalancerPolicies_policyNames = (DescribeLoadBalancerPolicies -> Maybe [Text])
-> (DescribeLoadBalancerPolicies
    -> Maybe [Text] -> DescribeLoadBalancerPolicies)
-> Lens
     DescribeLoadBalancerPolicies
     DescribeLoadBalancerPolicies
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLoadBalancerPolicies' {Maybe [Text]
policyNames :: Maybe [Text]
$sel:policyNames:DescribeLoadBalancerPolicies' :: DescribeLoadBalancerPolicies -> Maybe [Text]
policyNames} -> Maybe [Text]
policyNames) (\s :: DescribeLoadBalancerPolicies
s@DescribeLoadBalancerPolicies' {} Maybe [Text]
a -> DescribeLoadBalancerPolicies
s {$sel:policyNames:DescribeLoadBalancerPolicies' :: Maybe [Text]
policyNames = Maybe [Text]
a} :: DescribeLoadBalancerPolicies) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeLoadBalancerPolicies -> f DescribeLoadBalancerPolicies)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeLoadBalancerPolicies
-> f DescribeLoadBalancerPolicies
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the load balancer.
describeLoadBalancerPolicies_loadBalancerName :: Lens.Lens' DescribeLoadBalancerPolicies (Prelude.Maybe Prelude.Text)
describeLoadBalancerPolicies_loadBalancerName :: (Maybe Text -> f (Maybe Text))
-> DescribeLoadBalancerPolicies -> f DescribeLoadBalancerPolicies
describeLoadBalancerPolicies_loadBalancerName = (DescribeLoadBalancerPolicies -> Maybe Text)
-> (DescribeLoadBalancerPolicies
    -> Maybe Text -> DescribeLoadBalancerPolicies)
-> Lens
     DescribeLoadBalancerPolicies
     DescribeLoadBalancerPolicies
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLoadBalancerPolicies' {Maybe Text
loadBalancerName :: Maybe Text
$sel:loadBalancerName:DescribeLoadBalancerPolicies' :: DescribeLoadBalancerPolicies -> Maybe Text
loadBalancerName} -> Maybe Text
loadBalancerName) (\s :: DescribeLoadBalancerPolicies
s@DescribeLoadBalancerPolicies' {} Maybe Text
a -> DescribeLoadBalancerPolicies
s {$sel:loadBalancerName:DescribeLoadBalancerPolicies' :: Maybe Text
loadBalancerName = Maybe Text
a} :: DescribeLoadBalancerPolicies)

instance Core.AWSRequest DescribeLoadBalancerPolicies where
  type
    AWSResponse DescribeLoadBalancerPolicies =
      DescribeLoadBalancerPoliciesResponse
  request :: DescribeLoadBalancerPolicies
-> Request DescribeLoadBalancerPolicies
request = Service
-> DescribeLoadBalancerPolicies
-> Request DescribeLoadBalancerPolicies
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeLoadBalancerPolicies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeLoadBalancerPolicies)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeLoadBalancerPolicies))
-> Logger
-> Service
-> Proxy DescribeLoadBalancerPolicies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeLoadBalancerPolicies)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeLoadBalancerPoliciesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [PolicyDescription]
-> Int -> DescribeLoadBalancerPoliciesResponse
DescribeLoadBalancerPoliciesResponse'
            (Maybe [PolicyDescription]
 -> Int -> DescribeLoadBalancerPoliciesResponse)
-> Either String (Maybe [PolicyDescription])
-> Either String (Int -> DescribeLoadBalancerPoliciesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PolicyDescriptions"
                            Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [PolicyDescription]))
-> Either String (Maybe [PolicyDescription])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [PolicyDescription])
-> [Node] -> Either String (Maybe [PolicyDescription])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [PolicyDescription]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> DescribeLoadBalancerPoliciesResponse)
-> Either String Int
-> Either String DescribeLoadBalancerPoliciesResponse
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
    DescribeLoadBalancerPolicies

instance Prelude.NFData DescribeLoadBalancerPolicies

instance Core.ToHeaders DescribeLoadBalancerPolicies where
  toHeaders :: DescribeLoadBalancerPolicies -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeLoadBalancerPolicies -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery DescribeLoadBalancerPolicies where
  toQuery :: DescribeLoadBalancerPolicies -> QueryString
toQuery DescribeLoadBalancerPolicies' {Maybe [Text]
Maybe Text
loadBalancerName :: Maybe Text
policyNames :: Maybe [Text]
$sel:loadBalancerName:DescribeLoadBalancerPolicies' :: DescribeLoadBalancerPolicies -> Maybe Text
$sel:policyNames:DescribeLoadBalancerPolicies' :: DescribeLoadBalancerPolicies -> Maybe [Text]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeLoadBalancerPolicies" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-06-01" :: Prelude.ByteString),
        ByteString
"PolicyNames"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
policyNames),
        ByteString
"LoadBalancerName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
loadBalancerName
      ]

-- | Contains the output of DescribeLoadBalancerPolicies.
--
-- /See:/ 'newDescribeLoadBalancerPoliciesResponse' smart constructor.
data DescribeLoadBalancerPoliciesResponse = DescribeLoadBalancerPoliciesResponse'
  { -- | Information about the policies.
    DescribeLoadBalancerPoliciesResponse -> Maybe [PolicyDescription]
policyDescriptions :: Prelude.Maybe [PolicyDescription],
    -- | The response's http status code.
    DescribeLoadBalancerPoliciesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeLoadBalancerPoliciesResponse
-> DescribeLoadBalancerPoliciesResponse -> Bool
(DescribeLoadBalancerPoliciesResponse
 -> DescribeLoadBalancerPoliciesResponse -> Bool)
-> (DescribeLoadBalancerPoliciesResponse
    -> DescribeLoadBalancerPoliciesResponse -> Bool)
-> Eq DescribeLoadBalancerPoliciesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLoadBalancerPoliciesResponse
-> DescribeLoadBalancerPoliciesResponse -> Bool
$c/= :: DescribeLoadBalancerPoliciesResponse
-> DescribeLoadBalancerPoliciesResponse -> Bool
== :: DescribeLoadBalancerPoliciesResponse
-> DescribeLoadBalancerPoliciesResponse -> Bool
$c== :: DescribeLoadBalancerPoliciesResponse
-> DescribeLoadBalancerPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeLoadBalancerPoliciesResponse]
ReadPrec DescribeLoadBalancerPoliciesResponse
Int -> ReadS DescribeLoadBalancerPoliciesResponse
ReadS [DescribeLoadBalancerPoliciesResponse]
(Int -> ReadS DescribeLoadBalancerPoliciesResponse)
-> ReadS [DescribeLoadBalancerPoliciesResponse]
-> ReadPrec DescribeLoadBalancerPoliciesResponse
-> ReadPrec [DescribeLoadBalancerPoliciesResponse]
-> Read DescribeLoadBalancerPoliciesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLoadBalancerPoliciesResponse]
$creadListPrec :: ReadPrec [DescribeLoadBalancerPoliciesResponse]
readPrec :: ReadPrec DescribeLoadBalancerPoliciesResponse
$creadPrec :: ReadPrec DescribeLoadBalancerPoliciesResponse
readList :: ReadS [DescribeLoadBalancerPoliciesResponse]
$creadList :: ReadS [DescribeLoadBalancerPoliciesResponse]
readsPrec :: Int -> ReadS DescribeLoadBalancerPoliciesResponse
$creadsPrec :: Int -> ReadS DescribeLoadBalancerPoliciesResponse
Prelude.Read, Int -> DescribeLoadBalancerPoliciesResponse -> ShowS
[DescribeLoadBalancerPoliciesResponse] -> ShowS
DescribeLoadBalancerPoliciesResponse -> String
(Int -> DescribeLoadBalancerPoliciesResponse -> ShowS)
-> (DescribeLoadBalancerPoliciesResponse -> String)
-> ([DescribeLoadBalancerPoliciesResponse] -> ShowS)
-> Show DescribeLoadBalancerPoliciesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLoadBalancerPoliciesResponse] -> ShowS
$cshowList :: [DescribeLoadBalancerPoliciesResponse] -> ShowS
show :: DescribeLoadBalancerPoliciesResponse -> String
$cshow :: DescribeLoadBalancerPoliciesResponse -> String
showsPrec :: Int -> DescribeLoadBalancerPoliciesResponse -> ShowS
$cshowsPrec :: Int -> DescribeLoadBalancerPoliciesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeLoadBalancerPoliciesResponse
 -> Rep DescribeLoadBalancerPoliciesResponse x)
-> (forall x.
    Rep DescribeLoadBalancerPoliciesResponse x
    -> DescribeLoadBalancerPoliciesResponse)
-> Generic DescribeLoadBalancerPoliciesResponse
forall x.
Rep DescribeLoadBalancerPoliciesResponse x
-> DescribeLoadBalancerPoliciesResponse
forall x.
DescribeLoadBalancerPoliciesResponse
-> Rep DescribeLoadBalancerPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeLoadBalancerPoliciesResponse x
-> DescribeLoadBalancerPoliciesResponse
$cfrom :: forall x.
DescribeLoadBalancerPoliciesResponse
-> Rep DescribeLoadBalancerPoliciesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeLoadBalancerPoliciesResponse' 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:
--
-- 'policyDescriptions', 'describeLoadBalancerPoliciesResponse_policyDescriptions' - Information about the policies.
--
-- 'httpStatus', 'describeLoadBalancerPoliciesResponse_httpStatus' - The response's http status code.
newDescribeLoadBalancerPoliciesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeLoadBalancerPoliciesResponse
newDescribeLoadBalancerPoliciesResponse :: Int -> DescribeLoadBalancerPoliciesResponse
newDescribeLoadBalancerPoliciesResponse Int
pHttpStatus_ =
  DescribeLoadBalancerPoliciesResponse' :: Maybe [PolicyDescription]
-> Int -> DescribeLoadBalancerPoliciesResponse
DescribeLoadBalancerPoliciesResponse'
    { $sel:policyDescriptions:DescribeLoadBalancerPoliciesResponse' :: Maybe [PolicyDescription]
policyDescriptions =
        Maybe [PolicyDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeLoadBalancerPoliciesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the policies.
describeLoadBalancerPoliciesResponse_policyDescriptions :: Lens.Lens' DescribeLoadBalancerPoliciesResponse (Prelude.Maybe [PolicyDescription])
describeLoadBalancerPoliciesResponse_policyDescriptions :: (Maybe [PolicyDescription] -> f (Maybe [PolicyDescription]))
-> DescribeLoadBalancerPoliciesResponse
-> f DescribeLoadBalancerPoliciesResponse
describeLoadBalancerPoliciesResponse_policyDescriptions = (DescribeLoadBalancerPoliciesResponse -> Maybe [PolicyDescription])
-> (DescribeLoadBalancerPoliciesResponse
    -> Maybe [PolicyDescription]
    -> DescribeLoadBalancerPoliciesResponse)
-> Lens
     DescribeLoadBalancerPoliciesResponse
     DescribeLoadBalancerPoliciesResponse
     (Maybe [PolicyDescription])
     (Maybe [PolicyDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLoadBalancerPoliciesResponse' {Maybe [PolicyDescription]
policyDescriptions :: Maybe [PolicyDescription]
$sel:policyDescriptions:DescribeLoadBalancerPoliciesResponse' :: DescribeLoadBalancerPoliciesResponse -> Maybe [PolicyDescription]
policyDescriptions} -> Maybe [PolicyDescription]
policyDescriptions) (\s :: DescribeLoadBalancerPoliciesResponse
s@DescribeLoadBalancerPoliciesResponse' {} Maybe [PolicyDescription]
a -> DescribeLoadBalancerPoliciesResponse
s {$sel:policyDescriptions:DescribeLoadBalancerPoliciesResponse' :: Maybe [PolicyDescription]
policyDescriptions = Maybe [PolicyDescription]
a} :: DescribeLoadBalancerPoliciesResponse) ((Maybe [PolicyDescription] -> f (Maybe [PolicyDescription]))
 -> DescribeLoadBalancerPoliciesResponse
 -> f DescribeLoadBalancerPoliciesResponse)
-> ((Maybe [PolicyDescription] -> f (Maybe [PolicyDescription]))
    -> Maybe [PolicyDescription] -> f (Maybe [PolicyDescription]))
-> (Maybe [PolicyDescription] -> f (Maybe [PolicyDescription]))
-> DescribeLoadBalancerPoliciesResponse
-> f DescribeLoadBalancerPoliciesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PolicyDescription]
  [PolicyDescription]
  [PolicyDescription]
  [PolicyDescription]
-> Iso
     (Maybe [PolicyDescription])
     (Maybe [PolicyDescription])
     (Maybe [PolicyDescription])
     (Maybe [PolicyDescription])
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
  [PolicyDescription]
  [PolicyDescription]
  [PolicyDescription]
  [PolicyDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeLoadBalancerPoliciesResponse