{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Neptune.RemoveTagsFromResource
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Removes metadata tags from an Amazon Neptune resource.
module Amazonka.Neptune.RemoveTagsFromResource
  ( -- * Creating a Request
    RemoveTagsFromResource (..),
    newRemoveTagsFromResource,

    -- * Request Lenses
    removeTagsFromResource_resourceName,
    removeTagsFromResource_tagKeys,

    -- * Destructuring the Response
    RemoveTagsFromResourceResponse (..),
    newRemoveTagsFromResourceResponse,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Neptune.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newRemoveTagsFromResource' smart constructor.
data RemoveTagsFromResource = RemoveTagsFromResource'
  { -- | The Amazon Neptune resource that the tags are removed from. This value
    -- is an Amazon Resource Name (ARN). For information about creating an ARN,
    -- see
    -- <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing Constructing an Amazon Resource Name (ARN)>.
    RemoveTagsFromResource -> Text
resourceName :: Prelude.Text,
    -- | The tag key (name) of the tag to be removed.
    RemoveTagsFromResource -> [Text]
tagKeys :: [Prelude.Text]
  }
  deriving (RemoveTagsFromResource -> RemoveTagsFromResource -> Bool
(RemoveTagsFromResource -> RemoveTagsFromResource -> Bool)
-> (RemoveTagsFromResource -> RemoveTagsFromResource -> Bool)
-> Eq RemoveTagsFromResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveTagsFromResource -> RemoveTagsFromResource -> Bool
$c/= :: RemoveTagsFromResource -> RemoveTagsFromResource -> Bool
== :: RemoveTagsFromResource -> RemoveTagsFromResource -> Bool
$c== :: RemoveTagsFromResource -> RemoveTagsFromResource -> Bool
Prelude.Eq, ReadPrec [RemoveTagsFromResource]
ReadPrec RemoveTagsFromResource
Int -> ReadS RemoveTagsFromResource
ReadS [RemoveTagsFromResource]
(Int -> ReadS RemoveTagsFromResource)
-> ReadS [RemoveTagsFromResource]
-> ReadPrec RemoveTagsFromResource
-> ReadPrec [RemoveTagsFromResource]
-> Read RemoveTagsFromResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveTagsFromResource]
$creadListPrec :: ReadPrec [RemoveTagsFromResource]
readPrec :: ReadPrec RemoveTagsFromResource
$creadPrec :: ReadPrec RemoveTagsFromResource
readList :: ReadS [RemoveTagsFromResource]
$creadList :: ReadS [RemoveTagsFromResource]
readsPrec :: Int -> ReadS RemoveTagsFromResource
$creadsPrec :: Int -> ReadS RemoveTagsFromResource
Prelude.Read, Int -> RemoveTagsFromResource -> ShowS
[RemoveTagsFromResource] -> ShowS
RemoveTagsFromResource -> String
(Int -> RemoveTagsFromResource -> ShowS)
-> (RemoveTagsFromResource -> String)
-> ([RemoveTagsFromResource] -> ShowS)
-> Show RemoveTagsFromResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveTagsFromResource] -> ShowS
$cshowList :: [RemoveTagsFromResource] -> ShowS
show :: RemoveTagsFromResource -> String
$cshow :: RemoveTagsFromResource -> String
showsPrec :: Int -> RemoveTagsFromResource -> ShowS
$cshowsPrec :: Int -> RemoveTagsFromResource -> ShowS
Prelude.Show, (forall x. RemoveTagsFromResource -> Rep RemoveTagsFromResource x)
-> (forall x.
    Rep RemoveTagsFromResource x -> RemoveTagsFromResource)
-> Generic RemoveTagsFromResource
forall x. Rep RemoveTagsFromResource x -> RemoveTagsFromResource
forall x. RemoveTagsFromResource -> Rep RemoveTagsFromResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RemoveTagsFromResource x -> RemoveTagsFromResource
$cfrom :: forall x. RemoveTagsFromResource -> Rep RemoveTagsFromResource x
Prelude.Generic)

-- |
-- Create a value of 'RemoveTagsFromResource' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'resourceName', 'removeTagsFromResource_resourceName' - The Amazon Neptune resource that the tags are removed from. This value
-- is an Amazon Resource Name (ARN). For information about creating an ARN,
-- see
-- <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing Constructing an Amazon Resource Name (ARN)>.
--
-- 'tagKeys', 'removeTagsFromResource_tagKeys' - The tag key (name) of the tag to be removed.
newRemoveTagsFromResource ::
  -- | 'resourceName'
  Prelude.Text ->
  RemoveTagsFromResource
newRemoveTagsFromResource :: Text -> RemoveTagsFromResource
newRemoveTagsFromResource Text
pResourceName_ =
  RemoveTagsFromResource' :: Text -> [Text] -> RemoveTagsFromResource
RemoveTagsFromResource'
    { $sel:resourceName:RemoveTagsFromResource' :: Text
resourceName =
        Text
pResourceName_,
      $sel:tagKeys:RemoveTagsFromResource' :: [Text]
tagKeys = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The Amazon Neptune resource that the tags are removed from. This value
-- is an Amazon Resource Name (ARN). For information about creating an ARN,
-- see
-- <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing Constructing an Amazon Resource Name (ARN)>.
removeTagsFromResource_resourceName :: Lens.Lens' RemoveTagsFromResource Prelude.Text
removeTagsFromResource_resourceName :: (Text -> f Text)
-> RemoveTagsFromResource -> f RemoveTagsFromResource
removeTagsFromResource_resourceName = (RemoveTagsFromResource -> Text)
-> (RemoveTagsFromResource -> Text -> RemoveTagsFromResource)
-> Lens RemoveTagsFromResource RemoveTagsFromResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveTagsFromResource' {Text
resourceName :: Text
$sel:resourceName:RemoveTagsFromResource' :: RemoveTagsFromResource -> Text
resourceName} -> Text
resourceName) (\s :: RemoveTagsFromResource
s@RemoveTagsFromResource' {} Text
a -> RemoveTagsFromResource
s {$sel:resourceName:RemoveTagsFromResource' :: Text
resourceName = Text
a} :: RemoveTagsFromResource)

-- | The tag key (name) of the tag to be removed.
removeTagsFromResource_tagKeys :: Lens.Lens' RemoveTagsFromResource [Prelude.Text]
removeTagsFromResource_tagKeys :: ([Text] -> f [Text])
-> RemoveTagsFromResource -> f RemoveTagsFromResource
removeTagsFromResource_tagKeys = (RemoveTagsFromResource -> [Text])
-> (RemoveTagsFromResource -> [Text] -> RemoveTagsFromResource)
-> Lens RemoveTagsFromResource RemoveTagsFromResource [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveTagsFromResource' {[Text]
tagKeys :: [Text]
$sel:tagKeys:RemoveTagsFromResource' :: RemoveTagsFromResource -> [Text]
tagKeys} -> [Text]
tagKeys) (\s :: RemoveTagsFromResource
s@RemoveTagsFromResource' {} [Text]
a -> RemoveTagsFromResource
s {$sel:tagKeys:RemoveTagsFromResource' :: [Text]
tagKeys = [Text]
a} :: RemoveTagsFromResource) (([Text] -> f [Text])
 -> RemoveTagsFromResource -> f RemoveTagsFromResource)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> RemoveTagsFromResource
-> f RemoveTagsFromResource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest RemoveTagsFromResource where
  type
    AWSResponse RemoveTagsFromResource =
      RemoveTagsFromResourceResponse
  request :: RemoveTagsFromResource -> Request RemoveTagsFromResource
request = Service -> RemoveTagsFromResource -> Request RemoveTagsFromResource
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy RemoveTagsFromResource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RemoveTagsFromResource)))
response =
    AWSResponse RemoveTagsFromResource
-> Logger
-> Service
-> Proxy RemoveTagsFromResource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RemoveTagsFromResource)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse RemoveTagsFromResource
RemoveTagsFromResourceResponse
RemoveTagsFromResourceResponse'

instance Prelude.Hashable RemoveTagsFromResource

instance Prelude.NFData RemoveTagsFromResource

instance Core.ToHeaders RemoveTagsFromResource where
  toHeaders :: RemoveTagsFromResource -> [Header]
toHeaders = [Header] -> RemoveTagsFromResource -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath RemoveTagsFromResource where
  toPath :: RemoveTagsFromResource -> ByteString
toPath = ByteString -> RemoveTagsFromResource -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery RemoveTagsFromResource where
  toQuery :: RemoveTagsFromResource -> QueryString
toQuery RemoveTagsFromResource' {[Text]
Text
tagKeys :: [Text]
resourceName :: Text
$sel:tagKeys:RemoveTagsFromResource' :: RemoveTagsFromResource -> [Text]
$sel:resourceName:RemoveTagsFromResource' :: RemoveTagsFromResource -> 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
"RemoveTagsFromResource" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"ResourceName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
resourceName,
        ByteString
"TagKeys" ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [Text]
tagKeys
      ]

-- | /See:/ 'newRemoveTagsFromResourceResponse' smart constructor.
data RemoveTagsFromResourceResponse = RemoveTagsFromResourceResponse'
  {
  }
  deriving (RemoveTagsFromResourceResponse
-> RemoveTagsFromResourceResponse -> Bool
(RemoveTagsFromResourceResponse
 -> RemoveTagsFromResourceResponse -> Bool)
-> (RemoveTagsFromResourceResponse
    -> RemoveTagsFromResourceResponse -> Bool)
-> Eq RemoveTagsFromResourceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveTagsFromResourceResponse
-> RemoveTagsFromResourceResponse -> Bool
$c/= :: RemoveTagsFromResourceResponse
-> RemoveTagsFromResourceResponse -> Bool
== :: RemoveTagsFromResourceResponse
-> RemoveTagsFromResourceResponse -> Bool
$c== :: RemoveTagsFromResourceResponse
-> RemoveTagsFromResourceResponse -> Bool
Prelude.Eq, ReadPrec [RemoveTagsFromResourceResponse]
ReadPrec RemoveTagsFromResourceResponse
Int -> ReadS RemoveTagsFromResourceResponse
ReadS [RemoveTagsFromResourceResponse]
(Int -> ReadS RemoveTagsFromResourceResponse)
-> ReadS [RemoveTagsFromResourceResponse]
-> ReadPrec RemoveTagsFromResourceResponse
-> ReadPrec [RemoveTagsFromResourceResponse]
-> Read RemoveTagsFromResourceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveTagsFromResourceResponse]
$creadListPrec :: ReadPrec [RemoveTagsFromResourceResponse]
readPrec :: ReadPrec RemoveTagsFromResourceResponse
$creadPrec :: ReadPrec RemoveTagsFromResourceResponse
readList :: ReadS [RemoveTagsFromResourceResponse]
$creadList :: ReadS [RemoveTagsFromResourceResponse]
readsPrec :: Int -> ReadS RemoveTagsFromResourceResponse
$creadsPrec :: Int -> ReadS RemoveTagsFromResourceResponse
Prelude.Read, Int -> RemoveTagsFromResourceResponse -> ShowS
[RemoveTagsFromResourceResponse] -> ShowS
RemoveTagsFromResourceResponse -> String
(Int -> RemoveTagsFromResourceResponse -> ShowS)
-> (RemoveTagsFromResourceResponse -> String)
-> ([RemoveTagsFromResourceResponse] -> ShowS)
-> Show RemoveTagsFromResourceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveTagsFromResourceResponse] -> ShowS
$cshowList :: [RemoveTagsFromResourceResponse] -> ShowS
show :: RemoveTagsFromResourceResponse -> String
$cshow :: RemoveTagsFromResourceResponse -> String
showsPrec :: Int -> RemoveTagsFromResourceResponse -> ShowS
$cshowsPrec :: Int -> RemoveTagsFromResourceResponse -> ShowS
Prelude.Show, (forall x.
 RemoveTagsFromResourceResponse
 -> Rep RemoveTagsFromResourceResponse x)
-> (forall x.
    Rep RemoveTagsFromResourceResponse x
    -> RemoveTagsFromResourceResponse)
-> Generic RemoveTagsFromResourceResponse
forall x.
Rep RemoveTagsFromResourceResponse x
-> RemoveTagsFromResourceResponse
forall x.
RemoveTagsFromResourceResponse
-> Rep RemoveTagsFromResourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveTagsFromResourceResponse x
-> RemoveTagsFromResourceResponse
$cfrom :: forall x.
RemoveTagsFromResourceResponse
-> Rep RemoveTagsFromResourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'RemoveTagsFromResourceResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newRemoveTagsFromResourceResponse ::
  RemoveTagsFromResourceResponse
newRemoveTagsFromResourceResponse :: RemoveTagsFromResourceResponse
newRemoveTagsFromResourceResponse =
  RemoveTagsFromResourceResponse
RemoveTagsFromResourceResponse'

instance
  Prelude.NFData
    RemoveTagsFromResourceResponse