{-# 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.AutoScaling.CreateOrUpdateTags
(
CreateOrUpdateTags (..),
newCreateOrUpdateTags,
createOrUpdateTags_tags,
CreateOrUpdateTagsResponse (..),
newCreateOrUpdateTagsResponse,
)
where
import Amazonka.AutoScaling.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 CreateOrUpdateTags = CreateOrUpdateTags'
{
CreateOrUpdateTags -> [Tag]
tags :: [Tag]
}
deriving (CreateOrUpdateTags -> CreateOrUpdateTags -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateOrUpdateTags -> CreateOrUpdateTags -> Bool
$c/= :: CreateOrUpdateTags -> CreateOrUpdateTags -> Bool
== :: CreateOrUpdateTags -> CreateOrUpdateTags -> Bool
$c== :: CreateOrUpdateTags -> CreateOrUpdateTags -> Bool
Prelude.Eq, ReadPrec [CreateOrUpdateTags]
ReadPrec CreateOrUpdateTags
Int -> ReadS CreateOrUpdateTags
ReadS [CreateOrUpdateTags]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateOrUpdateTags]
$creadListPrec :: ReadPrec [CreateOrUpdateTags]
readPrec :: ReadPrec CreateOrUpdateTags
$creadPrec :: ReadPrec CreateOrUpdateTags
readList :: ReadS [CreateOrUpdateTags]
$creadList :: ReadS [CreateOrUpdateTags]
readsPrec :: Int -> ReadS CreateOrUpdateTags
$creadsPrec :: Int -> ReadS CreateOrUpdateTags
Prelude.Read, Int -> CreateOrUpdateTags -> ShowS
[CreateOrUpdateTags] -> ShowS
CreateOrUpdateTags -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateOrUpdateTags] -> ShowS
$cshowList :: [CreateOrUpdateTags] -> ShowS
show :: CreateOrUpdateTags -> String
$cshow :: CreateOrUpdateTags -> String
showsPrec :: Int -> CreateOrUpdateTags -> ShowS
$cshowsPrec :: Int -> CreateOrUpdateTags -> ShowS
Prelude.Show, forall x. Rep CreateOrUpdateTags x -> CreateOrUpdateTags
forall x. CreateOrUpdateTags -> Rep CreateOrUpdateTags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateOrUpdateTags x -> CreateOrUpdateTags
$cfrom :: forall x. CreateOrUpdateTags -> Rep CreateOrUpdateTags x
Prelude.Generic)
newCreateOrUpdateTags ::
CreateOrUpdateTags
newCreateOrUpdateTags :: CreateOrUpdateTags
newCreateOrUpdateTags =
CreateOrUpdateTags' {$sel:tags:CreateOrUpdateTags' :: [Tag]
tags = forall a. Monoid a => a
Prelude.mempty}
createOrUpdateTags_tags :: Lens.Lens' CreateOrUpdateTags [Tag]
createOrUpdateTags_tags :: Lens' CreateOrUpdateTags [Tag]
createOrUpdateTags_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOrUpdateTags' {[Tag]
tags :: [Tag]
$sel:tags:CreateOrUpdateTags' :: CreateOrUpdateTags -> [Tag]
tags} -> [Tag]
tags) (\s :: CreateOrUpdateTags
s@CreateOrUpdateTags' {} [Tag]
a -> CreateOrUpdateTags
s {$sel:tags:CreateOrUpdateTags' :: [Tag]
tags = [Tag]
a} :: CreateOrUpdateTags) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest CreateOrUpdateTags where
type
AWSResponse CreateOrUpdateTags =
CreateOrUpdateTagsResponse
request :: (Service -> Service)
-> CreateOrUpdateTags -> Request CreateOrUpdateTags
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 CreateOrUpdateTags
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateOrUpdateTags)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull CreateOrUpdateTagsResponse
CreateOrUpdateTagsResponse'
instance Prelude.Hashable CreateOrUpdateTags where
hashWithSalt :: Int -> CreateOrUpdateTags -> Int
hashWithSalt Int
_salt CreateOrUpdateTags' {[Tag]
tags :: [Tag]
$sel:tags:CreateOrUpdateTags' :: CreateOrUpdateTags -> [Tag]
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Tag]
tags
instance Prelude.NFData CreateOrUpdateTags where
rnf :: CreateOrUpdateTags -> ()
rnf CreateOrUpdateTags' {[Tag]
tags :: [Tag]
$sel:tags:CreateOrUpdateTags' :: CreateOrUpdateTags -> [Tag]
..} = forall a. NFData a => a -> ()
Prelude.rnf [Tag]
tags
instance Data.ToHeaders CreateOrUpdateTags where
toHeaders :: CreateOrUpdateTags -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath CreateOrUpdateTags where
toPath :: CreateOrUpdateTags -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateOrUpdateTags where
toQuery :: CreateOrUpdateTags -> QueryString
toQuery CreateOrUpdateTags' {[Tag]
tags :: [Tag]
$sel:tags:CreateOrUpdateTags' :: CreateOrUpdateTags -> [Tag]
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateOrUpdateTags" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2011-01-01" :: Prelude.ByteString),
ByteString
"Tags" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" [Tag]
tags
]
data CreateOrUpdateTagsResponse = CreateOrUpdateTagsResponse'
{
}
deriving (CreateOrUpdateTagsResponse -> CreateOrUpdateTagsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateOrUpdateTagsResponse -> CreateOrUpdateTagsResponse -> Bool
$c/= :: CreateOrUpdateTagsResponse -> CreateOrUpdateTagsResponse -> Bool
== :: CreateOrUpdateTagsResponse -> CreateOrUpdateTagsResponse -> Bool
$c== :: CreateOrUpdateTagsResponse -> CreateOrUpdateTagsResponse -> Bool
Prelude.Eq, ReadPrec [CreateOrUpdateTagsResponse]
ReadPrec CreateOrUpdateTagsResponse
Int -> ReadS CreateOrUpdateTagsResponse
ReadS [CreateOrUpdateTagsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateOrUpdateTagsResponse]
$creadListPrec :: ReadPrec [CreateOrUpdateTagsResponse]
readPrec :: ReadPrec CreateOrUpdateTagsResponse
$creadPrec :: ReadPrec CreateOrUpdateTagsResponse
readList :: ReadS [CreateOrUpdateTagsResponse]
$creadList :: ReadS [CreateOrUpdateTagsResponse]
readsPrec :: Int -> ReadS CreateOrUpdateTagsResponse
$creadsPrec :: Int -> ReadS CreateOrUpdateTagsResponse
Prelude.Read, Int -> CreateOrUpdateTagsResponse -> ShowS
[CreateOrUpdateTagsResponse] -> ShowS
CreateOrUpdateTagsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateOrUpdateTagsResponse] -> ShowS
$cshowList :: [CreateOrUpdateTagsResponse] -> ShowS
show :: CreateOrUpdateTagsResponse -> String
$cshow :: CreateOrUpdateTagsResponse -> String
showsPrec :: Int -> CreateOrUpdateTagsResponse -> ShowS
$cshowsPrec :: Int -> CreateOrUpdateTagsResponse -> ShowS
Prelude.Show, forall x.
Rep CreateOrUpdateTagsResponse x -> CreateOrUpdateTagsResponse
forall x.
CreateOrUpdateTagsResponse -> Rep CreateOrUpdateTagsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateOrUpdateTagsResponse x -> CreateOrUpdateTagsResponse
$cfrom :: forall x.
CreateOrUpdateTagsResponse -> Rep CreateOrUpdateTagsResponse x
Prelude.Generic)
newCreateOrUpdateTagsResponse ::
CreateOrUpdateTagsResponse
newCreateOrUpdateTagsResponse :: CreateOrUpdateTagsResponse
newCreateOrUpdateTagsResponse =
CreateOrUpdateTagsResponse
CreateOrUpdateTagsResponse'
instance Prelude.NFData CreateOrUpdateTagsResponse where
rnf :: CreateOrUpdateTagsResponse -> ()
rnf CreateOrUpdateTagsResponse
_ = ()