{-# 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.APIGateway.PutMethod
(
PutMethod (..),
newPutMethod,
putMethod_apiKeyRequired,
putMethod_authorizationScopes,
putMethod_authorizerId,
putMethod_operationName,
putMethod_requestModels,
putMethod_requestParameters,
putMethod_requestValidatorId,
putMethod_restApiId,
putMethod_resourceId,
putMethod_httpMethod,
putMethod_authorizationType,
Method (..),
newMethod,
method_apiKeyRequired,
method_authorizationScopes,
method_authorizationType,
method_authorizerId,
method_httpMethod,
method_methodIntegration,
method_methodResponses,
method_operationName,
method_requestModels,
method_requestParameters,
method_requestValidatorId,
)
where
import Amazonka.APIGateway.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 PutMethod = PutMethod'
{
PutMethod -> Maybe Bool
apiKeyRequired :: Prelude.Maybe Prelude.Bool,
PutMethod -> Maybe [Text]
authorizationScopes :: Prelude.Maybe [Prelude.Text],
PutMethod -> Maybe Text
authorizerId :: Prelude.Maybe Prelude.Text,
PutMethod -> Maybe Text
operationName :: Prelude.Maybe Prelude.Text,
PutMethod -> Maybe (HashMap Text Text)
requestModels :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
PutMethod -> Maybe (HashMap Text Bool)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Bool),
PutMethod -> Maybe Text
requestValidatorId :: Prelude.Maybe Prelude.Text,
PutMethod -> Text
restApiId :: Prelude.Text,
PutMethod -> Text
resourceId :: Prelude.Text,
PutMethod -> Text
httpMethod :: Prelude.Text,
PutMethod -> Text
authorizationType :: Prelude.Text
}
deriving (PutMethod -> PutMethod -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutMethod -> PutMethod -> Bool
$c/= :: PutMethod -> PutMethod -> Bool
== :: PutMethod -> PutMethod -> Bool
$c== :: PutMethod -> PutMethod -> Bool
Prelude.Eq, ReadPrec [PutMethod]
ReadPrec PutMethod
Int -> ReadS PutMethod
ReadS [PutMethod]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutMethod]
$creadListPrec :: ReadPrec [PutMethod]
readPrec :: ReadPrec PutMethod
$creadPrec :: ReadPrec PutMethod
readList :: ReadS [PutMethod]
$creadList :: ReadS [PutMethod]
readsPrec :: Int -> ReadS PutMethod
$creadsPrec :: Int -> ReadS PutMethod
Prelude.Read, Int -> PutMethod -> ShowS
[PutMethod] -> ShowS
PutMethod -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutMethod] -> ShowS
$cshowList :: [PutMethod] -> ShowS
show :: PutMethod -> String
$cshow :: PutMethod -> String
showsPrec :: Int -> PutMethod -> ShowS
$cshowsPrec :: Int -> PutMethod -> ShowS
Prelude.Show, forall x. Rep PutMethod x -> PutMethod
forall x. PutMethod -> Rep PutMethod x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutMethod x -> PutMethod
$cfrom :: forall x. PutMethod -> Rep PutMethod x
Prelude.Generic)
newPutMethod ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
PutMethod
newPutMethod :: Text -> Text -> Text -> Text -> PutMethod
newPutMethod
Text
pRestApiId_
Text
pResourceId_
Text
pHttpMethod_
Text
pAuthorizationType_ =
PutMethod'
{ $sel:apiKeyRequired:PutMethod' :: Maybe Bool
apiKeyRequired = forall a. Maybe a
Prelude.Nothing,
$sel:authorizationScopes:PutMethod' :: Maybe [Text]
authorizationScopes = forall a. Maybe a
Prelude.Nothing,
$sel:authorizerId:PutMethod' :: Maybe Text
authorizerId = forall a. Maybe a
Prelude.Nothing,
$sel:operationName:PutMethod' :: Maybe Text
operationName = forall a. Maybe a
Prelude.Nothing,
$sel:requestModels:PutMethod' :: Maybe (HashMap Text Text)
requestModels = forall a. Maybe a
Prelude.Nothing,
$sel:requestParameters:PutMethod' :: Maybe (HashMap Text Bool)
requestParameters = forall a. Maybe a
Prelude.Nothing,
$sel:requestValidatorId:PutMethod' :: Maybe Text
requestValidatorId = forall a. Maybe a
Prelude.Nothing,
$sel:restApiId:PutMethod' :: Text
restApiId = Text
pRestApiId_,
$sel:resourceId:PutMethod' :: Text
resourceId = Text
pResourceId_,
$sel:httpMethod:PutMethod' :: Text
httpMethod = Text
pHttpMethod_,
$sel:authorizationType:PutMethod' :: Text
authorizationType = Text
pAuthorizationType_
}
putMethod_apiKeyRequired :: Lens.Lens' PutMethod (Prelude.Maybe Prelude.Bool)
putMethod_apiKeyRequired :: Lens' PutMethod (Maybe Bool)
putMethod_apiKeyRequired = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Maybe Bool
apiKeyRequired :: Maybe Bool
$sel:apiKeyRequired:PutMethod' :: PutMethod -> Maybe Bool
apiKeyRequired} -> Maybe Bool
apiKeyRequired) (\s :: PutMethod
s@PutMethod' {} Maybe Bool
a -> PutMethod
s {$sel:apiKeyRequired:PutMethod' :: Maybe Bool
apiKeyRequired = Maybe Bool
a} :: PutMethod)
putMethod_authorizationScopes :: Lens.Lens' PutMethod (Prelude.Maybe [Prelude.Text])
putMethod_authorizationScopes :: Lens' PutMethod (Maybe [Text])
putMethod_authorizationScopes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Maybe [Text]
authorizationScopes :: Maybe [Text]
$sel:authorizationScopes:PutMethod' :: PutMethod -> Maybe [Text]
authorizationScopes} -> Maybe [Text]
authorizationScopes) (\s :: PutMethod
s@PutMethod' {} Maybe [Text]
a -> PutMethod
s {$sel:authorizationScopes:PutMethod' :: Maybe [Text]
authorizationScopes = Maybe [Text]
a} :: PutMethod) 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
putMethod_authorizerId :: Lens.Lens' PutMethod (Prelude.Maybe Prelude.Text)
putMethod_authorizerId :: Lens' PutMethod (Maybe Text)
putMethod_authorizerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Maybe Text
authorizerId :: Maybe Text
$sel:authorizerId:PutMethod' :: PutMethod -> Maybe Text
authorizerId} -> Maybe Text
authorizerId) (\s :: PutMethod
s@PutMethod' {} Maybe Text
a -> PutMethod
s {$sel:authorizerId:PutMethod' :: Maybe Text
authorizerId = Maybe Text
a} :: PutMethod)
putMethod_operationName :: Lens.Lens' PutMethod (Prelude.Maybe Prelude.Text)
putMethod_operationName :: Lens' PutMethod (Maybe Text)
putMethod_operationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Maybe Text
operationName :: Maybe Text
$sel:operationName:PutMethod' :: PutMethod -> Maybe Text
operationName} -> Maybe Text
operationName) (\s :: PutMethod
s@PutMethod' {} Maybe Text
a -> PutMethod
s {$sel:operationName:PutMethod' :: Maybe Text
operationName = Maybe Text
a} :: PutMethod)
putMethod_requestModels :: Lens.Lens' PutMethod (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
putMethod_requestModels :: Lens' PutMethod (Maybe (HashMap Text Text))
putMethod_requestModels = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Maybe (HashMap Text Text)
requestModels :: Maybe (HashMap Text Text)
$sel:requestModels:PutMethod' :: PutMethod -> Maybe (HashMap Text Text)
requestModels} -> Maybe (HashMap Text Text)
requestModels) (\s :: PutMethod
s@PutMethod' {} Maybe (HashMap Text Text)
a -> PutMethod
s {$sel:requestModels:PutMethod' :: Maybe (HashMap Text Text)
requestModels = Maybe (HashMap Text Text)
a} :: PutMethod) 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
putMethod_requestParameters :: Lens.Lens' PutMethod (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Bool))
putMethod_requestParameters :: Lens' PutMethod (Maybe (HashMap Text Bool))
putMethod_requestParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Maybe (HashMap Text Bool)
requestParameters :: Maybe (HashMap Text Bool)
$sel:requestParameters:PutMethod' :: PutMethod -> Maybe (HashMap Text Bool)
requestParameters} -> Maybe (HashMap Text Bool)
requestParameters) (\s :: PutMethod
s@PutMethod' {} Maybe (HashMap Text Bool)
a -> PutMethod
s {$sel:requestParameters:PutMethod' :: Maybe (HashMap Text Bool)
requestParameters = Maybe (HashMap Text Bool)
a} :: PutMethod) 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
putMethod_requestValidatorId :: Lens.Lens' PutMethod (Prelude.Maybe Prelude.Text)
putMethod_requestValidatorId :: Lens' PutMethod (Maybe Text)
putMethod_requestValidatorId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Maybe Text
requestValidatorId :: Maybe Text
$sel:requestValidatorId:PutMethod' :: PutMethod -> Maybe Text
requestValidatorId} -> Maybe Text
requestValidatorId) (\s :: PutMethod
s@PutMethod' {} Maybe Text
a -> PutMethod
s {$sel:requestValidatorId:PutMethod' :: Maybe Text
requestValidatorId = Maybe Text
a} :: PutMethod)
putMethod_restApiId :: Lens.Lens' PutMethod Prelude.Text
putMethod_restApiId :: Lens' PutMethod Text
putMethod_restApiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Text
restApiId :: Text
$sel:restApiId:PutMethod' :: PutMethod -> Text
restApiId} -> Text
restApiId) (\s :: PutMethod
s@PutMethod' {} Text
a -> PutMethod
s {$sel:restApiId:PutMethod' :: Text
restApiId = Text
a} :: PutMethod)
putMethod_resourceId :: Lens.Lens' PutMethod Prelude.Text
putMethod_resourceId :: Lens' PutMethod Text
putMethod_resourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Text
resourceId :: Text
$sel:resourceId:PutMethod' :: PutMethod -> Text
resourceId} -> Text
resourceId) (\s :: PutMethod
s@PutMethod' {} Text
a -> PutMethod
s {$sel:resourceId:PutMethod' :: Text
resourceId = Text
a} :: PutMethod)
putMethod_httpMethod :: Lens.Lens' PutMethod Prelude.Text
putMethod_httpMethod :: Lens' PutMethod Text
putMethod_httpMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Text
httpMethod :: Text
$sel:httpMethod:PutMethod' :: PutMethod -> Text
httpMethod} -> Text
httpMethod) (\s :: PutMethod
s@PutMethod' {} Text
a -> PutMethod
s {$sel:httpMethod:PutMethod' :: Text
httpMethod = Text
a} :: PutMethod)
putMethod_authorizationType :: Lens.Lens' PutMethod Prelude.Text
putMethod_authorizationType :: Lens' PutMethod Text
putMethod_authorizationType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutMethod' {Text
authorizationType :: Text
$sel:authorizationType:PutMethod' :: PutMethod -> Text
authorizationType} -> Text
authorizationType) (\s :: PutMethod
s@PutMethod' {} Text
a -> PutMethod
s {$sel:authorizationType:PutMethod' :: Text
authorizationType = Text
a} :: PutMethod)
instance Core.AWSRequest PutMethod where
type AWSResponse PutMethod = Method
request :: (Service -> Service) -> PutMethod -> Request PutMethod
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutMethod
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutMethod)))
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 -> forall a. FromJSON a => Object -> Either String a
Data.eitherParseJSON Object
x)
instance Prelude.Hashable PutMethod where
hashWithSalt :: Int -> PutMethod -> Int
hashWithSalt Int
_salt PutMethod' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Bool)
Maybe (HashMap Text Text)
Text
authorizationType :: Text
httpMethod :: Text
resourceId :: Text
restApiId :: Text
requestValidatorId :: Maybe Text
requestParameters :: Maybe (HashMap Text Bool)
requestModels :: Maybe (HashMap Text Text)
operationName :: Maybe Text
authorizerId :: Maybe Text
authorizationScopes :: Maybe [Text]
apiKeyRequired :: Maybe Bool
$sel:authorizationType:PutMethod' :: PutMethod -> Text
$sel:httpMethod:PutMethod' :: PutMethod -> Text
$sel:resourceId:PutMethod' :: PutMethod -> Text
$sel:restApiId:PutMethod' :: PutMethod -> Text
$sel:requestValidatorId:PutMethod' :: PutMethod -> Maybe Text
$sel:requestParameters:PutMethod' :: PutMethod -> Maybe (HashMap Text Bool)
$sel:requestModels:PutMethod' :: PutMethod -> Maybe (HashMap Text Text)
$sel:operationName:PutMethod' :: PutMethod -> Maybe Text
$sel:authorizerId:PutMethod' :: PutMethod -> Maybe Text
$sel:authorizationScopes:PutMethod' :: PutMethod -> Maybe [Text]
$sel:apiKeyRequired:PutMethod' :: PutMethod -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
apiKeyRequired
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
authorizationScopes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
authorizerId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
operationName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
requestModels
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Bool)
requestParameters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
requestValidatorId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
restApiId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
httpMethod
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
authorizationType
instance Prelude.NFData PutMethod where
rnf :: PutMethod -> ()
rnf PutMethod' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Bool)
Maybe (HashMap Text Text)
Text
authorizationType :: Text
httpMethod :: Text
resourceId :: Text
restApiId :: Text
requestValidatorId :: Maybe Text
requestParameters :: Maybe (HashMap Text Bool)
requestModels :: Maybe (HashMap Text Text)
operationName :: Maybe Text
authorizerId :: Maybe Text
authorizationScopes :: Maybe [Text]
apiKeyRequired :: Maybe Bool
$sel:authorizationType:PutMethod' :: PutMethod -> Text
$sel:httpMethod:PutMethod' :: PutMethod -> Text
$sel:resourceId:PutMethod' :: PutMethod -> Text
$sel:restApiId:PutMethod' :: PutMethod -> Text
$sel:requestValidatorId:PutMethod' :: PutMethod -> Maybe Text
$sel:requestParameters:PutMethod' :: PutMethod -> Maybe (HashMap Text Bool)
$sel:requestModels:PutMethod' :: PutMethod -> Maybe (HashMap Text Text)
$sel:operationName:PutMethod' :: PutMethod -> Maybe Text
$sel:authorizerId:PutMethod' :: PutMethod -> Maybe Text
$sel:authorizationScopes:PutMethod' :: PutMethod -> Maybe [Text]
$sel:apiKeyRequired:PutMethod' :: PutMethod -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
apiKeyRequired
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
authorizationScopes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
authorizerId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operationName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
requestModels
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Bool)
requestParameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requestValidatorId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
restApiId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
httpMethod
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
authorizationType
instance Data.ToHeaders PutMethod where
toHeaders :: PutMethod -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Accept"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"application/json" :: Prelude.ByteString)
]
)
instance Data.ToJSON PutMethod where
toJSON :: PutMethod -> Value
toJSON PutMethod' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Bool)
Maybe (HashMap Text Text)
Text
authorizationType :: Text
httpMethod :: Text
resourceId :: Text
restApiId :: Text
requestValidatorId :: Maybe Text
requestParameters :: Maybe (HashMap Text Bool)
requestModels :: Maybe (HashMap Text Text)
operationName :: Maybe Text
authorizerId :: Maybe Text
authorizationScopes :: Maybe [Text]
apiKeyRequired :: Maybe Bool
$sel:authorizationType:PutMethod' :: PutMethod -> Text
$sel:httpMethod:PutMethod' :: PutMethod -> Text
$sel:resourceId:PutMethod' :: PutMethod -> Text
$sel:restApiId:PutMethod' :: PutMethod -> Text
$sel:requestValidatorId:PutMethod' :: PutMethod -> Maybe Text
$sel:requestParameters:PutMethod' :: PutMethod -> Maybe (HashMap Text Bool)
$sel:requestModels:PutMethod' :: PutMethod -> Maybe (HashMap Text Text)
$sel:operationName:PutMethod' :: PutMethod -> Maybe Text
$sel:authorizerId:PutMethod' :: PutMethod -> Maybe Text
$sel:authorizationScopes:PutMethod' :: PutMethod -> Maybe [Text]
$sel:apiKeyRequired:PutMethod' :: PutMethod -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"apiKeyRequired" 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 Bool
apiKeyRequired,
(Key
"authorizationScopes" 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]
authorizationScopes,
(Key
"authorizerId" 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
authorizerId,
(Key
"operationName" 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
operationName,
(Key
"requestModels" 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 (HashMap Text Text)
requestModels,
(Key
"requestParameters" 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 (HashMap Text Bool)
requestParameters,
(Key
"requestValidatorId" 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
requestValidatorId,
forall a. a -> Maybe a
Prelude.Just
(Key
"authorizationType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
authorizationType)
]
)
instance Data.ToPath PutMethod where
toPath :: PutMethod -> ByteString
toPath PutMethod' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Bool)
Maybe (HashMap Text Text)
Text
authorizationType :: Text
httpMethod :: Text
resourceId :: Text
restApiId :: Text
requestValidatorId :: Maybe Text
requestParameters :: Maybe (HashMap Text Bool)
requestModels :: Maybe (HashMap Text Text)
operationName :: Maybe Text
authorizerId :: Maybe Text
authorizationScopes :: Maybe [Text]
apiKeyRequired :: Maybe Bool
$sel:authorizationType:PutMethod' :: PutMethod -> Text
$sel:httpMethod:PutMethod' :: PutMethod -> Text
$sel:resourceId:PutMethod' :: PutMethod -> Text
$sel:restApiId:PutMethod' :: PutMethod -> Text
$sel:requestValidatorId:PutMethod' :: PutMethod -> Maybe Text
$sel:requestParameters:PutMethod' :: PutMethod -> Maybe (HashMap Text Bool)
$sel:requestModels:PutMethod' :: PutMethod -> Maybe (HashMap Text Text)
$sel:operationName:PutMethod' :: PutMethod -> Maybe Text
$sel:authorizerId:PutMethod' :: PutMethod -> Maybe Text
$sel:authorizationScopes:PutMethod' :: PutMethod -> Maybe [Text]
$sel:apiKeyRequired:PutMethod' :: PutMethod -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/restapis/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
restApiId,
ByteString
"/resources/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
resourceId,
ByteString
"/methods/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
httpMethod
]
instance Data.ToQuery PutMethod where
toQuery :: PutMethod -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty