{-# 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.CloudSearch.DescribeServiceAccessPolicies
(
DescribeServiceAccessPolicies (..),
newDescribeServiceAccessPolicies,
describeServiceAccessPolicies_deployed,
describeServiceAccessPolicies_domainName,
DescribeServiceAccessPoliciesResponse (..),
newDescribeServiceAccessPoliciesResponse,
describeServiceAccessPoliciesResponse_httpStatus,
describeServiceAccessPoliciesResponse_accessPolicies,
)
where
import Amazonka.CloudSearch.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
data DescribeServiceAccessPolicies = DescribeServiceAccessPolicies'
{
DescribeServiceAccessPolicies -> Maybe Bool
deployed :: Prelude.Maybe Prelude.Bool,
DescribeServiceAccessPolicies -> Text
domainName :: Prelude.Text
}
deriving (DescribeServiceAccessPolicies
-> DescribeServiceAccessPolicies -> Bool
(DescribeServiceAccessPolicies
-> DescribeServiceAccessPolicies -> Bool)
-> (DescribeServiceAccessPolicies
-> DescribeServiceAccessPolicies -> Bool)
-> Eq DescribeServiceAccessPolicies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeServiceAccessPolicies
-> DescribeServiceAccessPolicies -> Bool
$c/= :: DescribeServiceAccessPolicies
-> DescribeServiceAccessPolicies -> Bool
== :: DescribeServiceAccessPolicies
-> DescribeServiceAccessPolicies -> Bool
$c== :: DescribeServiceAccessPolicies
-> DescribeServiceAccessPolicies -> Bool
Prelude.Eq, ReadPrec [DescribeServiceAccessPolicies]
ReadPrec DescribeServiceAccessPolicies
Int -> ReadS DescribeServiceAccessPolicies
ReadS [DescribeServiceAccessPolicies]
(Int -> ReadS DescribeServiceAccessPolicies)
-> ReadS [DescribeServiceAccessPolicies]
-> ReadPrec DescribeServiceAccessPolicies
-> ReadPrec [DescribeServiceAccessPolicies]
-> Read DescribeServiceAccessPolicies
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeServiceAccessPolicies]
$creadListPrec :: ReadPrec [DescribeServiceAccessPolicies]
readPrec :: ReadPrec DescribeServiceAccessPolicies
$creadPrec :: ReadPrec DescribeServiceAccessPolicies
readList :: ReadS [DescribeServiceAccessPolicies]
$creadList :: ReadS [DescribeServiceAccessPolicies]
readsPrec :: Int -> ReadS DescribeServiceAccessPolicies
$creadsPrec :: Int -> ReadS DescribeServiceAccessPolicies
Prelude.Read, Int -> DescribeServiceAccessPolicies -> ShowS
[DescribeServiceAccessPolicies] -> ShowS
DescribeServiceAccessPolicies -> String
(Int -> DescribeServiceAccessPolicies -> ShowS)
-> (DescribeServiceAccessPolicies -> String)
-> ([DescribeServiceAccessPolicies] -> ShowS)
-> Show DescribeServiceAccessPolicies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeServiceAccessPolicies] -> ShowS
$cshowList :: [DescribeServiceAccessPolicies] -> ShowS
show :: DescribeServiceAccessPolicies -> String
$cshow :: DescribeServiceAccessPolicies -> String
showsPrec :: Int -> DescribeServiceAccessPolicies -> ShowS
$cshowsPrec :: Int -> DescribeServiceAccessPolicies -> ShowS
Prelude.Show, (forall x.
DescribeServiceAccessPolicies
-> Rep DescribeServiceAccessPolicies x)
-> (forall x.
Rep DescribeServiceAccessPolicies x
-> DescribeServiceAccessPolicies)
-> Generic DescribeServiceAccessPolicies
forall x.
Rep DescribeServiceAccessPolicies x
-> DescribeServiceAccessPolicies
forall x.
DescribeServiceAccessPolicies
-> Rep DescribeServiceAccessPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeServiceAccessPolicies x
-> DescribeServiceAccessPolicies
$cfrom :: forall x.
DescribeServiceAccessPolicies
-> Rep DescribeServiceAccessPolicies x
Prelude.Generic)
newDescribeServiceAccessPolicies ::
Prelude.Text ->
DescribeServiceAccessPolicies
newDescribeServiceAccessPolicies :: Text -> DescribeServiceAccessPolicies
newDescribeServiceAccessPolicies Text
pDomainName_ =
DescribeServiceAccessPolicies' :: Maybe Bool -> Text -> DescribeServiceAccessPolicies
DescribeServiceAccessPolicies'
{ $sel:deployed:DescribeServiceAccessPolicies' :: Maybe Bool
deployed =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:DescribeServiceAccessPolicies' :: Text
domainName = Text
pDomainName_
}
describeServiceAccessPolicies_deployed :: Lens.Lens' DescribeServiceAccessPolicies (Prelude.Maybe Prelude.Bool)
describeServiceAccessPolicies_deployed :: (Maybe Bool -> f (Maybe Bool))
-> DescribeServiceAccessPolicies -> f DescribeServiceAccessPolicies
describeServiceAccessPolicies_deployed = (DescribeServiceAccessPolicies -> Maybe Bool)
-> (DescribeServiceAccessPolicies
-> Maybe Bool -> DescribeServiceAccessPolicies)
-> Lens
DescribeServiceAccessPolicies
DescribeServiceAccessPolicies
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServiceAccessPolicies' {Maybe Bool
deployed :: Maybe Bool
$sel:deployed:DescribeServiceAccessPolicies' :: DescribeServiceAccessPolicies -> Maybe Bool
deployed} -> Maybe Bool
deployed) (\s :: DescribeServiceAccessPolicies
s@DescribeServiceAccessPolicies' {} Maybe Bool
a -> DescribeServiceAccessPolicies
s {$sel:deployed:DescribeServiceAccessPolicies' :: Maybe Bool
deployed = Maybe Bool
a} :: DescribeServiceAccessPolicies)
describeServiceAccessPolicies_domainName :: Lens.Lens' DescribeServiceAccessPolicies Prelude.Text
describeServiceAccessPolicies_domainName :: (Text -> f Text)
-> DescribeServiceAccessPolicies -> f DescribeServiceAccessPolicies
describeServiceAccessPolicies_domainName = (DescribeServiceAccessPolicies -> Text)
-> (DescribeServiceAccessPolicies
-> Text -> DescribeServiceAccessPolicies)
-> Lens
DescribeServiceAccessPolicies
DescribeServiceAccessPolicies
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServiceAccessPolicies' {Text
domainName :: Text
$sel:domainName:DescribeServiceAccessPolicies' :: DescribeServiceAccessPolicies -> Text
domainName} -> Text
domainName) (\s :: DescribeServiceAccessPolicies
s@DescribeServiceAccessPolicies' {} Text
a -> DescribeServiceAccessPolicies
s {$sel:domainName:DescribeServiceAccessPolicies' :: Text
domainName = Text
a} :: DescribeServiceAccessPolicies)
instance
Core.AWSRequest
DescribeServiceAccessPolicies
where
type
AWSResponse DescribeServiceAccessPolicies =
DescribeServiceAccessPoliciesResponse
request :: DescribeServiceAccessPolicies
-> Request DescribeServiceAccessPolicies
request = Service
-> DescribeServiceAccessPolicies
-> Request DescribeServiceAccessPolicies
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeServiceAccessPolicies
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeServiceAccessPolicies)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeServiceAccessPolicies))
-> Logger
-> Service
-> Proxy DescribeServiceAccessPolicies
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeServiceAccessPolicies)))
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
"DescribeServiceAccessPoliciesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int
-> AccessPoliciesStatus -> DescribeServiceAccessPoliciesResponse
DescribeServiceAccessPoliciesResponse'
(Int
-> AccessPoliciesStatus -> DescribeServiceAccessPoliciesResponse)
-> Either String Int
-> Either
String
(AccessPoliciesStatus -> DescribeServiceAccessPoliciesResponse)
forall (f :: * -> *) a b. Functor 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))
Either
String
(AccessPoliciesStatus -> DescribeServiceAccessPoliciesResponse)
-> Either String AccessPoliciesStatus
-> Either String DescribeServiceAccessPoliciesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String AccessPoliciesStatus
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"AccessPolicies")
)
instance
Prelude.Hashable
DescribeServiceAccessPolicies
instance Prelude.NFData DescribeServiceAccessPolicies
instance Core.ToHeaders DescribeServiceAccessPolicies where
toHeaders :: DescribeServiceAccessPolicies -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeServiceAccessPolicies -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeServiceAccessPolicies where
toPath :: DescribeServiceAccessPolicies -> ByteString
toPath = ByteString -> DescribeServiceAccessPolicies -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeServiceAccessPolicies where
toQuery :: DescribeServiceAccessPolicies -> QueryString
toQuery DescribeServiceAccessPolicies' {Maybe Bool
Text
domainName :: Text
deployed :: Maybe Bool
$sel:domainName:DescribeServiceAccessPolicies' :: DescribeServiceAccessPolicies -> Text
$sel:deployed:DescribeServiceAccessPolicies' :: DescribeServiceAccessPolicies -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeServiceAccessPolicies" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2013-01-01" :: Prelude.ByteString),
ByteString
"Deployed" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
deployed,
ByteString
"DomainName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
domainName
]
data DescribeServiceAccessPoliciesResponse = DescribeServiceAccessPoliciesResponse'
{
DescribeServiceAccessPoliciesResponse -> Int
httpStatus :: Prelude.Int,
DescribeServiceAccessPoliciesResponse -> AccessPoliciesStatus
accessPolicies :: AccessPoliciesStatus
}
deriving (DescribeServiceAccessPoliciesResponse
-> DescribeServiceAccessPoliciesResponse -> Bool
(DescribeServiceAccessPoliciesResponse
-> DescribeServiceAccessPoliciesResponse -> Bool)
-> (DescribeServiceAccessPoliciesResponse
-> DescribeServiceAccessPoliciesResponse -> Bool)
-> Eq DescribeServiceAccessPoliciesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeServiceAccessPoliciesResponse
-> DescribeServiceAccessPoliciesResponse -> Bool
$c/= :: DescribeServiceAccessPoliciesResponse
-> DescribeServiceAccessPoliciesResponse -> Bool
== :: DescribeServiceAccessPoliciesResponse
-> DescribeServiceAccessPoliciesResponse -> Bool
$c== :: DescribeServiceAccessPoliciesResponse
-> DescribeServiceAccessPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeServiceAccessPoliciesResponse]
ReadPrec DescribeServiceAccessPoliciesResponse
Int -> ReadS DescribeServiceAccessPoliciesResponse
ReadS [DescribeServiceAccessPoliciesResponse]
(Int -> ReadS DescribeServiceAccessPoliciesResponse)
-> ReadS [DescribeServiceAccessPoliciesResponse]
-> ReadPrec DescribeServiceAccessPoliciesResponse
-> ReadPrec [DescribeServiceAccessPoliciesResponse]
-> Read DescribeServiceAccessPoliciesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeServiceAccessPoliciesResponse]
$creadListPrec :: ReadPrec [DescribeServiceAccessPoliciesResponse]
readPrec :: ReadPrec DescribeServiceAccessPoliciesResponse
$creadPrec :: ReadPrec DescribeServiceAccessPoliciesResponse
readList :: ReadS [DescribeServiceAccessPoliciesResponse]
$creadList :: ReadS [DescribeServiceAccessPoliciesResponse]
readsPrec :: Int -> ReadS DescribeServiceAccessPoliciesResponse
$creadsPrec :: Int -> ReadS DescribeServiceAccessPoliciesResponse
Prelude.Read, Int -> DescribeServiceAccessPoliciesResponse -> ShowS
[DescribeServiceAccessPoliciesResponse] -> ShowS
DescribeServiceAccessPoliciesResponse -> String
(Int -> DescribeServiceAccessPoliciesResponse -> ShowS)
-> (DescribeServiceAccessPoliciesResponse -> String)
-> ([DescribeServiceAccessPoliciesResponse] -> ShowS)
-> Show DescribeServiceAccessPoliciesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeServiceAccessPoliciesResponse] -> ShowS
$cshowList :: [DescribeServiceAccessPoliciesResponse] -> ShowS
show :: DescribeServiceAccessPoliciesResponse -> String
$cshow :: DescribeServiceAccessPoliciesResponse -> String
showsPrec :: Int -> DescribeServiceAccessPoliciesResponse -> ShowS
$cshowsPrec :: Int -> DescribeServiceAccessPoliciesResponse -> ShowS
Prelude.Show, (forall x.
DescribeServiceAccessPoliciesResponse
-> Rep DescribeServiceAccessPoliciesResponse x)
-> (forall x.
Rep DescribeServiceAccessPoliciesResponse x
-> DescribeServiceAccessPoliciesResponse)
-> Generic DescribeServiceAccessPoliciesResponse
forall x.
Rep DescribeServiceAccessPoliciesResponse x
-> DescribeServiceAccessPoliciesResponse
forall x.
DescribeServiceAccessPoliciesResponse
-> Rep DescribeServiceAccessPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeServiceAccessPoliciesResponse x
-> DescribeServiceAccessPoliciesResponse
$cfrom :: forall x.
DescribeServiceAccessPoliciesResponse
-> Rep DescribeServiceAccessPoliciesResponse x
Prelude.Generic)
newDescribeServiceAccessPoliciesResponse ::
Prelude.Int ->
AccessPoliciesStatus ->
DescribeServiceAccessPoliciesResponse
newDescribeServiceAccessPoliciesResponse :: Int
-> AccessPoliciesStatus -> DescribeServiceAccessPoliciesResponse
newDescribeServiceAccessPoliciesResponse
Int
pHttpStatus_
AccessPoliciesStatus
pAccessPolicies_ =
DescribeServiceAccessPoliciesResponse' :: Int
-> AccessPoliciesStatus -> DescribeServiceAccessPoliciesResponse
DescribeServiceAccessPoliciesResponse'
{ $sel:httpStatus:DescribeServiceAccessPoliciesResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:accessPolicies:DescribeServiceAccessPoliciesResponse' :: AccessPoliciesStatus
accessPolicies = AccessPoliciesStatus
pAccessPolicies_
}
describeServiceAccessPoliciesResponse_httpStatus :: Lens.Lens' DescribeServiceAccessPoliciesResponse Prelude.Int
describeServiceAccessPoliciesResponse_httpStatus :: (Int -> f Int)
-> DescribeServiceAccessPoliciesResponse
-> f DescribeServiceAccessPoliciesResponse
describeServiceAccessPoliciesResponse_httpStatus = (DescribeServiceAccessPoliciesResponse -> Int)
-> (DescribeServiceAccessPoliciesResponse
-> Int -> DescribeServiceAccessPoliciesResponse)
-> Lens
DescribeServiceAccessPoliciesResponse
DescribeServiceAccessPoliciesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServiceAccessPoliciesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeServiceAccessPoliciesResponse' :: DescribeServiceAccessPoliciesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeServiceAccessPoliciesResponse
s@DescribeServiceAccessPoliciesResponse' {} Int
a -> DescribeServiceAccessPoliciesResponse
s {$sel:httpStatus:DescribeServiceAccessPoliciesResponse' :: Int
httpStatus = Int
a} :: DescribeServiceAccessPoliciesResponse)
describeServiceAccessPoliciesResponse_accessPolicies :: Lens.Lens' DescribeServiceAccessPoliciesResponse AccessPoliciesStatus
describeServiceAccessPoliciesResponse_accessPolicies :: (AccessPoliciesStatus -> f AccessPoliciesStatus)
-> DescribeServiceAccessPoliciesResponse
-> f DescribeServiceAccessPoliciesResponse
describeServiceAccessPoliciesResponse_accessPolicies = (DescribeServiceAccessPoliciesResponse -> AccessPoliciesStatus)
-> (DescribeServiceAccessPoliciesResponse
-> AccessPoliciesStatus -> DescribeServiceAccessPoliciesResponse)
-> Lens
DescribeServiceAccessPoliciesResponse
DescribeServiceAccessPoliciesResponse
AccessPoliciesStatus
AccessPoliciesStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServiceAccessPoliciesResponse' {AccessPoliciesStatus
accessPolicies :: AccessPoliciesStatus
$sel:accessPolicies:DescribeServiceAccessPoliciesResponse' :: DescribeServiceAccessPoliciesResponse -> AccessPoliciesStatus
accessPolicies} -> AccessPoliciesStatus
accessPolicies) (\s :: DescribeServiceAccessPoliciesResponse
s@DescribeServiceAccessPoliciesResponse' {} AccessPoliciesStatus
a -> DescribeServiceAccessPoliciesResponse
s {$sel:accessPolicies:DescribeServiceAccessPoliciesResponse' :: AccessPoliciesStatus
accessPolicies = AccessPoliciesStatus
a} :: DescribeServiceAccessPoliciesResponse)
instance
Prelude.NFData
DescribeServiceAccessPoliciesResponse