{-# 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.ListLicenseSpecificationsForResource
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the license configurations for the specified resource.
--
-- This operation returns paginated results.
module Amazonka.LicenseManager.ListLicenseSpecificationsForResource
  ( -- * Creating a Request
    ListLicenseSpecificationsForResource (..),
    newListLicenseSpecificationsForResource,

    -- * Request Lenses
    listLicenseSpecificationsForResource_maxResults,
    listLicenseSpecificationsForResource_nextToken,
    listLicenseSpecificationsForResource_resourceArn,

    -- * Destructuring the Response
    ListLicenseSpecificationsForResourceResponse (..),
    newListLicenseSpecificationsForResourceResponse,

    -- * Response Lenses
    listLicenseSpecificationsForResourceResponse_licenseSpecifications,
    listLicenseSpecificationsForResourceResponse_nextToken,
    listLicenseSpecificationsForResourceResponse_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:/ 'newListLicenseSpecificationsForResource' smart constructor.
data ListLicenseSpecificationsForResource = ListLicenseSpecificationsForResource'
  { -- | Maximum number of results to return in a single call.
    ListLicenseSpecificationsForResource -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | Token for the next set of results.
    ListLicenseSpecificationsForResource -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Amazon Resource Name (ARN) of a resource that has an associated license
    -- configuration.
    ListLicenseSpecificationsForResource -> Text
resourceArn :: Prelude.Text
  }
  deriving (ListLicenseSpecificationsForResource
-> ListLicenseSpecificationsForResource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLicenseSpecificationsForResource
-> ListLicenseSpecificationsForResource -> Bool
$c/= :: ListLicenseSpecificationsForResource
-> ListLicenseSpecificationsForResource -> Bool
== :: ListLicenseSpecificationsForResource
-> ListLicenseSpecificationsForResource -> Bool
$c== :: ListLicenseSpecificationsForResource
-> ListLicenseSpecificationsForResource -> Bool
Prelude.Eq, ReadPrec [ListLicenseSpecificationsForResource]
ReadPrec ListLicenseSpecificationsForResource
Int -> ReadS ListLicenseSpecificationsForResource
ReadS [ListLicenseSpecificationsForResource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLicenseSpecificationsForResource]
$creadListPrec :: ReadPrec [ListLicenseSpecificationsForResource]
readPrec :: ReadPrec ListLicenseSpecificationsForResource
$creadPrec :: ReadPrec ListLicenseSpecificationsForResource
readList :: ReadS [ListLicenseSpecificationsForResource]
$creadList :: ReadS [ListLicenseSpecificationsForResource]
readsPrec :: Int -> ReadS ListLicenseSpecificationsForResource
$creadsPrec :: Int -> ReadS ListLicenseSpecificationsForResource
Prelude.Read, Int -> ListLicenseSpecificationsForResource -> ShowS
[ListLicenseSpecificationsForResource] -> ShowS
ListLicenseSpecificationsForResource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLicenseSpecificationsForResource] -> ShowS
$cshowList :: [ListLicenseSpecificationsForResource] -> ShowS
show :: ListLicenseSpecificationsForResource -> String
$cshow :: ListLicenseSpecificationsForResource -> String
showsPrec :: Int -> ListLicenseSpecificationsForResource -> ShowS
$cshowsPrec :: Int -> ListLicenseSpecificationsForResource -> ShowS
Prelude.Show, forall x.
Rep ListLicenseSpecificationsForResource x
-> ListLicenseSpecificationsForResource
forall x.
ListLicenseSpecificationsForResource
-> Rep ListLicenseSpecificationsForResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListLicenseSpecificationsForResource x
-> ListLicenseSpecificationsForResource
$cfrom :: forall x.
ListLicenseSpecificationsForResource
-> Rep ListLicenseSpecificationsForResource x
Prelude.Generic)

-- |
-- Create a value of 'ListLicenseSpecificationsForResource' 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:
--
-- 'maxResults', 'listLicenseSpecificationsForResource_maxResults' - Maximum number of results to return in a single call.
--
-- 'nextToken', 'listLicenseSpecificationsForResource_nextToken' - Token for the next set of results.
--
-- 'resourceArn', 'listLicenseSpecificationsForResource_resourceArn' - Amazon Resource Name (ARN) of a resource that has an associated license
-- configuration.
newListLicenseSpecificationsForResource ::
  -- | 'resourceArn'
  Prelude.Text ->
  ListLicenseSpecificationsForResource
newListLicenseSpecificationsForResource :: Text -> ListLicenseSpecificationsForResource
newListLicenseSpecificationsForResource Text
pResourceArn_ =
  ListLicenseSpecificationsForResource'
    { $sel:maxResults:ListLicenseSpecificationsForResource' :: Maybe Int
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLicenseSpecificationsForResource' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:ListLicenseSpecificationsForResource' :: Text
resourceArn = Text
pResourceArn_
    }

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

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

-- | Amazon Resource Name (ARN) of a resource that has an associated license
-- configuration.
listLicenseSpecificationsForResource_resourceArn :: Lens.Lens' ListLicenseSpecificationsForResource Prelude.Text
listLicenseSpecificationsForResource_resourceArn :: Lens' ListLicenseSpecificationsForResource Text
listLicenseSpecificationsForResource_resourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicenseSpecificationsForResource' {Text
resourceArn :: Text
$sel:resourceArn:ListLicenseSpecificationsForResource' :: ListLicenseSpecificationsForResource -> Text
resourceArn} -> Text
resourceArn) (\s :: ListLicenseSpecificationsForResource
s@ListLicenseSpecificationsForResource' {} Text
a -> ListLicenseSpecificationsForResource
s {$sel:resourceArn:ListLicenseSpecificationsForResource' :: Text
resourceArn = Text
a} :: ListLicenseSpecificationsForResource)

instance
  Core.AWSPager
    ListLicenseSpecificationsForResource
  where
  page :: ListLicenseSpecificationsForResource
-> AWSResponse ListLicenseSpecificationsForResource
-> Maybe ListLicenseSpecificationsForResource
page ListLicenseSpecificationsForResource
rq AWSResponse ListLicenseSpecificationsForResource
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLicenseSpecificationsForResource
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListLicenseSpecificationsForResourceResponse (Maybe Text)
listLicenseSpecificationsForResourceResponse_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 ListLicenseSpecificationsForResource
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListLicenseSpecificationsForResourceResponse
  (Maybe [LicenseSpecification])
listLicenseSpecificationsForResourceResponse_licenseSpecifications
            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.$ ListLicenseSpecificationsForResource
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListLicenseSpecificationsForResource (Maybe Text)
listLicenseSpecificationsForResource_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListLicenseSpecificationsForResource
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListLicenseSpecificationsForResourceResponse (Maybe Text)
listLicenseSpecificationsForResourceResponse_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
    ListLicenseSpecificationsForResource
  where
  type
    AWSResponse ListLicenseSpecificationsForResource =
      ListLicenseSpecificationsForResourceResponse
  request :: (Service -> Service)
-> ListLicenseSpecificationsForResource
-> Request ListLicenseSpecificationsForResource
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 ListLicenseSpecificationsForResource
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListLicenseSpecificationsForResource)))
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 [LicenseSpecification]
-> Maybe Text
-> Int
-> ListLicenseSpecificationsForResourceResponse
ListLicenseSpecificationsForResourceResponse'
            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
"LicenseSpecifications"
                            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
    ListLicenseSpecificationsForResource
  where
  hashWithSalt :: Int -> ListLicenseSpecificationsForResource -> Int
hashWithSalt
    Int
_salt
    ListLicenseSpecificationsForResource' {Maybe Int
Maybe Text
Text
resourceArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:resourceArn:ListLicenseSpecificationsForResource' :: ListLicenseSpecificationsForResource -> Text
$sel:nextToken:ListLicenseSpecificationsForResource' :: ListLicenseSpecificationsForResource -> Maybe Text
$sel:maxResults:ListLicenseSpecificationsForResource' :: ListLicenseSpecificationsForResource -> Maybe Int
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceArn

instance
  Prelude.NFData
    ListLicenseSpecificationsForResource
  where
  rnf :: ListLicenseSpecificationsForResource -> ()
rnf ListLicenseSpecificationsForResource' {Maybe Int
Maybe Text
Text
resourceArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:resourceArn:ListLicenseSpecificationsForResource' :: ListLicenseSpecificationsForResource -> Text
$sel:nextToken:ListLicenseSpecificationsForResource' :: ListLicenseSpecificationsForResource -> Maybe Text
$sel:maxResults:ListLicenseSpecificationsForResource' :: ListLicenseSpecificationsForResource -> Maybe Int
..} =
    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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceArn

instance
  Data.ToHeaders
    ListLicenseSpecificationsForResource
  where
  toHeaders :: ListLicenseSpecificationsForResource -> 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.ListLicenseSpecificationsForResource" ::
                          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
    ListLicenseSpecificationsForResource
  where
  toJSON :: ListLicenseSpecificationsForResource -> Value
toJSON ListLicenseSpecificationsForResource' {Maybe Int
Maybe Text
Text
resourceArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:resourceArn:ListLicenseSpecificationsForResource' :: ListLicenseSpecificationsForResource -> Text
$sel:nextToken:ListLicenseSpecificationsForResource' :: ListLicenseSpecificationsForResource -> Maybe Text
$sel:maxResults:ListLicenseSpecificationsForResource' :: ListLicenseSpecificationsForResource -> Maybe Int
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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,
            forall a. a -> Maybe a
Prelude.Just (Key
"ResourceArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
resourceArn)
          ]
      )

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

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

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

-- |
-- Create a value of 'ListLicenseSpecificationsForResourceResponse' 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:
--
-- 'licenseSpecifications', 'listLicenseSpecificationsForResourceResponse_licenseSpecifications' - License configurations associated with a resource.
--
-- 'nextToken', 'listLicenseSpecificationsForResourceResponse_nextToken' - Token for the next set of results.
--
-- 'httpStatus', 'listLicenseSpecificationsForResourceResponse_httpStatus' - The response's http status code.
newListLicenseSpecificationsForResourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListLicenseSpecificationsForResourceResponse
newListLicenseSpecificationsForResourceResponse :: Int -> ListLicenseSpecificationsForResourceResponse
newListLicenseSpecificationsForResourceResponse
  Int
pHttpStatus_ =
    ListLicenseSpecificationsForResourceResponse'
      { $sel:licenseSpecifications:ListLicenseSpecificationsForResourceResponse' :: Maybe [LicenseSpecification]
licenseSpecifications =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListLicenseSpecificationsForResourceResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListLicenseSpecificationsForResourceResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | License configurations associated with a resource.
listLicenseSpecificationsForResourceResponse_licenseSpecifications :: Lens.Lens' ListLicenseSpecificationsForResourceResponse (Prelude.Maybe [LicenseSpecification])
listLicenseSpecificationsForResourceResponse_licenseSpecifications :: Lens'
  ListLicenseSpecificationsForResourceResponse
  (Maybe [LicenseSpecification])
listLicenseSpecificationsForResourceResponse_licenseSpecifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicenseSpecificationsForResourceResponse' {Maybe [LicenseSpecification]
licenseSpecifications :: Maybe [LicenseSpecification]
$sel:licenseSpecifications:ListLicenseSpecificationsForResourceResponse' :: ListLicenseSpecificationsForResourceResponse
-> Maybe [LicenseSpecification]
licenseSpecifications} -> Maybe [LicenseSpecification]
licenseSpecifications) (\s :: ListLicenseSpecificationsForResourceResponse
s@ListLicenseSpecificationsForResourceResponse' {} Maybe [LicenseSpecification]
a -> ListLicenseSpecificationsForResourceResponse
s {$sel:licenseSpecifications:ListLicenseSpecificationsForResourceResponse' :: Maybe [LicenseSpecification]
licenseSpecifications = Maybe [LicenseSpecification]
a} :: ListLicenseSpecificationsForResourceResponse) 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.
listLicenseSpecificationsForResourceResponse_nextToken :: Lens.Lens' ListLicenseSpecificationsForResourceResponse (Prelude.Maybe Prelude.Text)
listLicenseSpecificationsForResourceResponse_nextToken :: Lens' ListLicenseSpecificationsForResourceResponse (Maybe Text)
listLicenseSpecificationsForResourceResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLicenseSpecificationsForResourceResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLicenseSpecificationsForResourceResponse' :: ListLicenseSpecificationsForResourceResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLicenseSpecificationsForResourceResponse
s@ListLicenseSpecificationsForResourceResponse' {} Maybe Text
a -> ListLicenseSpecificationsForResourceResponse
s {$sel:nextToken:ListLicenseSpecificationsForResourceResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListLicenseSpecificationsForResourceResponse)

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

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