{-# 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.DescribePortfolio
-- 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 information about the specified portfolio.
--
-- A delegated admin is authorized to invoke this command.
module Amazonka.ServiceCatalog.DescribePortfolio
  ( -- * Creating a Request
    DescribePortfolio (..),
    newDescribePortfolio,

    -- * Request Lenses
    describePortfolio_acceptLanguage,
    describePortfolio_id,

    -- * Destructuring the Response
    DescribePortfolioResponse (..),
    newDescribePortfolioResponse,

    -- * Response Lenses
    describePortfolioResponse_portfolioDetail,
    describePortfolioResponse_tagOptions,
    describePortfolioResponse_budgets,
    describePortfolioResponse_tags,
    describePortfolioResponse_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:/ 'newDescribePortfolio' smart constructor.
data DescribePortfolio = DescribePortfolio'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    DescribePortfolio -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The portfolio identifier.
    DescribePortfolio -> Text
id :: Prelude.Text
  }
  deriving (DescribePortfolio -> DescribePortfolio -> Bool
(DescribePortfolio -> DescribePortfolio -> Bool)
-> (DescribePortfolio -> DescribePortfolio -> Bool)
-> Eq DescribePortfolio
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePortfolio -> DescribePortfolio -> Bool
$c/= :: DescribePortfolio -> DescribePortfolio -> Bool
== :: DescribePortfolio -> DescribePortfolio -> Bool
$c== :: DescribePortfolio -> DescribePortfolio -> Bool
Prelude.Eq, ReadPrec [DescribePortfolio]
ReadPrec DescribePortfolio
Int -> ReadS DescribePortfolio
ReadS [DescribePortfolio]
(Int -> ReadS DescribePortfolio)
-> ReadS [DescribePortfolio]
-> ReadPrec DescribePortfolio
-> ReadPrec [DescribePortfolio]
-> Read DescribePortfolio
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePortfolio]
$creadListPrec :: ReadPrec [DescribePortfolio]
readPrec :: ReadPrec DescribePortfolio
$creadPrec :: ReadPrec DescribePortfolio
readList :: ReadS [DescribePortfolio]
$creadList :: ReadS [DescribePortfolio]
readsPrec :: Int -> ReadS DescribePortfolio
$creadsPrec :: Int -> ReadS DescribePortfolio
Prelude.Read, Int -> DescribePortfolio -> ShowS
[DescribePortfolio] -> ShowS
DescribePortfolio -> String
(Int -> DescribePortfolio -> ShowS)
-> (DescribePortfolio -> String)
-> ([DescribePortfolio] -> ShowS)
-> Show DescribePortfolio
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePortfolio] -> ShowS
$cshowList :: [DescribePortfolio] -> ShowS
show :: DescribePortfolio -> String
$cshow :: DescribePortfolio -> String
showsPrec :: Int -> DescribePortfolio -> ShowS
$cshowsPrec :: Int -> DescribePortfolio -> ShowS
Prelude.Show, (forall x. DescribePortfolio -> Rep DescribePortfolio x)
-> (forall x. Rep DescribePortfolio x -> DescribePortfolio)
-> Generic DescribePortfolio
forall x. Rep DescribePortfolio x -> DescribePortfolio
forall x. DescribePortfolio -> Rep DescribePortfolio x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribePortfolio x -> DescribePortfolio
$cfrom :: forall x. DescribePortfolio -> Rep DescribePortfolio x
Prelude.Generic)

-- |
-- Create a value of 'DescribePortfolio' 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', 'describePortfolio_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'id', 'describePortfolio_id' - The portfolio identifier.
newDescribePortfolio ::
  -- | 'id'
  Prelude.Text ->
  DescribePortfolio
newDescribePortfolio :: Text -> DescribePortfolio
newDescribePortfolio Text
pId_ =
  DescribePortfolio' :: Maybe Text -> Text -> DescribePortfolio
DescribePortfolio'
    { $sel:acceptLanguage:DescribePortfolio' :: Maybe Text
acceptLanguage =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:DescribePortfolio' :: Text
id = Text
pId_
    }

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

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

instance Core.AWSRequest DescribePortfolio where
  type
    AWSResponse DescribePortfolio =
      DescribePortfolioResponse
  request :: DescribePortfolio -> Request DescribePortfolio
request = Service -> DescribePortfolio -> Request DescribePortfolio
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribePortfolio
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribePortfolio)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribePortfolio))
-> Logger
-> Service
-> Proxy DescribePortfolio
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribePortfolio)))
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 PortfolioDetail
-> Maybe [TagOptionDetail]
-> Maybe [BudgetDetail]
-> Maybe [Tag]
-> Int
-> DescribePortfolioResponse
DescribePortfolioResponse'
            (Maybe PortfolioDetail
 -> Maybe [TagOptionDetail]
 -> Maybe [BudgetDetail]
 -> Maybe [Tag]
 -> Int
 -> DescribePortfolioResponse)
