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

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

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

instance
  Data.FromXML
    ImportImageLicenseConfigurationResponse
  where
  parseXML :: [Node] -> Either String ImportImageLicenseConfigurationResponse
parseXML [Node]
x =
    Maybe Text -> ImportImageLicenseConfigurationResponse
ImportImageLicenseConfigurationResponse'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"licenseConfigurationArn")

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

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