{-# 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.LicenseManager.ListReceivedLicensesForOrganization
-- 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 the licenses received for all accounts in the organization.
module Amazonka.LicenseManager.ListReceivedLicensesForOrganization
  ( -- * Creating a Request
    ListReceivedLicensesForOrganization (..),
    newListReceivedLicensesForOrganization,

    -- * Request Lenses
    listReceivedLicensesForOrganization_filters,
    listReceivedLicensesForOrganization_maxResults,
    listReceivedLicensesForOrganization_nextToken,

    -- * Destructuring the Response
    ListReceivedLicensesForOrganizationResponse (..),
    newListReceivedLicensesForOrganizationResponse,

    -- * Response Lenses
    listReceivedLicensesForOrganizationResponse_licenses,
    listReceivedLicensesForOrganizationResponse_nextToken,
    listReceivedLicensesForOrganizationResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListReceivedLicensesForOrganization' smart constructor.
data ListReceivedLicensesForOrganization = ListReceivedLicensesForOrganization'
  { -- | Filters to scope the results. The following filters are supported:
    --
    -- -   @Beneficiary@
    --
    -- -   @ProductSKU@
    ListReceivedLicensesForOrganization -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | Maximum number of results to return in a single call.
    ListReceivedLicensesForOrganization -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Token for the next set of results.
    ListReceivedLicensesForOrganization -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListReceivedLicensesForOrganization
-> ListReceivedLicensesForOrganization -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReceivedLicensesForOrganization
-> ListReceivedLicensesForOrganization -> Bool
$c/= :: ListReceivedLicensesForOrganization
-> ListReceivedLicensesForOrganization -> Bool
== :: ListReceivedLicensesForOrganization
-> ListReceivedLicensesForOrganization -> Bool
$c== :: ListReceivedLicensesForOrganization
-> ListReceivedLicensesForOrganization -> Bool
Prelude.Eq, ReadPrec [ListReceivedLicensesForOrganization]
ReadPrec ListReceivedLicensesForOrganization
Int -> ReadS ListReceivedLicensesForOrganization
ReadS [ListReceivedLicensesForOrganization]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReceivedLicensesForOrganization]
$creadListPrec :: ReadPrec [ListReceivedLicensesForOrganization]
readPrec :: ReadPrec ListReceivedLicensesForOrganization
$creadPrec :: ReadPrec ListReceivedLicensesForOrganization
readList :: ReadS [ListReceivedLicensesForOrganization]
$creadList :: ReadS [ListReceivedLicensesForOrganization]
readsPrec :: Int -> ReadS ListReceivedLicensesForOrganization
$creadsPrec :: Int -> ReadS ListReceivedLicensesForOrganization
Prelude.Read, Int -> ListReceivedLicensesForOrganization -> ShowS
[ListReceivedLicensesForOrganization] -> ShowS
ListReceivedLicensesForOrganization -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReceivedLicensesForOrganization] -> ShowS
$cshowList :: [ListReceivedLicensesForOrganization] -> ShowS
show :: ListReceivedLicensesForOrganization -> String
$cshow :: ListReceivedLicensesForOrganization -> String
showsPrec :: Int -> ListReceivedLicensesForOrganization -> ShowS
$cshowsPrec :: Int -> ListReceivedLicensesForOrganization -> ShowS
Prelude.Show, forall x.
Rep ListReceivedLicensesForOrganization x
-> ListReceivedLicensesForOrganization
forall x.
ListReceivedLicensesForOrganization
-> Rep ListReceivedLicensesForOrganization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListReceivedLicensesForOrganization x
-> ListReceivedLicensesForOrganization
$cfrom :: forall x.
ListReceivedLicensesForOrganization
-> Rep ListReceivedLicensesForOrganization x
Prelude.Generic)

-- |
-- Create a value of 'ListReceivedLicensesForOrganization' 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:
--
-- 'filters', 'listReceivedLicensesForOrganization_filters' - Filters to scope the results. The following filters are supported:
--
-- -   @Beneficiary@
--
-- -   @ProductSKU@
--
-- 'maxResults', 'listReceivedLicensesForOrganization_maxResults' - Maximum number of results to return in a single call.
--
-- 'nextToken', 'listReceivedLicensesForOrganization_nextToken' - Token for the next set of results.
newListReceivedLicensesForOrganization ::
  ListReceivedLicensesForOrganization
newListReceivedLicensesForOrganization :: ListReceivedLicensesForOrganization
newListReceivedLicensesForOrganization =
  ListReceivedLicensesForOrganization'
    { $sel:filters:ListReceivedLicensesForOrganization' :: Maybe [Filter]
filters =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListReceivedLicensesForOrganization' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReceivedLicensesForOrganization' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Filters to scope the results. The following filters are supported:
--
-- -   @Beneficiary@
--
-- -   @ProductSKU@
listReceivedLicensesForOrganization_filters :: Lens.Lens' ListReceivedLicensesForOrganization (Prelude.Maybe [Filter])
listReceivedLicensesForOrganization_filters :: Lens' ListReceivedLicensesForOrganization (Maybe [Filter])
listReceivedLicensesForOrganization_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReceivedLicensesForOrganization' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListReceivedLicensesForOrganization
s@ListReceivedLicensesForOrganization' {} Maybe [Filter]
a -> ListReceivedLicensesForOrganization
s {$sel:filters:ListReceivedLicensesForOrganization' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListReceivedLicensesForOrganization) 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

-- | Maximum number of results to return in a single call.
listReceivedLicensesForOrganization_maxResults :: Lens.Lens' ListReceivedLicensesForOrganization (Prelude.Maybe Prelude.Natural)
listReceivedLicensesForOrganization_maxResults :: Lens' ListReceivedLicensesForOrganization (Maybe Natural)
listReceivedLicensesForOrganization_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReceivedLicensesForOrganization' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListReceivedLicensesForOrganization
s@ListReceivedLicensesForOrganization' {} Maybe Natural
a -> ListReceivedLicensesForOrganization
s {$sel:maxResults:ListReceivedLicensesForOrganization' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListReceivedLicensesForOrganization)

-- | Token for the next set of results.
listReceivedLicensesForOrganization_nextToken :: Lens.Lens' ListReceivedLicensesForOrganization (Prelude.Maybe Prelude.Text)
listReceivedLicensesForOrganization_nextToken :: Lens' ListReceivedLicensesForOrganization (Maybe Text)
listReceivedLicensesForOrganization_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReceivedLicensesForOrganization' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReceivedLicensesForOrganization
s@ListReceivedLicensesForOrganization' {} Maybe Text
a -> ListReceivedLicensesForOrganization
s {$sel:nextToken:ListReceivedLicensesForOrganization' :: Maybe Text
nextToken = Maybe Text
a} :: ListReceivedLicensesForOrganization)

instance
  Core.AWSRequest
    ListReceivedLicensesForOrganization
  where
  type
    AWSResponse ListReceivedLicensesForOrganization =
      ListReceivedLicensesForOrganizationResponse
  request :: (Service -> Service)
-> ListReceivedLicensesForOrganization
-> Request ListReceivedLicensesForOrganization
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 ListReceivedLicensesForOrganization
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListReceivedLicensesForOrganization)))
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 [GrantedLicense]
-> Maybe Text -> Int -> ListReceivedLicensesForOrganizationResponse
ListReceivedLicensesForOrganizationResponse'
            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
"Licenses" 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.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            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
    ListReceivedLicensesForOrganization
  where
  hashWithSalt :: Int -> ListReceivedLicensesForOrganization -> Int
hashWithSalt
    Int
_salt
    ListReceivedLicensesForOrganization' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe Text
$sel:maxResults:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe Natural
$sel:filters:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe [Filter]
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance
  Prelude.NFData
    ListReceivedLicensesForOrganization
  where
  rnf :: ListReceivedLicensesForOrganization -> ()
rnf ListReceivedLicensesForOrganization' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe Text
$sel:maxResults:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe Natural
$sel:filters:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe [Filter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance
  Data.ToHeaders
    ListReceivedLicensesForOrganization
  where
  toHeaders :: ListReceivedLicensesForOrganization -> 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
"AWSLicenseManager.ListReceivedLicensesForOrganization" ::
                          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
    ListReceivedLicensesForOrganization
  where
  toJSON :: ListReceivedLicensesForOrganization -> Value
toJSON ListReceivedLicensesForOrganization' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe Text
$sel:maxResults:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe Natural
$sel:filters:ListReceivedLicensesForOrganization' :: ListReceivedLicensesForOrganization -> Maybe [Filter]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filters" 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 [Filter]
filters,
            (Key
"MaxResults" 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
maxResults,
            (Key
"NextToken" 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
nextToken
          ]
      )

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

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

-- | /See:/ 'newListReceivedLicensesForOrganizationResponse' smart constructor.
data ListReceivedLicensesForOrganizationResponse = ListReceivedLicensesForOrganizationResponse'
  { -- | Lists the licenses the organization has received.
    ListReceivedLicensesForOrganizationResponse
-> Maybe [GrantedLicense]
licenses :: Prelude.Maybe [GrantedLicense],
    -- | Token for the next set of results.
    ListReceivedLicensesForOrganizationResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListReceivedLicensesForOrganizationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListReceivedLicensesForOrganizationResponse
-> ListReceivedLicensesForOrganizationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReceivedLicensesForOrganizationResponse
-> ListReceivedLicensesForOrganizationResponse -> Bool
$c/= :: ListReceivedLicensesForOrganizationResponse
-> ListReceivedLicensesForOrganizationResponse -> Bool
== :: ListReceivedLicensesForOrganizationResponse
-> ListReceivedLicensesForOrganizationResponse -> Bool
$c== :: ListReceivedLicensesForOrganizationResponse
-> ListReceivedLicensesForOrganizationResponse -> Bool
Prelude.Eq, ReadPrec [ListReceivedLicensesForOrganizationResponse]
ReadPrec ListReceivedLicensesForOrganizationResponse
Int -> ReadS ListReceivedLicensesForOrganizationResponse
ReadS [ListReceivedLicensesForOrganizationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReceivedLicensesForOrganizationResponse]
$creadListPrec :: ReadPrec [ListReceivedLicensesForOrganizationResponse]
readPrec :: ReadPrec ListReceivedLicensesForOrganizationResponse
$creadPrec :: ReadPrec ListReceivedLicensesForOrganizationResponse
readList :: ReadS [ListReceivedLicensesForOrganizationResponse]
$creadList :: ReadS [ListReceivedLicensesForOrganizationResponse]
readsPrec :: Int -> ReadS ListReceivedLicensesForOrganizationResponse
$creadsPrec :: Int -> ReadS ListReceivedLicensesForOrganizationResponse
Prelude.Read, Int -> ListReceivedLicensesForOrganizationResponse -> ShowS
[ListReceivedLicensesForOrganizationResponse] -> ShowS
ListReceivedLicensesForOrganizationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReceivedLicensesForOrganizationResponse] -> ShowS
$cshowList :: [ListReceivedLicensesForOrganizationResponse] -> ShowS
show :: ListReceivedLicensesForOrganizationResponse -> String
$cshow :: ListReceivedLicensesForOrganizationResponse -> String
showsPrec :: Int -> ListReceivedLicensesForOrganizationResponse -> ShowS
$cshowsPrec :: Int -> ListReceivedLicensesForOrganizationResponse -> ShowS
Prelude.Show, forall x.
Rep ListReceivedLicensesForOrganizationResponse x
-> ListReceivedLicensesForOrganizationResponse
forall x.
ListReceivedLicensesForOrganizationResponse
-> Rep ListReceivedLicensesForOrganizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListReceivedLicensesForOrganizationResponse x
-> ListReceivedLicensesForOrganizationResponse
$cfrom :: forall x.
ListReceivedLicensesForOrganizationResponse
-> Rep ListReceivedLicensesForOrganizationResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListReceivedLicensesForOrganizationResponse' 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:
--
-- 'licenses', 'listReceivedLicensesForOrganizationResponse_licenses' - Lists the licenses the organization has received.
--
-- 'nextToken', 'listReceivedLicensesForOrganizationResponse_nextToken' - Token for the next set of results.
--
-- 'httpStatus', 'listReceivedLicensesForOrganizationResponse_httpStatus' - The response's http status code.
newListReceivedLicensesForOrganizationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListReceivedLicensesForOrganizationResponse
newListReceivedLicensesForOrganizationResponse :: Int -> ListReceivedLicensesForOrganizationResponse
newListReceivedLicensesForOrganizationResponse
  Int
pHttpStatus_ =
    ListReceivedLicensesForOrganizationResponse'
      { $sel:licenses:ListReceivedLicensesForOrganizationResponse' :: Maybe [GrantedLicense]
licenses =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListReceivedLicensesForOrganizationResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListReceivedLicensesForOrganizationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Lists the licenses the organization has received.
listReceivedLicensesForOrganizationResponse_licenses :: Lens.Lens' ListReceivedLicensesForOrganizationResponse (Prelude.Maybe [GrantedLicense])
listReceivedLicensesForOrganizationResponse_licenses :: Lens'
  ListReceivedLicensesForOrganizationResponse
  (Maybe [GrantedLicense])
listReceivedLicensesForOrganizationResponse_licenses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReceivedLicensesForOrganizationResponse' {Maybe [GrantedLicense]
licenses :: Maybe [GrantedLicense]
$sel:licenses:ListReceivedLicensesForOrganizationResponse' :: ListReceivedLicensesForOrganizationResponse
-> Maybe [GrantedLicense]
licenses} -> Maybe [GrantedLicense]
licenses) (\s :: ListReceivedLicensesForOrganizationResponse
s@ListReceivedLicensesForOrganizationResponse' {} Maybe [GrantedLicense]
a -> ListReceivedLicensesForOrganizationResponse
s {$sel:licenses:ListReceivedLicensesForOrganizationResponse' :: Maybe [GrantedLicense]
licenses = Maybe [GrantedLicense]
a} :: ListReceivedLicensesForOrganizationResponse) 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

-- | Token for the next set of results.
listReceivedLicensesForOrganizationResponse_nextToken :: Lens.Lens' ListReceivedLicensesForOrganizationResponse (Prelude.Maybe Prelude.Text)
listReceivedLicensesForOrganizationResponse_nextToken :: Lens' ListReceivedLicensesForOrganizationResponse (Maybe Text)
listReceivedLicensesForOrganizationResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReceivedLicensesForOrganizationResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReceivedLicensesForOrganizationResponse' :: ListReceivedLicensesForOrganizationResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReceivedLicensesForOrganizationResponse
s@ListReceivedLicensesForOrganizationResponse' {} Maybe Text
a -> ListReceivedLicensesForOrganizationResponse
s {$sel:nextToken:ListReceivedLicensesForOrganizationResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListReceivedLicensesForOrganizationResponse)

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

instance
  Prelude.NFData
    ListReceivedLicensesForOrganizationResponse
  where
  rnf :: ListReceivedLicensesForOrganizationResponse -> ()
rnf ListReceivedLicensesForOrganizationResponse' {Int
Maybe [GrantedLicense]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
licenses :: Maybe [GrantedLicense]
$sel:httpStatus:ListReceivedLicensesForOrganizationResponse' :: ListReceivedLicensesForOrganizationResponse -> Int
$sel:nextToken:ListReceivedLicensesForOrganizationResponse' :: ListReceivedLicensesForOrganizationResponse -> Maybe Text
$sel:licenses:ListReceivedLicensesForOrganizationResponse' :: ListReceivedLicensesForOrganizationResponse
-> Maybe [GrantedLicense]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [GrantedLicense]
licenses
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus