{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.EC2.Types.LicenseConfigurationRequest
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.LicenseConfigurationRequest where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude

-- | Describes a license configuration.
--
-- /See:/ 'newLicenseConfigurationRequest' smart constructor.
data LicenseConfigurationRequest = LicenseConfigurationRequest'
  { -- | The Amazon Resource Name (ARN) of the license configuration.
    LicenseConfigurationRequest -> Maybe Text
licenseConfigurationArn :: Prelude.Maybe Prelude.Text
  }
  deriving (LicenseConfigurationRequest -> LicenseConfigurationRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LicenseConfigurationRequest -> LicenseConfigurationRequest -> Bool
$c/= :: LicenseConfigurationRequest -> LicenseConfigurationRequest -> Bool
== :: LicenseConfigurationRequest -> LicenseConfigurationRequest -> Bool
$c== :: LicenseConfigurationRequest -> LicenseConfigurationRequest -> Bool
Prelude.Eq, ReadPrec [LicenseConfigurationRequest]
ReadPrec LicenseConfigurationRequest
Int -> ReadS LicenseConfigurationRequest
ReadS [LicenseConfigurationRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LicenseConfigurationRequest]
$creadListPrec :: ReadPrec [LicenseConfigurationRequest]
readPrec :: ReadPrec LicenseConfigurationRequest
$creadPrec :: ReadPrec LicenseConfigurationRequest
readList :: ReadS [LicenseConfigurationRequest]
$creadList :: ReadS [LicenseConfigurationRequest]
readsPrec :: Int -> ReadS LicenseConfigurationRequest
$creadsPrec :: Int -> ReadS LicenseConfigurationRequest
Prelude.Read, Int -> LicenseConfigurationRequest -> ShowS
[LicenseConfigurationRequest] -> ShowS
LicenseConfigurationRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LicenseConfigurationRequest] -> ShowS
$cshowList :: [LicenseConfigurationRequest] -> ShowS
show :: LicenseConfigurationRequest -> String
$cshow :: LicenseConfigurationRequest -> String
showsPrec :: Int -> LicenseConfigurationRequest -> ShowS
$cshowsPrec :: Int -> LicenseConfigurationRequest -> ShowS
Prelude.Show, forall x.
Rep LicenseConfigurationRequest x -> LicenseConfigurationRequest
forall x.
LicenseConfigurationRequest -> Rep LicenseConfigurationRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LicenseConfigurationRequest x -> LicenseConfigurationRequest
$cfrom :: forall x.
LicenseConfigurationRequest -> Rep LicenseConfigurationRequest x
Prelude.Generic)

-- |
-- Create a value of 'LicenseConfigurationRequest' 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:
--
-- 'licenseConfigurationArn', 'licenseConfigurationRequest_licenseConfigurationArn' - The Amazon Resource Name (ARN) of the license configuration.
newLicenseConfigurationRequest ::
  LicenseConfigurationRequest
newLicenseConfigurationRequest :: LicenseConfigurationRequest
newLicenseConfigurationRequest =
  LicenseConfigurationRequest'
    { $sel:licenseConfigurationArn:LicenseConfigurationRequest' :: Maybe Text
licenseConfigurationArn =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the license configuration.
licenseConfigurationRequest_licenseConfigurationArn :: Lens.Lens' LicenseConfigurationRequest (Prelude.Maybe Prelude.Text)
licenseConfigurationRequest_licenseConfigurationArn :: Lens' LicenseConfigurationRequest (Maybe Text)
licenseConfigurationRequest_licenseConfigurationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationRequest' {Maybe Text
licenseConfigurationArn :: Maybe Text
$sel:licenseConfigurationArn:LicenseConfigurationRequest' :: LicenseConfigurationRequest -> Maybe Text
licenseConfigurationArn} -> Maybe Text
licenseConfigurationArn) (\s :: LicenseConfigurationRequest
s@LicenseConfigurationRequest' {} Maybe Text
a -> LicenseConfigurationRequest
s {$sel:licenseConfigurationArn:LicenseConfigurationRequest' :: Maybe Text
licenseConfigurationArn = Maybe Text
a} :: LicenseConfigurationRequest)

instance Prelude.Hashable LicenseConfigurationRequest where
  hashWithSalt :: Int -> LicenseConfigurationRequest -> Int
hashWithSalt Int
_salt LicenseConfigurationRequest' {Maybe Text
licenseConfigurationArn :: Maybe Text
$sel:licenseConfigurationArn:LicenseConfigurationRequest' :: LicenseConfigurationRequest -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
licenseConfigurationArn

instance Prelude.NFData LicenseConfigurationRequest where
  rnf :: LicenseConfigurationRequest -> ()
rnf LicenseConfigurationRequest' {Maybe Text
licenseConfigurationArn :: Maybe Text
$sel:licenseConfigurationArn:LicenseConfigurationRequest' :: LicenseConfigurationRequest -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
licenseConfigurationArn

instance Data.ToQuery LicenseConfigurationRequest where
  toQuery :: LicenseConfigurationRequest -> QueryString
toQuery LicenseConfigurationRequest' {Maybe Text
licenseConfigurationArn :: Maybe Text
$sel:licenseConfigurationArn:LicenseConfigurationRequest' :: LicenseConfigurationRequest -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"LicenseConfigurationArn"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
licenseConfigurationArn
      ]