{-# 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.ServiceCatalog.DeletePortfolioShare
-- 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)
--
-- Stops sharing the specified portfolio with the specified account or
-- organization node. Shares to an organization node can only be deleted by
-- the management account of an organization or by a delegated
-- administrator.
--
-- Note that if a delegated admin is de-registered, portfolio shares
-- created from that account are removed.
module Amazonka.ServiceCatalog.DeletePortfolioShare
  ( -- * Creating a Request
    DeletePortfolioShare (..),
    newDeletePortfolioShare,

    -- * Request Lenses
    deletePortfolioShare_accountId,
    deletePortfolioShare_acceptLanguage,
    deletePortfolioShare_organizationNode,
    deletePortfolioShare_portfolioId,

    -- * Destructuring the Response
    DeletePortfolioShareResponse (..),
    newDeletePortfolioShareResponse,

    -- * Response Lenses
    deletePortfolioShareResponse_portfolioShareToken,
    deletePortfolioShareResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDeletePortfolioShare' smart constructor.
data DeletePortfolioShare = DeletePortfolioShare'
  { -- | The AWS account ID.
    DeletePortfolioShare -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    DeletePortfolioShare -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The organization node to whom you are going to stop sharing.
    DeletePortfolioShare -> Maybe OrganizationNode
organizationNode :: Prelude.Maybe OrganizationNode,
    -- | The portfolio identifier.
    DeletePortfolioShare -> Text
portfolioId :: Prelude.Text
  }
  deriving (DeletePortfolioShare -> DeletePortfolioShare -> Bool
(DeletePortfolioShare -> DeletePortfolioShare -> Bool)
-> (DeletePortfolioShare -> DeletePortfolioShare -> Bool)
-> Eq DeletePortfolioShare
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePortfolioShare -> DeletePortfolioShare -> Bool
$c/= :: DeletePortfolioShare -> DeletePortfolioShare -> Bool
== :: DeletePortfolioShare -> DeletePortfolioShare -> Bool
$c== :: DeletePortfolioShare -> DeletePortfolioShare -> Bool
Prelude.Eq, ReadPrec [DeletePortfolioShare]
ReadPrec DeletePortfolioShare
Int -> ReadS DeletePortfolioShare
ReadS [DeletePortfolioShare]
(Int -> ReadS DeletePortfolioShare)
-> ReadS [DeletePortfolioShare]
-> ReadPrec DeletePortfolioShare
-> ReadPrec [DeletePortfolioShare]
-> Read DeletePortfolioShare
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePortfolioShare]
$creadListPrec :: ReadPrec [DeletePortfolioShare]
readPrec :: ReadPrec DeletePortfolioShare
$creadPrec :: ReadPrec DeletePortfolioShare
readList :: ReadS [DeletePortfolioShare]
$creadList :: ReadS [DeletePortfolioShare]
readsPrec :: Int -> ReadS DeletePortfolioShare
$creadsPrec :: Int -> ReadS DeletePortfolioShare
Prelude.Read, Int -> DeletePortfolioShare -> ShowS
[DeletePortfolioShare] -> ShowS
DeletePortfolioShare -> String
(Int -> DeletePortfolioShare -> ShowS)
-> (DeletePortfolioShare -> String)
-> ([DeletePortfolioShare] -> ShowS)
-> Show DeletePortfolioShare
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePortfolioShare] -> ShowS
$cshowList :: [DeletePortfolioShare] -> ShowS
show :: DeletePortfolioShare -> String
$cshow :: DeletePortfolioShare -> String
showsPrec :: Int -> DeletePortfolioShare -> ShowS
$cshowsPrec :: Int -> DeletePortfolioShare -> ShowS
Prelude.Show, (forall x. DeletePortfolioShare -> Rep DeletePortfolioShare x)
-> (forall x. Rep DeletePortfolioShare x -> DeletePortfolioShare)
-> Generic DeletePortfolioShare
forall x. Rep DeletePortfolioShare x -> DeletePortfolioShare
forall x. DeletePortfolioShare -> Rep DeletePortfolioShare x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeletePortfolioShare x -> DeletePortfolioShare
$cfrom :: forall x. DeletePortfolioShare -> Rep DeletePortfolioShare x
Prelude.Generic)

-- |
-- Create a value of 'DeletePortfolioShare' 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:
--
-- 'accountId', 'deletePortfolioShare_accountId' - The AWS account ID.
--
-- 'acceptLanguage', 'deletePortfolioShare_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'organizationNode', 'deletePortfolioShare_organizationNode' - The organization node to whom you are going to stop sharing.
--
-- 'portfolioId', 'deletePortfolioShare_portfolioId' - The portfolio identifier.
newDeletePortfolioShare ::
  -- | 'portfolioId'
  Prelude.Text ->
  DeletePortfolioShare
newDeletePortfolioShare :: Text -> DeletePortfolioShare
newDeletePortfolioShare Text
pPortfolioId_ =
  DeletePortfolioShare' :: Maybe Text
-> Maybe Text
-> Maybe OrganizationNode
-> Text
-> DeletePortfolioShare
DeletePortfolioShare'
    { $sel:accountId:DeletePortfolioShare' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptLanguage:DeletePortfolioShare' :: Maybe Text
acceptLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:organizationNode:DeletePortfolioShare' :: Maybe OrganizationNode
organizationNode = Maybe OrganizationNode
forall a. Maybe a
Prelude.Nothing,
      $sel:portfolioId:DeletePortfolioShare' :: Text
portfolioId = Text
pPortfolioId_
    }

-- | The AWS account ID.
deletePortfolioShare_accountId :: Lens.Lens' DeletePortfolioShare (Prelude.Maybe Prelude.Text)
deletePortfolioShare_accountId :: (Maybe Text -> f (Maybe Text))
-> DeletePortfolioShare -> f DeletePortfolioShare
deletePortfolioShare_accountId = (DeletePortfolioShare -> Maybe Text)
-> (DeletePortfolioShare -> Maybe Text -> DeletePortfolioShare)
-> Lens
     DeletePortfolioShare DeletePortfolioShare (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePortfolioShare' {Maybe Text
accountId :: Maybe Text
$sel:accountId:DeletePortfolioShare' :: DeletePortfolioShare -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: DeletePortfolioShare
s@DeletePortfolioShare' {} Maybe Text
a -> DeletePortfolioShare
s {$sel:accountId:DeletePortfolioShare' :: Maybe Text
accountId = Maybe Text
a} :: DeletePortfolioShare)

-- | The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
deletePortfolioShare_acceptLanguage :: Lens.Lens' DeletePortfolioShare (Prelude.Maybe Prelude.Text)
deletePortfolioShare_acceptLanguage :: (Maybe Text -> f (Maybe Text))
-> DeletePortfolioShare -> f DeletePortfolioShare
deletePortfolioShare_acceptLanguage = (DeletePortfolioShare -> Maybe Text)
-> (DeletePortfolioShare -> Maybe Text -> DeletePortfolioShare)
-> Lens
     DeletePortfolioShare DeletePortfolioShare (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePortfolioShare' {Maybe Text
acceptLanguage :: Maybe Text
$sel:acceptLanguage:DeletePortfolioShare' :: DeletePortfolioShare -> Maybe Text
acceptLanguage} -> Maybe Text
acceptLanguage) (\s :: DeletePortfolioShare
s@DeletePortfolioShare' {} Maybe Text
a -> DeletePortfolioShare
s {$sel:acceptLanguage:DeletePortfolioShare' :: Maybe Text
acceptLanguage = Maybe Text
a} :: DeletePortfolioShare)

-- | The organization node to whom you are going to stop sharing.
deletePortfolioShare_organizationNode :: Lens.Lens' DeletePortfolioShare (Prelude.Maybe OrganizationNode)
deletePortfolioShare_organizationNode :: (Maybe OrganizationNode -> f (Maybe OrganizationNode))
-> DeletePortfolioShare -> f DeletePortfolioShare
deletePortfolioShare_organizationNode = (DeletePortfolioShare -> Maybe OrganizationNode)
-> (DeletePortfolioShare
    -> Maybe OrganizationNode -> DeletePortfolioShare)
-> Lens
     DeletePortfolioShare
     DeletePortfolioShare
     (Maybe OrganizationNode)
     (Maybe OrganizationNode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePortfolioShare' {Maybe OrganizationNode
organizationNode :: Maybe OrganizationNode
$sel:organizationNode:DeletePortfolioShare' :: DeletePortfolioShare -> Maybe OrganizationNode
organizationNode} -> Maybe OrganizationNode
organizationNode) (\s :: DeletePortfolioShare
s@DeletePortfolioShare' {} Maybe OrganizationNode
a -> DeletePortfolioShare
s {$sel:organizationNode:DeletePortfolioShare' :: Maybe OrganizationNode
organizationNode = Maybe OrganizationNode
a} :: DeletePortfolioShare)

-- | The portfolio identifier.
deletePortfolioShare_portfolioId :: Lens.Lens' DeletePortfolioShare Prelude.Text
deletePortfolioShare_portfolioId :: (Text -> f Text) -> DeletePortfolioShare -> f DeletePortfolioShare
deletePortfolioShare_portfolioId = (DeletePortfolioShare -> Text)
-> (DeletePortfolioShare -> Text -> DeletePortfolioShare)
-> Lens DeletePortfolioShare DeletePortfolioShare Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePortfolioShare' {Text
portfolioId :: Text
$sel:portfolioId:DeletePortfolioShare' :: DeletePortfolioShare -> Text
portfolioId} -> Text
portfolioId) (\s :: DeletePortfolioShare
s@DeletePortfolioShare' {} Text
a -> DeletePortfolioShare
s {$sel:portfolioId:DeletePortfolioShare' :: Text
portfolioId = Text
a} :: DeletePortfolioShare)

instance Core.AWSRequest DeletePortfolioShare where
  type
    AWSResponse DeletePortfolioShare =
      DeletePortfolioShareResponse
  request :: DeletePortfolioShare -> Request DeletePortfolioShare
request = Service -> DeletePortfolioShare -> Request DeletePortfolioShare
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeletePortfolioShare
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeletePortfolioShare)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DeletePortfolioShare))
-> Logger
-> Service
-> Proxy DeletePortfolioShare
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeletePortfolioShare)))
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 Text -> Int -> DeletePortfolioShareResponse
DeletePortfolioShareResponse'
            (Maybe Text -> Int -> DeletePortfolioShareResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DeletePortfolioShareResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PortfolioShareToken")
            Either String (Int -> DeletePortfolioShareResponse)
-> Either String Int -> Either String DeletePortfolioShareResponse
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 DeletePortfolioShare

instance Prelude.NFData DeletePortfolioShare

instance Core.ToHeaders DeletePortfolioShare where
  toHeaders :: DeletePortfolioShare -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeletePortfolioShare -> 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
"AWS242ServiceCatalogService.DeletePortfolioShare" ::
                          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 DeletePortfolioShare where
  toJSON :: DeletePortfolioShare -> Value
toJSON DeletePortfolioShare' {Maybe Text
Maybe OrganizationNode
Text
portfolioId :: Text
organizationNode :: Maybe OrganizationNode
acceptLanguage :: Maybe Text
accountId :: Maybe Text
$sel:portfolioId:DeletePortfolioShare' :: DeletePortfolioShare -> Text
$sel:organizationNode:DeletePortfolioShare' :: DeletePortfolioShare -> Maybe OrganizationNode
$sel:acceptLanguage:DeletePortfolioShare' :: DeletePortfolioShare -> Maybe Text
$sel:accountId:DeletePortfolioShare' :: DeletePortfolioShare -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AccountId" 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
accountId,
            (Text
"AcceptLanguage" 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
acceptLanguage,
            (Text
"OrganizationNode" Text -> OrganizationNode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (OrganizationNode -> Pair) -> Maybe OrganizationNode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OrganizationNode
organizationNode,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PortfolioId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
portfolioId)
          ]
      )

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

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

-- | /See:/ 'newDeletePortfolioShareResponse' smart constructor.
data DeletePortfolioShareResponse = DeletePortfolioShareResponse'
  { -- | The portfolio share unique identifier. This will only be returned if
    -- delete is made to an organization node.
    DeletePortfolioShareResponse -> Maybe Text
portfolioShareToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DeletePortfolioShareResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeletePortfolioShareResponse
-> DeletePortfolioShareResponse -> Bool
(DeletePortfolioShareResponse
 -> DeletePortfolioShareResponse -> Bool)
-> (DeletePortfolioShareResponse
    -> DeletePortfolioShareResponse -> Bool)
-> Eq DeletePortfolioShareResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePortfolioShareResponse
-> DeletePortfolioShareResponse -> Bool
$c/= :: DeletePortfolioShareResponse
-> DeletePortfolioShareResponse -> Bool
== :: DeletePortfolioShareResponse
-> DeletePortfolioShareResponse -> Bool
$c== :: DeletePortfolioShareResponse
-> DeletePortfolioShareResponse -> Bool
Prelude.Eq, ReadPrec [DeletePortfolioShareResponse]
ReadPrec DeletePortfolioShareResponse
Int -> ReadS DeletePortfolioShareResponse
ReadS [DeletePortfolioShareResponse]
(Int -> ReadS DeletePortfolioShareResponse)
-> ReadS [DeletePortfolioShareResponse]
-> ReadPrec DeletePortfolioShareResponse
-> ReadPrec [DeletePortfolioShareResponse]
-> Read DeletePortfolioShareResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePortfolioShareResponse]
$creadListPrec :: ReadPrec [DeletePortfolioShareResponse]
readPrec :: ReadPrec DeletePortfolioShareResponse
$creadPrec :: ReadPrec DeletePortfolioShareResponse
readList :: ReadS [DeletePortfolioShareResponse]
$creadList :: ReadS [DeletePortfolioShareResponse]
readsPrec :: Int -> ReadS DeletePortfolioShareResponse
$creadsPrec :: Int -> ReadS DeletePortfolioShareResponse
Prelude.Read, Int -> DeletePortfolioShareResponse -> ShowS
[DeletePortfolioShareResponse] -> ShowS
DeletePortfolioShareResponse -> String
(Int -> DeletePortfolioShareResponse -> ShowS)
-> (DeletePortfolioShareResponse -> String)
-> ([DeletePortfolioShareResponse] -> ShowS)
-> Show DeletePortfolioShareResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePortfolioShareResponse] -> ShowS
$cshowList :: [DeletePortfolioShareResponse] -> ShowS
show :: DeletePortfolioShareResponse -> String
$cshow :: DeletePortfolioShareResponse -> String
showsPrec :: Int -> DeletePortfolioShareResponse -> ShowS
$cshowsPrec :: Int -> DeletePortfolioShareResponse -> ShowS
Prelude.Show, (forall x.
 DeletePortfolioShareResponse -> Rep DeletePortfolioShareResponse x)
-> (forall x.
    Rep DeletePortfolioShareResponse x -> DeletePortfolioShareResponse)
-> Generic DeletePortfolioShareResponse
forall x.
Rep DeletePortfolioShareResponse x -> DeletePortfolioShareResponse
forall x.
DeletePortfolioShareResponse -> Rep DeletePortfolioShareResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeletePortfolioShareResponse x -> DeletePortfolioShareResponse
$cfrom :: forall x.
DeletePortfolioShareResponse -> Rep DeletePortfolioShareResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeletePortfolioShareResponse' 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:
--
-- 'portfolioShareToken', 'deletePortfolioShareResponse_portfolioShareToken' - The portfolio share unique identifier. This will only be returned if
-- delete is made to an organization node.
--
-- 'httpStatus', 'deletePortfolioShareResponse_httpStatus' - The response's http status code.
newDeletePortfolioShareResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeletePortfolioShareResponse
newDeletePortfolioShareResponse :: Int -> DeletePortfolioShareResponse
newDeletePortfolioShareResponse Int
pHttpStatus_ =
  DeletePortfolioShareResponse' :: Maybe Text -> Int -> DeletePortfolioShareResponse
DeletePortfolioShareResponse'
    { $sel:portfolioShareToken:DeletePortfolioShareResponse' :: Maybe Text
portfolioShareToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeletePortfolioShareResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The portfolio share unique identifier. This will only be returned if
-- delete is made to an organization node.
deletePortfolioShareResponse_portfolioShareToken :: Lens.Lens' DeletePortfolioShareResponse (Prelude.Maybe Prelude.Text)
deletePortfolioShareResponse_portfolioShareToken :: (Maybe Text -> f (Maybe Text))
-> DeletePortfolioShareResponse -> f DeletePortfolioShareResponse
deletePortfolioShareResponse_portfolioShareToken = (DeletePortfolioShareResponse -> Maybe Text)
-> (DeletePortfolioShareResponse
    -> Maybe Text -> DeletePortfolioShareResponse)
-> Lens
     DeletePortfolioShareResponse
     DeletePortfolioShareResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePortfolioShareResponse' {Maybe Text
portfolioShareToken :: Maybe Text
$sel:portfolioShareToken:DeletePortfolioShareResponse' :: DeletePortfolioShareResponse -> Maybe Text
portfolioShareToken} -> Maybe Text
portfolioShareToken) (\s :: DeletePortfolioShareResponse
s@DeletePortfolioShareResponse' {} Maybe Text
a -> DeletePortfolioShareResponse
s {$sel:portfolioShareToken:DeletePortfolioShareResponse' :: Maybe Text
portfolioShareToken = Maybe Text
a} :: DeletePortfolioShareResponse)

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

instance Prelude.NFData DeletePortfolioShareResponse