{-# 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.ImportImageLicenseConfigurationRequest
-- 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.ImportImageLicenseConfigurationRequest 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

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

-- |
-- Create a value of 'ImportImageLicenseConfigurationRequest' 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', 'importImageLicenseConfigurationRequest_licenseConfigurationArn' - The ARN of a license configuration.
newImportImageLicenseConfigurationRequest ::
  ImportImageLicenseConfigurationRequest
newImportImageLicenseConfigurationRequest :: ImportImageLicenseConfigurationRequest
newImportImageLicenseConfigurationRequest =
  ImportImageLicenseConfigurationRequest'
    { $sel:licenseConfigurationArn:ImportImageLicenseConfigurationRequest' :: Maybe Text
licenseConfigurationArn =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of a license configuration.
importImageLicenseConfigurationRequest_licenseConfigurationArn :: Lens.Lens' ImportImageLicenseConfigurationRequest (Prelude.Maybe Prelude.Text)
importImageLicenseConfigurationRequest_licenseConfigurationArn :: Lens' ImportImageLicenseConfigurationRequest (Maybe Text)
importImageLicenseConfigurationRequest_licenseConfigurationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportImageLicenseConfigurationRequest' {Maybe Text
licenseConfigurationArn :: Maybe Text
$sel:licenseConfigurationArn:ImportImageLicenseConfigurationRequest' :: ImportImageLicenseConfigurationRequest -> Maybe Text
licenseConfigurationArn} -> Maybe Text
licenseConfigurationArn) (\s :: ImportImageLicenseConfigurationRequest
s@ImportImageLicenseConfigurationRequest' {} Maybe Text
a -> ImportImageLicenseConfigurationRequest
s {$sel:licenseConfigurationArn:ImportImageLicenseConfigurationRequest' :: Maybe Text
licenseConfigurationArn = Maybe Text
a} :: ImportImageLicenseConfigurationRequest)

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

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

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