{-# 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.ServiceQuotas.GetAssociationForServiceQuotaTemplate
(
GetAssociationForServiceQuotaTemplate (..),
newGetAssociationForServiceQuotaTemplate,
GetAssociationForServiceQuotaTemplateResponse (..),
newGetAssociationForServiceQuotaTemplateResponse,
getAssociationForServiceQuotaTemplateResponse_serviceQuotaTemplateAssociationStatus,
getAssociationForServiceQuotaTemplateResponse_httpStatus,
)
where
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
import Amazonka.ServiceQuotas.Types
data GetAssociationForServiceQuotaTemplate = GetAssociationForServiceQuotaTemplate'
{
}
deriving (GetAssociationForServiceQuotaTemplate
-> GetAssociationForServiceQuotaTemplate -> Bool
(GetAssociationForServiceQuotaTemplate
-> GetAssociationForServiceQuotaTemplate -> Bool)
-> (GetAssociationForServiceQuotaTemplate
-> GetAssociationForServiceQuotaTemplate -> Bool)
-> Eq GetAssociationForServiceQuotaTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAssociationForServiceQuotaTemplate
-> GetAssociationForServiceQuotaTemplate -> Bool
$c/= :: GetAssociationForServiceQuotaTemplate
-> GetAssociationForServiceQuotaTemplate -> Bool
== :: GetAssociationForServiceQuotaTemplate
-> GetAssociationForServiceQuotaTemplate -> Bool
$c== :: GetAssociationForServiceQuotaTemplate
-> GetAssociationForServiceQuotaTemplate -> Bool
Prelude.Eq, ReadPrec [GetAssociationForServiceQuotaTemplate]
ReadPrec GetAssociationForServiceQuotaTemplate
Int -> ReadS GetAssociationForServiceQuotaTemplate
ReadS [GetAssociationForServiceQuotaTemplate]
(Int -> ReadS GetAssociationForServiceQuotaTemplate)
-> ReadS [GetAssociationForServiceQuotaTemplate]
-> ReadPrec GetAssociationForServiceQuotaTemplate
-> ReadPrec [GetAssociationForServiceQuotaTemplate]
-> Read GetAssociationForServiceQuotaTemplate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAssociationForServiceQuotaTemplate]
$creadListPrec :: ReadPrec [GetAssociationForServiceQuotaTemplate]
readPrec :: ReadPrec GetAssociationForServiceQuotaTemplate
$creadPrec :: ReadPrec GetAssociationForServiceQuotaTemplate
readList :: ReadS [GetAssociationForServiceQuotaTemplate]
$creadList :: ReadS [GetAssociationForServiceQuotaTemplate]
readsPrec :: Int -> ReadS GetAssociationForServiceQuotaTemplate
$creadsPrec :: Int -> ReadS GetAssociationForServiceQuotaTemplate
Prelude.Read, Int -> GetAssociationForServiceQuotaTemplate -> ShowS
[GetAssociationForServiceQuotaTemplate] -> ShowS
GetAssociationForServiceQuotaTemplate -> String
(Int -> GetAssociationForServiceQuotaTemplate -> ShowS)
-> (GetAssociationForServiceQuotaTemplate -> String)
-> ([GetAssociationForServiceQuotaTemplate] -> ShowS)
-> Show GetAssociationForServiceQuotaTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAssociationForServiceQuotaTemplate] -> ShowS
$cshowList :: [GetAssociationForServiceQuotaTemplate] -> ShowS
show :: GetAssociationForServiceQuotaTemplate -> String
$cshow :: GetAssociationForServiceQuotaTemplate -> String
showsPrec :: Int -> GetAssociationForServiceQuotaTemplate -> ShowS
$cshowsPrec :: Int -> GetAssociationForServiceQuotaTemplate -> ShowS
Prelude.Show, (forall x.
GetAssociationForServiceQuotaTemplate
-> Rep GetAssociationForServiceQuotaTemplate x)
-> (forall x.
Rep GetAssociationForServiceQuotaTemplate x
-> GetAssociationForServiceQuotaTemplate)
-> Generic GetAssociationForServiceQuotaTemplate
forall x.
Rep GetAssociationForServiceQuotaTemplate x
-> GetAssociationForServiceQuotaTemplate
forall x.
GetAssociationForServiceQuotaTemplate
-> Rep GetAssociationForServiceQuotaTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAssociationForServiceQuotaTemplate x
-> GetAssociationForServiceQuotaTemplate
$cfrom :: forall x.
GetAssociationForServiceQuotaTemplate
-> Rep GetAssociationForServiceQuotaTemplate x
Prelude.Generic)
newGetAssociationForServiceQuotaTemplate ::
GetAssociationForServiceQuotaTemplate
newGetAssociationForServiceQuotaTemplate :: GetAssociationForServiceQuotaTemplate
newGetAssociationForServiceQuotaTemplate =
GetAssociationForServiceQuotaTemplate
GetAssociationForServiceQuotaTemplate'
instance
Core.AWSRequest
GetAssociationForServiceQuotaTemplate
where
type
AWSResponse
GetAssociationForServiceQuotaTemplate =
GetAssociationForServiceQuotaTemplateResponse
request :: GetAssociationForServiceQuotaTemplate
-> Request GetAssociationForServiceQuotaTemplate
request = Service
-> GetAssociationForServiceQuotaTemplate
-> Request GetAssociationForServiceQuotaTemplate
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetAssociationForServiceQuotaTemplate
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse GetAssociationForServiceQuotaTemplate)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse GetAssociationForServiceQuotaTemplate))
-> Logger
-> Service
-> Proxy GetAssociationForServiceQuotaTemplate
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse GetAssociationForServiceQuotaTemplate)))
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 ServiceQuotaTemplateAssociationStatus
-> Int -> GetAssociationForServiceQuotaTemplateResponse
GetAssociationForServiceQuotaTemplateResponse'
(Maybe ServiceQuotaTemplateAssociationStatus
-> Int -> GetAssociationForServiceQuotaTemplateResponse)
-> Either String (Maybe ServiceQuotaTemplateAssociationStatus)
-> Either
String (Int -> GetAssociationForServiceQuotaTemplateResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Key
-> Either String (Maybe ServiceQuotaTemplateAssociationStatus)
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"ServiceQuotaTemplateAssociationStatus")
Either
String (Int -> GetAssociationForServiceQuotaTemplateResponse)
-> Either String Int
-> Either String GetAssociationForServiceQuotaTemplateResponse
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
GetAssociationForServiceQuotaTemplate
instance
Prelude.NFData
GetAssociationForServiceQuotaTemplate
instance
Core.ToHeaders
GetAssociationForServiceQuotaTemplate
where
toHeaders :: GetAssociationForServiceQuotaTemplate -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GetAssociationForServiceQuotaTemplate -> 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
"ServiceQuotasV20190624.GetAssociationForServiceQuotaTemplate" ::
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
GetAssociationForServiceQuotaTemplate
where
toJSON :: GetAssociationForServiceQuotaTemplate -> Value
toJSON = Value -> GetAssociationForServiceQuotaTemplate -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance
Core.ToPath
GetAssociationForServiceQuotaTemplate
where
toPath :: GetAssociationForServiceQuotaTemplate -> ByteString
toPath = ByteString -> GetAssociationForServiceQuotaTemplate -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
GetAssociationForServiceQuotaTemplate
where
toQuery :: GetAssociationForServiceQuotaTemplate -> QueryString
toQuery = QueryString -> GetAssociationForServiceQuotaTemplate -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetAssociationForServiceQuotaTemplateResponse = GetAssociationForServiceQuotaTemplateResponse'
{
GetAssociationForServiceQuotaTemplateResponse
-> Maybe ServiceQuotaTemplateAssociationStatus
serviceQuotaTemplateAssociationStatus :: Prelude.Maybe ServiceQuotaTemplateAssociationStatus,
GetAssociationForServiceQuotaTemplateResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetAssociationForServiceQuotaTemplateResponse
-> GetAssociationForServiceQuotaTemplateResponse -> Bool
(GetAssociationForServiceQuotaTemplateResponse
-> GetAssociationForServiceQuotaTemplateResponse -> Bool)
-> (GetAssociationForServiceQuotaTemplateResponse
-> GetAssociationForServiceQuotaTemplateResponse -> Bool)
-> Eq GetAssociationForServiceQuotaTemplateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAssociationForServiceQuotaTemplateResponse
-> GetAssociationForServiceQuotaTemplateResponse -> Bool
$c/= :: GetAssociationForServiceQuotaTemplateResponse
-> GetAssociationForServiceQuotaTemplateResponse -> Bool
== :: GetAssociationForServiceQuotaTemplateResponse
-> GetAssociationForServiceQuotaTemplateResponse -> Bool
$c== :: GetAssociationForServiceQuotaTemplateResponse
-> GetAssociationForServiceQuotaTemplateResponse -> Bool
Prelude.Eq, ReadPrec [GetAssociationForServiceQuotaTemplateResponse]
ReadPrec GetAssociationForServiceQuotaTemplateResponse
Int -> ReadS GetAssociationForServiceQuotaTemplateResponse
ReadS [GetAssociationForServiceQuotaTemplateResponse]
(Int -> ReadS GetAssociationForServiceQuotaTemplateResponse)
-> ReadS [GetAssociationForServiceQuotaTemplateResponse]
-> ReadPrec GetAssociationForServiceQuotaTemplateResponse
-> ReadPrec [GetAssociationForServiceQuotaTemplateResponse]
-> Read GetAssociationForServiceQuotaTemplateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAssociationForServiceQuotaTemplateResponse]
$creadListPrec :: ReadPrec [GetAssociationForServiceQuotaTemplateResponse]
readPrec :: ReadPrec GetAssociationForServiceQuotaTemplateResponse
$creadPrec :: ReadPrec GetAssociationForServiceQuotaTemplateResponse
readList :: ReadS [GetAssociationForServiceQuotaTemplateResponse]
$creadList :: ReadS [GetAssociationForServiceQuotaTemplateResponse]
readsPrec :: Int -> ReadS GetAssociationForServiceQuotaTemplateResponse
$creadsPrec :: Int -> ReadS GetAssociationForServiceQuotaTemplateResponse
Prelude.Read, Int -> GetAssociationForServiceQuotaTemplateResponse -> ShowS
[GetAssociationForServiceQuotaTemplateResponse] -> ShowS
GetAssociationForServiceQuotaTemplateResponse -> String
(Int -> GetAssociationForServiceQuotaTemplateResponse -> ShowS)
-> (GetAssociationForServiceQuotaTemplateResponse -> String)
-> ([GetAssociationForServiceQuotaTemplateResponse] -> ShowS)
-> Show GetAssociationForServiceQuotaTemplateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAssociationForServiceQuotaTemplateResponse] -> ShowS
$cshowList :: [GetAssociationForServiceQuotaTemplateResponse] -> ShowS
show :: GetAssociationForServiceQuotaTemplateResponse -> String
$cshow :: GetAssociationForServiceQuotaTemplateResponse -> String
showsPrec :: Int -> GetAssociationForServiceQuotaTemplateResponse -> ShowS
$cshowsPrec :: Int -> GetAssociationForServiceQuotaTemplateResponse -> ShowS
Prelude.Show, (forall x.
GetAssociationForServiceQuotaTemplateResponse
-> Rep GetAssociationForServiceQuotaTemplateResponse x)
-> (forall x.
Rep GetAssociationForServiceQuotaTemplateResponse x
-> GetAssociationForServiceQuotaTemplateResponse)
-> Generic GetAssociationForServiceQuotaTemplateResponse
forall x.
Rep GetAssociationForServiceQuotaTemplateResponse x
-> GetAssociationForServiceQuotaTemplateResponse
forall x.
GetAssociationForServiceQuotaTemplateResponse
-> Rep GetAssociationForServiceQuotaTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAssociationForServiceQuotaTemplateResponse x
-> GetAssociationForServiceQuotaTemplateResponse
$cfrom :: forall x.
GetAssociationForServiceQuotaTemplateResponse
-> Rep GetAssociationForServiceQuotaTemplateResponse x
Prelude.Generic)
newGetAssociationForServiceQuotaTemplateResponse ::
Prelude.Int ->
GetAssociationForServiceQuotaTemplateResponse
newGetAssociationForServiceQuotaTemplateResponse :: Int -> GetAssociationForServiceQuotaTemplateResponse
newGetAssociationForServiceQuotaTemplateResponse
Int
pHttpStatus_ =
GetAssociationForServiceQuotaTemplateResponse' :: Maybe ServiceQuotaTemplateAssociationStatus
-> Int -> GetAssociationForServiceQuotaTemplateResponse
GetAssociationForServiceQuotaTemplateResponse'
{ $sel:serviceQuotaTemplateAssociationStatus:GetAssociationForServiceQuotaTemplateResponse' :: Maybe ServiceQuotaTemplateAssociationStatus
serviceQuotaTemplateAssociationStatus =
Maybe ServiceQuotaTemplateAssociationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetAssociationForServiceQuotaTemplateResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getAssociationForServiceQuotaTemplateResponse_serviceQuotaTemplateAssociationStatus :: Lens.Lens' GetAssociationForServiceQuotaTemplateResponse (Prelude.Maybe ServiceQuotaTemplateAssociationStatus)
getAssociationForServiceQuotaTemplateResponse_serviceQuotaTemplateAssociationStatus :: (Maybe ServiceQuotaTemplateAssociationStatus
-> f (Maybe ServiceQuotaTemplateAssociationStatus))
-> GetAssociationForServiceQuotaTemplateResponse
-> f GetAssociationForServiceQuotaTemplateResponse
getAssociationForServiceQuotaTemplateResponse_serviceQuotaTemplateAssociationStatus = (GetAssociationForServiceQuotaTemplateResponse
-> Maybe ServiceQuotaTemplateAssociationStatus)
-> (GetAssociationForServiceQuotaTemplateResponse
-> Maybe ServiceQuotaTemplateAssociationStatus
-> GetAssociationForServiceQuotaTemplateResponse)
-> Lens
GetAssociationForServiceQuotaTemplateResponse
GetAssociationForServiceQuotaTemplateResponse
(Maybe ServiceQuotaTemplateAssociationStatus)
(Maybe ServiceQuotaTemplateAssociationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssociationForServiceQuotaTemplateResponse' {Maybe ServiceQuotaTemplateAssociationStatus
serviceQuotaTemplateAssociationStatus :: Maybe ServiceQuotaTemplateAssociationStatus
$sel:serviceQuotaTemplateAssociationStatus:GetAssociationForServiceQuotaTemplateResponse' :: GetAssociationForServiceQuotaTemplateResponse
-> Maybe ServiceQuotaTemplateAssociationStatus
serviceQuotaTemplateAssociationStatus} -> Maybe ServiceQuotaTemplateAssociationStatus
serviceQuotaTemplateAssociationStatus) (\s :: GetAssociationForServiceQuotaTemplateResponse
s@GetAssociationForServiceQuotaTemplateResponse' {} Maybe ServiceQuotaTemplateAssociationStatus
a -> GetAssociationForServiceQuotaTemplateResponse
s {$sel:serviceQuotaTemplateAssociationStatus:GetAssociationForServiceQuotaTemplateResponse' :: Maybe ServiceQuotaTemplateAssociationStatus
serviceQuotaTemplateAssociationStatus = Maybe ServiceQuotaTemplateAssociationStatus
a} :: GetAssociationForServiceQuotaTemplateResponse)
getAssociationForServiceQuotaTemplateResponse_httpStatus :: Lens.Lens' GetAssociationForServiceQuotaTemplateResponse Prelude.Int
getAssociationForServiceQuotaTemplateResponse_httpStatus :: (Int -> f Int)
-> GetAssociationForServiceQuotaTemplateResponse
-> f GetAssociationForServiceQuotaTemplateResponse
getAssociationForServiceQuotaTemplateResponse_httpStatus = (GetAssociationForServiceQuotaTemplateResponse -> Int)
-> (GetAssociationForServiceQuotaTemplateResponse
-> Int -> GetAssociationForServiceQuotaTemplateResponse)
-> Lens
GetAssociationForServiceQuotaTemplateResponse
GetAssociationForServiceQuotaTemplateResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssociationForServiceQuotaTemplateResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetAssociationForServiceQuotaTemplateResponse' :: GetAssociationForServiceQuotaTemplateResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetAssociationForServiceQuotaTemplateResponse
s@GetAssociationForServiceQuotaTemplateResponse' {} Int
a -> GetAssociationForServiceQuotaTemplateResponse
s {$sel:httpStatus:GetAssociationForServiceQuotaTemplateResponse' :: Int
httpStatus = Int
a} :: GetAssociationForServiceQuotaTemplateResponse)
instance
Prelude.NFData
GetAssociationForServiceQuotaTemplateResponse