-> Either String (Maybe PortfolioDetail)
-> Either
     String
     (Maybe [TagOptionDetail]
      -> Maybe [BudgetDetail]
      -> Maybe [Tag]
      -> Int
      -> DescribePortfolioResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe PortfolioDetail)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PortfolioDetail")
            Either
  String
  (Maybe [TagOptionDetail]
   -> Maybe [BudgetDetail]
   -> Maybe [Tag]
   -> Int
   -> DescribePortfolioResponse)
-> Either String (Maybe [TagOptionDetail])
-> Either
     String
     (Maybe [BudgetDetail]
      -> Maybe [Tag] -> Int -> DescribePortfolioResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [TagOptionDetail]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TagOptions" Either String (Maybe (Maybe [TagOptionDetail]))
-> Maybe [TagOptionDetail]
-> Either String (Maybe [TagOptionDetail])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [TagOptionDetail]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe [BudgetDetail]
   -> Maybe [Tag] -> Int -> DescribePortfolioResponse)
-> Either String (Maybe [BudgetDetail])
-> Either String (Maybe [Tag] -> Int -> DescribePortfolioResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [BudgetDetail]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Budgets" Either String (Maybe (Maybe [BudgetDetail]))
-> Maybe [BudgetDetail] -> Either String (Maybe [BudgetDetail])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [BudgetDetail]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe [Tag] -> Int -> DescribePortfolioResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> DescribePortfolioResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe [Tag]))
-> Maybe [Tag] -> Either String (Maybe [Tag])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribePortfolioResponse)
-> Either String Int -> Either String DescribePortfolioResponse
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 DescribePortfolio

instance Prelude.NFData DescribePortfolio

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

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

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

-- | /See:/ 'newDescribePortfolioResponse' smart constructor.
data DescribePortfolioResponse = DescribePortfolioResponse'
  { -- | Information about the portfolio.
    DescribePortfolioResponse -> Maybe PortfolioDetail
portfolioDetail :: Prelude.Maybe PortfolioDetail,
    -- | Information about the TagOptions associated with the portfolio.
    DescribePortfolioResponse -> Maybe [TagOptionDetail]
tagOptions :: Prelude.Maybe [TagOptionDetail],
    -- | Information about the associated budgets.
    DescribePortfolioResponse -> Maybe [BudgetDetail]
budgets :: Prelude.Maybe [BudgetDetail],
    -- | Information about the tags associated with the portfolio.
    DescribePortfolioResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The response's http status code.
    DescribePortfolioResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribePortfolioResponse -> DescribePortfolioResponse -> Bool
(DescribePortfolioResponse -> DescribePortfolioResponse -> Bool)
-> (DescribePortfolioResponse -> DescribePortfolioResponse -> Bool)
-> Eq DescribePortfolioResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePortfolioResponse -> DescribePortfolioResponse -> Bool
$c/= :: DescribePortfolioResponse -> DescribePortfolioResponse -> Bool
== :: DescribePortfolioResponse -> DescribePortfolioResponse -> Bool
$c== :: DescribePortfolioResponse -> DescribePortfolioResponse -> Bool
Prelude.Eq, ReadPrec [DescribePortfolioResponse]
ReadPrec DescribePortfolioResponse
Int -> ReadS DescribePortfolioResponse
ReadS [DescribePortfolioResponse]
(Int -> ReadS DescribePortfolioResponse)
-> ReadS [DescribePortfolioResponse]
-> ReadPrec DescribePortfolioResponse
-> ReadPrec [DescribePortfolioResponse]
-> Read DescribePortfolioResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePortfolioResponse]
$creadListPrec :: ReadPrec [DescribePortfolioResponse]
readPrec :: ReadPrec DescribePortfolioResponse
$creadPrec :: ReadPrec DescribePortfolioResponse
readList :: ReadS [DescribePortfolioResponse]
$creadList :: ReadS [DescribePortfolioResponse]
readsPrec :: Int -> ReadS DescribePortfolioResponse
$creadsPrec :: Int -> ReadS DescribePortfolioResponse
Prelude.Read, Int -> DescribePortfolioResponse -> ShowS
[DescribePortfolioResponse] -> ShowS
DescribePortfolioResponse -> String
(Int -> DescribePortfolioResponse -> ShowS)
-> (DescribePortfolioResponse -> String)
-> ([DescribePortfolioResponse] -> ShowS)
-> Show DescribePortfolioResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePortfolioResponse] -> ShowS
$cshowList :: [DescribePortfolioResponse] -> ShowS
show :: DescribePortfolioResponse -> String
$cshow :: DescribePortfolioResponse -> String
showsPrec :: Int -> DescribePortfolioResponse -> ShowS
$cshowsPrec :: Int -> DescribePortfolioResponse -> ShowS
Prelude.Show, (forall x.
 DescribePortfolioResponse -> Rep DescribePortfolioResponse x)
-> (forall x.
    Rep DescribePortfolioResponse x -> DescribePortfolioResponse)
-> Generic DescribePortfolioResponse
forall x.
Rep DescribePortfolioResponse x -> DescribePortfolioResponse
forall x.
DescribePortfolioResponse -> Rep DescribePortfolioResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePortfolioResponse x -> DescribePortfolioResponse
$cfrom :: forall x.
DescribePortfolioResponse -> Rep DescribePortfolioResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribePortfolioResponse' 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:
--
-- 'portfolioDetail', 'describePortfolioResponse_portfolioDetail' - Information about the portfolio.
--
-- 'tagOptions', 'describePortfolioResponse_tagOptions' - Information about the TagOptions associated with the portfolio.
--
-- 'budgets', 'describePortfolioResponse_budgets' - Information about the associated budgets.
--
-- 'tags', 'describePortfolioResponse_tags' - Information about the tags associated with the portfolio.
--
-- 'httpStatus', 'describePortfolioResponse_httpStatus' - The response's http status code.
newDescribePortfolioResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribePortfolioResponse
newDescribePortfolioResponse :: Int -> DescribePortfolioResponse
newDescribePortfolioResponse Int
pHttpStatus_ =
  DescribePortfolioResponse' :: Maybe PortfolioDetail
-> Maybe [TagOptionDetail]
-> Maybe [BudgetDetail]
-> Maybe [Tag]
-> Int
-> DescribePortfolioResponse
DescribePortfolioResponse'
    { $sel:portfolioDetail:DescribePortfolioResponse' :: Maybe PortfolioDetail
portfolioDetail =
        Maybe PortfolioDetail
forall a. Maybe a
Prelude.Nothing,
      $sel:tagOptions:DescribePortfolioResponse' :: Maybe [TagOptionDetail]
tagOptions = Maybe [TagOptionDetail]
forall a. Maybe a
Prelude.Nothing,
      $sel:budgets:DescribePortfolioResponse' :: Maybe [BudgetDetail]
budgets = Maybe [BudgetDetail]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribePortfolioResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribePortfolioResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the portfolio.
describePortfolioResponse_portfolioDetail :: Lens.Lens' DescribePortfolioResponse (Prelude.Maybe PortfolioDetail)
describePortfolioResponse_portfolioDetail :: (Maybe PortfolioDetail -> f (Maybe PortfolioDetail))
-> DescribePortfolioResponse -> f DescribePortfolioResponse
describePortfolioResponse_portfolioDetail = (DescribePortfolioResponse -> Maybe PortfolioDetail)
-> (DescribePortfolioResponse
    -> Maybe PortfolioDetail -> DescribePortfolioResponse)
-> Lens
     DescribePortfolioResponse
     DescribePortfolioResponse
     (Maybe PortfolioDetail)
     (Maybe PortfolioDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePortfolioResponse' {Maybe PortfolioDetail
portfolioDetail :: Maybe PortfolioDetail
$sel:portfolioDetail:DescribePortfolioResponse' :: DescribePortfolioResponse -> Maybe PortfolioDetail
portfolioDetail} -> Maybe PortfolioDetail
portfolioDetail) (\s :: DescribePortfolioResponse
s@DescribePortfolioResponse' {} Maybe PortfolioDetail
a -> DescribePortfolioResponse
s {$sel:portfolioDetail:DescribePortfolioResponse' :: Maybe PortfolioDetail
portfolioDetail = Maybe PortfolioDetail
a} :: DescribePortfolioResponse)

-- | Information about the TagOptions associated with the portfolio.
describePortfolioResponse_tagOptions :: Lens.Lens' DescribePortfolioResponse (Prelude.Maybe [TagOptionDetail])
describePortfolioResponse_tagOptions :: (Maybe [TagOptionDetail] -> f (Maybe [TagOptionDetail]))
-> DescribePortfolioResponse -> f DescribePortfolioResponse
describePortfolioResponse_tagOptions = (DescribePortfolioResponse -> Maybe [TagOptionDetail])
-> (DescribePortfolioResponse
    -> Maybe [TagOptionDetail] -> DescribePortfolioResponse)
-> Lens
     DescribePortfolioResponse
     DescribePortfolioResponse
     (Maybe [TagOptionDetail])
     (Maybe [TagOptionDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePortfolioResponse' {Maybe [TagOptionDetail]
tagOptions :: Maybe [TagOptionDetail]
$sel:tagOptions:DescribePortfolioResponse' :: DescribePortfolioResponse -> Maybe [TagOptionDetail]
tagOptions} -> Maybe [TagOptionDetail]
tagOptions) (\s :: DescribePortfolioResponse
s@DescribePortfolioResponse' {} Maybe [TagOptionDetail]
a -> DescribePortfolioResponse
s {$sel:tagOptions:DescribePortfolioResponse' :: Maybe [TagOptionDetail]
tagOptions = Maybe [TagOptionDetail]
a} :: DescribePortfolioResponse) ((Maybe [TagOptionDetail] -> f (Maybe [TagOptionDetail]))
 -> DescribePortfolioResponse -> f DescribePortfolioResponse)
-> ((Maybe [TagOptionDetail] -> f (Maybe [TagOptionDetail]))
    -> Maybe [TagOptionDetail] -> f (Maybe [TagOptionDetail]))
-> (Maybe [TagOptionDetail] -> f (Maybe [TagOptionDetail]))
-> DescribePortfolioResponse
-> f DescribePortfolioResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [TagOptionDetail]
  [TagOptionDetail]
  [TagOptionDetail]
  [TagOptionDetail]
-> Iso
     (Maybe [TagOptionDetail])
     (Maybe [TagOptionDetail])
     (Maybe [TagOptionDetail])
     (Maybe [TagOptionDetail])
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
  [TagOptionDetail]
  [TagOptionDetail]
  [TagOptionDetail]
  [TagOptionDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about the associated budgets.
describePortfolioResponse_budgets :: Lens.Lens' DescribePortfolioResponse (Prelude.Maybe [BudgetDetail])
describePortfolioResponse_budgets :: (Maybe [BudgetDetail] -> f (Maybe [BudgetDetail]))
-> DescribePortfolioResponse -> f DescribePortfolioResponse
describePortfolioResponse_budgets = (DescribePortfolioResponse -> Maybe [BudgetDetail])
-> (DescribePortfolioResponse
    -> Maybe [BudgetDetail] -> DescribePortfolioResponse)
-> Lens
     DescribePortfolioResponse
     DescribePortfolioResponse
     (Maybe [BudgetDetail])
     (Maybe [BudgetDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePortfolioResponse' {Maybe [BudgetDetail]
budgets :: Maybe [BudgetDetail]
$sel:budgets:DescribePortfolioResponse' :: DescribePortfolioResponse -> Maybe [BudgetDetail]
budgets} -> Maybe [BudgetDetail]
budgets) (\s :: DescribePortfolioResponse
s@DescribePortfolioResponse' {} Maybe [BudgetDetail]
a -> DescribePortfolioResponse
s {$sel:budgets:DescribePortfolioResponse' :: Maybe [BudgetDetail]
budgets = Maybe [BudgetDetail]
a} :: DescribePortfolioResponse) ((Maybe [BudgetDetail] -> f (Maybe [BudgetDetail]))
 -> DescribePortfolioResponse -> f DescribePortfolioResponse)
-> ((Maybe [BudgetDetail] -> f (Maybe [BudgetDetail]))
    -> Maybe [BudgetDetail] -> f (Maybe [BudgetDetail]))
-> (Maybe [BudgetDetail] -> f (Maybe [BudgetDetail]))
-> DescribePortfolioResponse
-> f DescribePortfolioResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [BudgetDetail] [BudgetDetail] [BudgetDetail] [BudgetDetail]
-> Iso
     (Maybe [BudgetDetail])
     (Maybe [BudgetDetail])
     (Maybe [BudgetDetail])
     (Maybe [BudgetDetail])
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 [BudgetDetail] [BudgetDetail] [BudgetDetail] [BudgetDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about the tags associated with the portfolio.
describePortfolioResponse_tags :: Lens.Lens' DescribePortfolioResponse (Prelude.Maybe [Tag])
describePortfolioResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> DescribePortfolioResponse -> f DescribePortfolioResponse
describePortfolioResponse_tags = (DescribePortfolioResponse -> Maybe [Tag])
-> (DescribePortfolioResponse
    -> Maybe [Tag] -> DescribePortfolioResponse)
-> Lens
     DescribePortfolioResponse
     DescribePortfolioResponse
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePortfolioResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:DescribePortfolioResponse' :: DescribePortfolioResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: DescribePortfolioResponse
s@DescribePortfolioResponse' {} Maybe [Tag]
a -> DescribePortfolioResponse
s {$sel:tags:DescribePortfolioResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: DescribePortfolioResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> DescribePortfolioResponse -> f DescribePortfolioResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> DescribePortfolioResponse
-> f DescribePortfolioResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribePortfolioResponse