{-# 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.DescribePortfolioShareStatus
-- 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)
--
-- Gets the status of the specified portfolio share operation. This API can
-- only be called by the management account in the organization or by a
-- delegated admin.
module Amazonka.ServiceCatalog.DescribePortfolioShareStatus
  ( -- * Creating a Request
    DescribePortfolioShareStatus (..),
    newDescribePortfolioShareStatus,

    -- * Request Lenses
    describePortfolioShareStatus_portfolioShareToken,

    -- * Destructuring the Response
    DescribePortfolioShareStatusResponse (..),
    newDescribePortfolioShareStatusResponse,

    -- * Response Lenses
    describePortfolioShareStatusResponse_status,
    describePortfolioShareStatusResponse_portfolioShareToken,
    describePortfolioShareStatusResponse_shareDetails,
    describePortfolioShareStatusResponse_portfolioId,
    describePortfolioShareStatusResponse_organizationNodeValue,
    describePortfolioShareStatusResponse_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:/ 'newDescribePortfolioShareStatus' smart constructor.
data DescribePortfolioShareStatus = DescribePortfolioShareStatus'
  { -- | The token for the portfolio share operation. This token is returned
    -- either by CreatePortfolioShare or by DeletePortfolioShare.
    DescribePortfolioShareStatus -> Text
portfolioShareToken :: Prelude.Text
  }
  deriving (DescribePortfolioShareStatus
-> DescribePortfolioShareStatus -> Bool
(DescribePortfolioShareStatus
 -> DescribePortfolioShareStatus -> Bool)
-> (DescribePortfolioShareStatus
    -> DescribePortfolioShareStatus -> Bool)
-> Eq DescribePortfolioShareStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePortfolioShareStatus
-> DescribePortfolioShareStatus -> Bool
$c/= :: DescribePortfolioShareStatus
-> DescribePortfolioShareStatus -> Bool
== :: DescribePortfolioShareStatus
-> DescribePortfolioShareStatus -> Bool
$c== :: DescribePortfolioShareStatus
-> DescribePortfolioShareStatus -> Bool
Prelude.Eq, ReadPrec [DescribePortfolioShareStatus]
ReadPrec DescribePortfolioShareStatus
Int -> ReadS DescribePortfolioShareStatus
ReadS [DescribePortfolioShareStatus]
(Int -> ReadS DescribePortfolioShareStatus)
-> ReadS [DescribePortfolioShareStatus]
-> ReadPrec DescribePortfolioShareStatus
-> ReadPrec [DescribePortfolioShareStatus]
-> Read DescribePortfolioShareStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePortfolioShareStatus]
$creadListPrec :: ReadPrec [DescribePortfolioShareStatus]
readPrec :: ReadPrec DescribePortfolioShareStatus
$creadPrec :: ReadPrec DescribePortfolioShareStatus
readList :: ReadS [DescribePortfolioShareStatus]
$creadList :: ReadS [DescribePortfolioShareStatus]
readsPrec :: Int -> ReadS DescribePortfolioShareStatus
$creadsPrec :: Int -> ReadS DescribePortfolioShareStatus
Prelude.Read, Int -> DescribePortfolioShareStatus -> ShowS
[DescribePortfolioShareStatus] -> ShowS
DescribePortfolioShareStatus -> String
(Int -> DescribePortfolioShareStatus -> ShowS)
-> (DescribePortfolioShareStatus -> String)
-> ([DescribePortfolioShareStatus] -> ShowS)
-> Show DescribePortfolioShareStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePortfolioShareStatus] -> ShowS
$cshowList :: [DescribePortfolioShareStatus] -> ShowS
show :: DescribePortfolioShareStatus -> String
$cshow :: DescribePortfolioShareStatus -> String
showsPrec :: Int -> DescribePortfolioShareStatus -> ShowS
$cshowsPrec :: Int -> DescribePortfolioShareStatus -> ShowS
Prelude.Show, (forall x.
 DescribePortfolioShareStatus -> Rep DescribePortfolioShareStatus x)
-> (forall x.
    Rep DescribePortfolioShareStatus x -> DescribePortfolioShareStatus)
-> Generic DescribePortfolioShareStatus
forall x.
Rep DescribePortfolioShareStatus x -> DescribePortfolioShareStatus
forall x.
DescribePortfolioShareStatus -> Rep DescribePortfolioShareStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePortfolioShareStatus x -> DescribePortfolioShareStatus
$cfrom :: forall x.
DescribePortfolioShareStatus -> Rep DescribePortfolioShareStatus x
Prelude.Generic)

-- |
-- Create a value of 'DescribePortfolioShareStatus' 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', 'describePortfolioShareStatus_portfolioShareToken' - The token for the portfolio share operation. This token is returned
-- either by CreatePortfolioShare or by DeletePortfolioShare.
newDescribePortfolioShareStatus ::
  -- | 'portfolioShareToken'
  Prelude.Text ->
  DescribePortfolioShareStatus
newDescribePortfolioShareStatus :: Text -> DescribePortfolioShareStatus
newDescribePortfolioShareStatus Text
pPortfolioShareToken_ =
  DescribePortfolioShareStatus' :: Text -> DescribePortfolioShareStatus
DescribePortfolioShareStatus'
    { $sel:portfolioShareToken:DescribePortfolioShareStatus' :: Text
portfolioShareToken =
        Text
pPortfolioShareToken_
    }

-- | The token for the portfolio share operation. This token is returned
-- either by CreatePortfolioShare or by DeletePortfolioShare.
describePortfolioShareStatus_portfolioShareToken :: Lens.Lens' DescribePortfolioShareStatus Prelude.Text
describePortfolioShareStatus_portfolioShareToken :: (Text -> f Text)
-> DescribePortfolioShareStatus -> f DescribePortfolioShareStatus
describePortfolioShareStatus_portfolioShareToken = (DescribePortfolioShareStatus -> Text)
-> (DescribePortfolioShareStatus
    -> Text -> DescribePortfolioShareStatus)
-> Lens
     DescribePortfolioShareStatus DescribePortfolioShareStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePortfolioShareStatus' {Text
portfolioShareToken :: Text
$sel:portfolioShareToken:DescribePortfolioShareStatus' :: DescribePortfolioShareStatus -> Text
portfolioShareToken} -> Text
portfolioShareToken) (\s :: DescribePortfolioShareStatus
s@DescribePortfolioShareStatus' {} Text
a -> DescribePortfolioShareStatus
s {$sel:portfolioShareToken:DescribePortfolioShareStatus' :: Text
portfolioShareToken = Text
a} :: DescribePortfolioShareStatus)

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

instance Prelude.NFData DescribePortfolioShareStatus

instance Core.ToHeaders DescribePortfolioShareStatus where
  toHeaders :: DescribePortfolioShareStatus -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribePortfolioShareStatus -> 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.DescribePortfolioShareStatus" ::
                          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 DescribePortfolioShareStatus where
  toJSON :: DescribePortfolioShareStatus -> Value
toJSON DescribePortfolioShareStatus' {Text
portfolioShareToken :: Text
$sel:portfolioShareToken:DescribePortfolioShareStatus' :: DescribePortfolioShareStatus -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"PortfolioShareToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
portfolioShareToken)
          ]
      )

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

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

-- | /See:/ 'newDescribePortfolioShareStatusResponse' smart constructor.
data DescribePortfolioShareStatusResponse = DescribePortfolioShareStatusResponse'
  { -- | Status of the portfolio share operation.
    DescribePortfolioShareStatusResponse -> Maybe ShareStatus
status :: Prelude.Maybe ShareStatus,
    -- | The token for the portfolio share operation. For example,
    -- @share-6v24abcdefghi@.
    DescribePortfolioShareStatusResponse -> Maybe Text
portfolioShareToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the portfolio share operation.
    DescribePortfolioShareStatusResponse -> Maybe ShareDetails
shareDetails :: Prelude.Maybe ShareDetails,
    -- | The portfolio identifier.
    DescribePortfolioShareStatusResponse -> Maybe Text
portfolioId :: Prelude.Maybe Prelude.Text,
    -- | Organization node identifier. It can be either account id,
    -- organizational unit id or organization id.
    DescribePortfolioShareStatusResponse -> Maybe Text
organizationNodeValue :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribePortfolioShareStatusResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribePortfolioShareStatusResponse
-> DescribePortfolioShareStatusResponse -> Bool
(DescribePortfolioShareStatusResponse
 -> DescribePortfolioShareStatusResponse -> Bool)
-> (DescribePortfolioShareStatusResponse
    -> DescribePortfolioShareStatusResponse -> Bool)
-> Eq DescribePortfolioShareStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePortfolioShareStatusResponse
-> DescribePortfolioShareStatusResponse -> Bool
$c/= :: DescribePortfolioShareStatusResponse
-> DescribePortfolioShareStatusResponse -> Bool
== :: DescribePortfolioShareStatusResponse
-> DescribePortfolioShareStatusResponse -> Bool
$c== :: DescribePortfolioShareStatusResponse
-> DescribePortfolioShareStatusResponse -> Bool
Prelude.Eq, ReadPrec [DescribePortfolioShareStatusResponse]
ReadPrec DescribePortfolioShareStatusResponse
Int -> ReadS DescribePortfolioShareStatusResponse
ReadS [DescribePortfolioShareStatusResponse]
(Int -> ReadS DescribePortfolioShareStatusResponse)
-> ReadS [DescribePortfolioShareStatusResponse]
-> ReadPrec DescribePortfolioShareStatusResponse
-> ReadPrec [DescribePortfolioShareStatusResponse]
-> Read DescribePortfolioShareStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePortfolioShareStatusResponse]
$creadListPrec :: ReadPrec [DescribePortfolioShareStatusResponse]
readPrec :: ReadPrec DescribePortfolioShareStatusResponse
$creadPrec :: ReadPrec DescribePortfolioShareStatusResponse
readList :: ReadS [DescribePortfolioShareStatusResponse]
$creadList :: ReadS [DescribePortfolioShareStatusResponse]
readsPrec :: Int -> ReadS DescribePortfolioShareStatusResponse
$creadsPrec :: Int -> ReadS DescribePortfolioShareStatusResponse
Prelude.Read, Int -> DescribePortfolioShareStatusResponse -> ShowS
[DescribePortfolioShareStatusResponse] -> ShowS
DescribePortfolioShareStatusResponse -> String
(Int -> DescribePortfolioShareStatusResponse -> ShowS)
-> (DescribePortfolioShareStatusResponse -> String)
-> ([DescribePortfolioShareStatusResponse] -> ShowS)
-> Show DescribePortfolioShareStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePortfolioShareStatusResponse] -> ShowS
$cshowList :: [DescribePortfolioShareStatusResponse] -> ShowS
show :: DescribePortfolioShareStatusResponse -> String
$cshow :: DescribePortfolioShareStatusResponse -> String
showsPrec :: Int -> DescribePortfolioShareStatusResponse -> ShowS
$cshowsPrec :: Int -> DescribePortfolioShareStatusResponse -> ShowS
Prelude.Show, (forall x.
 DescribePortfolioShareStatusResponse
 -> Rep DescribePortfolioShareStatusResponse x)
-> (forall x.
    Rep DescribePortfolioShareStatusResponse x
    -> DescribePortfolioShareStatusResponse)
-> Generic DescribePortfolioShareStatusResponse
forall x.
Rep DescribePortfolioShareStatusResponse x
-> DescribePortfolioShareStatusResponse
forall x.
DescribePortfolioShareStatusResponse
-> Rep DescribePortfolioShareStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePortfolioShareStatusResponse x
-> DescribePortfolioShareStatusResponse
$cfrom :: forall x.
DescribePortfolioShareStatusResponse
-> Rep DescribePortfolioShareStatusResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribePortfolioShareStatusResponse' 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:
--
-- 'status', 'describePortfolioShareStatusResponse_status' - Status of the portfolio share operation.
--
-- 'portfolioShareToken', 'describePortfolioShareStatusResponse_portfolioShareToken' - The token for the portfolio share operation. For example,
-- @share-6v24abcdefghi@.
--
-- 'shareDetails', 'describePortfolioShareStatusResponse_shareDetails' - Information about the portfolio share operation.
--
-- 'portfolioId', 'describePortfolioShareStatusResponse_portfolioId' - The portfolio identifier.
--
-- 'organizationNodeValue', 'describePortfolioShareStatusResponse_organizationNodeValue' - Organization node identifier. It can be either account id,
-- organizational unit id or organization id.
--
-- 'httpStatus', 'describePortfolioShareStatusResponse_httpStatus' - The response's http status code.
newDescribePortfolioShareStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribePortfolioShareStatusResponse
newDescribePortfolioShareStatusResponse :: Int -> DescribePortfolioShareStatusResponse
newDescribePortfolioShareStatusResponse Int
pHttpStatus_ =
  DescribePortfolioShareStatusResponse' :: Maybe ShareStatus
-> Maybe Text
-> Maybe ShareDetails
-> Maybe Text
-> Maybe Text
-> Int
-> DescribePortfolioShareStatusResponse
DescribePortfolioShareStatusResponse'
    { $sel:status:DescribePortfolioShareStatusResponse' :: Maybe ShareStatus
status =
        Maybe ShareStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:portfolioShareToken:DescribePortfolioShareStatusResponse' :: Maybe Text
portfolioShareToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:shareDetails:DescribePortfolioShareStatusResponse' :: Maybe ShareDetails
shareDetails = Maybe ShareDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:portfolioId:DescribePortfolioShareStatusResponse' :: Maybe Text
portfolioId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:organizationNodeValue:DescribePortfolioShareStatusResponse' :: Maybe Text
organizationNodeValue =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribePortfolioShareStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Status of the portfolio share operation.
describePortfolioShareStatusResponse_status :: Lens.Lens' DescribePortfolioShareStatusResponse (Prelude.Maybe ShareStatus)
describePortfolioShareStatusResponse_status :: (Maybe ShareStatus -> f (Maybe ShareStatus))
-> DescribePortfolioShareStatusResponse
-> f DescribePortfolioShareStatusResponse
describePortfolioShareStatusResponse_status = (DescribePortfolioShareStatusResponse -> Maybe ShareStatus)
-> (DescribePortfolioShareStatusResponse
    -> Maybe ShareStatus -> DescribePortfolioShareStatusResponse)
-> Lens
     DescribePortfolioShareStatusResponse
     DescribePortfolioShareStatusResponse
     (Maybe ShareStatus)
     (Maybe ShareStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePortfolioShareStatusResponse' {Maybe ShareStatus
status :: Maybe ShareStatus
$sel:status:DescribePortfolioShareStatusResponse' :: DescribePortfolioShareStatusResponse -> Maybe ShareStatus
status} -> Maybe ShareStatus
status) (\s :: DescribePortfolioShareStatusResponse
s@DescribePortfolioShareStatusResponse' {} Maybe ShareStatus
a -> DescribePortfolioShareStatusResponse
s {$sel:status:DescribePortfolioShareStatusResponse' :: Maybe ShareStatus
status = Maybe ShareStatus
a} :: DescribePortfolioShareStatusResponse)

-- | The token for the portfolio share operation. For example,
-- @share-6v24abcdefghi@.
describePortfolioShareStatusResponse_portfolioShareToken :: Lens.Lens' DescribePortfolioShareStatusResponse (Prelude.Maybe Prelude.Text)
describePortfolioShareStatusResponse_portfolioShareToken :: (Maybe Text -> f (Maybe Text))
-> DescribePortfolioShareStatusResponse
-> f DescribePortfolioShareStatusResponse
describePortfolioShareStatusResponse_portfolioShareToken = (DescribePortfolioShareStatusResponse -> Maybe Text)
-> (DescribePortfolioShareStatusResponse
    -> Maybe Text -> DescribePortfolioShareStatusResponse)
-> Lens
     DescribePortfolioShareStatusResponse
     DescribePortfolioShareStatusResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePortfolioShareStatusResponse' {Maybe Text
portfolioShareToken :: Maybe Text
$sel:portfolioShareToken:DescribePortfolioShareStatusResponse' :: DescribePortfolioShareStatusResponse -> Maybe Text
portfolioShareToken} -> Maybe Text
portfolioShareToken) (\s :: DescribePortfolioShareStatusResponse
s@DescribePortfolioShareStatusResponse' {} Maybe Text
a -> DescribePortfolioShareStatusResponse
s {$sel:portfolioShareToken:DescribePortfolioShareStatusResponse' :: Maybe Text
portfolioShareToken = Maybe Text
a} :: DescribePortfolioShareStatusResponse)

-- | Information about the portfolio share operation.
describePortfolioShareStatusResponse_shareDetails :: Lens.Lens' DescribePortfolioShareStatusResponse (Prelude.Maybe ShareDetails)
describePortfolioShareStatusResponse_shareDetails :: (Maybe ShareDetails -> f (Maybe ShareDetails))
-> DescribePortfolioShareStatusResponse
-> f DescribePortfolioShareStatusResponse
describePortfolioShareStatusResponse_shareDetails = (DescribePortfolioShareStatusResponse -> Maybe ShareDetails)
-> (DescribePortfolioShareStatusResponse
    -> Maybe ShareDetails -> DescribePortfolioShareStatusResponse)
-> Lens
     DescribePortfolioShareStatusResponse
     DescribePortfolioShareStatusResponse
     (Maybe ShareDetails)
     (Maybe ShareDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePortfolioShareStatusResponse' {Maybe ShareDetails
shareDetails :: Maybe ShareDetails
$sel:shareDetails:DescribePortfolioShareStatusResponse' :: DescribePortfolioShareStatusResponse -> Maybe ShareDetails
shareDetails} -> Maybe ShareDetails
shareDetails) (\s :: DescribePortfolioShareStatusResponse
s@DescribePortfolioShareStatusResponse' {} Maybe ShareDetails
a -> DescribePortfolioShareStatusResponse
s {$sel:shareDetails:DescribePortfolioShareStatusResponse' :: Maybe ShareDetails
shareDetails = Maybe ShareDetails
a} :: DescribePortfolioShareStatusResponse)

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

-- | Organization node identifier. It can be either account id,
-- organizational unit id or organization id.
describePortfolioShareStatusResponse_organizationNodeValue :: Lens.Lens' DescribePortfolioShareStatusResponse (Prelude.Maybe Prelude.Text)
describePortfolioShareStatusResponse_organizationNodeValue :: (Maybe Text -> f (Maybe Text))
-> DescribePortfolioShareStatusResponse
-> f DescribePortfolioShareStatusResponse
describePortfolioShareStatusResponse_organizationNodeValue = (DescribePortfolioShareStatusResponse -> Maybe Text)
-> (DescribePortfolioShareStatusResponse
    -> Maybe Text -> DescribePortfolioShareStatusResponse)
-> Lens
     DescribePortfolioShareStatusResponse
     DescribePortfolioShareStatusResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePortfolioShareStatusResponse' {Maybe Text
organizationNodeValue :: Maybe Text
$sel:organizationNodeValue:DescribePortfolioShareStatusResponse' :: DescribePortfolioShareStatusResponse -> Maybe Text
organizationNodeValue} -> Maybe Text
organizationNodeValue) (\s :: DescribePortfolioShareStatusResponse
s@DescribePortfolioShareStatusResponse' {} Maybe Text
a -> DescribePortfolioShareStatusResponse
s {$sel:organizationNodeValue:DescribePortfolioShareStatusResponse' :: Maybe Text
organizationNodeValue = Maybe Text
a} :: DescribePortfolioShareStatusResponse)

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

instance
  Prelude.NFData
    DescribePortfolioShareStatusResponse