{-# 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.MechanicalTurk.CreateQualificationType
(
CreateQualificationType (..),
newCreateQualificationType,
createQualificationType_testDurationInSeconds,
createQualificationType_answerKey,
createQualificationType_test,
createQualificationType_keywords,
createQualificationType_autoGranted,
createQualificationType_autoGrantedValue,
createQualificationType_retryDelayInSeconds,
createQualificationType_name,
createQualificationType_description,
createQualificationType_qualificationTypeStatus,
CreateQualificationTypeResponse (..),
newCreateQualificationTypeResponse,
createQualificationTypeResponse_qualificationType,
createQualificationTypeResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MechanicalTurk.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateQualificationType = CreateQualificationType'
{
CreateQualificationType -> Maybe Integer
testDurationInSeconds :: Prelude.Maybe Prelude.Integer,
CreateQualificationType -> Maybe Text
answerKey :: Prelude.Maybe Prelude.Text,
CreateQualificationType -> Maybe Text
test :: Prelude.Maybe Prelude.Text,
CreateQualificationType -> Maybe Text
keywords :: Prelude.Maybe Prelude.Text,
CreateQualificationType -> Maybe Bool
autoGranted :: Prelude.Maybe Prelude.Bool,
CreateQualificationType -> Maybe Int
autoGrantedValue :: Prelude.Maybe Prelude.Int,
CreateQualificationType -> Maybe Integer
retryDelayInSeconds :: Prelude.Maybe Prelude.Integer,
CreateQualificationType -> Text
name :: Prelude.Text,
CreateQualificationType -> Text
description :: Prelude.Text,
CreateQualificationType -> QualificationTypeStatus
qualificationTypeStatus :: QualificationTypeStatus
}
deriving (CreateQualificationType -> CreateQualificationType -> Bool
(CreateQualificationType -> CreateQualificationType -> Bool)
-> (CreateQualificationType -> CreateQualificationType -> Bool)
-> Eq CreateQualificationType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateQualificationType -> CreateQualificationType -> Bool
$c/= :: CreateQualificationType -> CreateQualificationType -> Bool
== :: CreateQualificationType -> CreateQualificationType -> Bool
$c== :: CreateQualificationType -> CreateQualificationType -> Bool
Prelude.Eq, ReadPrec [CreateQualificationType]
ReadPrec CreateQualificationType
Int -> ReadS CreateQualificationType
ReadS [CreateQualificationType]
(Int -> ReadS CreateQualificationType)
-> ReadS [CreateQualificationType]
-> ReadPrec CreateQualificationType
-> ReadPrec [CreateQualificationType]
-> Read CreateQualificationType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateQualificationType]
$creadListPrec :: ReadPrec [CreateQualificationType]
readPrec :: ReadPrec CreateQualificationType
$creadPrec :: ReadPrec CreateQualificationType
readList :: ReadS [CreateQualificationType]
$creadList :: ReadS [CreateQualificationType]
readsPrec :: Int -> ReadS CreateQualificationType
$creadsPrec :: Int -> ReadS CreateQualificationType
Prelude.Read, Int -> CreateQualificationType -> ShowS
[CreateQualificationType] -> ShowS
CreateQualificationType -> String
(Int -> CreateQualificationType -> ShowS)
-> (CreateQualificationType -> String)
-> ([CreateQualificationType] -> ShowS)
-> Show CreateQualificationType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateQualificationType] -> ShowS
$cshowList :: [CreateQualificationType] -> ShowS
show :: CreateQualificationType -> String
$cshow :: CreateQualificationType -> String
showsPrec :: Int -> CreateQualificationType -> ShowS
$cshowsPrec :: Int -> CreateQualificationType -> ShowS
Prelude.Show, (forall x.
CreateQualificationType -> Rep CreateQualificationType x)
-> (forall x.
Rep CreateQualificationType x -> CreateQualificationType)
-> Generic CreateQualificationType
forall x. Rep CreateQualificationType x -> CreateQualificationType
forall x. CreateQualificationType -> Rep CreateQualificationType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateQualificationType x -> CreateQualificationType
$cfrom :: forall x. CreateQualificationType -> Rep CreateQualificationType x
Prelude.Generic)
newCreateQualificationType ::
Prelude.Text ->
Prelude.Text ->
QualificationTypeStatus ->
CreateQualificationType
newCreateQualificationType :: Text -> Text -> QualificationTypeStatus -> CreateQualificationType
newCreateQualificationType
Text
pName_
Text
pDescription_
QualificationTypeStatus
pQualificationTypeStatus_ =
CreateQualificationType' :: Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Integer
-> Text
-> Text
-> QualificationTypeStatus
-> CreateQualificationType
CreateQualificationType'
{ $sel:testDurationInSeconds:CreateQualificationType' :: Maybe Integer
testDurationInSeconds =
Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:answerKey:CreateQualificationType' :: Maybe Text
answerKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:test:CreateQualificationType' :: Maybe Text
test = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:keywords:CreateQualificationType' :: Maybe Text
keywords = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:autoGranted:CreateQualificationType' :: Maybe Bool
autoGranted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:autoGrantedValue:CreateQualificationType' :: Maybe Int
autoGrantedValue = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:retryDelayInSeconds:CreateQualificationType' :: Maybe Integer
retryDelayInSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateQualificationType' :: Text
name = Text
pName_,
$sel:description:CreateQualificationType' :: Text
description = Text
pDescription_,
$sel:qualificationTypeStatus:CreateQualificationType' :: QualificationTypeStatus
qualificationTypeStatus =
QualificationTypeStatus
pQualificationTypeStatus_
}
createQualificationType_testDurationInSeconds :: Lens.Lens' CreateQualificationType (Prelude.Maybe Prelude.Integer)
createQualificationType_testDurationInSeconds :: (Maybe Integer -> f (Maybe Integer))
-> CreateQualificationType -> f CreateQualificationType
createQualificationType_testDurationInSeconds = (CreateQualificationType -> Maybe Integer)
-> (CreateQualificationType
-> Maybe Integer -> CreateQualificationType)
-> Lens
CreateQualificationType
CreateQualificationType
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationType' {Maybe Integer
testDurationInSeconds :: Maybe Integer
$sel:testDurationInSeconds:CreateQualificationType' :: CreateQualificationType -> Maybe Integer
testDurationInSeconds} -> Maybe Integer
testDurationInSeconds) (\s :: CreateQualificationType
s@CreateQualificationType' {} Maybe Integer
a -> CreateQualificationType
s {$sel:testDurationInSeconds:CreateQualificationType' :: Maybe Integer
testDurationInSeconds = Maybe Integer
a} :: CreateQualificationType)
createQualificationType_answerKey :: Lens.Lens' CreateQualificationType (Prelude.Maybe Prelude.Text)
createQualificationType_answerKey :: (Maybe Text -> f (Maybe Text))
-> CreateQualificationType -> f CreateQualificationType
createQualificationType_answerKey = (CreateQualificationType -> Maybe Text)
-> (CreateQualificationType
-> Maybe Text -> CreateQualificationType)
-> Lens
CreateQualificationType
CreateQualificationType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationType' {Maybe Text
answerKey :: Maybe Text
$sel:answerKey:CreateQualificationType' :: CreateQualificationType -> Maybe Text
answerKey} -> Maybe Text
answerKey) (\s :: CreateQualificationType
s@CreateQualificationType' {} Maybe Text
a -> CreateQualificationType
s {$sel:answerKey:CreateQualificationType' :: Maybe Text
answerKey = Maybe Text
a} :: CreateQualificationType)
createQualificationType_test :: Lens.Lens' CreateQualificationType (Prelude.Maybe Prelude.Text)
createQualificationType_test :: (Maybe Text -> f (Maybe Text))
-> CreateQualificationType -> f CreateQualificationType
createQualificationType_test = (CreateQualificationType -> Maybe Text)
-> (CreateQualificationType
-> Maybe Text -> CreateQualificationType)
-> Lens
CreateQualificationType
CreateQualificationType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationType' {Maybe Text
test :: Maybe Text
$sel:test:CreateQualificationType' :: CreateQualificationType -> Maybe Text
test} -> Maybe Text
test) (\s :: CreateQualificationType
s@CreateQualificationType' {} Maybe Text
a -> CreateQualificationType
s {$sel:test:CreateQualificationType' :: Maybe Text
test = Maybe Text
a} :: CreateQualificationType)
createQualificationType_keywords :: Lens.Lens' CreateQualificationType (Prelude.Maybe Prelude.Text)
createQualificationType_keywords :: (Maybe Text -> f (Maybe Text))
-> CreateQualificationType -> f CreateQualificationType
createQualificationType_keywords = (CreateQualificationType -> Maybe Text)
-> (CreateQualificationType
-> Maybe Text -> CreateQualificationType)
-> Lens
CreateQualificationType
CreateQualificationType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationType' {Maybe Text
keywords :: Maybe Text
$sel:keywords:CreateQualificationType' :: CreateQualificationType -> Maybe Text
keywords} -> Maybe Text
keywords) (\s :: CreateQualificationType
s@CreateQualificationType' {} Maybe Text
a -> CreateQualificationType
s {$sel:keywords:CreateQualificationType' :: Maybe Text
keywords = Maybe Text
a} :: CreateQualificationType)
createQualificationType_autoGranted :: Lens.Lens' CreateQualificationType (Prelude.Maybe Prelude.Bool)
createQualificationType_autoGranted :: (Maybe Bool -> f (Maybe Bool))
-> CreateQualificationType -> f CreateQualificationType
createQualificationType_autoGranted = (CreateQualificationType -> Maybe Bool)
-> (CreateQualificationType
-> Maybe Bool -> CreateQualificationType)
-> Lens
CreateQualificationType
CreateQualificationType
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationType' {Maybe Bool
autoGranted :: Maybe Bool
$sel:autoGranted:CreateQualificationType' :: CreateQualificationType -> Maybe Bool
autoGranted} -> Maybe Bool
autoGranted) (\s :: CreateQualificationType
s@CreateQualificationType' {} Maybe Bool
a -> CreateQualificationType
s {$sel:autoGranted:CreateQualificationType' :: Maybe Bool
autoGranted = Maybe Bool
a} :: CreateQualificationType)
createQualificationType_autoGrantedValue :: Lens.Lens' CreateQualificationType (Prelude.Maybe Prelude.Int)
createQualificationType_autoGrantedValue :: (Maybe Int -> f (Maybe Int))
-> CreateQualificationType -> f CreateQualificationType
createQualificationType_autoGrantedValue = (CreateQualificationType -> Maybe Int)
-> (CreateQualificationType
-> Maybe Int -> CreateQualificationType)
-> Lens
CreateQualificationType
CreateQualificationType
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationType' {Maybe Int
autoGrantedValue :: Maybe Int
$sel:autoGrantedValue:CreateQualificationType' :: CreateQualificationType -> Maybe Int
autoGrantedValue} -> Maybe Int
autoGrantedValue) (\s :: CreateQualificationType
s@CreateQualificationType' {} Maybe Int
a -> CreateQualificationType
s {$sel:autoGrantedValue:CreateQualificationType' :: Maybe Int
autoGrantedValue = Maybe Int
a} :: CreateQualificationType)
createQualificationType_retryDelayInSeconds :: Lens.Lens' CreateQualificationType (Prelude.Maybe Prelude.Integer)
createQualificationType_retryDelayInSeconds :: (Maybe Integer -> f (Maybe Integer))
-> CreateQualificationType -> f CreateQualificationType
createQualificationType_retryDelayInSeconds = (CreateQualificationType -> Maybe Integer)
-> (CreateQualificationType
-> Maybe Integer -> CreateQualificationType)
-> Lens
CreateQualificationType
CreateQualificationType
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationType' {Maybe Integer
retryDelayInSeconds :: Maybe Integer
$sel:retryDelayInSeconds:CreateQualificationType' :: CreateQualificationType -> Maybe Integer
retryDelayInSeconds} -> Maybe Integer
retryDelayInSeconds) (\s :: CreateQualificationType
s@CreateQualificationType' {} Maybe Integer
a -> CreateQualificationType
s {$sel:retryDelayInSeconds:CreateQualificationType' :: Maybe Integer
retryDelayInSeconds = Maybe Integer
a} :: CreateQualificationType)
createQualificationType_name :: Lens.Lens' CreateQualificationType Prelude.Text
createQualificationType_name :: (Text -> f Text)
-> CreateQualificationType -> f CreateQualificationType
createQualificationType_name = (CreateQualificationType -> Text)
-> (CreateQualificationType -> Text -> CreateQualificationType)
-> Lens CreateQualificationType CreateQualificationType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationType' {Text
name :: Text
$sel:name:CreateQualificationType' :: CreateQualificationType -> Text
name} -> Text
name) (\s :: CreateQualificationType
s@CreateQualificationType' {} Text
a -> CreateQualificationType
s {$sel:name:CreateQualificationType' :: Text
name = Text
a} :: CreateQualificationType)
createQualificationType_description :: Lens.Lens' CreateQualificationType Prelude.Text
createQualificationType_description :: (Text -> f Text)
-> CreateQualificationType -> f CreateQualificationType
createQualificationType_description = (CreateQualificationType -> Text)
-> (CreateQualificationType -> Text -> CreateQualificationType)
-> Lens CreateQualificationType CreateQualificationType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationType' {Text
description :: Text
$sel:description:CreateQualificationType' :: CreateQualificationType -> Text
description} -> Text
description) (\s :: CreateQualificationType
s@CreateQualificationType' {} Text
a -> CreateQualificationType
s {$sel:description:CreateQualificationType' :: Text
description = Text
a} :: CreateQualificationType)
createQualificationType_qualificationTypeStatus :: Lens.Lens' CreateQualificationType QualificationTypeStatus
createQualificationType_qualificationTypeStatus :: (QualificationTypeStatus -> f QualificationTypeStatus)
-> CreateQualificationType -> f CreateQualificationType
createQualificationType_qualificationTypeStatus = (CreateQualificationType -> QualificationTypeStatus)
-> (CreateQualificationType
-> QualificationTypeStatus -> CreateQualificationType)
-> Lens
CreateQualificationType
CreateQualificationType
QualificationTypeStatus
QualificationTypeStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationType' {QualificationTypeStatus
qualificationTypeStatus :: QualificationTypeStatus
$sel:qualificationTypeStatus:CreateQualificationType' :: CreateQualificationType -> QualificationTypeStatus
qualificationTypeStatus} -> QualificationTypeStatus
qualificationTypeStatus) (\s :: CreateQualificationType
s@CreateQualificationType' {} QualificationTypeStatus
a -> CreateQualificationType
s {$sel:qualificationTypeStatus:CreateQualificationType' :: QualificationTypeStatus
qualificationTypeStatus = QualificationTypeStatus
a} :: CreateQualificationType)
instance Core.AWSRequest CreateQualificationType where
type
AWSResponse CreateQualificationType =
CreateQualificationTypeResponse
request :: CreateQualificationType -> Request CreateQualificationType
request = Service
-> CreateQualificationType -> Request CreateQualificationType
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateQualificationType
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateQualificationType)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateQualificationType))
-> Logger
-> Service
-> Proxy CreateQualificationType
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateQualificationType)))
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 QualificationType -> Int -> CreateQualificationTypeResponse
CreateQualificationTypeResponse'
(Maybe QualificationType -> Int -> CreateQualificationTypeResponse)
-> Either String (Maybe QualificationType)
-> Either String (Int -> CreateQualificationTypeResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe QualificationType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"QualificationType")
Either String (Int -> CreateQualificationTypeResponse)
-> Either String Int
-> Either String CreateQualificationTypeResponse
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 CreateQualificationType
instance Prelude.NFData CreateQualificationType
instance Core.ToHeaders CreateQualificationType where
toHeaders :: CreateQualificationType -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateQualificationType -> 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
"MTurkRequesterServiceV20170117.CreateQualificationType" ::
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 CreateQualificationType where
toJSON :: CreateQualificationType -> Value
toJSON CreateQualificationType' {Maybe Bool
Maybe Int
Maybe Integer
Maybe Text
Text
QualificationTypeStatus
qualificationTypeStatus :: QualificationTypeStatus
description :: Text
name :: Text
retryDelayInSeconds :: Maybe Integer
autoGrantedValue :: Maybe Int
autoGranted :: Maybe Bool
keywords :: Maybe Text
test :: Maybe Text
answerKey :: Maybe Text
testDurationInSeconds :: Maybe Integer
$sel:qualificationTypeStatus:CreateQualificationType' :: CreateQualificationType -> QualificationTypeStatus
$sel:description:CreateQualificationType' :: CreateQualificationType -> Text
$sel:name:CreateQualificationType' :: CreateQualificationType -> Text
$sel:retryDelayInSeconds:CreateQualificationType' :: CreateQualificationType -> Maybe Integer
$sel:autoGrantedValue:CreateQualificationType' :: CreateQualificationType -> Maybe Int
$sel:autoGranted:CreateQualificationType' :: CreateQualificationType -> Maybe Bool
$sel:keywords:CreateQualificationType' :: CreateQualificationType -> Maybe Text
$sel:test:CreateQualificationType' :: CreateQualificationType -> Maybe Text
$sel:answerKey:CreateQualificationType' :: CreateQualificationType -> Maybe Text
$sel:testDurationInSeconds:CreateQualificationType' :: CreateQualificationType -> Maybe Integer
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"TestDurationInSeconds" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Integer -> Pair) -> Maybe Integer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
testDurationInSeconds,
(Text
"AnswerKey" 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
answerKey,
(Text
"Test" 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
test,
(Text
"Keywords" 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
keywords,
(Text
"AutoGranted" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
autoGranted,
(Text
"AutoGrantedValue" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
autoGrantedValue,
(Text
"RetryDelayInSeconds" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Integer -> Pair) -> Maybe Integer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
retryDelayInSeconds,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
description),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"QualificationTypeStatus"
Text -> QualificationTypeStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= QualificationTypeStatus
qualificationTypeStatus
)
]
)
instance Core.ToPath CreateQualificationType where
toPath :: CreateQualificationType -> ByteString
toPath = ByteString -> CreateQualificationType -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateQualificationType where
toQuery :: CreateQualificationType -> QueryString
toQuery = QueryString -> CreateQualificationType -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateQualificationTypeResponse = CreateQualificationTypeResponse'
{
CreateQualificationTypeResponse -> Maybe QualificationType
qualificationType :: Prelude.Maybe QualificationType,
CreateQualificationTypeResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateQualificationTypeResponse
-> CreateQualificationTypeResponse -> Bool
(CreateQualificationTypeResponse
-> CreateQualificationTypeResponse -> Bool)
-> (CreateQualificationTypeResponse
-> CreateQualificationTypeResponse -> Bool)
-> Eq CreateQualificationTypeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateQualificationTypeResponse
-> CreateQualificationTypeResponse -> Bool
$c/= :: CreateQualificationTypeResponse
-> CreateQualificationTypeResponse -> Bool
== :: CreateQualificationTypeResponse
-> CreateQualificationTypeResponse -> Bool
$c== :: CreateQualificationTypeResponse
-> CreateQualificationTypeResponse -> Bool
Prelude.Eq, ReadPrec [CreateQualificationTypeResponse]
ReadPrec CreateQualificationTypeResponse
Int -> ReadS CreateQualificationTypeResponse
ReadS [CreateQualificationTypeResponse]
(Int -> ReadS CreateQualificationTypeResponse)
-> ReadS [CreateQualificationTypeResponse]
-> ReadPrec CreateQualificationTypeResponse
-> ReadPrec [CreateQualificationTypeResponse]
-> Read CreateQualificationTypeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateQualificationTypeResponse]
$creadListPrec :: ReadPrec [CreateQualificationTypeResponse]
readPrec :: ReadPrec CreateQualificationTypeResponse
$creadPrec :: ReadPrec CreateQualificationTypeResponse
readList :: ReadS [CreateQualificationTypeResponse]
$creadList :: ReadS [CreateQualificationTypeResponse]
readsPrec :: Int -> ReadS CreateQualificationTypeResponse
$creadsPrec :: Int -> ReadS CreateQualificationTypeResponse
Prelude.Read, Int -> CreateQualificationTypeResponse -> ShowS
[CreateQualificationTypeResponse] -> ShowS
CreateQualificationTypeResponse -> String
(Int -> CreateQualificationTypeResponse -> ShowS)
-> (CreateQualificationTypeResponse -> String)
-> ([CreateQualificationTypeResponse] -> ShowS)
-> Show CreateQualificationTypeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateQualificationTypeResponse] -> ShowS
$cshowList :: [CreateQualificationTypeResponse] -> ShowS
show :: CreateQualificationTypeResponse -> String
$cshow :: CreateQualificationTypeResponse -> String
showsPrec :: Int -> CreateQualificationTypeResponse -> ShowS
$cshowsPrec :: Int -> CreateQualificationTypeResponse -> ShowS
Prelude.Show, (forall x.
CreateQualificationTypeResponse
-> Rep CreateQualificationTypeResponse x)
-> (forall x.
Rep CreateQualificationTypeResponse x
-> CreateQualificationTypeResponse)
-> Generic CreateQualificationTypeResponse
forall x.
Rep CreateQualificationTypeResponse x
-> CreateQualificationTypeResponse
forall x.
CreateQualificationTypeResponse
-> Rep CreateQualificationTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateQualificationTypeResponse x
-> CreateQualificationTypeResponse
$cfrom :: forall x.
CreateQualificationTypeResponse
-> Rep CreateQualificationTypeResponse x
Prelude.Generic)
newCreateQualificationTypeResponse ::
Prelude.Int ->
CreateQualificationTypeResponse
newCreateQualificationTypeResponse :: Int -> CreateQualificationTypeResponse
newCreateQualificationTypeResponse Int
pHttpStatus_ =
CreateQualificationTypeResponse' :: Maybe QualificationType -> Int -> CreateQualificationTypeResponse
CreateQualificationTypeResponse'
{ $sel:qualificationType:CreateQualificationTypeResponse' :: Maybe QualificationType
qualificationType =
Maybe QualificationType
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateQualificationTypeResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createQualificationTypeResponse_qualificationType :: Lens.Lens' CreateQualificationTypeResponse (Prelude.Maybe QualificationType)
createQualificationTypeResponse_qualificationType :: (Maybe QualificationType -> f (Maybe QualificationType))
-> CreateQualificationTypeResponse
-> f CreateQualificationTypeResponse
createQualificationTypeResponse_qualificationType = (CreateQualificationTypeResponse -> Maybe QualificationType)
-> (CreateQualificationTypeResponse
-> Maybe QualificationType -> CreateQualificationTypeResponse)
-> Lens
CreateQualificationTypeResponse
CreateQualificationTypeResponse
(Maybe QualificationType)
(Maybe QualificationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationTypeResponse' {Maybe QualificationType
qualificationType :: Maybe QualificationType
$sel:qualificationType:CreateQualificationTypeResponse' :: CreateQualificationTypeResponse -> Maybe QualificationType
qualificationType} -> Maybe QualificationType
qualificationType) (\s :: CreateQualificationTypeResponse
s@CreateQualificationTypeResponse' {} Maybe QualificationType
a -> CreateQualificationTypeResponse
s {$sel:qualificationType:CreateQualificationTypeResponse' :: Maybe QualificationType
qualificationType = Maybe QualificationType
a} :: CreateQualificationTypeResponse)
createQualificationTypeResponse_httpStatus :: Lens.Lens' CreateQualificationTypeResponse Prelude.Int
createQualificationTypeResponse_httpStatus :: (Int -> f Int)
-> CreateQualificationTypeResponse
-> f CreateQualificationTypeResponse
createQualificationTypeResponse_httpStatus = (CreateQualificationTypeResponse -> Int)
-> (CreateQualificationTypeResponse
-> Int -> CreateQualificationTypeResponse)
-> Lens
CreateQualificationTypeResponse
CreateQualificationTypeResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateQualificationTypeResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateQualificationTypeResponse' :: CreateQualificationTypeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateQualificationTypeResponse
s@CreateQualificationTypeResponse' {} Int
a -> CreateQualificationTypeResponse
s {$sel:httpStatus:CreateQualificationTypeResponse' :: Int
httpStatus = Int
a} :: CreateQualificationTypeResponse)
instance
Prelude.NFData
CreateQualificationTypeResponse