{-# 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.CertificateManager.GetAccountConfiguration
(
GetAccountConfiguration (..),
newGetAccountConfiguration,
GetAccountConfigurationResponse (..),
newGetAccountConfigurationResponse,
getAccountConfigurationResponse_expiryEvents,
getAccountConfigurationResponse_httpStatus,
)
where
import Amazonka.CertificateManager.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 GetAccountConfiguration = GetAccountConfiguration'
{
}
deriving (GetAccountConfiguration -> GetAccountConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAccountConfiguration -> GetAccountConfiguration -> Bool
$c/= :: GetAccountConfiguration -> GetAccountConfiguration -> Bool
== :: GetAccountConfiguration -> GetAccountConfiguration -> Bool
$c== :: GetAccountConfiguration -> GetAccountConfiguration -> Bool
Prelude.Eq, ReadPrec [GetAccountConfiguration]
ReadPrec GetAccountConfiguration
Int -> ReadS GetAccountConfiguration
ReadS [GetAccountConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAccountConfiguration]
$creadListPrec :: ReadPrec [GetAccountConfiguration]
readPrec :: ReadPrec GetAccountConfiguration
$creadPrec :: ReadPrec GetAccountConfiguration
readList :: ReadS [GetAccountConfiguration]
$creadList :: ReadS [GetAccountConfiguration]
readsPrec :: Int -> ReadS GetAccountConfiguration
$creadsPrec :: Int -> ReadS GetAccountConfiguration
Prelude.Read, Int -> GetAccountConfiguration -> ShowS
[GetAccountConfiguration] -> ShowS
GetAccountConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAccountConfiguration] -> ShowS
$cshowList :: [GetAccountConfiguration] -> ShowS
show :: GetAccountConfiguration -> String
$cshow :: GetAccountConfiguration -> String
showsPrec :: Int -> GetAccountConfiguration -> ShowS
$cshowsPrec :: Int -> GetAccountConfiguration -> ShowS
Prelude.Show, forall x. Rep GetAccountConfiguration x -> GetAccountConfiguration
forall x. GetAccountConfiguration -> Rep GetAccountConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetAccountConfiguration x -> GetAccountConfiguration
$cfrom :: forall x. GetAccountConfiguration -> Rep GetAccountConfiguration x
Prelude.Generic)
newGetAccountConfiguration ::
GetAccountConfiguration
newGetAccountConfiguration :: GetAccountConfiguration
newGetAccountConfiguration = GetAccountConfiguration
GetAccountConfiguration'
instance Core.AWSRequest GetAccountConfiguration where
type
AWSResponse GetAccountConfiguration =
GetAccountConfigurationResponse
request :: (Service -> Service)
-> GetAccountConfiguration -> Request GetAccountConfiguration
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 GetAccountConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetAccountConfiguration)))
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 ExpiryEventsConfiguration
-> Int -> GetAccountConfigurationResponse
GetAccountConfigurationResponse'
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
"ExpiryEvents")
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 GetAccountConfiguration where
hashWithSalt :: Int -> GetAccountConfiguration -> Int
hashWithSalt Int
_salt GetAccountConfiguration
_ =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance Prelude.NFData GetAccountConfiguration where
rnf :: GetAccountConfiguration -> ()
rnf GetAccountConfiguration
_ = ()
instance Data.ToHeaders GetAccountConfiguration where
toHeaders :: GetAccountConfiguration -> 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
"CertificateManager.GetAccountConfiguration" ::
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 GetAccountConfiguration where
toJSON :: GetAccountConfiguration -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)
instance Data.ToPath GetAccountConfiguration where
toPath :: GetAccountConfiguration -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetAccountConfiguration where
toQuery :: GetAccountConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetAccountConfigurationResponse = GetAccountConfigurationResponse'
{
GetAccountConfigurationResponse -> Maybe ExpiryEventsConfiguration
expiryEvents :: Prelude.Maybe ExpiryEventsConfiguration,
GetAccountConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetAccountConfigurationResponse
-> GetAccountConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAccountConfigurationResponse
-> GetAccountConfigurationResponse -> Bool
$c/= :: GetAccountConfigurationResponse
-> GetAccountConfigurationResponse -> Bool
== :: GetAccountConfigurationResponse
-> GetAccountConfigurationResponse -> Bool
$c== :: GetAccountConfigurationResponse
-> GetAccountConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetAccountConfigurationResponse]
ReadPrec GetAccountConfigurationResponse
Int -> ReadS GetAccountConfigurationResponse
ReadS [GetAccountConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAccountConfigurationResponse]
$creadListPrec :: ReadPrec [GetAccountConfigurationResponse]
readPrec :: ReadPrec GetAccountConfigurationResponse
$creadPrec :: ReadPrec GetAccountConfigurationResponse
readList :: ReadS [GetAccountConfigurationResponse]
$creadList :: ReadS [GetAccountConfigurationResponse]
readsPrec :: Int -> ReadS GetAccountConfigurationResponse
$creadsPrec :: Int -> ReadS GetAccountConfigurationResponse
Prelude.Read, Int -> GetAccountConfigurationResponse -> ShowS
[GetAccountConfigurationResponse] -> ShowS
GetAccountConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAccountConfigurationResponse] -> ShowS
$cshowList :: [GetAccountConfigurationResponse] -> ShowS
show :: GetAccountConfigurationResponse -> String
$cshow :: GetAccountConfigurationResponse -> String
showsPrec :: Int -> GetAccountConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetAccountConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep GetAccountConfigurationResponse x
-> GetAccountConfigurationResponse
forall x.
GetAccountConfigurationResponse
-> Rep GetAccountConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAccountConfigurationResponse x
-> GetAccountConfigurationResponse
$cfrom :: forall x.
GetAccountConfigurationResponse
-> Rep GetAccountConfigurationResponse x
Prelude.Generic)
newGetAccountConfigurationResponse ::
Prelude.Int ->
GetAccountConfigurationResponse
newGetAccountConfigurationResponse :: Int -> GetAccountConfigurationResponse
newGetAccountConfigurationResponse Int
pHttpStatus_ =
GetAccountConfigurationResponse'
{ $sel:expiryEvents:GetAccountConfigurationResponse' :: Maybe ExpiryEventsConfiguration
expiryEvents =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetAccountConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getAccountConfigurationResponse_expiryEvents :: Lens.Lens' GetAccountConfigurationResponse (Prelude.Maybe ExpiryEventsConfiguration)
getAccountConfigurationResponse_expiryEvents :: Lens'
GetAccountConfigurationResponse (Maybe ExpiryEventsConfiguration)
getAccountConfigurationResponse_expiryEvents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccountConfigurationResponse' {Maybe ExpiryEventsConfiguration
expiryEvents :: Maybe ExpiryEventsConfiguration
$sel:expiryEvents:GetAccountConfigurationResponse' :: GetAccountConfigurationResponse -> Maybe ExpiryEventsConfiguration
expiryEvents} -> Maybe ExpiryEventsConfiguration
expiryEvents) (\s :: GetAccountConfigurationResponse
s@GetAccountConfigurationResponse' {} Maybe ExpiryEventsConfiguration
a -> GetAccountConfigurationResponse
s {$sel:expiryEvents:GetAccountConfigurationResponse' :: Maybe ExpiryEventsConfiguration
expiryEvents = Maybe ExpiryEventsConfiguration
a} :: GetAccountConfigurationResponse)
getAccountConfigurationResponse_httpStatus :: Lens.Lens' GetAccountConfigurationResponse Prelude.Int
getAccountConfigurationResponse_httpStatus :: Lens' GetAccountConfigurationResponse Int
getAccountConfigurationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAccountConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetAccountConfigurationResponse' :: GetAccountConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetAccountConfigurationResponse
s@GetAccountConfigurationResponse' {} Int
a -> GetAccountConfigurationResponse
s {$sel:httpStatus:GetAccountConfigurationResponse' :: Int
httpStatus = Int
a} :: GetAccountConfigurationResponse)
instance
Prelude.NFData
GetAccountConfigurationResponse
where
rnf :: GetAccountConfigurationResponse -> ()
rnf GetAccountConfigurationResponse' {Int
Maybe ExpiryEventsConfiguration
httpStatus :: Int
expiryEvents :: Maybe ExpiryEventsConfiguration
$sel:httpStatus:GetAccountConfigurationResponse' :: GetAccountConfigurationResponse -> Int
$sel:expiryEvents:GetAccountConfigurationResponse' :: GetAccountConfigurationResponse -> Maybe ExpiryEventsConfiguration
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ExpiryEventsConfiguration
expiryEvents
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus