{-# 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.Config.DescribeOrganizationConfigRules
(
DescribeOrganizationConfigRules (..),
newDescribeOrganizationConfigRules,
describeOrganizationConfigRules_organizationConfigRuleNames,
describeOrganizationConfigRules_nextToken,
describeOrganizationConfigRules_limit,
DescribeOrganizationConfigRulesResponse (..),
newDescribeOrganizationConfigRulesResponse,
describeOrganizationConfigRulesResponse_organizationConfigRules,
describeOrganizationConfigRulesResponse_nextToken,
describeOrganizationConfigRulesResponse_httpStatus,
)
where
import Amazonka.Config.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 DescribeOrganizationConfigRules = DescribeOrganizationConfigRules'
{
DescribeOrganizationConfigRules -> Maybe [Text]
organizationConfigRuleNames :: Prelude.Maybe [Prelude.Text],
DescribeOrganizationConfigRules -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeOrganizationConfigRules -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural
}
deriving (DescribeOrganizationConfigRules
-> DescribeOrganizationConfigRules -> Bool
(DescribeOrganizationConfigRules
-> DescribeOrganizationConfigRules -> Bool)
-> (DescribeOrganizationConfigRules
-> DescribeOrganizationConfigRules -> Bool)
-> Eq DescribeOrganizationConfigRules
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeOrganizationConfigRules
-> DescribeOrganizationConfigRules -> Bool
$c/= :: DescribeOrganizationConfigRules
-> DescribeOrganizationConfigRules -> Bool
== :: DescribeOrganizationConfigRules
-> DescribeOrganizationConfigRules -> Bool
$c== :: DescribeOrganizationConfigRules
-> DescribeOrganizationConfigRules -> Bool
Prelude.Eq, ReadPrec [DescribeOrganizationConfigRules]
ReadPrec DescribeOrganizationConfigRules
Int -> ReadS DescribeOrganizationConfigRules
ReadS [DescribeOrganizationConfigRules]
(Int -> ReadS DescribeOrganizationConfigRules)
-> ReadS [DescribeOrganizationConfigRules]
-> ReadPrec DescribeOrganizationConfigRules
-> ReadPrec [DescribeOrganizationConfigRules]
-> Read DescribeOrganizationConfigRules
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeOrganizationConfigRules]
$creadListPrec :: ReadPrec [DescribeOrganizationConfigRules]
readPrec :: ReadPrec DescribeOrganizationConfigRules
$creadPrec :: ReadPrec DescribeOrganizationConfigRules
readList :: ReadS [DescribeOrganizationConfigRules]
$creadList :: ReadS [DescribeOrganizationConfigRules]
readsPrec :: Int -> ReadS DescribeOrganizationConfigRules
$creadsPrec :: Int -> ReadS DescribeOrganizationConfigRules
Prelude.Read, Int -> DescribeOrganizationConfigRules -> ShowS
[DescribeOrganizationConfigRules] -> ShowS
DescribeOrganizationConfigRules -> String
(Int -> DescribeOrganizationConfigRules -> ShowS)
-> (DescribeOrganizationConfigRules -> String)
-> ([DescribeOrganizationConfigRules] -> ShowS)
-> Show DescribeOrganizationConfigRules
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeOrganizationConfigRules] -> ShowS
$cshowList :: [DescribeOrganizationConfigRules] -> ShowS
show :: DescribeOrganizationConfigRules -> String
$cshow :: DescribeOrganizationConfigRules -> String
showsPrec :: Int -> DescribeOrganizationConfigRules -> ShowS
$cshowsPrec :: Int -> DescribeOrganizationConfigRules -> ShowS
Prelude.Show, (forall x.
DescribeOrganizationConfigRules
-> Rep DescribeOrganizationConfigRules x)
-> (forall x.
Rep DescribeOrganizationConfigRules x
-> DescribeOrganizationConfigRules)
-> Generic DescribeOrganizationConfigRules
forall x.
Rep DescribeOrganizationConfigRules x
-> DescribeOrganizationConfigRules
forall x.
DescribeOrganizationConfigRules
-> Rep DescribeOrganizationConfigRules x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeOrganizationConfigRules x
-> DescribeOrganizationConfigRules
$cfrom :: forall x.
DescribeOrganizationConfigRules
-> Rep DescribeOrganizationConfigRules x
Prelude.Generic)
newDescribeOrganizationConfigRules ::
DescribeOrganizationConfigRules
newDescribeOrganizationConfigRules :: DescribeOrganizationConfigRules
newDescribeOrganizationConfigRules =
DescribeOrganizationConfigRules' :: Maybe [Text]
-> Maybe Text -> Maybe Natural -> DescribeOrganizationConfigRules
DescribeOrganizationConfigRules'
{ $sel:organizationConfigRuleNames:DescribeOrganizationConfigRules' :: Maybe [Text]
organizationConfigRuleNames =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeOrganizationConfigRules' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeOrganizationConfigRules' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
describeOrganizationConfigRules_organizationConfigRuleNames :: Lens.Lens' DescribeOrganizationConfigRules (Prelude.Maybe [Prelude.Text])
describeOrganizationConfigRules_organizationConfigRuleNames :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeOrganizationConfigRules
-> f DescribeOrganizationConfigRules
describeOrganizationConfigRules_organizationConfigRuleNames = (DescribeOrganizationConfigRules -> Maybe [Text])
-> (DescribeOrganizationConfigRules
-> Maybe [Text] -> DescribeOrganizationConfigRules)
-> Lens
DescribeOrganizationConfigRules
DescribeOrganizationConfigRules
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConfigRules' {Maybe [Text]
organizationConfigRuleNames :: Maybe [Text]
$sel:organizationConfigRuleNames:DescribeOrganizationConfigRules' :: DescribeOrganizationConfigRules -> Maybe [Text]
organizationConfigRuleNames} -> Maybe [Text]
organizationConfigRuleNames) (\s :: DescribeOrganizationConfigRules
s@DescribeOrganizationConfigRules' {} Maybe [Text]
a -> DescribeOrganizationConfigRules
s {$sel:organizationConfigRuleNames:DescribeOrganizationConfigRules' :: Maybe [Text]
organizationConfigRuleNames = Maybe [Text]
a} :: DescribeOrganizationConfigRules) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeOrganizationConfigRules
-> f DescribeOrganizationConfigRules)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeOrganizationConfigRules
-> f DescribeOrganizationConfigRules
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
describeOrganizationConfigRules_nextToken :: Lens.Lens' DescribeOrganizationConfigRules (Prelude.Maybe Prelude.Text)
describeOrganizationConfigRules_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeOrganizationConfigRules
-> f DescribeOrganizationConfigRules
describeOrganizationConfigRules_nextToken = (DescribeOrganizationConfigRules -> Maybe Text)
-> (DescribeOrganizationConfigRules
-> Maybe Text -> DescribeOrganizationConfigRules)
-> Lens
DescribeOrganizationConfigRules
DescribeOrganizationConfigRules
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConfigRules' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeOrganizationConfigRules' :: DescribeOrganizationConfigRules -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeOrganizationConfigRules
s@DescribeOrganizationConfigRules' {} Maybe Text
a -> DescribeOrganizationConfigRules
s {$sel:nextToken:DescribeOrganizationConfigRules' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeOrganizationConfigRules)
describeOrganizationConfigRules_limit :: Lens.Lens' DescribeOrganizationConfigRules (Prelude.Maybe Prelude.Natural)
describeOrganizationConfigRules_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeOrganizationConfigRules
-> f DescribeOrganizationConfigRules
describeOrganizationConfigRules_limit = (DescribeOrganizationConfigRules -> Maybe Natural)
-> (DescribeOrganizationConfigRules
-> Maybe Natural -> DescribeOrganizationConfigRules)
-> Lens
DescribeOrganizationConfigRules
DescribeOrganizationConfigRules
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConfigRules' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeOrganizationConfigRules' :: DescribeOrganizationConfigRules -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeOrganizationConfigRules
s@DescribeOrganizationConfigRules' {} Maybe Natural
a -> DescribeOrganizationConfigRules
s {$sel:limit:DescribeOrganizationConfigRules' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeOrganizationConfigRules)
instance
Core.AWSPager
DescribeOrganizationConfigRules
where
page :: DescribeOrganizationConfigRules
-> AWSResponse DescribeOrganizationConfigRules
-> Maybe DescribeOrganizationConfigRules
page DescribeOrganizationConfigRules
rq AWSResponse DescribeOrganizationConfigRules
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeOrganizationConfigRules
DescribeOrganizationConfigRulesResponse
rs
DescribeOrganizationConfigRulesResponse
-> Getting
(First Text) DescribeOrganizationConfigRulesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeOrganizationConfigRulesResponse
-> Const (First Text) DescribeOrganizationConfigRulesResponse
Lens' DescribeOrganizationConfigRulesResponse (Maybe Text)
describeOrganizationConfigRulesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeOrganizationConfigRulesResponse
-> Const (First Text) DescribeOrganizationConfigRulesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) DescribeOrganizationConfigRulesResponse 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 DescribeOrganizationConfigRules
forall a. Maybe a
Prelude.Nothing
| Maybe [OrganizationConfigRule] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeOrganizationConfigRules
DescribeOrganizationConfigRulesResponse
rs
DescribeOrganizationConfigRulesResponse
-> Getting
(First [OrganizationConfigRule])
DescribeOrganizationConfigRulesResponse
[OrganizationConfigRule]
-> Maybe [OrganizationConfigRule]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [OrganizationConfigRule]
-> Const
(First [OrganizationConfigRule]) (Maybe [OrganizationConfigRule]))
-> DescribeOrganizationConfigRulesResponse
-> Const
(First [OrganizationConfigRule])
DescribeOrganizationConfigRulesResponse
Lens'
DescribeOrganizationConfigRulesResponse
(Maybe [OrganizationConfigRule])
describeOrganizationConfigRulesResponse_organizationConfigRules
((Maybe [OrganizationConfigRule]
-> Const
(First [OrganizationConfigRule]) (Maybe [OrganizationConfigRule]))
-> DescribeOrganizationConfigRulesResponse
-> Const
(First [OrganizationConfigRule])
DescribeOrganizationConfigRulesResponse)
-> (([OrganizationConfigRule]
-> Const (First [OrganizationConfigRule]) [OrganizationConfigRule])
-> Maybe [OrganizationConfigRule]
-> Const
(First [OrganizationConfigRule]) (Maybe [OrganizationConfigRule]))
-> Getting
(First [OrganizationConfigRule])
DescribeOrganizationConfigRulesResponse
[OrganizationConfigRule]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([OrganizationConfigRule]
-> Const (First [OrganizationConfigRule]) [OrganizationConfigRule])
-> Maybe [OrganizationConfigRule]
-> Const
(First [OrganizationConfigRule]) (Maybe [OrganizationConfigRule])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeOrganizationConfigRules
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeOrganizationConfigRules
-> Maybe DescribeOrganizationConfigRules
forall a. a -> Maybe a
Prelude.Just (DescribeOrganizationConfigRules
-> Maybe DescribeOrganizationConfigRules)
-> DescribeOrganizationConfigRules
-> Maybe DescribeOrganizationConfigRules
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeOrganizationConfigRules
rq
DescribeOrganizationConfigRules
-> (DescribeOrganizationConfigRules
-> DescribeOrganizationConfigRules)
-> DescribeOrganizationConfigRules
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeOrganizationConfigRules
-> Identity DescribeOrganizationConfigRules
Lens
DescribeOrganizationConfigRules
DescribeOrganizationConfigRules
(Maybe Text)
(Maybe Text)
describeOrganizationConfigRules_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeOrganizationConfigRules
-> Identity DescribeOrganizationConfigRules)
-> Maybe Text
-> DescribeOrganizationConfigRules
-> DescribeOrganizationConfigRules
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeOrganizationConfigRules
DescribeOrganizationConfigRulesResponse
rs
DescribeOrganizationConfigRulesResponse
-> Getting
(First Text) DescribeOrganizationConfigRulesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeOrganizationConfigRulesResponse
-> Const (First Text) DescribeOrganizationConfigRulesResponse
Lens' DescribeOrganizationConfigRulesResponse (Maybe Text)
describeOrganizationConfigRulesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeOrganizationConfigRulesResponse
-> Const (First Text) DescribeOrganizationConfigRulesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) DescribeOrganizationConfigRulesResponse 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
DescribeOrganizationConfigRules
where
type
AWSResponse DescribeOrganizationConfigRules =
DescribeOrganizationConfigRulesResponse
request :: DescribeOrganizationConfigRules
-> Request DescribeOrganizationConfigRules
request = Service
-> DescribeOrganizationConfigRules
-> Request DescribeOrganizationConfigRules
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeOrganizationConfigRules
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeOrganizationConfigRules)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeOrganizationConfigRules))
-> Logger
-> Service
-> Proxy DescribeOrganizationConfigRules
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeOrganizationConfigRules)))
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 [OrganizationConfigRule]
-> Maybe Text -> Int -> DescribeOrganizationConfigRulesResponse
DescribeOrganizationConfigRulesResponse'
(Maybe [OrganizationConfigRule]
-> Maybe Text -> Int -> DescribeOrganizationConfigRulesResponse)
-> Either String (Maybe [OrganizationConfigRule])
-> Either
String
(Maybe Text -> Int -> DescribeOrganizationConfigRulesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [OrganizationConfigRule]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"OrganizationConfigRules"
Either String (Maybe (Maybe [OrganizationConfigRule]))
-> Maybe [OrganizationConfigRule]
-> Either String (Maybe [OrganizationConfigRule])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [OrganizationConfigRule]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Maybe Text -> Int -> DescribeOrganizationConfigRulesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeOrganizationConfigRulesResponse)
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
"NextToken")
Either String (Int -> DescribeOrganizationConfigRulesResponse)
-> Either String Int
-> Either String DescribeOrganizationConfigRulesResponse
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
DescribeOrganizationConfigRules
instance
Prelude.NFData
DescribeOrganizationConfigRules
instance
Core.ToHeaders
DescribeOrganizationConfigRules
where
toHeaders :: DescribeOrganizationConfigRules -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DescribeOrganizationConfigRules -> 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
"StarlingDoveService.DescribeOrganizationConfigRules" ::
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 DescribeOrganizationConfigRules where
toJSON :: DescribeOrganizationConfigRules -> Value
toJSON DescribeOrganizationConfigRules' {Maybe Natural
Maybe [Text]
Maybe Text
limit :: Maybe Natural
nextToken :: Maybe Text
organizationConfigRuleNames :: Maybe [Text]
$sel:limit:DescribeOrganizationConfigRules' :: DescribeOrganizationConfigRules -> Maybe Natural
$sel:nextToken:DescribeOrganizationConfigRules' :: DescribeOrganizationConfigRules -> Maybe Text
$sel:organizationConfigRuleNames:DescribeOrganizationConfigRules' :: DescribeOrganizationConfigRules -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"OrganizationConfigRuleNames" 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]
organizationConfigRuleNames,
(Text
"NextToken" 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
nextToken,
(Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit
]
)
instance Core.ToPath DescribeOrganizationConfigRules where
toPath :: DescribeOrganizationConfigRules -> ByteString
toPath = ByteString -> DescribeOrganizationConfigRules -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeOrganizationConfigRules where
toQuery :: DescribeOrganizationConfigRules -> QueryString
toQuery = QueryString -> DescribeOrganizationConfigRules -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeOrganizationConfigRulesResponse = DescribeOrganizationConfigRulesResponse'
{
DescribeOrganizationConfigRulesResponse
-> Maybe [OrganizationConfigRule]
organizationConfigRules :: Prelude.Maybe [OrganizationConfigRule],
DescribeOrganizationConfigRulesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeOrganizationConfigRulesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeOrganizationConfigRulesResponse
-> DescribeOrganizationConfigRulesResponse -> Bool
(DescribeOrganizationConfigRulesResponse
-> DescribeOrganizationConfigRulesResponse -> Bool)
-> (DescribeOrganizationConfigRulesResponse
-> DescribeOrganizationConfigRulesResponse -> Bool)
-> Eq DescribeOrganizationConfigRulesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeOrganizationConfigRulesResponse
-> DescribeOrganizationConfigRulesResponse -> Bool
$c/= :: DescribeOrganizationConfigRulesResponse
-> DescribeOrganizationConfigRulesResponse -> Bool
== :: DescribeOrganizationConfigRulesResponse
-> DescribeOrganizationConfigRulesResponse -> Bool
$c== :: DescribeOrganizationConfigRulesResponse
-> DescribeOrganizationConfigRulesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeOrganizationConfigRulesResponse]
ReadPrec DescribeOrganizationConfigRulesResponse
Int -> ReadS DescribeOrganizationConfigRulesResponse
ReadS [DescribeOrganizationConfigRulesResponse]
(Int -> ReadS DescribeOrganizationConfigRulesResponse)
-> ReadS [DescribeOrganizationConfigRulesResponse]
-> ReadPrec DescribeOrganizationConfigRulesResponse
-> ReadPrec [DescribeOrganizationConfigRulesResponse]
-> Read DescribeOrganizationConfigRulesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeOrganizationConfigRulesResponse]
$creadListPrec :: ReadPrec [DescribeOrganizationConfigRulesResponse]
readPrec :: ReadPrec DescribeOrganizationConfigRulesResponse
$creadPrec :: ReadPrec DescribeOrganizationConfigRulesResponse
readList :: ReadS [DescribeOrganizationConfigRulesResponse]
$creadList :: ReadS [DescribeOrganizationConfigRulesResponse]
readsPrec :: Int -> ReadS DescribeOrganizationConfigRulesResponse
$creadsPrec :: Int -> ReadS DescribeOrganizationConfigRulesResponse
Prelude.Read, Int -> DescribeOrganizationConfigRulesResponse -> ShowS
[DescribeOrganizationConfigRulesResponse] -> ShowS
DescribeOrganizationConfigRulesResponse -> String
(Int -> DescribeOrganizationConfigRulesResponse -> ShowS)
-> (DescribeOrganizationConfigRulesResponse -> String)
-> ([DescribeOrganizationConfigRulesResponse] -> ShowS)
-> Show DescribeOrganizationConfigRulesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeOrganizationConfigRulesResponse] -> ShowS
$cshowList :: [DescribeOrganizationConfigRulesResponse] -> ShowS
show :: DescribeOrganizationConfigRulesResponse -> String
$cshow :: DescribeOrganizationConfigRulesResponse -> String
showsPrec :: Int -> DescribeOrganizationConfigRulesResponse -> ShowS
$cshowsPrec :: Int -> DescribeOrganizationConfigRulesResponse -> ShowS
Prelude.Show, (forall x.
DescribeOrganizationConfigRulesResponse
-> Rep DescribeOrganizationConfigRulesResponse x)
-> (forall x.
Rep DescribeOrganizationConfigRulesResponse x
-> DescribeOrganizationConfigRulesResponse)
-> Generic DescribeOrganizationConfigRulesResponse
forall x.
Rep DescribeOrganizationConfigRulesResponse x
-> DescribeOrganizationConfigRulesResponse
forall x.
DescribeOrganizationConfigRulesResponse
-> Rep DescribeOrganizationConfigRulesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeOrganizationConfigRulesResponse x
-> DescribeOrganizationConfigRulesResponse
$cfrom :: forall x.
DescribeOrganizationConfigRulesResponse
-> Rep DescribeOrganizationConfigRulesResponse x
Prelude.Generic)
newDescribeOrganizationConfigRulesResponse ::
Prelude.Int ->
DescribeOrganizationConfigRulesResponse
newDescribeOrganizationConfigRulesResponse :: Int -> DescribeOrganizationConfigRulesResponse
newDescribeOrganizationConfigRulesResponse
Int
pHttpStatus_ =
DescribeOrganizationConfigRulesResponse' :: Maybe [OrganizationConfigRule]
-> Maybe Text -> Int -> DescribeOrganizationConfigRulesResponse
DescribeOrganizationConfigRulesResponse'
{ $sel:organizationConfigRules:DescribeOrganizationConfigRulesResponse' :: Maybe [OrganizationConfigRule]
organizationConfigRules =
Maybe [OrganizationConfigRule]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeOrganizationConfigRulesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeOrganizationConfigRulesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeOrganizationConfigRulesResponse_organizationConfigRules :: Lens.Lens' DescribeOrganizationConfigRulesResponse (Prelude.Maybe [OrganizationConfigRule])
describeOrganizationConfigRulesResponse_organizationConfigRules :: (Maybe [OrganizationConfigRule]
-> f (Maybe [OrganizationConfigRule]))
-> DescribeOrganizationConfigRulesResponse
-> f DescribeOrganizationConfigRulesResponse
describeOrganizationConfigRulesResponse_organizationConfigRules = (DescribeOrganizationConfigRulesResponse
-> Maybe [OrganizationConfigRule])
-> (DescribeOrganizationConfigRulesResponse
-> Maybe [OrganizationConfigRule]
-> DescribeOrganizationConfigRulesResponse)
-> Lens'
DescribeOrganizationConfigRulesResponse
(Maybe [OrganizationConfigRule])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConfigRulesResponse' {Maybe [OrganizationConfigRule]
organizationConfigRules :: Maybe [OrganizationConfigRule]
$sel:organizationConfigRules:DescribeOrganizationConfigRulesResponse' :: DescribeOrganizationConfigRulesResponse
-> Maybe [OrganizationConfigRule]
organizationConfigRules} -> Maybe [OrganizationConfigRule]
organizationConfigRules) (\s :: DescribeOrganizationConfigRulesResponse
s@DescribeOrganizationConfigRulesResponse' {} Maybe [OrganizationConfigRule]
a -> DescribeOrganizationConfigRulesResponse
s {$sel:organizationConfigRules:DescribeOrganizationConfigRulesResponse' :: Maybe [OrganizationConfigRule]
organizationConfigRules = Maybe [OrganizationConfigRule]
a} :: DescribeOrganizationConfigRulesResponse) ((Maybe [OrganizationConfigRule]
-> f (Maybe [OrganizationConfigRule]))
-> DescribeOrganizationConfigRulesResponse
-> f DescribeOrganizationConfigRulesResponse)
-> ((Maybe [OrganizationConfigRule]
-> f (Maybe [OrganizationConfigRule]))
-> Maybe [OrganizationConfigRule]
-> f (Maybe [OrganizationConfigRule]))
-> (Maybe [OrganizationConfigRule]
-> f (Maybe [OrganizationConfigRule]))
-> DescribeOrganizationConfigRulesResponse
-> f DescribeOrganizationConfigRulesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[OrganizationConfigRule]
[OrganizationConfigRule]
[OrganizationConfigRule]
[OrganizationConfigRule]
-> Iso
(Maybe [OrganizationConfigRule])
(Maybe [OrganizationConfigRule])
(Maybe [OrganizationConfigRule])
(Maybe [OrganizationConfigRule])
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
[OrganizationConfigRule]
[OrganizationConfigRule]
[OrganizationConfigRule]
[OrganizationConfigRule]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeOrganizationConfigRulesResponse_nextToken :: Lens.Lens' DescribeOrganizationConfigRulesResponse (Prelude.Maybe Prelude.Text)
describeOrganizationConfigRulesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeOrganizationConfigRulesResponse
-> f DescribeOrganizationConfigRulesResponse
describeOrganizationConfigRulesResponse_nextToken = (DescribeOrganizationConfigRulesResponse -> Maybe Text)
-> (DescribeOrganizationConfigRulesResponse
-> Maybe Text -> DescribeOrganizationConfigRulesResponse)
-> Lens' DescribeOrganizationConfigRulesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConfigRulesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeOrganizationConfigRulesResponse' :: DescribeOrganizationConfigRulesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeOrganizationConfigRulesResponse
s@DescribeOrganizationConfigRulesResponse' {} Maybe Text
a -> DescribeOrganizationConfigRulesResponse
s {$sel:nextToken:DescribeOrganizationConfigRulesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeOrganizationConfigRulesResponse)
describeOrganizationConfigRulesResponse_httpStatus :: Lens.Lens' DescribeOrganizationConfigRulesResponse Prelude.Int
describeOrganizationConfigRulesResponse_httpStatus :: (Int -> f Int)
-> DescribeOrganizationConfigRulesResponse
-> f DescribeOrganizationConfigRulesResponse
describeOrganizationConfigRulesResponse_httpStatus = (DescribeOrganizationConfigRulesResponse -> Int)
-> (DescribeOrganizationConfigRulesResponse
-> Int -> DescribeOrganizationConfigRulesResponse)
-> Lens
DescribeOrganizationConfigRulesResponse
DescribeOrganizationConfigRulesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConfigRulesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeOrganizationConfigRulesResponse' :: DescribeOrganizationConfigRulesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeOrganizationConfigRulesResponse
s@DescribeOrganizationConfigRulesResponse' {} Int
a -> DescribeOrganizationConfigRulesResponse
s {$sel:httpStatus:DescribeOrganizationConfigRulesResponse' :: Int
httpStatus = Int
a} :: DescribeOrganizationConfigRulesResponse)
instance
Prelude.NFData
DescribeOrganizationConfigRulesResponse