{-# 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.ListLicenseConfigurations
-- 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 license configurations for your account.
--
-- This operation returns paginated results.
module Amazonka.LicenseManager.ListLicenseConfigurations
  ( -- * Creating a Request
    ListLicenseConfigurations (..),
    newListLicenseConfigurations,

    -- * Request Lenses
    listLicenseConfigurations_filters,
    listLicenseConfigurations_licenseConfigurationArns,
    listLicenseConfigurations_maxResults,
    listLicenseConfigurations_nextToken,

    -- * Destructuring the Response
    ListLicenseConfigurationsResponse (..),
    newListLicenseConfigurationsResponse,

    -- * Response Lenses
    listLicenseConfigurationsResponse_licenseConfigurations,
    listLicenseConfigurationsResponse_nextToken,
    listLicenseConfigurationsResponse_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:/ 'newListLicenseConfigurations' smart constructor.
data ListLicenseConfigurations = ListLicenseConfigurations'
  { -- | Filters to scope the results. The following filters and logical
    -- operators are supported:
    --
    -- -   @licenseCountingType@ - The dimension for which licenses are
    --     counted. Possible values are @vCPU@ | @Instance@ | @Core@ |
    --     @Socket@. Logical operators are @EQUALS@ | @NOT_EQUALS@.
    --
    -- -   @enforceLicenseCount@ - A Boolean value that indicates whether hard
    --     license enforcement is used. Logical operators are @EQUALS@ |
    --     @NOT_EQUALS@.
    --
    -- -   @usagelimitExceeded@ - A Boolean value that indicates whether the
    --     available licenses have been exceeded. Logical operators are
    --     @EQUALS@ | @NOT_EQUALS@.
    ListLicenseConfigurations -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | Amazon Resource Names (ARN) of the license configurations.
    ListLicenseConfigurations -> Maybe [Text]
licenseConfigurationArns :: Prelude.Maybe [Prelude.Text],
    -- | Maximum number of results to return in a single call.
    ListLicenseConfigurations -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | Token for the next set of results.
    ListLicenseConfigurations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListLicenseConfigurations -> ListLicenseConfigurations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLicenseConfigurations -> ListLicenseConfigurations -> Bool
$c/= :: ListLicenseConfigurations -> ListLicenseConfigurations -> Bool
== :: ListLicenseConfigurations -> ListLicenseConfigurations -> Bool
$c== :: ListLicenseConfigurations -> ListLicenseConfigurations -> Bool
Prelude.Eq, ReadPrec [ListLicenseConfigurations]
ReadPrec ListLicenseConfigurations
Int -> ReadS ListLicenseConfigurations
ReadS [ListLicenseConfigurations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLicenseConfigurations]
$creadListPrec :: ReadPrec [ListLicenseConfigurations]
readPrec :: ReadPrec ListLicenseConfigurations
$creadPrec :: ReadPrec ListLicenseConfigurations
readList :: ReadS [ListLicenseConfigurations]
$creadList :: ReadS [ListLicenseConfigurations]
readsPrec :: Int -> ReadS ListLicenseConfigurations
$creadsPrec :: Int -> ReadS ListLicenseConfigurations
Prelude.Read, Int -> ListLicenseConfigurations -> ShowS
[ListLicenseConfigurations] -> ShowS
ListLicenseConfigurations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLicenseConfigurations] -> ShowS
$cshowList :: [ListLicenseConfigurations] -> ShowS
show :: ListLicenseConfigurations -> String
$cshow :: ListLicenseConfigurations -> String
showsPrec :: Int -> ListLicenseConfigurations -> ShowS
$cshowsPrec :: Int -> ListLicenseConfigurations -> ShowS
Prelude.Show, forall x.
Rep ListLicenseConfigurations x -> ListLicenseConfigurations
forall x.
ListLicenseConfigurations -> Rep ListLicenseConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListLicenseConfigurations x -> ListLicenseConfigurations
$cfrom :: forall x.
ListLicenseConfigurations -> Rep ListLicenseConfigurations x
Prelude.Generic)

-- |
-- Create a value of 'ListLicenseConfigurations' 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', 'listLicenseConfigurations_filters' - Filters to scope the results. The following filters and logical
-- operators are supported:
--
-- -   @licenseCountingType@ - The dimension for which licenses are
--     counted. Possible values are @vCPU@ | @Instance@ | @Core@ |
--     @Socket@. Logical operators are @EQUALS@ | @NOT_EQUALS@.
--
-- -   @enforceLicenseCount@ - A Boolean value that indicates whether hard
--     license enforcement is used. Logical operators are @EQUALS@ |
--     @NOT_EQUALS@.
--
-- -   @usagelimitExceeded@ - A Boolean value that indicates whether the
--     available licenses have been exceeded. Logical operators are
--     @EQUALS@ | @NOT_EQUALS@.
--
-- 'licenseConfigurationArns', 'listLicenseConfigurations_licenseConfigurationArns' - Amazon Resource Names (ARN) of the license configurations.
--
-- 'maxResults', 'listLicenseConfigurations_maxResults' - Maximum number of results to return in a single call.
--
-- 'nextToken', 'listLicenseConfigurations_nextToken' - Token for the next set of results.
newListLicenseConfigurations ::
  ListLicenseConfigurations
newListLicenseConfigurations :: ListLicenseConfigurations
newListLicenseConfigurations =
  ListLicenseConfigurations'
    { $sel:filters:ListLicenseConfigurations' :: Maybe [Filter]
filters =
        forall a. Maybe a
Prelude.Nothing,
      $sel:licenseConfigurationArns:ListLicenseConfigurations' :: Maybe [Text]
licenseConfigurationArns = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListLicenseConfigurations' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLicenseConfigurations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Filters to scope the results. The following filters and logical
-- operators are supported:
--
-- -   @licenseCountingType@ - The dimension for which licenses are
--     counted. Possible values are @vCPU@ | @Instance@ | @Core@ |
--     @Socket@. Logical operators are @EQUALS@ | @NOT_EQUALS@.
--
-- -   @enforceLicenseCount@ - A Boolean value that indicates whether hard
--     license enforcement is used. Logical operators are @EQUALS@ |
--     @NOT_EQUALS@.
--
-- -   @usagelimitExceeded@ - A Boolean value that indicates whether the
--     available licenses have been exceeded. Logical operators are
--     @EQUALS@ | @NOT_EQUALS@.
listLicenseConfigurations_filters :: Lens.Lens' ListLicenseConfigurations (Prelude.Maybe [Filter])
listLicenseConfigurations_filters :: Lens' ListLicenseConfigurations (Maybe [Filter])
listLicenseConfigurations_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicenseConfigurations' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListLicenseConfigurations
s@ListLicenseConfigurations' {} Maybe [Filter]
a -> ListLicenseConfigurations
s {$sel:filters:ListLicenseConfigurations' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListLicenseConfigurations) 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 (ARN) of the license configurations.
listLicenseConfigurations_licenseConfigurationArns :: Lens.Lens' ListLicenseConfigurations (Prelude.Maybe [Prelude.Text])
listLicenseConfigurations_licenseConfigurationArns :: Lens' ListLicenseConfigurations (Maybe [Text])
listLicenseConfigurations_licenseConfigurationArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicenseConfigurations' {Maybe [Text]
licenseConfigurationArns :: Maybe [Text]
$sel:licenseConfigurationArns:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe [Text]
licenseConfigurationArns} -> Maybe [Text]
licenseConfigurationArns) (\s :: ListLicenseConfigurations
s@ListLicenseConfigurations' {} Maybe [Text]
a -> ListLicenseConfigurations
s {$sel:licenseConfigurationArns:ListLicenseConfigurations' :: Maybe [Text]
licenseConfigurationArns = Maybe [Text]
a} :: ListLicenseConfigurations) 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.
listLicenseConfigurations_maxResults :: Lens.Lens' ListLicenseConfigurations (Prelude.Maybe Prelude.Int)
listLicenseConfigurations_maxResults :: Lens' ListLicenseConfigurations (Maybe Int)
listLicenseConfigurations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicenseConfigurations' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListLicenseConfigurations
s@ListLicenseConfigurations' {} Maybe Int
a -> ListLicenseConfigurations
s {$sel:maxResults:ListLicenseConfigurations' :: Maybe Int
maxResults = Maybe Int
a} :: ListLicenseConfigurations)

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

instance Core.AWSPager ListLicenseConfigurations where
  page :: ListLicenseConfigurations
-> AWSResponse ListLicenseConfigurations
-> Maybe ListLicenseConfigurations
page ListLicenseConfigurations
rq AWSResponse ListLicenseConfigurations
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLicenseConfigurations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListLicenseConfigurationsResponse (Maybe Text)
listLicenseConfigurationsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLicenseConfigurations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListLicenseConfigurationsResponse (Maybe [LicenseConfiguration])
listLicenseConfigurationsResponse_licenseConfigurations
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListLicenseConfigurations
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListLicenseConfigurations (Maybe Text)
listLicenseConfigurations_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListLicenseConfigurations
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListLicenseConfigurationsResponse (Maybe Text)
listLicenseConfigurationsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListLicenseConfigurations where
  type
    AWSResponse ListLicenseConfigurations =
      ListLicenseConfigurationsResponse
  request :: (Service -> Service)
-> ListLicenseConfigurations -> Request ListLicenseConfigurations
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 ListLicenseConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListLicenseConfigurations)))
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 [LicenseConfiguration]
-> Maybe Text -> Int -> ListLicenseConfigurationsResponse
ListLicenseConfigurationsResponse'
            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
"LicenseConfigurations"
                            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 ListLicenseConfigurations where
  hashWithSalt :: Int -> ListLicenseConfigurations -> Int
hashWithSalt Int
_salt ListLicenseConfigurations' {Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
licenseConfigurationArns :: Maybe [Text]
filters :: Maybe [Filter]
$sel:nextToken:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe Text
$sel:maxResults:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe Int
$sel:licenseConfigurationArns:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe [Text]
$sel:filters:ListLicenseConfigurations' :: ListLicenseConfigurations -> 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]
licenseConfigurationArns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListLicenseConfigurations where
  rnf :: ListLicenseConfigurations -> ()
rnf ListLicenseConfigurations' {Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
licenseConfigurationArns :: Maybe [Text]
filters :: Maybe [Filter]
$sel:nextToken:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe Text
$sel:maxResults:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe Int
$sel:licenseConfigurationArns:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe [Text]
$sel:filters:ListLicenseConfigurations' :: ListLicenseConfigurations -> 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]
licenseConfigurationArns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders ListLicenseConfigurations where
  toHeaders :: ListLicenseConfigurations -> 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.ListLicenseConfigurations" ::
                          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 ListLicenseConfigurations where
  toJSON :: ListLicenseConfigurations -> Value
toJSON ListLicenseConfigurations' {Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
licenseConfigurationArns :: Maybe [Text]
filters :: Maybe [Filter]
$sel:nextToken:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe Text
$sel:maxResults:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe Int
$sel:licenseConfigurationArns:ListLicenseConfigurations' :: ListLicenseConfigurations -> Maybe [Text]
$sel:filters:ListLicenseConfigurations' :: ListLicenseConfigurations -> 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
"LicenseConfigurationArns" 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]
licenseConfigurationArns,
            (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 Int
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 ListLicenseConfigurations where
  toPath :: ListLicenseConfigurations -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListLicenseConfigurationsResponse' 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:
--
-- 'licenseConfigurations', 'listLicenseConfigurationsResponse_licenseConfigurations' - Information about the license configurations.
--
-- 'nextToken', 'listLicenseConfigurationsResponse_nextToken' - Token for the next set of results.
--
-- 'httpStatus', 'listLicenseConfigurationsResponse_httpStatus' - The response's http status code.
newListLicenseConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListLicenseConfigurationsResponse
newListLicenseConfigurationsResponse :: Int -> ListLicenseConfigurationsResponse
newListLicenseConfigurationsResponse Int
pHttpStatus_ =
  ListLicenseConfigurationsResponse'
    { $sel:licenseConfigurations:ListLicenseConfigurationsResponse' :: Maybe [LicenseConfiguration]
licenseConfigurations =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLicenseConfigurationsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListLicenseConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the license configurations.
listLicenseConfigurationsResponse_licenseConfigurations :: Lens.Lens' ListLicenseConfigurationsResponse (Prelude.Maybe [LicenseConfiguration])
listLicenseConfigurationsResponse_licenseConfigurations :: Lens'
  ListLicenseConfigurationsResponse (Maybe [LicenseConfiguration])
listLicenseConfigurationsResponse_licenseConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicenseConfigurationsResponse' {Maybe [LicenseConfiguration]
licenseConfigurations :: Maybe [LicenseConfiguration]
$sel:licenseConfigurations:ListLicenseConfigurationsResponse' :: ListLicenseConfigurationsResponse -> Maybe [LicenseConfiguration]
licenseConfigurations} -> Maybe [LicenseConfiguration]
licenseConfigurations) (\s :: ListLicenseConfigurationsResponse
s@ListLicenseConfigurationsResponse' {} Maybe [LicenseConfiguration]
a -> ListLicenseConfigurationsResponse
s {$sel:licenseConfigurations:ListLicenseConfigurationsResponse' :: Maybe [LicenseConfiguration]
licenseConfigurations = Maybe [LicenseConfiguration]
a} :: ListLicenseConfigurationsResponse) 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.
listLicenseConfigurationsResponse_nextToken :: Lens.Lens' ListLicenseConfigurationsResponse (Prelude.Maybe Prelude.Text)
listLicenseConfigurationsResponse_nextToken :: Lens' ListLicenseConfigurationsResponse (Maybe Text)
listLicenseConfigurationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicenseConfigurationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLicenseConfigurationsResponse' :: ListLicenseConfigurationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLicenseConfigurationsResponse
s@ListLicenseConfigurationsResponse' {} Maybe Text
a -> ListLicenseConfigurationsResponse
s {$sel:nextToken:ListLicenseConfigurationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListLicenseConfigurationsResponse)

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

instance
  Prelude.NFData
    ListLicenseConfigurationsResponse
  where
  rnf :: ListLicenseConfigurationsResponse -> ()
rnf ListLicenseConfigurationsResponse' {Int
Maybe [LicenseConfiguration]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
licenseConfigurations :: Maybe [LicenseConfiguration]
$sel:httpStatus:ListLicenseConfigurationsResponse' :: ListLicenseConfigurationsResponse -> Int
$sel:nextToken:ListLicenseConfigurationsResponse' :: ListLicenseConfigurationsResponse -> Maybe Text
$sel:licenseConfigurations:ListLicenseConfigurationsResponse' :: ListLicenseConfigurationsResponse -> Maybe [LicenseConfiguration]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [LicenseConfiguration]
licenseConfigurations
      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