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

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

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

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

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

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