{-# 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.CloudFormation.TestType
(
TestType (..),
newTestType,
testType_versionId,
testType_typeName,
testType_arn,
testType_logDeliveryBucket,
testType_type,
TestTypeResponse (..),
newTestTypeResponse,
testTypeResponse_typeVersionArn,
testTypeResponse_httpStatus,
)
where
import Amazonka.CloudFormation.Types
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
data TestType = TestType'
{
TestType -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text,
TestType -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
TestType -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
TestType -> Maybe Text
logDeliveryBucket :: Prelude.Maybe Prelude.Text,
TestType -> Maybe ThirdPartyType
type' :: Prelude.Maybe ThirdPartyType
}
deriving (TestType -> TestType -> Bool
(TestType -> TestType -> Bool)
-> (TestType -> TestType -> Bool) -> Eq TestType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestType -> TestType -> Bool
$c/= :: TestType -> TestType -> Bool
== :: TestType -> TestType -> Bool
$c== :: TestType -> TestType -> Bool
Prelude.Eq, ReadPrec [TestType]
ReadPrec TestType
Int -> ReadS TestType
ReadS [TestType]
(Int -> ReadS TestType)
-> ReadS [TestType]
-> ReadPrec TestType
-> ReadPrec [TestType]
-> Read TestType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TestType]
$creadListPrec :: ReadPrec [TestType]
readPrec :: ReadPrec TestType
$creadPrec :: ReadPrec TestType
readList :: ReadS [TestType]
$creadList :: ReadS [TestType]
readsPrec :: Int -> ReadS TestType
$creadsPrec :: Int -> ReadS TestType
Prelude.Read, Int -> TestType -> ShowS
[TestType] -> ShowS
TestType -> String
(Int -> TestType -> ShowS)
-> (TestType -> String) -> ([TestType] -> ShowS) -> Show TestType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestType] -> ShowS
$cshowList :: [TestType] -> ShowS
show :: TestType -> String
$cshow :: TestType -> String
showsPrec :: Int -> TestType -> ShowS
$cshowsPrec :: Int -> TestType -> ShowS
Prelude.Show, (forall x. TestType -> Rep TestType x)
-> (forall x. Rep TestType x -> TestType) -> Generic TestType
forall x. Rep TestType x -> TestType
forall x. TestType -> Rep TestType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestType x -> TestType
$cfrom :: forall x. TestType -> Rep TestType x
Prelude.Generic)
newTestType ::
TestType
newTestType :: TestType
newTestType =
TestType' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ThirdPartyType
-> TestType
TestType'
{ $sel:versionId:TestType' :: Maybe Text
versionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:typeName:TestType' :: Maybe Text
typeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:TestType' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:logDeliveryBucket:TestType' :: Maybe Text
logDeliveryBucket = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':TestType' :: Maybe ThirdPartyType
type' = Maybe ThirdPartyType
forall a. Maybe a
Prelude.Nothing
}
testType_versionId :: Lens.Lens' TestType (Prelude.Maybe Prelude.Text)
testType_versionId :: (Maybe Text -> f (Maybe Text)) -> TestType -> f TestType
testType_versionId = (TestType -> Maybe Text)
-> (TestType -> Maybe Text -> TestType)
-> Lens TestType TestType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestType' {Maybe Text
versionId :: Maybe Text
$sel:versionId:TestType' :: TestType -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: TestType
s@TestType' {} Maybe Text
a -> TestType
s {$sel:versionId:TestType' :: Maybe Text
versionId = Maybe Text
a} :: TestType)
testType_typeName :: Lens.Lens' TestType (Prelude.Maybe Prelude.Text)
testType_typeName :: (Maybe Text -> f (Maybe Text)) -> TestType -> f TestType
testType_typeName = (TestType -> Maybe Text)
-> (TestType -> Maybe Text -> TestType)
-> Lens TestType TestType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestType' {Maybe Text
typeName :: Maybe Text
$sel:typeName:TestType' :: TestType -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: TestType
s@TestType' {} Maybe Text
a -> TestType
s {$sel:typeName:TestType' :: Maybe Text
typeName = Maybe Text
a} :: TestType)
testType_arn :: Lens.Lens' TestType (Prelude.Maybe Prelude.Text)
testType_arn :: (Maybe Text -> f (Maybe Text)) -> TestType -> f TestType
testType_arn = (TestType -> Maybe Text)
-> (TestType -> Maybe Text -> TestType)
-> Lens TestType TestType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestType' {Maybe Text
arn :: Maybe Text
$sel:arn:TestType' :: TestType -> Maybe Text
arn} -> Maybe Text
arn) (\s :: TestType
s@TestType' {} Maybe Text
a -> TestType
s {$sel:arn:TestType' :: Maybe Text
arn = Maybe Text
a} :: TestType)
testType_logDeliveryBucket :: Lens.Lens' TestType (Prelude.Maybe Prelude.Text)
testType_logDeliveryBucket :: (Maybe Text -> f (Maybe Text)) -> TestType -> f TestType
testType_logDeliveryBucket = (TestType -> Maybe Text)
-> (TestType -> Maybe Text -> TestType)
-> Lens TestType TestType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestType' {Maybe Text
logDeliveryBucket :: Maybe Text
$sel:logDeliveryBucket:TestType' :: TestType -> Maybe Text
logDeliveryBucket} -> Maybe Text
logDeliveryBucket) (\s :: TestType
s@TestType' {} Maybe Text
a -> TestType
s {$sel:logDeliveryBucket:TestType' :: Maybe Text
logDeliveryBucket = Maybe Text
a} :: TestType)
testType_type :: Lens.Lens' TestType (Prelude.Maybe ThirdPartyType)
testType_type :: (Maybe ThirdPartyType -> f (Maybe ThirdPartyType))
-> TestType -> f TestType
testType_type = (TestType -> Maybe ThirdPartyType)
-> (TestType -> Maybe ThirdPartyType -> TestType)
-> Lens
TestType TestType (Maybe ThirdPartyType) (Maybe ThirdPartyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestType' {Maybe ThirdPartyType
type' :: Maybe ThirdPartyType
$sel:type':TestType' :: TestType -> Maybe ThirdPartyType
type'} -> Maybe ThirdPartyType
type') (\s :: TestType
s@TestType' {} Maybe ThirdPartyType
a -> TestType
s {$sel:type':TestType' :: Maybe ThirdPartyType
type' = Maybe ThirdPartyType
a} :: TestType)
instance Core.AWSRequest TestType where
type AWSResponse TestType = TestTypeResponse
request :: TestType -> Request TestType
request = Service -> TestType -> Request TestType
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy TestType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TestType)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse TestType))
-> Logger
-> Service
-> Proxy TestType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TestType)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"TestTypeResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text -> Int -> TestTypeResponse
TestTypeResponse'
(Maybe Text -> Int -> TestTypeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> TestTypeResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TypeVersionArn")
Either String (Int -> TestTypeResponse)
-> Either String Int -> Either String TestTypeResponse
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 TestType
instance Prelude.NFData TestType
instance Core.ToHeaders TestType where
toHeaders :: TestType -> ResponseHeaders
toHeaders = ResponseHeaders -> TestType -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath TestType where
toPath :: TestType -> ByteString
toPath = ByteString -> TestType -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery TestType where
toQuery :: TestType -> QueryString
toQuery TestType' {Maybe Text
Maybe ThirdPartyType
type' :: Maybe ThirdPartyType
logDeliveryBucket :: Maybe Text
arn :: Maybe Text
typeName :: Maybe Text
versionId :: Maybe Text
$sel:type':TestType' :: TestType -> Maybe ThirdPartyType
$sel:logDeliveryBucket:TestType' :: TestType -> Maybe Text
$sel:arn:TestType' :: TestType -> Maybe Text
$sel:typeName:TestType' :: TestType -> Maybe Text
$sel:versionId:TestType' :: TestType -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action" ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"TestType" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"VersionId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
versionId,
ByteString
"TypeName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
typeName,
ByteString
"Arn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
arn,
ByteString
"LogDeliveryBucket" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
logDeliveryBucket,
ByteString
"Type" ByteString -> Maybe ThirdPartyType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ThirdPartyType
type'
]
data TestTypeResponse = TestTypeResponse'
{
TestTypeResponse -> Maybe Text
typeVersionArn :: Prelude.Maybe Prelude.Text,
TestTypeResponse -> Int
httpStatus :: Prelude.Int
}
deriving (TestTypeResponse -> TestTypeResponse -> Bool
(TestTypeResponse -> TestTypeResponse -> Bool)
-> (TestTypeResponse -> TestTypeResponse -> Bool)
-> Eq TestTypeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestTypeResponse -> TestTypeResponse -> Bool
$c/= :: TestTypeResponse -> TestTypeResponse -> Bool
== :: TestTypeResponse -> TestTypeResponse -> Bool
$c== :: TestTypeResponse -> TestTypeResponse -> Bool
Prelude.Eq, ReadPrec [TestTypeResponse]
ReadPrec TestTypeResponse
Int -> ReadS TestTypeResponse
ReadS [TestTypeResponse]
(Int -> ReadS TestTypeResponse)
-> ReadS [TestTypeResponse]
-> ReadPrec TestTypeResponse
-> ReadPrec [TestTypeResponse]
-> Read TestTypeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TestTypeResponse]
$creadListPrec :: ReadPrec [TestTypeResponse]
readPrec :: ReadPrec TestTypeResponse
$creadPrec :: ReadPrec TestTypeResponse
readList :: ReadS [TestTypeResponse]
$creadList :: ReadS [TestTypeResponse]
readsPrec :: Int -> ReadS TestTypeResponse
$creadsPrec :: Int -> ReadS TestTypeResponse
Prelude.Read, Int -> TestTypeResponse -> ShowS
[TestTypeResponse] -> ShowS
TestTypeResponse -> String
(Int -> TestTypeResponse -> ShowS)
-> (TestTypeResponse -> String)
-> ([TestTypeResponse] -> ShowS)
-> Show TestTypeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestTypeResponse] -> ShowS
$cshowList :: [TestTypeResponse] -> ShowS
show :: TestTypeResponse -> String
$cshow :: TestTypeResponse -> String
showsPrec :: Int -> TestTypeResponse -> ShowS
$cshowsPrec :: Int -> TestTypeResponse -> ShowS
Prelude.Show, (forall x. TestTypeResponse -> Rep TestTypeResponse x)
-> (forall x. Rep TestTypeResponse x -> TestTypeResponse)
-> Generic TestTypeResponse
forall x. Rep TestTypeResponse x -> TestTypeResponse
forall x. TestTypeResponse -> Rep TestTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestTypeResponse x -> TestTypeResponse
$cfrom :: forall x. TestTypeResponse -> Rep TestTypeResponse x
Prelude.Generic)
newTestTypeResponse ::
Prelude.Int ->
TestTypeResponse
newTestTypeResponse :: Int -> TestTypeResponse
newTestTypeResponse Int
pHttpStatus_ =
TestTypeResponse' :: Maybe Text -> Int -> TestTypeResponse
TestTypeResponse'
{ $sel:typeVersionArn:TestTypeResponse' :: Maybe Text
typeVersionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:TestTypeResponse' :: Int
httpStatus = Int
pHttpStatus_
}
testTypeResponse_typeVersionArn :: Lens.Lens' TestTypeResponse (Prelude.Maybe Prelude.Text)
testTypeResponse_typeVersionArn :: (Maybe Text -> f (Maybe Text))
-> TestTypeResponse -> f TestTypeResponse
testTypeResponse_typeVersionArn = (TestTypeResponse -> Maybe Text)
-> (TestTypeResponse -> Maybe Text -> TestTypeResponse)
-> Lens TestTypeResponse TestTypeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestTypeResponse' {Maybe Text
typeVersionArn :: Maybe Text
$sel:typeVersionArn:TestTypeResponse' :: TestTypeResponse -> Maybe Text
typeVersionArn} -> Maybe Text
typeVersionArn) (\s :: TestTypeResponse
s@TestTypeResponse' {} Maybe Text
a -> TestTypeResponse
s {$sel:typeVersionArn:TestTypeResponse' :: Maybe Text
typeVersionArn = Maybe Text
a} :: TestTypeResponse)
testTypeResponse_httpStatus :: Lens.Lens' TestTypeResponse Prelude.Int
testTypeResponse_httpStatus :: (Int -> f Int) -> TestTypeResponse -> f TestTypeResponse
testTypeResponse_httpStatus = (TestTypeResponse -> Int)
-> (TestTypeResponse -> Int -> TestTypeResponse)
-> Lens TestTypeResponse TestTypeResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestTypeResponse' {Int
httpStatus :: Int
$sel:httpStatus:TestTypeResponse' :: TestTypeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: TestTypeResponse
s@TestTypeResponse' {} Int
a -> TestTypeResponse
s {$sel:httpStatus:TestTypeResponse' :: Int
httpStatus = Int
a} :: TestTypeResponse)
instance Prelude.NFData TestTypeResponse