{-# 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.IAM.UntagSAMLProvider
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Removes the specified tags from the specified Security Assertion Markup
-- Language (SAML) identity provider in IAM. For more information about
-- these providers, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html About web identity federation>.
-- For more information about tagging, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
-- in the /IAM User Guide/.
module Amazonka.IAM.UntagSAMLProvider
  ( -- * Creating a Request
    UntagSAMLProvider (..),
    newUntagSAMLProvider,

    -- * Request Lenses
    untagSAMLProvider_sAMLProviderArn,
    untagSAMLProvider_tagKeys,

    -- * Destructuring the Response
    UntagSAMLProviderResponse (..),
    newUntagSAMLProviderResponse,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IAM.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUntagSAMLProvider' smart constructor.
data UntagSAMLProvider = UntagSAMLProvider'
  { -- | The ARN of the SAML identity provider in IAM from which you want to
    -- remove tags.
    --
    -- This parameter allows (through its
    -- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
    -- consisting of upper and lowercase alphanumeric characters with no
    -- spaces. You can also include any of the following characters: _+=,.\@-
    UntagSAMLProvider -> Text
sAMLProviderArn :: Prelude.Text,
    -- | A list of key names as a simple array of strings. The tags with matching
    -- keys are removed from the specified SAML identity provider.
    UntagSAMLProvider -> [Text]
tagKeys :: [Prelude.Text]
  }
  deriving (UntagSAMLProvider -> UntagSAMLProvider -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UntagSAMLProvider -> UntagSAMLProvider -> Bool
$c/= :: UntagSAMLProvider -> UntagSAMLProvider -> Bool
== :: UntagSAMLProvider -> UntagSAMLProvider -> Bool
$c== :: UntagSAMLProvider -> UntagSAMLProvider -> Bool
Prelude.Eq, ReadPrec [UntagSAMLProvider]
ReadPrec UntagSAMLProvider
Int -> ReadS UntagSAMLProvider
ReadS [UntagSAMLProvider]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UntagSAMLProvider]
$creadListPrec :: ReadPrec [UntagSAMLProvider]
readPrec :: ReadPrec UntagSAMLProvider
$creadPrec :: ReadPrec UntagSAMLProvider
readList :: ReadS [UntagSAMLProvider]
$creadList :: ReadS [UntagSAMLProvider]
readsPrec :: Int -> ReadS UntagSAMLProvider
$creadsPrec :: Int -> ReadS UntagSAMLProvider
Prelude.Read, Int -> UntagSAMLProvider -> ShowS
[UntagSAMLProvider] -> ShowS
UntagSAMLProvider -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UntagSAMLProvider] -> ShowS
$cshowList :: [UntagSAMLProvider] -> ShowS
show :: UntagSAMLProvider -> String
$cshow :: UntagSAMLProvider -> String
showsPrec :: Int -> UntagSAMLProvider -> ShowS
$cshowsPrec :: Int -> UntagSAMLProvider -> ShowS
Prelude.Show, forall x. Rep UntagSAMLProvider x -> UntagSAMLProvider
forall x. UntagSAMLProvider -> Rep UntagSAMLProvider x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UntagSAMLProvider x -> UntagSAMLProvider
$cfrom :: forall x. UntagSAMLProvider -> Rep UntagSAMLProvider x
Prelude.Generic)

-- |
-- Create a value of 'UntagSAMLProvider' 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:
--
-- 'sAMLProviderArn', 'untagSAMLProvider_sAMLProviderArn' - The ARN of the SAML identity provider in IAM from which you want to
-- remove tags.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
--
-- 'tagKeys', 'untagSAMLProvider_tagKeys' - A list of key names as a simple array of strings. The tags with matching
-- keys are removed from the specified SAML identity provider.
newUntagSAMLProvider ::
  -- | 'sAMLProviderArn'
  Prelude.Text ->
  UntagSAMLProvider
newUntagSAMLProvider :: Text -> UntagSAMLProvider
newUntagSAMLProvider Text
pSAMLProviderArn_ =
  UntagSAMLProvider'
    { $sel:sAMLProviderArn:UntagSAMLProvider' :: Text
sAMLProviderArn =
        Text
pSAMLProviderArn_,
      $sel:tagKeys:UntagSAMLProvider' :: [Text]
tagKeys = forall a. Monoid a => a
Prelude.mempty
    }

-- | The ARN of the SAML identity provider in IAM from which you want to
-- remove tags.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
untagSAMLProvider_sAMLProviderArn :: Lens.Lens' UntagSAMLProvider Prelude.Text
untagSAMLProvider_sAMLProviderArn :: Lens' UntagSAMLProvider Text
untagSAMLProvider_sAMLProviderArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UntagSAMLProvider' {Text
sAMLProviderArn :: Text
$sel:sAMLProviderArn:UntagSAMLProvider' :: UntagSAMLProvider -> Text
sAMLProviderArn} -> Text
sAMLProviderArn) (\s :: UntagSAMLProvider
s@UntagSAMLProvider' {} Text
a -> UntagSAMLProvider
s {$sel:sAMLProviderArn:UntagSAMLProvider' :: Text
sAMLProviderArn = Text
a} :: UntagSAMLProvider)

