{-# 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.ELBV2.DescribeSSLPolicies
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the specified policies or all policies used for SSL
-- negotiation.
--
-- For more information, see
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies Security policies>
-- in the /Application Load Balancers Guide/ or
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies Security policies>
-- in the /Network Load Balancers Guide/.
--
-- This operation returns paginated results.
module Amazonka.ELBV2.DescribeSSLPolicies
  ( -- * Creating a Request
    DescribeSSLPolicies (..),
    newDescribeSSLPolicies,

    -- * Request Lenses
    describeSSLPolicies_loadBalancerType,
    describeSSLPolicies_marker,
    describeSSLPolicies_names,
    describeSSLPolicies_pageSize,

    -- * Destructuring the Response
    DescribeSSLPoliciesResponse (..),
    newDescribeSSLPoliciesResponse,

    -- * Response Lenses
    describeSSLPoliciesResponse_nextMarker,
    describeSSLPoliciesResponse_sslPolicies,
    describeSSLPoliciesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ELBV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeSSLPolicies' smart constructor.
data DescribeSSLPolicies = DescribeSSLPolicies'
  { -- | The type of load balancer. The default lists the SSL policies for all
    -- load balancers.
    DescribeSSLPolicies -> Maybe LoadBalancerTypeEnum
loadBalancerType :: Prelude.Maybe LoadBalancerTypeEnum,
    -- | The marker for the next set of results. (You received this marker from a
    -- previous call.)
    DescribeSSLPolicies -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The names of the policies.
    DescribeSSLPolicies -> Maybe [Text]
names :: Prelude.Maybe [Prelude.Text],
    -- | The maximum number of results to return with this call.
    DescribeSSLPolicies -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural
  }
  deriving (DescribeSSLPolicies -> DescribeSSLPolicies -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSSLPolicies -> DescribeSSLPolicies -> Bool
$c/= :: DescribeSSLPolicies -> DescribeSSLPolicies -> Bool
== :: DescribeSSLPolicies -> DescribeSSLPolicies -> Bool
$c== :: DescribeSSLPolicies -> DescribeSSLPolicies -> Bool
Prelude.Eq, ReadPrec [DescribeSSLPolicies]
ReadPrec DescribeSSLPolicies
Int -> ReadS DescribeSSLPolicies
ReadS [DescribeSSLPolicies]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSSLPolicies]
$creadListPrec :: ReadPrec [DescribeSSLPolicies]
readPrec :: ReadPrec DescribeSSLPolicies
$creadPrec :: ReadPrec DescribeSSLPolicies
readList :: ReadS [DescribeSSLPolicies]
$creadList :: ReadS [DescribeSSLPolicies]
readsPrec :: Int -> ReadS DescribeSSLPolicies
$creadsPrec :: Int -> ReadS DescribeSSLPolicies
Prelude.Read, Int -> DescribeSSLPolicies -> ShowS
[DescribeSSLPolicies] -> ShowS
DescribeSSLPolicies -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSSLPolicies] -> ShowS
$cshowList :: [DescribeSSLPolicies] -> ShowS
show :: DescribeSSLPolicies -> String
$cshow :: DescribeSSLPolicies -> String
showsPrec :: Int -> DescribeSSLPolicies -> ShowS
$cshowsPrec :: Int -> DescribeSSLPolicies -> ShowS
Prelude.Show, forall x. Rep DescribeSSLPolicies x -> DescribeSSLPolicies
forall x. DescribeSSLPolicies -> Rep DescribeSSLPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeSSLPolicies x -> DescribeSSLPolicies
$cfrom :: forall x. DescribeSSLPolicies -> Rep DescribeSSLPolicies x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSSLPolicies' 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:
--
-- 'loadBalancerType', 'describeSSLPolicies_loadBalancerType' - The type of load balancer. The default lists the SSL policies for all
-- load balancers.
--
-- 'marker', 'describeSSLPolicies_marker' - The marker for the next set of results. (You received this marker from a
-- previous call.)
--
-- 'names', 'describeSSLPolicies_names' - The names of the policies.
--
-- 'pageSize', 'describeSSLPolicies_pageSize' - The maximum number of results to return with this call.
newDescribeSSLPolicies ::
  DescribeSSLPolicies
newDescribeSSLPolicies :: DescribeSSLPolicies
newDescribeSSLPolicies =
  DescribeSSLPolicies'
    { $sel:loadBalancerType:DescribeSSLPolicies' :: Maybe LoadBalancerTypeEnum
loadBalancerType =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeSSLPolicies' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:names:DescribeSSLPolicies' :: Maybe [Text]
names = forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:DescribeSSLPolicies' :: Maybe Natural
pageSize = forall a. Maybe a
Prelude.Nothing
    }

-- | The type of load balancer. The default lists the SSL policies for all
-- load balancers.
describeSSLPolicies_loadBalancerType :: Lens.Lens' DescribeSSLPolicies (Prelude.Maybe LoadBalancerTypeEnum)
describeSSLPolicies_loadBalancerType :: Lens' DescribeSSLPolicies (Maybe LoadBalancerTypeEnum)
describeSSLPolicies_loadBalancerType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSSLPolicies' {Maybe LoadBalancerTypeEnum
loadBalancerType :: Maybe LoadBalancerTypeEnum
$sel:loadBalancerType:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe LoadBalancerTypeEnum
loadBalancerType} -> Maybe LoadBalancerTypeEnum
loadBalancerType) (\s :: DescribeSSLPolicies
s@DescribeSSLPolicies' {} Maybe LoadBalancerTypeEnum
a -> DescribeSSLPolicies
s {$sel:loadBalancerType:DescribeSSLPolicies' :: Maybe LoadBalancerTypeEnum
loadBalancerType = Maybe LoadBalancerTypeEnum
a} :: DescribeSSLPolicies)

-- | The marker for the next set of results. (You received this marker from a
-- previous call.)
describeSSLPolicies_marker :: Lens.Lens' DescribeSSLPolicies (Prelude.Maybe Prelude.Text)
describeSSLPolicies_marker :: Lens' DescribeSSLPolicies (Maybe Text)
describeSSLPolicies_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSSLPolicies' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeSSLPolicies
s@DescribeSSLPolicies' {} Maybe Text
a -> DescribeSSLPolicies
s {$sel:marker:DescribeSSLPolicies' :: Maybe Text
marker = Maybe Text
a} :: DescribeSSLPolicies)

-- | The names of the policies.
describeSSLPolicies_names :: Lens.Lens' DescribeSSLPolicies (Prelude.Maybe [Prelude.Text])
describeSSLPolicies_names :: Lens' DescribeSSLPolicies (Maybe [Text])
describeSSLPolicies_names = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSSLPolicies' {Maybe [Text]
names :: Maybe [Text]
$sel:names:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe [Text]
names} -> Maybe [Text]
names) (\s :: DescribeSSLPolicies
s@DescribeSSLPolicies' {} Maybe [Text]
a -> DescribeSSLPolicies
s {$sel:names:DescribeSSLPolicies' :: Maybe [Text]
names = Maybe [Text]
a} :: DescribeSSLPolicies) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of results to return with this call.
describeSSLPolicies_pageSize :: Lens.Lens' DescribeSSLPolicies (Prelude.Maybe Prelude.Natural)
describeSSLPolicies_pageSize :: Lens' DescribeSSLPolicies (Maybe Natural)
describeSSLPolicies_pageSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSSLPolicies' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: DescribeSSLPolicies
s@DescribeSSLPolicies' {} Maybe Natural
a -> DescribeSSLPolicies
s {$sel:pageSize:DescribeSSLPolicies' :: Maybe Natural
pageSize = Maybe Natural
a} :: DescribeSSLPolicies)

instance Core.AWSPager DescribeSSLPolicies where
  page :: DescribeSSLPolicies
-> AWSResponse DescribeSSLPolicies -> Maybe DescribeSSLPolicies
page DescribeSSLPolicies
rq AWSResponse DescribeSSLPolicies
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeSSLPolicies
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeSSLPoliciesResponse (Maybe Text)
describeSSLPoliciesResponse_nextMarker
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeSSLPolicies
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeSSLPoliciesResponse (Maybe [SslPolicy])
describeSSLPoliciesResponse_sslPolicies
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeSSLPolicies
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeSSLPolicies (Maybe Text)
describeSSLPolicies_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeSSLPolicies
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeSSLPoliciesResponse (Maybe Text)
describeSSLPoliciesResponse_nextMarker
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeSSLPolicies where
  type
    AWSResponse DescribeSSLPolicies =
      DescribeSSLPoliciesResponse
  request :: (Service -> Service)
-> DescribeSSLPolicies -> Request DescribeSSLPolicies
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeSSLPolicies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSSLPolicies)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeSSLPoliciesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [SslPolicy] -> Int -> DescribeSSLPoliciesResponse
DescribeSSLPoliciesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NextMarker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"SslPolicies"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeSSLPolicies where
  hashWithSalt :: Int -> DescribeSSLPolicies -> Int
hashWithSalt Int
_salt DescribeSSLPolicies' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe LoadBalancerTypeEnum
pageSize :: Maybe Natural
names :: Maybe [Text]
marker :: Maybe Text
loadBalancerType :: Maybe LoadBalancerTypeEnum
$sel:pageSize:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe Natural
$sel:names:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe [Text]
$sel:marker:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe Text
$sel:loadBalancerType:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe LoadBalancerTypeEnum
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LoadBalancerTypeEnum
loadBalancerType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
names
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
pageSize

instance Prelude.NFData DescribeSSLPolicies where
  rnf :: DescribeSSLPolicies -> ()
rnf DescribeSSLPolicies' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe LoadBalancerTypeEnum
pageSize :: Maybe Natural
names :: Maybe [Text]
marker :: Maybe Text
loadBalancerType :: Maybe LoadBalancerTypeEnum
$sel:pageSize:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe Natural
$sel:names:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe [Text]
$sel:marker:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe Text
$sel:loadBalancerType:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe LoadBalancerTypeEnum
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe LoadBalancerTypeEnum
loadBalancerType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
names
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
pageSize

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

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

instance Data.ToQuery DescribeSSLPolicies where
  toQuery :: DescribeSSLPolicies -> QueryString
toQuery DescribeSSLPolicies' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe LoadBalancerTypeEnum
pageSize :: Maybe Natural
names :: Maybe [Text]
marker :: Maybe Text
loadBalancerType :: Maybe LoadBalancerTypeEnum
$sel:pageSize:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe Natural
$sel:names:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe [Text]
$sel:marker:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe Text
$sel:loadBalancerType:DescribeSSLPolicies' :: DescribeSSLPolicies -> Maybe LoadBalancerTypeEnum
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeSSLPolicies" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-12-01" :: Prelude.ByteString),
        ByteString
"LoadBalancerType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe LoadBalancerTypeEnum
loadBalancerType,
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"Names"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
names),
        ByteString
"PageSize" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
pageSize
      ]

-- | /See:/ 'newDescribeSSLPoliciesResponse' smart constructor.
data DescribeSSLPoliciesResponse = DescribeSSLPoliciesResponse'
  { -- | If there are additional results, this is the marker for the next set of
    -- results. Otherwise, this is null.
    DescribeSSLPoliciesResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | Information about the security policies.
    DescribeSSLPoliciesResponse -> Maybe [SslPolicy]
sslPolicies :: Prelude.Maybe [SslPolicy],
    -- | The response's http status code.
    DescribeSSLPoliciesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeSSLPoliciesResponse -> DescribeSSLPoliciesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSSLPoliciesResponse -> DescribeSSLPoliciesResponse -> Bool
$c/= :: DescribeSSLPoliciesResponse -> DescribeSSLPoliciesResponse -> Bool
== :: DescribeSSLPoliciesResponse -> DescribeSSLPoliciesResponse -> Bool
$c== :: DescribeSSLPoliciesResponse -> DescribeSSLPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSSLPoliciesResponse]
ReadPrec DescribeSSLPoliciesResponse
Int -> ReadS DescribeSSLPoliciesResponse
ReadS [DescribeSSLPoliciesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSSLPoliciesResponse]
$creadListPrec :: ReadPrec [DescribeSSLPoliciesResponse]
readPrec :: ReadPrec DescribeSSLPoliciesResponse
$creadPrec :: ReadPrec DescribeSSLPoliciesResponse
readList :: ReadS [DescribeSSLPoliciesResponse]
$creadList :: ReadS [DescribeSSLPoliciesResponse]
readsPrec :: Int -> ReadS DescribeSSLPoliciesResponse
$creadsPrec :: Int -> ReadS DescribeSSLPoliciesResponse
Prelude.Read, Int -> DescribeSSLPoliciesResponse -> ShowS
[DescribeSSLPoliciesResponse] -> ShowS
DescribeSSLPoliciesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSSLPoliciesResponse] -> ShowS
$cshowList :: [DescribeSSLPoliciesResponse] -> ShowS
show :: DescribeSSLPoliciesResponse -> String
$cshow :: DescribeSSLPoliciesResponse -> String
showsPrec :: Int -> DescribeSSLPoliciesResponse -> ShowS
$cshowsPrec :: Int -> DescribeSSLPoliciesResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeSSLPoliciesResponse x -> DescribeSSLPoliciesResponse
forall x.
DescribeSSLPoliciesResponse -> Rep DescribeSSLPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSSLPoliciesResponse x -> DescribeSSLPoliciesResponse
$cfrom :: forall x.
DescribeSSLPoliciesResponse -> Rep DescribeSSLPoliciesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSSLPoliciesResponse' 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:
--
-- 'nextMarker', 'describeSSLPoliciesResponse_nextMarker' - If there are additional results, this is the marker for the next set of
-- results. Otherwise, this is null.
--
-- 'sslPolicies', 'describeSSLPoliciesResponse_sslPolicies' - Information about the security policies.
--
-- 'httpStatus', 'describeSSLPoliciesResponse_httpStatus' - The response's http status code.
newDescribeSSLPoliciesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeSSLPoliciesResponse
newDescribeSSLPoliciesResponse :: Int -> DescribeSSLPoliciesResponse
newDescribeSSLPoliciesResponse Int
pHttpStatus_ =
  DescribeSSLPoliciesResponse'
    { $sel:nextMarker:DescribeSSLPoliciesResponse' :: Maybe Text
nextMarker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:sslPolicies:DescribeSSLPoliciesResponse' :: Maybe [SslPolicy]
sslPolicies = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeSSLPoliciesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If there are additional results, this is the marker for the next set of
-- results. Otherwise, this is null.
describeSSLPoliciesResponse_nextMarker :: Lens.Lens' DescribeSSLPoliciesResponse (Prelude.Maybe Prelude.Text)
describeSSLPoliciesResponse_nextMarker :: Lens' DescribeSSLPoliciesResponse (Maybe Text)
describeSSLPoliciesResponse_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSSLPoliciesResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:DescribeSSLPoliciesResponse' :: DescribeSSLPoliciesResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: DescribeSSLPoliciesResponse
s@DescribeSSLPoliciesResponse' {} Maybe Text
a -> DescribeSSLPoliciesResponse
s {$sel:nextMarker:DescribeSSLPoliciesResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: DescribeSSLPoliciesResponse)

-- | Information about the security policies.
describeSSLPoliciesResponse_sslPolicies :: Lens.Lens' DescribeSSLPoliciesResponse (Prelude.Maybe [SslPolicy])
describeSSLPoliciesResponse_sslPolicies :: Lens' DescribeSSLPoliciesResponse (Maybe [SslPolicy])
describeSSLPoliciesResponse_sslPolicies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSSLPoliciesResponse' {Maybe [SslPolicy]
sslPolicies :: Maybe [SslPolicy]
$sel:sslPolicies:DescribeSSLPoliciesResponse' :: DescribeSSLPoliciesResponse -> Maybe [SslPolicy]
sslPolicies} -> Maybe [SslPolicy]
sslPolicies) (\s :: DescribeSSLPoliciesResponse
s@DescribeSSLPoliciesResponse' {} Maybe [SslPolicy]
a -> DescribeSSLPoliciesResponse
s {$sel:sslPolicies:DescribeSSLPoliciesResponse' :: Maybe [SslPolicy]
sslPolicies = Maybe [SslPolicy]
a} :: DescribeSSLPoliciesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeSSLPoliciesResponse where
  rnf :: DescribeSSLPoliciesResponse -> ()
rnf DescribeSSLPoliciesResponse' {Int
Maybe [SslPolicy]
Maybe Text
httpStatus :: Int
sslPolicies :: Maybe [SslPolicy]
nextMarker :: Maybe Text
$sel:httpStatus:DescribeSSLPoliciesResponse' :: DescribeSSLPoliciesResponse -> Int
$sel:sslPolicies:DescribeSSLPoliciesResponse' :: DescribeSSLPoliciesResponse -> Maybe [SslPolicy]
$sel:nextMarker:DescribeSSLPoliciesResponse' :: DescribeSSLPoliciesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SslPolicy]
sslPolicies
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus