{-# 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.SetTypeDefaultVersion
(
SetTypeDefaultVersion (..),
newSetTypeDefaultVersion,
setTypeDefaultVersion_arn,
setTypeDefaultVersion_type,
setTypeDefaultVersion_typeName,
setTypeDefaultVersion_versionId,
SetTypeDefaultVersionResponse (..),
newSetTypeDefaultVersionResponse,
setTypeDefaultVersionResponse_httpStatus,
)
where
import Amazonka.CloudFormation.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 SetTypeDefaultVersion = SetTypeDefaultVersion'
{
SetTypeDefaultVersion -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
SetTypeDefaultVersion -> Maybe RegistryType
type' :: Prelude.Maybe RegistryType,
SetTypeDefaultVersion -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
SetTypeDefaultVersion -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text
}
deriving (SetTypeDefaultVersion -> SetTypeDefaultVersion -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetTypeDefaultVersion -> SetTypeDefaultVersion -> Bool
$c/= :: SetTypeDefaultVersion -> SetTypeDefaultVersion -> Bool
== :: SetTypeDefaultVersion -> SetTypeDefaultVersion -> Bool
$c== :: SetTypeDefaultVersion -> SetTypeDefaultVersion -> Bool
Prelude.Eq, ReadPrec [SetTypeDefaultVersion]
ReadPrec SetTypeDefaultVersion
Int -> ReadS SetTypeDefaultVersion
ReadS [SetTypeDefaultVersion]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetTypeDefaultVersion]
$creadListPrec :: ReadPrec [SetTypeDefaultVersion]
readPrec :: ReadPrec SetTypeDefaultVersion
$creadPrec :: ReadPrec SetTypeDefaultVersion
readList :: ReadS [SetTypeDefaultVersion]
$creadList :: ReadS [SetTypeDefaultVersion]
readsPrec :: Int -> ReadS SetTypeDefaultVersion
$creadsPrec :: Int -> ReadS SetTypeDefaultVersion
Prelude.Read, Int -> SetTypeDefaultVersion -> ShowS
[SetTypeDefaultVersion] -> ShowS
SetTypeDefaultVersion -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetTypeDefaultVersion] -> ShowS
$cshowList :: [SetTypeDefaultVersion] -> ShowS
show :: SetTypeDefaultVersion -> String
$cshow :: SetTypeDefaultVersion -> String
showsPrec :: Int -> SetTypeDefaultVersion -> ShowS
$cshowsPrec :: Int -> SetTypeDefaultVersion -> ShowS
Prelude.Show, forall x. Rep SetTypeDefaultVersion x -> SetTypeDefaultVersion
forall x. SetTypeDefaultVersion -> Rep SetTypeDefaultVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SetTypeDefaultVersion x -> SetTypeDefaultVersion
$cfrom :: forall x. SetTypeDefaultVersion -> Rep SetTypeDefaultVersion x
Prelude.Generic)
newSetTypeDefaultVersion ::
SetTypeDefaultVersion
newSetTypeDefaultVersion :: SetTypeDefaultVersion
newSetTypeDefaultVersion =
SetTypeDefaultVersion'
{ $sel:arn:SetTypeDefaultVersion' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:type':SetTypeDefaultVersion' :: Maybe RegistryType
type' = forall a. Maybe a
Prelude.Nothing,
$sel:typeName:SetTypeDefaultVersion' :: Maybe Text
typeName = forall a. Maybe a
Prelude.Nothing,
$sel:versionId:SetTypeDefaultVersion' :: Maybe Text
versionId = forall a. Maybe a
Prelude.Nothing
}
setTypeDefaultVersion_arn :: Lens.Lens' SetTypeDefaultVersion (Prelude.Maybe Prelude.Text)
setTypeDefaultVersion_arn :: Lens' SetTypeDefaultVersion (Maybe Text)
setTypeDefaultVersion_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetTypeDefaultVersion' {Maybe Text
arn :: Maybe Text
$sel:arn:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
arn} -> Maybe Text
arn) (\s :: SetTypeDefaultVersion
s@SetTypeDefaultVersion' {} Maybe Text
a -> SetTypeDefaultVersion
s {$sel:arn:SetTypeDefaultVersion' :: Maybe Text
arn = Maybe Text
a} :: SetTypeDefaultVersion)
setTypeDefaultVersion_type :: Lens.Lens' SetTypeDefaultVersion (Prelude.Maybe RegistryType)
setTypeDefaultVersion_type :: Lens' SetTypeDefaultVersion (Maybe RegistryType)
setTypeDefaultVersion_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetTypeDefaultVersion' {Maybe RegistryType
type' :: Maybe RegistryType
$sel:type':SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe RegistryType
type'} -> Maybe RegistryType
type') (\s :: SetTypeDefaultVersion
s@SetTypeDefaultVersion' {} Maybe RegistryType
a -> SetTypeDefaultVersion
s {$sel:type':SetTypeDefaultVersion' :: Maybe RegistryType
type' = Maybe RegistryType
a} :: SetTypeDefaultVersion)
setTypeDefaultVersion_typeName :: Lens.Lens' SetTypeDefaultVersion (Prelude.Maybe Prelude.Text)
setTypeDefaultVersion_typeName :: Lens' SetTypeDefaultVersion (Maybe Text)
setTypeDefaultVersion_typeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetTypeDefaultVersion' {Maybe Text
typeName :: Maybe Text
$sel:typeName:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: SetTypeDefaultVersion
s@SetTypeDefaultVersion' {} Maybe Text
a -> SetTypeDefaultVersion
s {$sel:typeName:SetTypeDefaultVersion' :: Maybe Text
typeName = Maybe Text
a} :: SetTypeDefaultVersion)
setTypeDefaultVersion_versionId :: Lens.Lens' SetTypeDefaultVersion (Prelude.Maybe Prelude.Text)
setTypeDefaultVersion_versionId :: Lens' SetTypeDefaultVersion (Maybe Text)
setTypeDefaultVersion_versionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetTypeDefaultVersion' {Maybe Text
versionId :: Maybe Text
$sel:versionId:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: SetTypeDefaultVersion
s@SetTypeDefaultVersion' {} Maybe Text
a -> SetTypeDefaultVersion
s {$sel:versionId:SetTypeDefaultVersion' :: Maybe Text
versionId = Maybe Text
a} :: SetTypeDefaultVersion)
instance Core.AWSRequest SetTypeDefaultVersion where
type
AWSResponse SetTypeDefaultVersion =
SetTypeDefaultVersionResponse
request :: (Service -> Service)
-> SetTypeDefaultVersion -> Request SetTypeDefaultVersion
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SetTypeDefaultVersion
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetTypeDefaultVersion)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"SetTypeDefaultVersionResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> SetTypeDefaultVersionResponse
SetTypeDefaultVersionResponse'
forall (f :: * -> *) a b. Functor 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 SetTypeDefaultVersion where
hashWithSalt :: Int -> SetTypeDefaultVersion -> Int
hashWithSalt Int
_salt SetTypeDefaultVersion' {Maybe Text
Maybe RegistryType
versionId :: Maybe Text
typeName :: Maybe Text
type' :: Maybe RegistryType
arn :: Maybe Text
$sel:versionId:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
$sel:typeName:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
$sel:type':SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe RegistryType
$sel:arn:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RegistryType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
typeName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
versionId
instance Prelude.NFData SetTypeDefaultVersion where
rnf :: SetTypeDefaultVersion -> ()
rnf SetTypeDefaultVersion' {Maybe Text
Maybe RegistryType
versionId :: Maybe Text
typeName :: Maybe Text
type' :: Maybe RegistryType
arn :: Maybe Text
$sel:versionId:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
$sel:typeName:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
$sel:type':SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe RegistryType
$sel:arn:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RegistryType
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
typeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
versionId
instance Data.ToHeaders SetTypeDefaultVersion where
toHeaders :: SetTypeDefaultVersion -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath SetTypeDefaultVersion where
toPath :: SetTypeDefaultVersion -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery SetTypeDefaultVersion where
toQuery :: SetTypeDefaultVersion -> QueryString
toQuery SetTypeDefaultVersion' {Maybe Text
Maybe RegistryType
versionId :: Maybe Text
typeName :: Maybe Text
type' :: Maybe RegistryType
arn :: Maybe Text
$sel:versionId:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
$sel:typeName:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
$sel:type':SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe RegistryType
$sel:arn:SetTypeDefaultVersion' :: SetTypeDefaultVersion -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"SetTypeDefaultVersion" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"Arn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
arn,
ByteString
"Type" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe RegistryType
type',
ByteString
"TypeName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
typeName,
ByteString
"VersionId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
versionId
]
data SetTypeDefaultVersionResponse = SetTypeDefaultVersionResponse'
{
SetTypeDefaultVersionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SetTypeDefaultVersionResponse
-> SetTypeDefaultVersionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetTypeDefaultVersionResponse
-> SetTypeDefaultVersionResponse -> Bool
$c/= :: SetTypeDefaultVersionResponse
-> SetTypeDefaultVersionResponse -> Bool
== :: SetTypeDefaultVersionResponse
-> SetTypeDefaultVersionResponse -> Bool
$c== :: SetTypeDefaultVersionResponse
-> SetTypeDefaultVersionResponse -> Bool
Prelude.Eq, ReadPrec [SetTypeDefaultVersionResponse]
ReadPrec SetTypeDefaultVersionResponse
Int -> ReadS SetTypeDefaultVersionResponse
ReadS [SetTypeDefaultVersionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetTypeDefaultVersionResponse]
$creadListPrec :: ReadPrec [SetTypeDefaultVersionResponse]
readPrec :: ReadPrec SetTypeDefaultVersionResponse
$creadPrec :: ReadPrec SetTypeDefaultVersionResponse
readList :: ReadS [SetTypeDefaultVersionResponse]
$creadList :: ReadS [SetTypeDefaultVersionResponse]
readsPrec :: Int -> ReadS SetTypeDefaultVersionResponse
$creadsPrec :: Int -> ReadS SetTypeDefaultVersionResponse
Prelude.Read, Int -> SetTypeDefaultVersionResponse -> ShowS
[SetTypeDefaultVersionResponse] -> ShowS
SetTypeDefaultVersionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetTypeDefaultVersionResponse] -> ShowS
$cshowList :: [SetTypeDefaultVersionResponse] -> ShowS
show :: SetTypeDefaultVersionResponse -> String
$cshow :: SetTypeDefaultVersionResponse -> String
showsPrec :: Int -> SetTypeDefaultVersionResponse -> ShowS
$cshowsPrec :: Int -> SetTypeDefaultVersionResponse -> ShowS
Prelude.Show, forall x.
Rep SetTypeDefaultVersionResponse x
-> SetTypeDefaultVersionResponse
forall x.
SetTypeDefaultVersionResponse
-> Rep SetTypeDefaultVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetTypeDefaultVersionResponse x
-> SetTypeDefaultVersionResponse
$cfrom :: forall x.
SetTypeDefaultVersionResponse
-> Rep SetTypeDefaultVersionResponse x
Prelude.Generic)
newSetTypeDefaultVersionResponse ::
Prelude.Int ->
SetTypeDefaultVersionResponse
newSetTypeDefaultVersionResponse :: Int -> SetTypeDefaultVersionResponse
newSetTypeDefaultVersionResponse Int
pHttpStatus_ =
SetTypeDefaultVersionResponse'
{ $sel:httpStatus:SetTypeDefaultVersionResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
setTypeDefaultVersionResponse_httpStatus :: Lens.Lens' SetTypeDefaultVersionResponse Prelude.Int
setTypeDefaultVersionResponse_httpStatus :: Lens' SetTypeDefaultVersionResponse Int
setTypeDefaultVersionResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetTypeDefaultVersionResponse' {Int
httpStatus :: Int
$sel:httpStatus:SetTypeDefaultVersionResponse' :: SetTypeDefaultVersionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SetTypeDefaultVersionResponse
s@SetTypeDefaultVersionResponse' {} Int
a -> SetTypeDefaultVersionResponse
s {$sel:httpStatus:SetTypeDefaultVersionResponse' :: Int
httpStatus = Int
a} :: SetTypeDefaultVersionResponse)
instance Prelude.NFData SetTypeDefaultVersionResponse where
rnf :: SetTypeDefaultVersionResponse -> ()
rnf SetTypeDefaultVersionResponse' {Int
httpStatus :: Int
$sel:httpStatus:SetTypeDefaultVersionResponse' :: SetTypeDefaultVersionResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus