{-# 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.ListLicenses
-- 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)
--
-- Lists the licenses for your account.
module Amazonka.LicenseManager.ListLicenses
  ( -- * Creating a Request
    ListLicenses (..),
    newListLicenses,

    -- * Request Lenses
    listLicenses_filters,
    listLicenses_nextToken,
    listLicenses_licenseArns,
    listLicenses_maxResults,

    -- * Destructuring the Response
    ListLicensesResponse (..),
    newListLicensesResponse,

    -- * Response Lenses
    listLicensesResponse_nextToken,
    listLicensesResponse_licenses,
    listLicensesResponse_httpStatus,
  )
where

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

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

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

-- | Filters to scope the results. The following filters are supported:
--
-- -   @Beneficiary@
--
-- -   @ProductSKU@
--
-- -   @Fingerprint@
--
-- -   @Status@
listLicenses_filters :: Lens.Lens' ListLicenses (Prelude.Maybe [Filter])
listLicenses_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> ListLicenses -> f ListLicenses
listLicenses_filters = (ListLicenses -> Maybe [Filter])
-> (ListLicenses -> Maybe [Filter] -> ListLicenses)
-> Lens ListLicenses ListLicenses (Maybe [Filter]) (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicenses' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListLicenses' :: ListLicenses -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListLicenses
s@ListLicenses' {} Maybe [Filter]
a -> ListLicenses
s {$sel:filters:ListLicenses' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListLicenses) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> ListLicenses -> f ListLicenses)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> ListLicenses
-> f ListLicenses
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
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.
listLicenses_nextToken :: Lens.Lens' ListLicenses (Prelude.Maybe Prelude.Text)
listLicenses_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListLicenses -> f ListLicenses
listLicenses_nextToken = (ListLicenses -> Maybe Text)
-> (ListLicenses -> Maybe Text -> ListLicenses)
-> Lens ListLicenses ListLicenses (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicenses' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLicenses' :: ListLicenses -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLicenses
s@ListLicenses' {} Maybe Text
a -> ListLicenses
s {$sel:nextToken:ListLicenses' :: Maybe Text
nextToken = Maybe Text
a} :: ListLicenses)

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

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

instance Prelude.NFData ListLicenses

instance Core.ToHeaders ListLicenses where
  toHeaders :: ListLicenses -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListLicenses -> 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
"AWSLicenseManager.ListLicenses" ::
                          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 ListLicenses where
  toJSON :: ListLicenses -> Value
toJSON ListLicenses' {Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
maxResults :: Maybe Natural
licenseArns :: Maybe [Text]
nextToken :: Maybe Text
filters :: Maybe [Filter]
$sel:maxResults:ListLicenses' :: ListLicenses -> Maybe Natural
$sel:licenseArns:ListLicenses' :: ListLicenses -> Maybe [Text]
$sel:nextToken:ListLicenses' :: ListLicenses -> Maybe Text
$sel:filters:ListLicenses' :: ListLicenses -> Maybe [Filter]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (Text
"NextToken" 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
nextToken,
            (Text
"LicenseArns" 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]
licenseArns,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

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

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

-- |
-- Create a value of 'ListLicensesResponse' 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:
--
-- 'nextToken', 'listLicensesResponse_nextToken' - Token for the next set of results.
--
-- 'licenses', 'listLicensesResponse_licenses' - License details.
--
-- 'httpStatus', 'listLicensesResponse_httpStatus' - The response's http status code.
newListLicensesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListLicensesResponse
newListLicensesResponse :: Int -> ListLicensesResponse
newListLicensesResponse Int
pHttpStatus_ =
  ListLicensesResponse' :: Maybe Text -> Maybe [License] -> Int -> ListLicensesResponse
ListLicensesResponse'
    { $sel:nextToken:ListLicensesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:licenses:ListLicensesResponse' :: Maybe [License]
licenses = Maybe [License]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListLicensesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | License details.
listLicensesResponse_licenses :: Lens.Lens' ListLicensesResponse (Prelude.Maybe [License])
listLicensesResponse_licenses :: (Maybe [License] -> f (Maybe [License]))
-> ListLicensesResponse -> f ListLicensesResponse
listLicensesResponse_licenses = (ListLicensesResponse -> Maybe [License])
-> (ListLicensesResponse
    -> Maybe [License] -> ListLicensesResponse)
-> Lens
     ListLicensesResponse
     ListLicensesResponse
     (Maybe [License])
     (Maybe [License])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicensesResponse' {Maybe [License]
licenses :: Maybe [License]
$sel:licenses:ListLicensesResponse' :: ListLicensesResponse -> Maybe [License]
licenses} -> Maybe [License]
licenses) (\s :: ListLicensesResponse
s@ListLicensesResponse' {} Maybe [License]
a -> ListLicensesResponse
s {$sel:licenses:ListLicensesResponse' :: Maybe [License]
licenses = Maybe [License]
a} :: ListLicensesResponse) ((Maybe [License] -> f (Maybe [License]))
 -> ListLicensesResponse -> f ListLicensesResponse)
-> ((Maybe [License] -> f (Maybe [License]))
    -> Maybe [License] -> f (Maybe [License]))
-> (Maybe [License] -> f (Maybe [License]))
-> ListLicensesResponse
-> f ListLicensesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [License] [License] [License] [License]
-> Iso
     (Maybe [License])
     (Maybe [License])
     (Maybe [License])
     (Maybe [License])
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 [License] [License] [License] [License]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListLicensesResponse