{-# 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.ListAcceptedPortfolioShares
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all imported portfolios for which account-to-account shares were
-- accepted by this account. By specifying the @PortfolioShareType@, you
-- can list portfolios for which organizational shares were accepted by
-- this account.
--
-- This operation returns paginated results.
module Amazonka.ServiceCatalog.ListAcceptedPortfolioShares
  ( -- * Creating a Request
    ListAcceptedPortfolioShares (..),
    newListAcceptedPortfolioShares,

    -- * Request Lenses
    listAcceptedPortfolioShares_acceptLanguage,
    listAcceptedPortfolioShares_pageSize,
    listAcceptedPortfolioShares_pageToken,
    listAcceptedPortfolioShares_portfolioShareType,

    -- * Destructuring the Response
    ListAcceptedPortfolioSharesResponse (..),
    newListAcceptedPortfolioSharesResponse,

    -- * Response Lenses
    listAcceptedPortfolioSharesResponse_nextPageToken,
    listAcceptedPortfolioSharesResponse_portfolioDetails,
    listAcceptedPortfolioSharesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListAcceptedPortfolioShares' smart constructor.
data ListAcceptedPortfolioShares = ListAcceptedPortfolioShares'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    ListAcceptedPortfolioShares -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return with this call.
    ListAcceptedPortfolioShares -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
    -- | The page token for the next set of results. To retrieve the first set of
    -- results, use null.
    ListAcceptedPortfolioShares -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
    -- | The type of shared portfolios to list. The default is to list imported
    -- portfolios.
    --
    -- -   @AWS_ORGANIZATIONS@ - List portfolios accepted and shared via
    --     organizational sharing by the management account or delegated
    --     administrator of your organization.
    --
    -- -   @AWS_SERVICECATALOG@ - Deprecated type.
    --
    -- -   @IMPORTED@ - List imported portfolios that have been accepted and
    --     shared through account-to-account sharing.
    ListAcceptedPortfolioShares -> Maybe PortfolioShareType
portfolioShareType :: Prelude.Maybe PortfolioShareType
  }
  deriving (ListAcceptedPortfolioShares -> ListAcceptedPortfolioShares -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAcceptedPortfolioShares -> ListAcceptedPortfolioShares -> Bool
$c/= :: ListAcceptedPortfolioShares -> ListAcceptedPortfolioShares -> Bool
== :: ListAcceptedPortfolioShares -> ListAcceptedPortfolioShares -> Bool
$c== :: ListAcceptedPortfolioShares -> ListAcceptedPortfolioShares -> Bool
Prelude.Eq, ReadPrec [ListAcceptedPortfolioShares]
ReadPrec ListAcceptedPortfolioShares
Int -> ReadS ListAcceptedPortfolioShares
ReadS [ListAcceptedPortfolioShares]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAcceptedPortfolioShares]
$creadListPrec :: ReadPrec [ListAcceptedPortfolioShares]
readPrec :: ReadPrec ListAcceptedPortfolioShares
$creadPrec :: ReadPrec ListAcceptedPortfolioShares
readList :: ReadS [ListAcceptedPortfolioShares]
$creadList :: ReadS [ListAcceptedPortfolioShares]
readsPrec :: Int -> ReadS ListAcceptedPortfolioShares
$creadsPrec :: Int -> ReadS ListAcceptedPortfolioShares
Prelude.Read, Int -> ListAcceptedPortfolioShares -> ShowS
[ListAcceptedPortfolioShares] -> ShowS
ListAcceptedPortfolioShares -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAcceptedPortfolioShares] -> ShowS
$cshowList :: [ListAcceptedPortfolioShares] -> ShowS
show :: ListAcceptedPortfolioShares -> String
$cshow :: ListAcceptedPortfolioShares -> String
showsPrec :: Int -> ListAcceptedPortfolioShares -> ShowS
$cshowsPrec :: Int -> ListAcceptedPortfolioShares -> ShowS
Prelude.Show, forall x.
Rep ListAcceptedPortfolioShares x -> ListAcceptedPortfolioShares
forall x.
ListAcceptedPortfolioShares -> Rep ListAcceptedPortfolioShares x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAcceptedPortfolioShares x -> ListAcceptedPortfolioShares
$cfrom :: forall x.
ListAcceptedPortfolioShares -> Rep ListAcceptedPortfolioShares x
Prelude.Generic)

-- |
-- Create a value of 'ListAcceptedPortfolioShares' 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:
--
-- 'acceptLanguage', 'listAcceptedPortfolioShares_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'pageSize', 'listAcceptedPortfolioShares_pageSize' - The maximum number of items to return with this call.
--
-- 'pageToken', 'listAcceptedPortfolioShares_pageToken' - The page token for the next set of results. To retrieve the first set of
-- results, use null.
--
-- 'portfolioShareType', 'listAcceptedPortfolioShares_portfolioShareType' - The type of shared portfolios to list. The default is to list imported
-- portfolios.
--
-- -   @AWS_ORGANIZATIONS@ - List portfolios accepted and shared via
--     organizational sharing by the management account or delegated
--     administrator of your organization.
--
-- -   @AWS_SERVICECATALOG@ - Deprecated type.
--
-- -   @IMPORTED@ - List imported portfolios that have been accepted and
--     shared through account-to-account sharing.
newListAcceptedPortfolioShares ::
  ListAcceptedPortfolioShares
newListAcceptedPortfolioShares :: ListAcceptedPortfolioShares
newListAcceptedPortfolioShares =
  ListAcceptedPortfolioShares'
    { $sel:acceptLanguage:ListAcceptedPortfolioShares' :: Maybe Text
acceptLanguage =
        forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ListAcceptedPortfolioShares' :: Maybe Natural
pageSize = forall a. Maybe a
Prelude.Nothing,
      $sel:pageToken:ListAcceptedPortfolioShares' :: Maybe Text
pageToken = forall a. Maybe a
Prelude.Nothing,
      $sel:portfolioShareType:ListAcceptedPortfolioShares' :: Maybe PortfolioShareType
portfolioShareType = forall a. Maybe a
Prelude.Nothing
    }

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

-- | The maximum number of items to return with this call.
listAcceptedPortfolioShares_pageSize :: Lens.Lens' ListAcceptedPortfolioShares (Prelude.Maybe Prelude.Natural)
listAcceptedPortfolioShares_pageSize :: Lens' ListAcceptedPortfolioShares (Maybe Natural)
listAcceptedPortfolioShares_pageSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAcceptedPortfolioShares' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: ListAcceptedPortfolioShares
s@ListAcceptedPortfolioShares' {} Maybe Natural
a -> ListAcceptedPortfolioShares
s {$sel:pageSize:ListAcceptedPortfolioShares' :: Maybe Natural
pageSize = Maybe Natural
a} :: ListAcceptedPortfolioShares)

-- | The page token for the next set of results. To retrieve the first set of
-- results, use null.
listAcceptedPortfolioShares_pageToken :: Lens.Lens' ListAcceptedPortfolioShares (Prelude.Maybe Prelude.Text)
listAcceptedPortfolioShares_pageToken :: Lens' ListAcceptedPortfolioShares (Maybe Text)
listAcceptedPortfolioShares_pageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAcceptedPortfolioShares' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: ListAcceptedPortfolioShares
s@ListAcceptedPortfolioShares' {} Maybe Text
a -> ListAcceptedPortfolioShares
s {$sel:pageToken:ListAcceptedPortfolioShares' :: Maybe Text
pageToken = Maybe Text
a} :: ListAcceptedPortfolioShares)

-- | The type of shared portfolios to list. The default is to list imported
-- portfolios.
--
-- -   @AWS_ORGANIZATIONS@ - List portfolios accepted and shared via
--     organizational sharing by the management account or delegated
--     administrator of your organization.
--
-- -   @AWS_SERVICECATALOG@ - Deprecated type.
--
-- -   @IMPORTED@ - List imported portfolios that have been accepted and
--     shared through account-to-account sharing.
listAcceptedPortfolioShares_portfolioShareType :: Lens.Lens' ListAcceptedPortfolioShares (Prelude.Maybe PortfolioShareType)
listAcceptedPortfolioShares_portfolioShareType :: Lens' ListAcceptedPortfolioShares (Maybe PortfolioShareType)
listAcceptedPortfolioShares_portfolioShareType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAcceptedPortfolioShares' {Maybe PortfolioShareType
portfolioShareType :: Maybe PortfolioShareType
$sel:portfolioShareType:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe PortfolioShareType
portfolioShareType} -> Maybe PortfolioShareType
portfolioShareType) (\s :: ListAcceptedPortfolioShares
s@ListAcceptedPortfolioShares' {} Maybe PortfolioShareType
a -> ListAcceptedPortfolioShares
s {$sel:portfolioShareType:ListAcceptedPortfolioShares' :: Maybe PortfolioShareType
portfolioShareType = Maybe PortfolioShareType
a} :: ListAcceptedPortfolioShares)

instance Core.AWSPager ListAcceptedPortfolioShares where
  page :: ListAcceptedPortfolioShares
-> AWSResponse ListAcceptedPortfolioShares
-> Maybe ListAcceptedPortfolioShares
page ListAcceptedPortfolioShares
rq AWSResponse ListAcceptedPortfolioShares
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAcceptedPortfolioShares
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAcceptedPortfolioSharesResponse (Maybe Text)
listAcceptedPortfolioSharesResponse_nextPageToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAcceptedPortfolioShares
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAcceptedPortfolioSharesResponse (Maybe [PortfolioDetail])
listAcceptedPortfolioSharesResponse_portfolioDetails
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListAcceptedPortfolioShares
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListAcceptedPortfolioShares (Maybe Text)
listAcceptedPortfolioShares_pageToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAcceptedPortfolioShares
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAcceptedPortfolioSharesResponse (Maybe Text)
listAcceptedPortfolioSharesResponse_nextPageToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListAcceptedPortfolioShares where
  type
    AWSResponse ListAcceptedPortfolioShares =
      ListAcceptedPortfolioSharesResponse
  request :: (Service -> Service)
-> ListAcceptedPortfolioShares
-> Request ListAcceptedPortfolioShares
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListAcceptedPortfolioShares
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAcceptedPortfolioShares)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [PortfolioDetail]
-> Int
-> ListAcceptedPortfolioSharesResponse
ListAcceptedPortfolioSharesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextPageToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PortfolioDetails"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListAcceptedPortfolioShares where
  hashWithSalt :: Int -> ListAcceptedPortfolioShares -> Int
hashWithSalt Int
_salt ListAcceptedPortfolioShares' {Maybe Natural
Maybe Text
Maybe PortfolioShareType
portfolioShareType :: Maybe PortfolioShareType
pageToken :: Maybe Text
pageSize :: Maybe Natural
acceptLanguage :: Maybe Text
$sel:portfolioShareType:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe PortfolioShareType
$sel:pageToken:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Text
$sel:pageSize:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Natural
$sel:acceptLanguage:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
acceptLanguage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
pageSize
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pageToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PortfolioShareType
portfolioShareType

instance Prelude.NFData ListAcceptedPortfolioShares where
  rnf :: ListAcceptedPortfolioShares -> ()
rnf ListAcceptedPortfolioShares' {Maybe Natural
Maybe Text
Maybe PortfolioShareType
portfolioShareType :: Maybe PortfolioShareType
pageToken :: Maybe Text
pageSize :: Maybe Natural
acceptLanguage :: Maybe Text
$sel:portfolioShareType:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe PortfolioShareType
$sel:pageToken:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Text
$sel:pageSize:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Natural
$sel:acceptLanguage:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
acceptLanguage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
pageSize
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pageToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PortfolioShareType
portfolioShareType

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

instance Data.ToJSON ListAcceptedPortfolioShares where
  toJSON :: ListAcceptedPortfolioShares -> Value
toJSON ListAcceptedPortfolioShares' {Maybe Natural
Maybe Text
Maybe PortfolioShareType
portfolioShareType :: Maybe PortfolioShareType
pageToken :: Maybe Text
pageSize :: Maybe Natural
acceptLanguage :: Maybe Text
$sel:portfolioShareType:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe PortfolioShareType
$sel:pageToken:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Text
$sel:pageSize:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Natural
$sel:acceptLanguage:ListAcceptedPortfolioShares' :: ListAcceptedPortfolioShares -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AcceptLanguage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
acceptLanguage,
            (Key
"PageSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pageSize,
            (Key
"PageToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pageToken,
            (Key
"PortfolioShareType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PortfolioShareType
portfolioShareType
          ]
      )

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

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

-- | /See:/ 'newListAcceptedPortfolioSharesResponse' smart constructor.
data ListAcceptedPortfolioSharesResponse = ListAcceptedPortfolioSharesResponse'
  { -- | The page token to use to retrieve the next set of results. If there are
    -- no additional results, this value is null.
    ListAcceptedPortfolioSharesResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the portfolios.
    ListAcceptedPortfolioSharesResponse -> Maybe [PortfolioDetail]
portfolioDetails :: Prelude.Maybe [PortfolioDetail],
    -- | The response's http status code.
    ListAcceptedPortfolioSharesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListAcceptedPortfolioSharesResponse
-> ListAcceptedPortfolioSharesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAcceptedPortfolioSharesResponse
-> ListAcceptedPortfolioSharesResponse -> Bool
$c/= :: ListAcceptedPortfolioSharesResponse
-> ListAcceptedPortfolioSharesResponse -> Bool
== :: ListAcceptedPortfolioSharesResponse
-> ListAcceptedPortfolioSharesResponse -> Bool
$c== :: ListAcceptedPortfolioSharesResponse
-> ListAcceptedPortfolioSharesResponse -> Bool
Prelude.Eq, ReadPrec [ListAcceptedPortfolioSharesResponse]
ReadPrec ListAcceptedPortfolioSharesResponse
Int -> ReadS ListAcceptedPortfolioSharesResponse
ReadS [ListAcceptedPortfolioSharesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAcceptedPortfolioSharesResponse]
$creadListPrec :: ReadPrec [ListAcceptedPortfolioSharesResponse]
readPrec :: ReadPrec ListAcceptedPortfolioSharesResponse
$creadPrec :: ReadPrec ListAcceptedPortfolioSharesResponse
readList :: ReadS [ListAcceptedPortfolioSharesResponse]
$creadList :: ReadS [ListAcceptedPortfolioSharesResponse]
readsPrec :: Int -> ReadS ListAcceptedPortfolioSharesResponse
$creadsPrec :: Int -> ReadS ListAcceptedPortfolioSharesResponse
Prelude.Read, Int -> ListAcceptedPortfolioSharesResponse -> ShowS
[ListAcceptedPortfolioSharesResponse] -> ShowS
ListAcceptedPortfolioSharesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAcceptedPortfolioSharesResponse] -> ShowS
$cshowList :: [ListAcceptedPortfolioSharesResponse] -> ShowS
show :: ListAcceptedPortfolioSharesResponse -> String
$cshow :: ListAcceptedPortfolioSharesResponse -> String
showsPrec :: Int -> ListAcceptedPortfolioSharesResponse -> ShowS
$cshowsPrec :: Int -> ListAcceptedPortfolioSharesResponse -> ShowS
Prelude.Show, forall x.
Rep ListAcceptedPortfolioSharesResponse x
-> ListAcceptedPortfolioSharesResponse
forall x.
ListAcceptedPortfolioSharesResponse
-> Rep ListAcceptedPortfolioSharesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAcceptedPortfolioSharesResponse x
-> ListAcceptedPortfolioSharesResponse
$cfrom :: forall x.
ListAcceptedPortfolioSharesResponse
-> Rep ListAcceptedPortfolioSharesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAcceptedPortfolioSharesResponse' 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:
--
-- 'nextPageToken', 'listAcceptedPortfolioSharesResponse_nextPageToken' - The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
--
-- 'portfolioDetails', 'listAcceptedPortfolioSharesResponse_portfolioDetails' - Information about the portfolios.
--
-- 'httpStatus', 'listAcceptedPortfolioSharesResponse_httpStatus' - The response's http status code.
newListAcceptedPortfolioSharesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAcceptedPortfolioSharesResponse
newListAcceptedPortfolioSharesResponse :: Int -> ListAcceptedPortfolioSharesResponse
newListAcceptedPortfolioSharesResponse Int
pHttpStatus_ =
  ListAcceptedPortfolioSharesResponse'
    { $sel:nextPageToken:ListAcceptedPortfolioSharesResponse' :: Maybe Text
nextPageToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:portfolioDetails:ListAcceptedPortfolioSharesResponse' :: Maybe [PortfolioDetail]
portfolioDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAcceptedPortfolioSharesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
listAcceptedPortfolioSharesResponse_nextPageToken :: Lens.Lens' ListAcceptedPortfolioSharesResponse (Prelude.Maybe Prelude.Text)
listAcceptedPortfolioSharesResponse_nextPageToken :: Lens' ListAcceptedPortfolioSharesResponse (Maybe Text)
listAcceptedPortfolioSharesResponse_nextPageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAcceptedPortfolioSharesResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:ListAcceptedPortfolioSharesResponse' :: ListAcceptedPortfolioSharesResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: ListAcceptedPortfolioSharesResponse
s@ListAcceptedPortfolioSharesResponse' {} Maybe Text
a -> ListAcceptedPortfolioSharesResponse
s {$sel:nextPageToken:ListAcceptedPortfolioSharesResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: ListAcceptedPortfolioSharesResponse)

-- | Information about the portfolios.
listAcceptedPortfolioSharesResponse_portfolioDetails :: Lens.Lens' ListAcceptedPortfolioSharesResponse (Prelude.Maybe [PortfolioDetail])
listAcceptedPortfolioSharesResponse_portfolioDetails :: Lens' ListAcceptedPortfolioSharesResponse (Maybe [PortfolioDetail])
listAcceptedPortfolioSharesResponse_portfolioDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAcceptedPortfolioSharesResponse' {Maybe [PortfolioDetail]
portfolioDetails :: Maybe [PortfolioDetail]
$sel:portfolioDetails:ListAcceptedPortfolioSharesResponse' :: ListAcceptedPortfolioSharesResponse -> Maybe [PortfolioDetail]
portfolioDetails} -> Maybe [PortfolioDetail]
portfolioDetails) (\s :: ListAcceptedPortfolioSharesResponse
s@ListAcceptedPortfolioSharesResponse' {} Maybe [PortfolioDetail]
a -> ListAcceptedPortfolioSharesResponse
s {$sel:portfolioDetails:ListAcceptedPortfolioSharesResponse' :: Maybe [PortfolioDetail]
portfolioDetails = Maybe [PortfolioDetail]
a} :: ListAcceptedPortfolioSharesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListAcceptedPortfolioSharesResponse
  where
  rnf :: ListAcceptedPortfolioSharesResponse -> ()
rnf ListAcceptedPortfolioSharesResponse' {Int
Maybe [PortfolioDetail]
Maybe Text
httpStatus :: Int
portfolioDetails :: Maybe [PortfolioDetail]
nextPageToken :: Maybe Text
$sel:httpStatus:ListAcceptedPortfolioSharesResponse' :: ListAcceptedPortfolioSharesResponse -> Int
$sel:portfolioDetails:ListAcceptedPortfolioSharesResponse' :: ListAcceptedPortfolioSharesResponse -> Maybe [PortfolioDetail]
$sel:nextPageToken:ListAcceptedPortfolioSharesResponse' :: ListAcceptedPortfolioSharesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextPageToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PortfolioDetail]
portfolioDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus