{-# 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.ListReceivedLicenses
-- 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 received licenses.
module Amazonka.LicenseManager.ListReceivedLicenses
  ( -- * Creating a Request
    ListReceivedLicenses (..),
    newListReceivedLicenses,

    -- * Request Lenses
    listReceivedLicenses_filters,
    listReceivedLicenses_licenseArns,
    listReceivedLicenses_maxResults,
    listReceivedLicenses_nextToken,

    -- * Destructuring the Response
    ListReceivedLicensesResponse (..),
    newListReceivedLicensesResponse,

    -- * Response Lenses
    listReceivedLicensesResponse_licenses,
    listReceivedLicensesResponse_nextToken,
    listReceivedLicensesResponse_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:/ 'newListReceivedLicenses' smart constructor.
data ListReceivedLicenses = ListReceivedLicenses'
  { -- | Filters to scope the results. The following filters are supported:
    --
    -- -   @ProductSKU@
    --
    -- -   @Status@
    --
    -- -   @Fingerprint@
    --
    -- -   @IssuerName@
    --
    -- -   @Beneficiary@
    ListReceivedLicenses -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | Amazon Resource Names (ARNs) of the licenses.
    ListReceivedLicenses -> Maybe [Text]
licenseArns :: Prelude.Maybe [Prelude.Text],
    -- | Maximum number of results to return in a single call.
    ListReceivedLicenses -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Token for the next set of results.
    ListReceivedLicenses -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListReceivedLicenses -> ListReceivedLicenses -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReceivedLicenses -> ListReceivedLicenses -> Bool
$c/= :: ListReceivedLicenses -> ListReceivedLicenses -> Bool
== :: ListReceivedLicenses -> ListReceivedLicenses -> Bool
$c== :: ListReceivedLicenses -> ListReceivedLicenses -> Bool
Prelude.Eq, ReadPrec [ListReceivedLicenses]
ReadPrec ListReceivedLicenses
Int -> ReadS ListReceivedLicenses
ReadS [ListReceivedLicenses]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReceivedLicenses]
$creadListPrec :: ReadPrec [ListReceivedLicenses]
readPrec :: ReadPrec ListReceivedLicenses
$creadPrec :: ReadPrec ListReceivedLicenses
readList :: ReadS [ListReceivedLicenses]
$creadList :: ReadS [ListReceivedLicenses]
readsPrec :: Int -> ReadS ListReceivedLicenses
$creadsPrec :: Int -> ReadS ListReceivedLicenses
Prelude.Read, Int -> ListReceivedLicenses -> ShowS
[ListReceivedLicenses] -> ShowS
ListReceivedLicenses -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReceivedLicenses] -> ShowS
$cshowList :: [ListReceivedLicenses] -> ShowS
show :: ListReceivedLicenses -> String
$cshow :: ListReceivedLicenses -> String
showsPrec :: Int -> ListReceivedLicenses -> ShowS
$cshowsPrec :: Int -> ListReceivedLicenses -> ShowS
Prelude.Show, forall x. Rep ListReceivedLicenses x -> ListReceivedLicenses
forall x. ListReceivedLicenses -> Rep ListReceivedLicenses x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListReceivedLicenses x -> ListReceivedLicenses
$cfrom :: forall x. ListReceivedLicenses -> Rep ListReceivedLicenses x
Prelude.Generic)

-- |
-- Create a value of 'ListReceivedLicenses' 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', 'listReceivedLicenses_filters' - Filters to scope the results. The following filters are supported:
--
-- -   @ProductSKU@
--
-- -   @Status@
--
-- -   @Fingerprint@
--
-- -   @IssuerName@
--
-- -   @Beneficiary@
--
-- 'licenseArns', 'listReceivedLicenses_licenseArns' - Amazon Resource Names (ARNs) of the licenses.
--
-- 'maxResults', 'listReceivedLicenses_maxResults' - Maximum number of results to return in a single call.
--
-- 'nextToken', 'listReceivedLicenses_nextToken' - Token for the next set of results.
newListReceivedLicenses ::
  ListReceivedLicenses
newListReceivedLicenses :: ListReceivedLicenses
newListReceivedLicenses =
  ListReceivedLicenses'
    { $sel:filters:ListReceivedLicenses' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:licenseArns:ListReceivedLicenses' :: Maybe [Text]
licenseArns = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListReceivedLicenses' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReceivedLicenses' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

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

-- | Amazon Resource Names (ARNs) of the licenses.
listReceivedLicenses_licenseArns :: Lens.Lens' ListReceivedLicenses (Prelude.Maybe [Prelude.Text])
listReceivedLicenses_licenseArns :: Lens' ListReceivedLicenses (Maybe [Text])
listReceivedLicenses_licenseArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReceivedLicenses' {Maybe [Text]
licenseArns :: Maybe [Text]
$sel:licenseArns:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe [Text]
licenseArns} -> Maybe [Text]
licenseArns) (\s :: ListReceivedLicenses
s@ListReceivedLicenses' {} Maybe [Text]
a -> ListReceivedLicenses
s {$sel:licenseArns:ListReceivedLicenses' :: Maybe [Text]
licenseArns = Maybe [Text]
a} :: ListReceivedLicenses) 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.
listReceivedLicenses_maxResults :: Lens.Lens' ListReceivedLicenses (Prelude.Maybe Prelude.Natural)
listReceivedLicenses_maxResults :: Lens' ListReceivedLicenses (Maybe Natural)
listReceivedLicenses_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReceivedLicenses' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListReceivedLicenses
s@ListReceivedLicenses' {} Maybe Natural
a -> ListReceivedLicenses
s {$sel:maxResults:ListReceivedLicenses' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListReceivedLicenses)

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

instance Core.AWSRequest ListReceivedLicenses where
  type
    AWSResponse ListReceivedLicenses =
      ListReceivedLicensesResponse
  request :: (Service -> Service)
-> ListReceivedLicenses -> Request ListReceivedLicenses
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 ListReceivedLicenses
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListReceivedLicenses)))
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 -> ListReceivedLicensesResponse
ListReceivedLicensesResponse'
            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 ListReceivedLicenses where
  hashWithSalt :: Int -> ListReceivedLicenses -> Int
hashWithSalt Int
_salt ListReceivedLicenses' {Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
licenseArns :: Maybe [Text]
filters :: Maybe [Filter]
$sel:nextToken:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe Text
$sel:maxResults:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe Natural
$sel:licenseArns:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe [Text]
$sel:filters:ListReceivedLicenses' :: ListReceivedLicenses -> 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 [Text]
licenseArns
      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 ListReceivedLicenses where
  rnf :: ListReceivedLicenses -> ()
rnf ListReceivedLicenses' {Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
licenseArns :: Maybe [Text]
filters :: Maybe [Filter]
$sel:nextToken:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe Text
$sel:maxResults:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe Natural
$sel:licenseArns:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe [Text]
$sel:filters:ListReceivedLicenses' :: ListReceivedLicenses -> 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 [Text]
licenseArns
      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 ListReceivedLicenses where
  toHeaders :: ListReceivedLicenses -> 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.ListReceivedLicenses" ::
                          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 ListReceivedLicenses where
  toJSON :: ListReceivedLicenses -> Value
toJSON ListReceivedLicenses' {Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
licenseArns :: Maybe [Text]
filters :: Maybe [Filter]
$sel:nextToken:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe Text
$sel:maxResults:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe Natural
$sel:licenseArns:ListReceivedLicenses' :: ListReceivedLicenses -> Maybe [Text]
$sel:filters:ListReceivedLicenses' :: ListReceivedLicenses -> 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
"LicenseArns" 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]
licenseArns,
            (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 ListReceivedLicenses where
  toPath :: ListReceivedLicenses -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListReceivedLicensesResponse' 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', 'listReceivedLicensesResponse_licenses' - Received license details.
--
-- 'nextToken', 'listReceivedLicensesResponse_nextToken' - Token for the next set of results.
--
-- 'httpStatus', 'listReceivedLicensesResponse_httpStatus' - The response's http status code.
newListReceivedLicensesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListReceivedLicensesResponse
newListReceivedLicensesResponse :: Int -> ListReceivedLicensesResponse
newListReceivedLicensesResponse Int
pHttpStatus_ =
  ListReceivedLicensesResponse'
    { $sel:licenses:ListReceivedLicensesResponse' :: Maybe [GrantedLicense]
licenses =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReceivedLicensesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListReceivedLicensesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Received license details.
listReceivedLicensesResponse_licenses :: Lens.Lens' ListReceivedLicensesResponse (Prelude.Maybe [GrantedLicense])
listReceivedLicensesResponse_licenses :: Lens' ListReceivedLicensesResponse (Maybe [GrantedLicense])
listReceivedLicensesResponse_licenses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReceivedLicensesResponse' {Maybe [GrantedLicense]
licenses :: Maybe [GrantedLicense]
$sel:licenses:ListReceivedLicensesResponse' :: ListReceivedLicensesResponse -> Maybe [GrantedLicense]
licenses} -> Maybe [GrantedLicense]
licenses) (\s :: ListReceivedLicensesResponse
s@ListReceivedLicensesResponse' {} Maybe [GrantedLicense]
a -> ListReceivedLicensesResponse
s {$sel:licenses:ListReceivedLicensesResponse' :: Maybe [GrantedLicense]
licenses = Maybe [GrantedLicense]
a} :: ListReceivedLicensesResponse) 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.
listReceivedLicensesResponse_nextToken :: Lens.Lens' ListReceivedLicensesResponse (Prelude.Maybe Prelude.Text)
listReceivedLicensesResponse_nextToken :: Lens' ListReceivedLicensesResponse (Maybe Text)
listReceivedLicensesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReceivedLicensesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReceivedLicensesResponse' :: ListReceivedLicensesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReceivedLicensesResponse
s@ListReceivedLicensesResponse' {} Maybe Text
a -> ListReceivedLicensesResponse
s {$sel:nextToken:ListReceivedLicensesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListReceivedLicensesResponse)

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

instance Prelude.NFData ListReceivedLicensesResponse where
  rnf :: ListReceivedLicensesResponse -> ()
rnf ListReceivedLicensesResponse' {Int
Maybe [GrantedLicense]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
licenses :: Maybe [GrantedLicense]
$sel:httpStatus:ListReceivedLicensesResponse' :: ListReceivedLicensesResponse -> Int
$sel:nextToken:ListReceivedLicensesResponse' :: ListReceivedLicensesResponse -> Maybe Text
$sel:licenses:ListReceivedLicensesResponse' :: ListReceivedLicensesResponse -> 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