{-# 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 #-}
module Amazonka.Lightsail.GetLoadBalancerTlsPolicies
(
GetLoadBalancerTlsPolicies (..),
newGetLoadBalancerTlsPolicies,
getLoadBalancerTlsPolicies_pageToken,
GetLoadBalancerTlsPoliciesResponse (..),
newGetLoadBalancerTlsPoliciesResponse,
getLoadBalancerTlsPoliciesResponse_nextPageToken,
getLoadBalancerTlsPoliciesResponse_tlsPolicies,
getLoadBalancerTlsPoliciesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lightsail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetLoadBalancerTlsPolicies = GetLoadBalancerTlsPolicies'
{
GetLoadBalancerTlsPolicies -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text
}
deriving (GetLoadBalancerTlsPolicies -> GetLoadBalancerTlsPolicies -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLoadBalancerTlsPolicies -> GetLoadBalancerTlsPolicies -> Bool
$c/= :: GetLoadBalancerTlsPolicies -> GetLoadBalancerTlsPolicies -> Bool
== :: GetLoadBalancerTlsPolicies -> GetLoadBalancerTlsPolicies -> Bool
$c== :: GetLoadBalancerTlsPolicies -> GetLoadBalancerTlsPolicies -> Bool
Prelude.Eq, ReadPrec [GetLoadBalancerTlsPolicies]
ReadPrec GetLoadBalancerTlsPolicies
Int -> ReadS GetLoadBalancerTlsPolicies
ReadS [GetLoadBalancerTlsPolicies]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLoadBalancerTlsPolicies]
$creadListPrec :: ReadPrec [GetLoadBalancerTlsPolicies]
readPrec :: ReadPrec GetLoadBalancerTlsPolicies
$creadPrec :: ReadPrec GetLoadBalancerTlsPolicies
readList :: ReadS [GetLoadBalancerTlsPolicies]
$creadList :: ReadS [GetLoadBalancerTlsPolicies]
readsPrec :: Int -> ReadS GetLoadBalancerTlsPolicies
$creadsPrec :: Int -> ReadS GetLoadBalancerTlsPolicies
Prelude.Read, Int -> GetLoadBalancerTlsPolicies -> ShowS
[GetLoadBalancerTlsPolicies] -> ShowS
GetLoadBalancerTlsPolicies -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLoadBalancerTlsPolicies] -> ShowS
$cshowList :: [GetLoadBalancerTlsPolicies] -> ShowS
show :: GetLoadBalancerTlsPolicies -> String
$cshow :: GetLoadBalancerTlsPolicies -> String
showsPrec :: Int -> GetLoadBalancerTlsPolicies -> ShowS
$cshowsPrec :: Int -> GetLoadBalancerTlsPolicies -> ShowS
Prelude.Show, forall x.
Rep GetLoadBalancerTlsPolicies x -> GetLoadBalancerTlsPolicies
forall x.
GetLoadBalancerTlsPolicies -> Rep GetLoadBalancerTlsPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLoadBalancerTlsPolicies x -> GetLoadBalancerTlsPolicies
$cfrom :: forall x.
GetLoadBalancerTlsPolicies -> Rep GetLoadBalancerTlsPolicies x
Prelude.Generic)
newGetLoadBalancerTlsPolicies ::
GetLoadBalancerTlsPolicies
newGetLoadBalancerTlsPolicies :: GetLoadBalancerTlsPolicies
newGetLoadBalancerTlsPolicies =
GetLoadBalancerTlsPolicies'
{ $sel:pageToken:GetLoadBalancerTlsPolicies' :: Maybe Text
pageToken =
forall a. Maybe a
Prelude.Nothing
}
getLoadBalancerTlsPolicies_pageToken :: Lens.Lens' GetLoadBalancerTlsPolicies (Prelude.Maybe Prelude.Text)
getLoadBalancerTlsPolicies_pageToken :: Lens' GetLoadBalancerTlsPolicies (Maybe Text)
getLoadBalancerTlsPolicies_pageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerTlsPolicies' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:GetLoadBalancerTlsPolicies' :: GetLoadBalancerTlsPolicies -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: GetLoadBalancerTlsPolicies
s@GetLoadBalancerTlsPolicies' {} Maybe Text
a -> GetLoadBalancerTlsPolicies
s {$sel:pageToken:GetLoadBalancerTlsPolicies' :: Maybe Text
pageToken = Maybe Text
a} :: GetLoadBalancerTlsPolicies)
instance Core.AWSRequest GetLoadBalancerTlsPolicies where
type
AWSResponse GetLoadBalancerTlsPolicies =
GetLoadBalancerTlsPoliciesResponse
request :: (Service -> Service)
-> GetLoadBalancerTlsPolicies -> Request GetLoadBalancerTlsPolicies
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetLoadBalancerTlsPolicies
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetLoadBalancerTlsPolicies)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe [LoadBalancerTlsPolicy]
-> Int
-> GetLoadBalancerTlsPoliciesResponse
GetLoadBalancerTlsPoliciesResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextPageToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tlsPolicies" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
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 GetLoadBalancerTlsPolicies where
hashWithSalt :: Int -> GetLoadBalancerTlsPolicies -> Int
hashWithSalt Int
_salt GetLoadBalancerTlsPolicies' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:GetLoadBalancerTlsPolicies' :: GetLoadBalancerTlsPolicies -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pageToken
instance Prelude.NFData GetLoadBalancerTlsPolicies where
rnf :: GetLoadBalancerTlsPolicies -> ()
rnf GetLoadBalancerTlsPolicies' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:GetLoadBalancerTlsPolicies' :: GetLoadBalancerTlsPolicies -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pageToken
instance Data.ToHeaders GetLoadBalancerTlsPolicies where
toHeaders :: GetLoadBalancerTlsPolicies -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"Lightsail_20161128.GetLoadBalancerTlsPolicies" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON GetLoadBalancerTlsPolicies where
toJSON :: GetLoadBalancerTlsPolicies -> Value
toJSON GetLoadBalancerTlsPolicies' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:GetLoadBalancerTlsPolicies' :: GetLoadBalancerTlsPolicies -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"pageToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pageToken]
)
instance Data.ToPath GetLoadBalancerTlsPolicies where
toPath :: GetLoadBalancerTlsPolicies -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetLoadBalancerTlsPolicies where
toQuery :: GetLoadBalancerTlsPolicies -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetLoadBalancerTlsPoliciesResponse = GetLoadBalancerTlsPoliciesResponse'
{
GetLoadBalancerTlsPoliciesResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
GetLoadBalancerTlsPoliciesResponse -> Maybe [LoadBalancerTlsPolicy]
tlsPolicies :: Prelude.Maybe [LoadBalancerTlsPolicy],
GetLoadBalancerTlsPoliciesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetLoadBalancerTlsPoliciesResponse
-> GetLoadBalancerTlsPoliciesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLoadBalancerTlsPoliciesResponse
-> GetLoadBalancerTlsPoliciesResponse -> Bool
$c/= :: GetLoadBalancerTlsPoliciesResponse
-> GetLoadBalancerTlsPoliciesResponse -> Bool
== :: GetLoadBalancerTlsPoliciesResponse
-> GetLoadBalancerTlsPoliciesResponse -> Bool
$c== :: GetLoadBalancerTlsPoliciesResponse
-> GetLoadBalancerTlsPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [GetLoadBalancerTlsPoliciesResponse]
ReadPrec GetLoadBalancerTlsPoliciesResponse
Int -> ReadS GetLoadBalancerTlsPoliciesResponse
ReadS [GetLoadBalancerTlsPoliciesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLoadBalancerTlsPoliciesResponse]
$creadListPrec :: ReadPrec [GetLoadBalancerTlsPoliciesResponse]
readPrec :: ReadPrec GetLoadBalancerTlsPoliciesResponse
$creadPrec :: ReadPrec GetLoadBalancerTlsPoliciesResponse
readList :: ReadS [GetLoadBalancerTlsPoliciesResponse]
$creadList :: ReadS [GetLoadBalancerTlsPoliciesResponse]
readsPrec :: Int -> ReadS GetLoadBalancerTlsPoliciesResponse
$creadsPrec :: Int -> ReadS GetLoadBalancerTlsPoliciesResponse
Prelude.Read, Int -> GetLoadBalancerTlsPoliciesResponse -> ShowS
[GetLoadBalancerTlsPoliciesResponse] -> ShowS
GetLoadBalancerTlsPoliciesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLoadBalancerTlsPoliciesResponse] -> ShowS
$cshowList :: [GetLoadBalancerTlsPoliciesResponse] -> ShowS
show :: GetLoadBalancerTlsPoliciesResponse -> String
$cshow :: GetLoadBalancerTlsPoliciesResponse -> String
showsPrec :: Int -> GetLoadBalancerTlsPoliciesResponse -> ShowS
$cshowsPrec :: Int -> GetLoadBalancerTlsPoliciesResponse -> ShowS
Prelude.Show, forall x.
Rep GetLoadBalancerTlsPoliciesResponse x
-> GetLoadBalancerTlsPoliciesResponse
forall x.
GetLoadBalancerTlsPoliciesResponse
-> Rep GetLoadBalancerTlsPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLoadBalancerTlsPoliciesResponse x
-> GetLoadBalancerTlsPoliciesResponse
$cfrom :: forall x.
GetLoadBalancerTlsPoliciesResponse
-> Rep GetLoadBalancerTlsPoliciesResponse x
Prelude.Generic)
newGetLoadBalancerTlsPoliciesResponse ::
Prelude.Int ->
GetLoadBalancerTlsPoliciesResponse
newGetLoadBalancerTlsPoliciesResponse :: Int -> GetLoadBalancerTlsPoliciesResponse
newGetLoadBalancerTlsPoliciesResponse Int
pHttpStatus_ =
GetLoadBalancerTlsPoliciesResponse'
{ $sel:nextPageToken:GetLoadBalancerTlsPoliciesResponse' :: Maybe Text
nextPageToken =
forall a. Maybe a
Prelude.Nothing,
$sel:tlsPolicies:GetLoadBalancerTlsPoliciesResponse' :: Maybe [LoadBalancerTlsPolicy]
tlsPolicies = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetLoadBalancerTlsPoliciesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getLoadBalancerTlsPoliciesResponse_nextPageToken :: Lens.Lens' GetLoadBalancerTlsPoliciesResponse (Prelude.Maybe Prelude.Text)
getLoadBalancerTlsPoliciesResponse_nextPageToken :: Lens' GetLoadBalancerTlsPoliciesResponse (Maybe Text)
getLoadBalancerTlsPoliciesResponse_nextPageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerTlsPoliciesResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetLoadBalancerTlsPoliciesResponse' :: GetLoadBalancerTlsPoliciesResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetLoadBalancerTlsPoliciesResponse
s@GetLoadBalancerTlsPoliciesResponse' {} Maybe Text
a -> GetLoadBalancerTlsPoliciesResponse
s {$sel:nextPageToken:GetLoadBalancerTlsPoliciesResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetLoadBalancerTlsPoliciesResponse)
getLoadBalancerTlsPoliciesResponse_tlsPolicies :: Lens.Lens' GetLoadBalancerTlsPoliciesResponse (Prelude.Maybe [LoadBalancerTlsPolicy])
getLoadBalancerTlsPoliciesResponse_tlsPolicies :: Lens'
GetLoadBalancerTlsPoliciesResponse (Maybe [LoadBalancerTlsPolicy])
getLoadBalancerTlsPoliciesResponse_tlsPolicies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerTlsPoliciesResponse' {Maybe [LoadBalancerTlsPolicy]
tlsPolicies :: Maybe [LoadBalancerTlsPolicy]
$sel:tlsPolicies:GetLoadBalancerTlsPoliciesResponse' :: GetLoadBalancerTlsPoliciesResponse -> Maybe [LoadBalancerTlsPolicy]
tlsPolicies} -> Maybe [LoadBalancerTlsPolicy]
tlsPolicies) (\s :: GetLoadBalancerTlsPoliciesResponse
s@GetLoadBalancerTlsPoliciesResponse' {} Maybe [LoadBalancerTlsPolicy]
a -> GetLoadBalancerTlsPoliciesResponse
s {$sel:tlsPolicies:GetLoadBalancerTlsPoliciesResponse' :: Maybe [LoadBalancerTlsPolicy]
tlsPolicies = Maybe [LoadBalancerTlsPolicy]
a} :: GetLoadBalancerTlsPoliciesResponse) 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
getLoadBalancerTlsPoliciesResponse_httpStatus :: Lens.Lens' GetLoadBalancerTlsPoliciesResponse Prelude.Int
getLoadBalancerTlsPoliciesResponse_httpStatus :: Lens' GetLoadBalancerTlsPoliciesResponse Int
getLoadBalancerTlsPoliciesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLoadBalancerTlsPoliciesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetLoadBalancerTlsPoliciesResponse' :: GetLoadBalancerTlsPoliciesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetLoadBalancerTlsPoliciesResponse
s@GetLoadBalancerTlsPoliciesResponse' {} Int
a -> GetLoadBalancerTlsPoliciesResponse
s {$sel:httpStatus:GetLoadBalancerTlsPoliciesResponse' :: Int
httpStatus = Int
a} :: GetLoadBalancerTlsPoliciesResponse)
instance
Prelude.NFData
GetLoadBalancerTlsPoliciesResponse
where
rnf :: GetLoadBalancerTlsPoliciesResponse -> ()
rnf GetLoadBalancerTlsPoliciesResponse' {Int
Maybe [LoadBalancerTlsPolicy]
Maybe Text
httpStatus :: Int
tlsPolicies :: Maybe [LoadBalancerTlsPolicy]
nextPageToken :: Maybe Text
$sel:httpStatus:GetLoadBalancerTlsPoliciesResponse' :: GetLoadBalancerTlsPoliciesResponse -> Int
$sel:tlsPolicies:GetLoadBalancerTlsPoliciesResponse' :: GetLoadBalancerTlsPoliciesResponse -> Maybe [LoadBalancerTlsPolicy]
$sel:nextPageToken:GetLoadBalancerTlsPoliciesResponse' :: GetLoadBalancerTlsPoliciesResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextPageToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [LoadBalancerTlsPolicy]
tlsPolicies
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus