{-# 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.DescribeConfigurationRecorderStatus
(
DescribeConfigurationRecorderStatus (..),
newDescribeConfigurationRecorderStatus,
describeConfigurationRecorderStatus_configurationRecorderNames,
DescribeConfigurationRecorderStatusResponse (..),
newDescribeConfigurationRecorderStatusResponse,
describeConfigurationRecorderStatusResponse_configurationRecordersStatus,
describeConfigurationRecorderStatusResponse_httpStatus,
)
where
import Amazonka.Config.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeConfigurationRecorderStatus = DescribeConfigurationRecorderStatus'
{
DescribeConfigurationRecorderStatus -> Maybe [Text]
configurationRecorderNames :: Prelude.Maybe [Prelude.Text]
}
deriving (DescribeConfigurationRecorderStatus
-> DescribeConfigurationRecorderStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConfigurationRecorderStatus
-> DescribeConfigurationRecorderStatus -> Bool
$c/= :: DescribeConfigurationRecorderStatus
-> DescribeConfigurationRecorderStatus -> Bool
== :: DescribeConfigurationRecorderStatus
-> DescribeConfigurationRecorderStatus -> Bool
$c== :: DescribeConfigurationRecorderStatus
-> DescribeConfigurationRecorderStatus -> Bool
Prelude.Eq, ReadPrec [DescribeConfigurationRecorderStatus]
ReadPrec DescribeConfigurationRecorderStatus
Int -> ReadS DescribeConfigurationRecorderStatus
ReadS [DescribeConfigurationRecorderStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConfigurationRecorderStatus]
$creadListPrec :: ReadPrec [DescribeConfigurationRecorderStatus]
readPrec :: ReadPrec DescribeConfigurationRecorderStatus
$creadPrec :: ReadPrec DescribeConfigurationRecorderStatus
readList :: ReadS [DescribeConfigurationRecorderStatus]
$creadList :: ReadS [DescribeConfigurationRecorderStatus]
readsPrec :: Int -> ReadS DescribeConfigurationRecorderStatus
$creadsPrec :: Int -> ReadS DescribeConfigurationRecorderStatus
Prelude.Read, Int -> DescribeConfigurationRecorderStatus -> ShowS
[DescribeConfigurationRecorderStatus] -> ShowS
DescribeConfigurationRecorderStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConfigurationRecorderStatus] -> ShowS
$cshowList :: [DescribeConfigurationRecorderStatus] -> ShowS
show :: DescribeConfigurationRecorderStatus -> String
$cshow :: DescribeConfigurationRecorderStatus -> String
showsPrec :: Int -> DescribeConfigurationRecorderStatus -> ShowS
$cshowsPrec :: Int -> DescribeConfigurationRecorderStatus -> ShowS
Prelude.Show, forall x.
Rep DescribeConfigurationRecorderStatus x
-> DescribeConfigurationRecorderStatus
forall x.
DescribeConfigurationRecorderStatus
-> Rep DescribeConfigurationRecorderStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConfigurationRecorderStatus x
-> DescribeConfigurationRecorderStatus
$cfrom :: forall x.
DescribeConfigurationRecorderStatus
-> Rep DescribeConfigurationRecorderStatus x
Prelude.Generic)
newDescribeConfigurationRecorderStatus ::
DescribeConfigurationRecorderStatus
newDescribeConfigurationRecorderStatus :: DescribeConfigurationRecorderStatus
newDescribeConfigurationRecorderStatus =
DescribeConfigurationRecorderStatus'
{ $sel:configurationRecorderNames:DescribeConfigurationRecorderStatus' :: Maybe [Text]
configurationRecorderNames =
forall a. Maybe a
Prelude.Nothing
}
describeConfigurationRecorderStatus_configurationRecorderNames :: Lens.Lens' DescribeConfigurationRecorderStatus (Prelude.Maybe [Prelude.Text])
describeConfigurationRecorderStatus_configurationRecorderNames :: Lens' DescribeConfigurationRecorderStatus (Maybe [Text])
describeConfigurationRecorderStatus_configurationRecorderNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationRecorderStatus' {Maybe [Text]
configurationRecorderNames :: Maybe [Text]
$sel:configurationRecorderNames:DescribeConfigurationRecorderStatus' :: DescribeConfigurationRecorderStatus -> Maybe [Text]
configurationRecorderNames} -> Maybe [Text]
configurationRecorderNames) (\s :: DescribeConfigurationRecorderStatus
s@DescribeConfigurationRecorderStatus' {} Maybe [Text]
a -> DescribeConfigurationRecorderStatus
s {$sel:configurationRecorderNames:DescribeConfigurationRecorderStatus' :: Maybe [Text]
configurationRecorderNames = Maybe [Text]
a} :: DescribeConfigurationRecorderStatus) 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
instance
Core.AWSRequest
DescribeConfigurationRecorderStatus
where
type
AWSResponse DescribeConfigurationRecorderStatus =
DescribeConfigurationRecorderStatusResponse
request :: (Service -> Service)
-> DescribeConfigurationRecorderStatus
-> Request DescribeConfigurationRecorderStatus
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 DescribeConfigurationRecorderStatus
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeConfigurationRecorderStatus)))
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 [ConfigurationRecorderStatus]
-> Int -> DescribeConfigurationRecorderStatusResponse
DescribeConfigurationRecorderStatusResponse'
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
"ConfigurationRecordersStatus"
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
DescribeConfigurationRecorderStatus
where
hashWithSalt :: Int -> DescribeConfigurationRecorderStatus -> Int
hashWithSalt
Int
_salt
DescribeConfigurationRecorderStatus' {Maybe [Text]
configurationRecorderNames :: Maybe [Text]
$sel:configurationRecorderNames:DescribeConfigurationRecorderStatus' :: DescribeConfigurationRecorderStatus -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
configurationRecorderNames
instance
Prelude.NFData
DescribeConfigurationRecorderStatus
where
rnf :: DescribeConfigurationRecorderStatus -> ()
rnf DescribeConfigurationRecorderStatus' {Maybe [Text]
configurationRecorderNames :: Maybe [Text]
$sel:configurationRecorderNames:DescribeConfigurationRecorderStatus' :: DescribeConfigurationRecorderStatus -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
configurationRecorderNames
instance
Data.ToHeaders
DescribeConfigurationRecorderStatus
where
toHeaders :: DescribeConfigurationRecorderStatus -> 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
"StarlingDoveService.DescribeConfigurationRecorderStatus" ::
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
DescribeConfigurationRecorderStatus
where
toJSON :: DescribeConfigurationRecorderStatus -> Value
toJSON DescribeConfigurationRecorderStatus' {Maybe [Text]
configurationRecorderNames :: Maybe [Text]
$sel:configurationRecorderNames:DescribeConfigurationRecorderStatus' :: DescribeConfigurationRecorderStatus -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ConfigurationRecorderNames" 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]
configurationRecorderNames
]
)
instance
Data.ToPath
DescribeConfigurationRecorderStatus
where
toPath :: DescribeConfigurationRecorderStatus -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
DescribeConfigurationRecorderStatus
where
toQuery :: DescribeConfigurationRecorderStatus -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DescribeConfigurationRecorderStatusResponse = DescribeConfigurationRecorderStatusResponse'
{
:: Prelude.Maybe [ConfigurationRecorderStatus],
DescribeConfigurationRecorderStatusResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeConfigurationRecorderStatusResponse
-> DescribeConfigurationRecorderStatusResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConfigurationRecorderStatusResponse
-> DescribeConfigurationRecorderStatusResponse -> Bool
$c/= :: DescribeConfigurationRecorderStatusResponse
-> DescribeConfigurationRecorderStatusResponse -> Bool
== :: DescribeConfigurationRecorderStatusResponse
-> DescribeConfigurationRecorderStatusResponse -> Bool
$c== :: DescribeConfigurationRecorderStatusResponse
-> DescribeConfigurationRecorderStatusResponse -> Bool
Prelude.Eq, ReadPrec [DescribeConfigurationRecorderStatusResponse]
ReadPrec DescribeConfigurationRecorderStatusResponse
Int -> ReadS DescribeConfigurationRecorderStatusResponse
ReadS [DescribeConfigurationRecorderStatusResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConfigurationRecorderStatusResponse]
$creadListPrec :: ReadPrec [DescribeConfigurationRecorderStatusResponse]
readPrec :: ReadPrec DescribeConfigurationRecorderStatusResponse
$creadPrec :: ReadPrec DescribeConfigurationRecorderStatusResponse
readList :: ReadS [DescribeConfigurationRecorderStatusResponse]
$creadList :: ReadS [DescribeConfigurationRecorderStatusResponse]
readsPrec :: Int -> ReadS DescribeConfigurationRecorderStatusResponse
$creadsPrec :: Int -> ReadS DescribeConfigurationRecorderStatusResponse
Prelude.Read, Int -> DescribeConfigurationRecorderStatusResponse -> ShowS
[DescribeConfigurationRecorderStatusResponse] -> ShowS
DescribeConfigurationRecorderStatusResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConfigurationRecorderStatusResponse] -> ShowS
$cshowList :: [DescribeConfigurationRecorderStatusResponse] -> ShowS
show :: DescribeConfigurationRecorderStatusResponse -> String
$cshow :: DescribeConfigurationRecorderStatusResponse -> String
showsPrec :: Int -> DescribeConfigurationRecorderStatusResponse -> ShowS
$cshowsPrec :: Int -> DescribeConfigurationRecorderStatusResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeConfigurationRecorderStatusResponse x
-> DescribeConfigurationRecorderStatusResponse
forall x.
DescribeConfigurationRecorderStatusResponse
-> Rep DescribeConfigurationRecorderStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConfigurationRecorderStatusResponse x
-> DescribeConfigurationRecorderStatusResponse
$cfrom :: forall x.
DescribeConfigurationRecorderStatusResponse
-> Rep DescribeConfigurationRecorderStatusResponse x
Prelude.Generic)
newDescribeConfigurationRecorderStatusResponse ::
Prelude.Int ->
DescribeConfigurationRecorderStatusResponse
newDescribeConfigurationRecorderStatusResponse :: Int -> DescribeConfigurationRecorderStatusResponse
newDescribeConfigurationRecorderStatusResponse
Int
pHttpStatus_ =
DescribeConfigurationRecorderStatusResponse'
{ $sel:configurationRecordersStatus:DescribeConfigurationRecorderStatusResponse' :: Maybe [ConfigurationRecorderStatus]
configurationRecordersStatus =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeConfigurationRecorderStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeConfigurationRecorderStatusResponse_configurationRecordersStatus :: Lens.Lens' DescribeConfigurationRecorderStatusResponse (Prelude.Maybe [ConfigurationRecorderStatus])
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationRecorderStatusResponse' {Maybe [ConfigurationRecorderStatus]
configurationRecordersStatus :: Maybe [ConfigurationRecorderStatus]
$sel:configurationRecordersStatus:DescribeConfigurationRecorderStatusResponse' :: DescribeConfigurationRecorderStatusResponse
-> Maybe [ConfigurationRecorderStatus]
configurationRecordersStatus} -> Maybe [ConfigurationRecorderStatus]
configurationRecordersStatus) (\s :: DescribeConfigurationRecorderStatusResponse
s@DescribeConfigurationRecorderStatusResponse' {} Maybe [ConfigurationRecorderStatus]
a -> DescribeConfigurationRecorderStatusResponse
s {$sel:configurationRecordersStatus:DescribeConfigurationRecorderStatusResponse' :: Maybe [ConfigurationRecorderStatus]
configurationRecordersStatus = Maybe [ConfigurationRecorderStatus]
a} :: DescribeConfigurationRecorderStatusResponse) 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
describeConfigurationRecorderStatusResponse_httpStatus :: Lens.Lens' DescribeConfigurationRecorderStatusResponse Prelude.Int
describeConfigurationRecorderStatusResponse_httpStatus :: Lens' DescribeConfigurationRecorderStatusResponse Int
describeConfigurationRecorderStatusResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationRecorderStatusResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeConfigurationRecorderStatusResponse' :: DescribeConfigurationRecorderStatusResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeConfigurationRecorderStatusResponse
s@DescribeConfigurationRecorderStatusResponse' {} Int
a -> DescribeConfigurationRecorderStatusResponse
s {$sel:httpStatus:DescribeConfigurationRecorderStatusResponse' :: Int
httpStatus = Int
a} :: DescribeConfigurationRecorderStatusResponse)
instance
Prelude.NFData
DescribeConfigurationRecorderStatusResponse
where
rnf :: DescribeConfigurationRecorderStatusResponse -> ()
rnf DescribeConfigurationRecorderStatusResponse' {Int
Maybe [ConfigurationRecorderStatus]
httpStatus :: Int
configurationRecordersStatus :: Maybe [ConfigurationRecorderStatus]
$sel:httpStatus:DescribeConfigurationRecorderStatusResponse' :: DescribeConfigurationRecorderStatusResponse -> Int
$sel:configurationRecordersStatus:DescribeConfigurationRecorderStatusResponse' :: DescribeConfigurationRecorderStatusResponse
-> Maybe [ConfigurationRecorderStatus]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [ConfigurationRecorderStatus]
configurationRecordersStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus