{-# 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.LakeFormation.RemoveLFTagsFromResource
-- 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 a tag from the resource. Only database, table, or
-- tableWithColumns resource are allowed. To tag columns, use the column
-- inclusion list in @tableWithColumns@ to specify column input.
module Amazonka.LakeFormation.RemoveLFTagsFromResource
  ( -- * Creating a Request
    RemoveLFTagsFromResource (..),
    newRemoveLFTagsFromResource,

    -- * Request Lenses
    removeLFTagsFromResource_catalogId,
    removeLFTagsFromResource_resource,
    removeLFTagsFromResource_lFTags,

    -- * Destructuring the Response
    RemoveLFTagsFromResourceResponse (..),
    newRemoveLFTagsFromResourceResponse,

    -- * Response Lenses
    removeLFTagsFromResourceResponse_failures,
    removeLFTagsFromResourceResponse_httpStatus,
  )
where

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

-- | /See:/ 'newRemoveLFTagsFromResource' smart constructor.
data RemoveLFTagsFromResource = RemoveLFTagsFromResource'
  { -- | The identifier for the Data Catalog. By default, the account ID. The
    -- Data Catalog is the persistent metadata store. It contains database
    -- definitions, table definitions, and other control information to manage
    -- your AWS Lake Formation environment.
    RemoveLFTagsFromResource -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
    -- | The resource where you want to remove a tag.
    RemoveLFTagsFromResource -> Resource
resource :: Resource,
    -- | The tags to be removed from the resource.
    RemoveLFTagsFromResource -> NonEmpty LFTagPair
lFTags :: Prelude.NonEmpty LFTagPair
  }
  deriving (RemoveLFTagsFromResource -> RemoveLFTagsFromResource -> Bool
(RemoveLFTagsFromResource -> RemoveLFTagsFromResource -> Bool)
-> (RemoveLFTagsFromResource -> RemoveLFTagsFromResource -> Bool)
-> Eq RemoveLFTagsFromResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveLFTagsFromResource -> RemoveLFTagsFromResource -> Bool
$c/= :: RemoveLFTagsFromResource -> RemoveLFTagsFromResource -> Bool
== :: RemoveLFTagsFromResource -> RemoveLFTagsFromResource -> Bool
$c== :: RemoveLFTagsFromResource -> RemoveLFTagsFromResource -> Bool
Prelude.Eq, ReadPrec [RemoveLFTagsFromResource]
ReadPrec RemoveLFTagsFromResource
Int -> ReadS RemoveLFTagsFromResource
ReadS [RemoveLFTagsFromResource]
(Int -> ReadS RemoveLFTagsFromResource)
-> ReadS [RemoveLFTagsFromResource]
-> ReadPrec RemoveLFTagsFromResource
-> ReadPrec [RemoveLFTagsFromResource]
-> Read RemoveLFTagsFromResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveLFTagsFromResource]
$creadListPrec :: ReadPrec [RemoveLFTagsFromResource]
readPrec :: ReadPrec RemoveLFTagsFromResource
$creadPrec :: ReadPrec RemoveLFTagsFromResource
readList :: ReadS [RemoveLFTagsFromResource]
$creadList :: ReadS [RemoveLFTagsFromResource]
readsPrec :: Int -> ReadS RemoveLFTagsFromResource
$creadsPrec :: Int -> ReadS RemoveLFTagsFromResource
Prelude.Read, Int -> RemoveLFTagsFromResource -> ShowS
[RemoveLFTagsFromResource] -> ShowS
RemoveLFTagsFromResource -> String
(Int -> RemoveLFTagsFromResource -> ShowS)
-> (RemoveLFTagsFromResource -> String)
-> ([RemoveLFTagsFromResource] -> ShowS)
-> Show RemoveLFTagsFromResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveLFTagsFromResource] -> ShowS
$cshowList :: [RemoveLFTagsFromResource] -> ShowS
show :: RemoveLFTagsFromResource -> String
$cshow :: RemoveLFTagsFromResource -> String
showsPrec :: Int -> RemoveLFTagsFromResource -> ShowS
$cshowsPrec :: Int -> RemoveLFTagsFromResource -> ShowS
Prelude.Show, (forall x.
 RemoveLFTagsFromResource -> Rep RemoveLFTagsFromResource x)
-> (forall x.
    Rep RemoveLFTagsFromResource x -> RemoveLFTagsFromResource)
-> Generic RemoveLFTagsFromResource
forall x.
Rep RemoveLFTagsFromResource x -> RemoveLFTagsFromResource
forall x.
RemoveLFTagsFromResource -> Rep RemoveLFTagsFromResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveLFTagsFromResource x -> RemoveLFTagsFromResource
$cfrom :: forall x.
RemoveLFTagsFromResource -> Rep RemoveLFTagsFromResource x
Prelude.Generic)

-- |
-- Create a value of 'RemoveLFTagsFromResource' 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:
--
-- 'catalogId', 'removeLFTagsFromResource_catalogId' - The identifier for the Data Catalog. By default, the account ID. The
-- Data Catalog is the persistent metadata store. It contains database
-- definitions, table definitions, and other control information to manage
-- your AWS Lake Formation environment.
--
-- 'resource', 'removeLFTagsFromResource_resource' - The resource where you want to remove a tag.
--
-- 'lFTags', 'removeLFTagsFromResource_lFTags' - The tags to be removed from the resource.
newRemoveLFTagsFromResource ::
  -- | 'resource'
  Resource ->
  -- | 'lFTags'
  Prelude.NonEmpty LFTagPair ->
  RemoveLFTagsFromResource
newRemoveLFTagsFromResource :: Resource -> NonEmpty LFTagPair -> RemoveLFTagsFromResource
newRemoveLFTagsFromResource Resource
pResource_ NonEmpty LFTagPair
pLFTags_ =
  RemoveLFTagsFromResource' :: Maybe Text
-> Resource -> NonEmpty LFTagPair -> RemoveLFTagsFromResource
RemoveLFTagsFromResource'
    { $sel:catalogId:RemoveLFTagsFromResource' :: Maybe Text
catalogId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resource:RemoveLFTagsFromResource' :: Resource
resource = Resource
pResource_,
      $sel:lFTags:RemoveLFTagsFromResource' :: NonEmpty LFTagPair
lFTags = Tagged (NonEmpty LFTagPair) (Identity (NonEmpty LFTagPair))
-> Tagged (NonEmpty LFTagPair) (Identity (NonEmpty LFTagPair))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty LFTagPair) (Identity (NonEmpty LFTagPair))
 -> Tagged (NonEmpty LFTagPair) (Identity (NonEmpty LFTagPair)))
-> NonEmpty LFTagPair -> NonEmpty LFTagPair
forall t b. AReview t b -> b -> t
Lens.# NonEmpty LFTagPair
pLFTags_
    }

-- | The identifier for the Data Catalog. By default, the account ID. The
-- Data Catalog is the persistent metadata store. It contains database
-- definitions, table definitions, and other control information to manage
-- your AWS Lake Formation environment.
removeLFTagsFromResource_catalogId :: Lens.Lens' RemoveLFTagsFromResource (Prelude.Maybe Prelude.Text)
removeLFTagsFromResource_catalogId :: (Maybe Text -> f (Maybe Text))
-> RemoveLFTagsFromResource -> f RemoveLFTagsFromResource
removeLFTagsFromResource_catalogId = (RemoveLFTagsFromResource -> Maybe Text)
-> (RemoveLFTagsFromResource
    -> Maybe Text -> RemoveLFTagsFromResource)
-> Lens
     RemoveLFTagsFromResource
     RemoveLFTagsFromResource
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveLFTagsFromResource' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:RemoveLFTagsFromResource' :: RemoveLFTagsFromResource -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: RemoveLFTagsFromResource
s@RemoveLFTagsFromResource' {} Maybe Text
a -> RemoveLFTagsFromResource
s {$sel:catalogId:RemoveLFTagsFromResource' :: Maybe Text
catalogId = Maybe Text
a} :: RemoveLFTagsFromResource)

-- | The resource where you want to remove a tag.
removeLFTagsFromResource_resource :: Lens.Lens' RemoveLFTagsFromResource Resource
removeLFTagsFromResource_resource :: (Resource -> f Resource)
-> RemoveLFTagsFromResource -> f RemoveLFTagsFromResource
removeLFTagsFromResource_resource = (RemoveLFTagsFromResource -> Resource)
-> (RemoveLFTagsFromResource
    -> Resource -> RemoveLFTagsFromResource)
-> Lens
     RemoveLFTagsFromResource RemoveLFTagsFromResource Resource Resource
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveLFTagsFromResource' {Resource
resource :: Resource
$sel:resource:RemoveLFTagsFromResource' :: RemoveLFTagsFromResource -> Resource
resource} -> Resource
resource) (\s :: RemoveLFTagsFromResource
s@RemoveLFTagsFromResource' {} Resource
a -> RemoveLFTagsFromResource
s {$sel:resource:RemoveLFTagsFromResource' :: Resource
resource = Resource
a} :: RemoveLFTagsFromResource)

-- | The tags to be removed from the resource.
removeLFTagsFromResource_lFTags :: Lens.Lens' RemoveLFTagsFromResource (Prelude.NonEmpty LFTagPair)
removeLFTagsFromResource_lFTags :: (NonEmpty LFTagPair -> f (NonEmpty LFTagPair))
-> RemoveLFTagsFromResource -> f RemoveLFTagsFromResource
removeLFTagsFromResource_lFTags = (RemoveLFTagsFromResource -> NonEmpty LFTagPair)
-> (RemoveLFTagsFromResource
    -> NonEmpty LFTagPair -> RemoveLFTagsFromResource)
-> Lens
     RemoveLFTagsFromResource
     RemoveLFTagsFromResource
     (NonEmpty LFTagPair)
     (NonEmpty LFTagPair)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveLFTagsFromResource' {NonEmpty LFTagPair
lFTags :: NonEmpty LFTagPair
$sel:lFTags:RemoveLFTagsFromResource' :: RemoveLFTagsFromResource -> NonEmpty LFTagPair
lFTags} -> NonEmpty LFTagPair
lFTags) (\s :: RemoveLFTagsFromResource
s@RemoveLFTagsFromResource' {} NonEmpty LFTagPair
a -> RemoveLFTagsFromResource
s {$sel:lFTags:RemoveLFTagsFromResource' :: NonEmpty LFTagPair
lFTags = NonEmpty LFTagPair
a} :: RemoveLFTagsFromResource) ((NonEmpty LFTagPair -> f (NonEmpty LFTagPair))
 -> RemoveLFTagsFromResource -> f RemoveLFTagsFromResource)
-> ((NonEmpty LFTagPair -> f (NonEmpty LFTagPair))
    -> NonEmpty LFTagPair -> f (NonEmpty LFTagPair))
-> (NonEmpty LFTagPair -> f (NonEmpty LFTagPair))
-> RemoveLFTagsFromResource
-> f RemoveLFTagsFromResource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty LFTagPair -> f (NonEmpty LFTagPair))
-> NonEmpty LFTagPair -> f (NonEmpty LFTagPair)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest RemoveLFTagsFromResource where
  type
    AWSResponse RemoveLFTagsFromResource =
      RemoveLFTagsFromResourceResponse
  request :: RemoveLFTagsFromResource -> Request RemoveLFTagsFromResource
request = Service
-> RemoveLFTagsFromResource -> Request RemoveLFTagsFromResource
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy RemoveLFTagsFromResource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RemoveLFTagsFromResource)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse RemoveLFTagsFromResource))
-> Logger
-> Service
-> Proxy RemoveLFTagsFromResource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RemoveLFTagsFromResource)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [LFTagError] -> Int -> RemoveLFTagsFromResourceResponse
RemoveLFTagsFromResourceResponse'
            (Maybe [LFTagError] -> Int -> RemoveLFTagsFromResourceResponse)
-> Either String (Maybe [LFTagError])
-> Either String (Int -> RemoveLFTagsFromResourceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [LFTagError]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Failures" Either String (Maybe (Maybe [LFTagError]))
-> Maybe [LFTagError] -> Either String (Maybe [LFTagError])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [LFTagError]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> RemoveLFTagsFromResourceResponse)
-> Either String Int
-> Either String RemoveLFTagsFromResourceResponse
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 RemoveLFTagsFromResource

instance Prelude.NFData RemoveLFTagsFromResource

instance Core.ToHeaders RemoveLFTagsFromResource where
  toHeaders :: RemoveLFTagsFromResource -> ResponseHeaders
toHeaders =
    ResponseHeaders -> RemoveLFTagsFromResource -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSLakeFormation.RemoveLFTagsFromResource" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON RemoveLFTagsFromResource where
  toJSON :: RemoveLFTagsFromResource -> Value
toJSON RemoveLFTagsFromResource' {Maybe Text
NonEmpty LFTagPair
Resource
lFTags :: NonEmpty LFTagPair
resource :: Resource
catalogId :: Maybe Text
$sel:lFTags:RemoveLFTagsFromResource' :: RemoveLFTagsFromResource -> NonEmpty LFTagPair
$sel:resource:RemoveLFTagsFromResource' :: RemoveLFTagsFromResource -> Resource
$sel:catalogId:RemoveLFTagsFromResource' :: RemoveLFTagsFromResource -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"CatalogId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
catalogId,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Resource" Text -> Resource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Resource
resource),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"LFTags" Text -> NonEmpty LFTagPair -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty LFTagPair
lFTags)
          ]
      )

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

instance Core.ToQuery RemoveLFTagsFromResource where
  toQuery :: RemoveLFTagsFromResource -> QueryString
toQuery = QueryString -> RemoveLFTagsFromResource -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newRemoveLFTagsFromResourceResponse' smart constructor.
data RemoveLFTagsFromResourceResponse = RemoveLFTagsFromResourceResponse'
  { -- | A list of failures to untag a resource.
    RemoveLFTagsFromResourceResponse -> Maybe [LFTagError]
failures :: Prelude.Maybe [LFTagError],
    -- | The response's http status code.
    RemoveLFTagsFromResourceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RemoveLFTagsFromResourceResponse
-> RemoveLFTagsFromResourceResponse -> Bool
(RemoveLFTagsFromResourceResponse
 -> RemoveLFTagsFromResourceResponse -> Bool)
-> (RemoveLFTagsFromResourceResponse
    -> RemoveLFTagsFromResourceResponse -> Bool)
-> Eq RemoveLFTagsFromResourceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveLFTagsFromResourceResponse
-> RemoveLFTagsFromResourceResponse -> Bool
$c/= :: RemoveLFTagsFromResourceResponse
-> RemoveLFTagsFromResourceResponse -> Bool
== :: RemoveLFTagsFromResourceResponse
-> RemoveLFTagsFromResourceResponse -> Bool
$c== :: RemoveLFTagsFromResourceResponse
-> RemoveLFTagsFromResourceResponse -> Bool
Prelude.Eq, ReadPrec [RemoveLFTagsFromResourceResponse]
ReadPrec RemoveLFTagsFromResourceResponse
Int -> ReadS RemoveLFTagsFromResourceResponse
ReadS [RemoveLFTagsFromResourceResponse]
(Int -> ReadS RemoveLFTagsFromResourceResponse)
-> ReadS [RemoveLFTagsFromResourceResponse]
-> ReadPrec RemoveLFTagsFromResourceResponse
-> ReadPrec [RemoveLFTagsFromResourceResponse]
-> Read RemoveLFTagsFromResourceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveLFTagsFromResourceResponse]
$creadListPrec :: ReadPrec [RemoveLFTagsFromResourceResponse]
readPrec :: ReadPrec RemoveLFTagsFromResourceResponse
$creadPrec :: ReadPrec RemoveLFTagsFromResourceResponse
readList :: ReadS [RemoveLFTagsFromResourceResponse]
$creadList :: ReadS [RemoveLFTagsFromResourceResponse]
readsPrec :: Int -> ReadS RemoveLFTagsFromResourceResponse
$creadsPrec :: Int -> ReadS RemoveLFTagsFromResourceResponse
Prelude.Read, Int -> RemoveLFTagsFromResourceResponse -> ShowS
[RemoveLFTagsFromResourceResponse] -> ShowS
RemoveLFTagsFromResourceResponse -> String
(Int -> RemoveLFTagsFromResourceResponse -> ShowS)
-> (RemoveLFTagsFromResourceResponse -> String)
-> ([RemoveLFTagsFromResourceResponse] -> ShowS)
-> Show RemoveLFTagsFromResourceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveLFTagsFromResourceResponse] -> ShowS
$cshowList :: [RemoveLFTagsFromResourceResponse] -> ShowS
show :: RemoveLFTagsFromResourceResponse -> String
$cshow :: RemoveLFTagsFromResourceResponse -> String
showsPrec :: Int -> RemoveLFTagsFromResourceResponse -> ShowS
$cshowsPrec :: Int -> RemoveLFTagsFromResourceResponse -> ShowS
Prelude.Show, (forall x.
 RemoveLFTagsFromResourceResponse
 -> Rep RemoveLFTagsFromResourceResponse x)
-> (forall x.
    Rep RemoveLFTagsFromResourceResponse x
    -> RemoveLFTagsFromResourceResponse)
-> Generic RemoveLFTagsFromResourceResponse
forall x.
Rep RemoveLFTagsFromResourceResponse x
-> RemoveLFTagsFromResourceResponse
forall x.
RemoveLFTagsFromResourceResponse
-> Rep RemoveLFTagsFromResourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveLFTagsFromResourceResponse x
-> RemoveLFTagsFromResourceResponse
$cfrom :: forall x.
RemoveLFTagsFromResourceResponse
-> Rep RemoveLFTagsFromResourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'RemoveLFTagsFromResourceResponse' 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:
--
-- 'failures', 'removeLFTagsFromResourceResponse_failures' - A list of failures to untag a resource.
--
-- 'httpStatus', 'removeLFTagsFromResourceResponse_httpStatus' - The response's http status code.
newRemoveLFTagsFromResourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RemoveLFTagsFromResourceResponse
newRemoveLFTagsFromResourceResponse :: Int -> RemoveLFTagsFromResourceResponse
newRemoveLFTagsFromResourceResponse Int
pHttpStatus_ =
  RemoveLFTagsFromResourceResponse' :: Maybe [LFTagError] -> Int -> RemoveLFTagsFromResourceResponse
RemoveLFTagsFromResourceResponse'
    { $sel:failures:RemoveLFTagsFromResourceResponse' :: Maybe [LFTagError]
failures =
        Maybe [LFTagError]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RemoveLFTagsFromResourceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of failures to untag a resource.
removeLFTagsFromResourceResponse_failures :: Lens.Lens' RemoveLFTagsFromResourceResponse (Prelude.Maybe [LFTagError])
removeLFTagsFromResourceResponse_failures :: (Maybe [LFTagError] -> f (Maybe [LFTagError]))
-> RemoveLFTagsFromResourceResponse
-> f RemoveLFTagsFromResourceResponse
removeLFTagsFromResourceResponse_failures = (RemoveLFTagsFromResourceResponse -> Maybe [LFTagError])
-> (RemoveLFTagsFromResourceResponse
    -> Maybe [LFTagError] -> RemoveLFTagsFromResourceResponse)
-> Lens
     RemoveLFTagsFromResourceResponse
     RemoveLFTagsFromResourceResponse
     (Maybe [LFTagError])
     (Maybe [LFTagError])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveLFTagsFromResourceResponse' {Maybe [LFTagError]
failures :: Maybe [LFTagError]
$sel:failures:RemoveLFTagsFromResourceResponse' :: RemoveLFTagsFromResourceResponse -> Maybe [LFTagError]
failures} -> Maybe [LFTagError]
failures) (\s :: RemoveLFTagsFromResourceResponse
s@RemoveLFTagsFromResourceResponse' {} Maybe [LFTagError]
a -> RemoveLFTagsFromResourceResponse
s {$sel:failures:RemoveLFTagsFromResourceResponse' :: Maybe [LFTagError]
failures = Maybe [LFTagError]
a} :: RemoveLFTagsFromResourceResponse) ((Maybe [LFTagError] -> f (Maybe [LFTagError]))
 -> RemoveLFTagsFromResourceResponse
 -> f RemoveLFTagsFromResourceResponse)
-> ((Maybe [LFTagError] -> f (Maybe [LFTagError]))
    -> Maybe [LFTagError] -> f (Maybe [LFTagError]))
-> (Maybe [LFTagError] -> f (Maybe [LFTagError]))
-> RemoveLFTagsFromResourceResponse
-> f RemoveLFTagsFromResourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [LFTagError] [LFTagError] [LFTagError] [LFTagError]
-> Iso
     (Maybe [LFTagError])
     (Maybe [LFTagError])
     (Maybe [LFTagError])
     (Maybe [LFTagError])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [LFTagError] [LFTagError] [LFTagError] [LFTagError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
removeLFTagsFromResourceResponse_httpStatus :: Lens.Lens' RemoveLFTagsFromResourceResponse Prelude.Int
removeLFTagsFromResourceResponse_httpStatus :: (Int -> f Int)
-> RemoveLFTagsFromResourceResponse
-> f RemoveLFTagsFromResourceResponse
removeLFTagsFromResourceResponse_httpStatus = (RemoveLFTagsFromResourceResponse -> Int)
-> (RemoveLFTagsFromResourceResponse
    -> Int -> RemoveLFTagsFromResourceResponse)
-> Lens
     RemoveLFTagsFromResourceResponse
     RemoveLFTagsFromResourceResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveLFTagsFromResourceResponse' {Int
httpStatus :: Int
$sel:httpStatus:RemoveLFTagsFromResourceResponse' :: RemoveLFTagsFromResourceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RemoveLFTagsFromResourceResponse
s@RemoveLFTagsFromResourceResponse' {} Int
a -> RemoveLFTagsFromResourceResponse
s {$sel:httpStatus:RemoveLFTagsFromResourceResponse' :: Int
httpStatus = Int
a} :: RemoveLFTagsFromResourceResponse)

instance
  Prelude.NFData
    RemoveLFTagsFromResourceResponse