-- | A list of key names as a simple array of strings. The tags with matching
-- keys are removed from the specified SAML identity provider.
untagSAMLProvider_tagKeys :: Lens.Lens' UntagSAMLProvider [Prelude.Text]
untagSAMLProvider_tagKeys :: Lens' UntagSAMLProvider [Text]
untagSAMLProvider_tagKeys = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UntagSAMLProvider' {[Text]
tagKeys :: [Text]
$sel:tagKeys:UntagSAMLProvider' :: UntagSAMLProvider -> [Text]
tagKeys} -> [Text]
tagKeys) (\s :: UntagSAMLProvider
s@UntagSAMLProvider' {} [Text]
a -> UntagSAMLProvider
s {$sel:tagKeys:UntagSAMLProvider' :: [Text]
tagKeys = [Text]
a} :: UntagSAMLProvider) 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 UntagSAMLProvider where
  type
    AWSResponse UntagSAMLProvider =
      UntagSAMLProviderResponse
  request :: (Service -> Service)
-> UntagSAMLProvider -> Request UntagSAMLProvider
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 UntagSAMLProvider
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UntagSAMLProvider)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull UntagSAMLProviderResponse
UntagSAMLProviderResponse'

instance Prelude.Hashable UntagSAMLProvider where
  hashWithSalt :: Int -> UntagSAMLProvider -> Int
hashWithSalt Int
_salt UntagSAMLProvider' {[Text]
Text
tagKeys :: [Text]
sAMLProviderArn :: Text
$sel:tagKeys:UntagSAMLProvider' :: UntagSAMLProvider -> [Text]
$sel:sAMLProviderArn:UntagSAMLProvider' :: UntagSAMLProvider -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sAMLProviderArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
tagKeys

instance Prelude.NFData UntagSAMLProvider where
  rnf :: UntagSAMLProvider -> ()
rnf UntagSAMLProvider' {[Text]
Text
tagKeys :: [Text]
sAMLProviderArn :: Text
$sel:tagKeys:UntagSAMLProvider' :: UntagSAMLProvider -> [Text]
$sel:sAMLProviderArn:UntagSAMLProvider' :: UntagSAMLProvider -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
sAMLProviderArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
tagKeys

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

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

instance Data.ToQuery UntagSAMLProvider where
  toQuery :: UntagSAMLProvider -> QueryString
toQuery UntagSAMLProvider' {[Text]
Text
tagKeys :: [Text]
sAMLProviderArn :: Text
$sel:tagKeys:UntagSAMLProvider' :: UntagSAMLProvider -> [Text]
$sel:sAMLProviderArn:UntagSAMLProvider' :: UntagSAMLProvider -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"UntagSAMLProvider" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"SAMLProviderArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
sAMLProviderArn,
        ByteString
"TagKeys" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" [Text]
tagKeys
      ]

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

-- |
-- Create a value of 'UntagSAMLProviderResponse' 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.
newUntagSAMLProviderResponse ::
  UntagSAMLProviderResponse
newUntagSAMLProviderResponse :: UntagSAMLProviderResponse
newUntagSAMLProviderResponse =
  UntagSAMLProviderResponse
UntagSAMLProviderResponse'

instance Prelude.NFData UntagSAMLProviderResponse where
  rnf :: UntagSAMLProviderResponse -> ()
rnf UntagSAMLProviderResponse
_ = ()