{-# 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 #-}
module Amazonka.EC2.Types.LaunchTemplateIamInstanceProfileSpecification 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
data LaunchTemplateIamInstanceProfileSpecification = LaunchTemplateIamInstanceProfileSpecification'
{
LaunchTemplateIamInstanceProfileSpecification -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
LaunchTemplateIamInstanceProfileSpecification -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (LaunchTemplateIamInstanceProfileSpecification
-> LaunchTemplateIamInstanceProfileSpecification -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LaunchTemplateIamInstanceProfileSpecification
-> LaunchTemplateIamInstanceProfileSpecification -> Bool
$c/= :: LaunchTemplateIamInstanceProfileSpecification
-> LaunchTemplateIamInstanceProfileSpecification -> Bool
== :: LaunchTemplateIamInstanceProfileSpecification
-> LaunchTemplateIamInstanceProfileSpecification -> Bool
$c== :: LaunchTemplateIamInstanceProfileSpecification
-> LaunchTemplateIamInstanceProfileSpecification -> Bool
Prelude.Eq, ReadPrec [LaunchTemplateIamInstanceProfileSpecification]
ReadPrec LaunchTemplateIamInstanceProfileSpecification
Int -> ReadS LaunchTemplateIamInstanceProfileSpecification
ReadS [LaunchTemplateIamInstanceProfileSpecification]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LaunchTemplateIamInstanceProfileSpecification]
$creadListPrec :: ReadPrec [LaunchTemplateIamInstanceProfileSpecification]
readPrec :: ReadPrec LaunchTemplateIamInstanceProfileSpecification
$creadPrec :: ReadPrec LaunchTemplateIamInstanceProfileSpecification
readList :: ReadS [LaunchTemplateIamInstanceProfileSpecification]
$creadList :: ReadS [LaunchTemplateIamInstanceProfileSpecification]
readsPrec :: Int -> ReadS LaunchTemplateIamInstanceProfileSpecification
$creadsPrec :: Int -> ReadS LaunchTemplateIamInstanceProfileSpecification
Prelude.Read, Int -> LaunchTemplateIamInstanceProfileSpecification -> ShowS
[LaunchTemplateIamInstanceProfileSpecification] -> ShowS
LaunchTemplateIamInstanceProfileSpecification -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LaunchTemplateIamInstanceProfileSpecification] -> ShowS
$cshowList :: [LaunchTemplateIamInstanceProfileSpecification] -> ShowS
show :: LaunchTemplateIamInstanceProfileSpecification -> String
$cshow :: LaunchTemplateIamInstanceProfileSpecification -> String
showsPrec :: Int -> LaunchTemplateIamInstanceProfileSpecification -> ShowS
$cshowsPrec :: Int -> LaunchTemplateIamInstanceProfileSpecification -> ShowS
Prelude.Show, forall x.
Rep LaunchTemplateIamInstanceProfileSpecification x
-> LaunchTemplateIamInstanceProfileSpecification
forall x.
LaunchTemplateIamInstanceProfileSpecification
-> Rep LaunchTemplateIamInstanceProfileSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LaunchTemplateIamInstanceProfileSpecification x
-> LaunchTemplateIamInstanceProfileSpecification
$cfrom :: forall x.
LaunchTemplateIamInstanceProfileSpecification
-> Rep LaunchTemplateIamInstanceProfileSpecification x
Prelude.Generic)
newLaunchTemplateIamInstanceProfileSpecification ::
LaunchTemplateIamInstanceProfileSpecification
newLaunchTemplateIamInstanceProfileSpecification :: LaunchTemplateIamInstanceProfileSpecification
newLaunchTemplateIamInstanceProfileSpecification =
LaunchTemplateIamInstanceProfileSpecification'
{ $sel:arn:LaunchTemplateIamInstanceProfileSpecification' :: Maybe Text
arn =
forall a. Maybe a
Prelude.Nothing,
$sel:name:LaunchTemplateIamInstanceProfileSpecification' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
}
launchTemplateIamInstanceProfileSpecification_arn :: Lens.Lens' LaunchTemplateIamInstanceProfileSpecification (Prelude.Maybe Prelude.Text)
launchTemplateIamInstanceProfileSpecification_arn :: Lens' LaunchTemplateIamInstanceProfileSpecification (Maybe Text)
launchTemplateIamInstanceProfileSpecification_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchTemplateIamInstanceProfileSpecification' {Maybe Text
arn :: Maybe Text
$sel:arn:LaunchTemplateIamInstanceProfileSpecification' :: LaunchTemplateIamInstanceProfileSpecification -> Maybe Text
arn} -> Maybe Text
arn) (\s :: LaunchTemplateIamInstanceProfileSpecification
s@LaunchTemplateIamInstanceProfileSpecification' {} Maybe Text
a -> LaunchTemplateIamInstanceProfileSpecification
s {$sel:arn:LaunchTemplateIamInstanceProfileSpecification' :: Maybe Text
arn = Maybe Text
a} :: LaunchTemplateIamInstanceProfileSpecification)
launchTemplateIamInstanceProfileSpecification_name :: Lens.Lens' LaunchTemplateIamInstanceProfileSpecification (Prelude.Maybe Prelude.Text)
launchTemplateIamInstanceProfileSpecification_name :: Lens' LaunchTemplateIamInstanceProfileSpecification (Maybe Text)
launchTemplateIamInstanceProfileSpecification_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchTemplateIamInstanceProfileSpecification' {Maybe Text
name :: Maybe Text
$sel:name:LaunchTemplateIamInstanceProfileSpecification' :: LaunchTemplateIamInstanceProfileSpecification -> Maybe Text
name} -> Maybe Text
name) (\s :: LaunchTemplateIamInstanceProfileSpecification
s@LaunchTemplateIamInstanceProfileSpecification' {} Maybe Text
a -> LaunchTemplateIamInstanceProfileSpecification
s {$sel:name:LaunchTemplateIamInstanceProfileSpecification' :: Maybe Text
name = Maybe Text
a} :: LaunchTemplateIamInstanceProfileSpecification)
instance
Data.FromXML
LaunchTemplateIamInstanceProfileSpecification
where
parseXML :: [Node]
-> Either String LaunchTemplateIamInstanceProfileSpecification
parseXML [Node]
x =
Maybe Text
-> Maybe Text -> LaunchTemplateIamInstanceProfileSpecification
LaunchTemplateIamInstanceProfileSpecification'
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
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"name")
instance
Prelude.Hashable
LaunchTemplateIamInstanceProfileSpecification
where
hashWithSalt :: Int -> LaunchTemplateIamInstanceProfileSpecification -> Int
hashWithSalt
Int
_salt
LaunchTemplateIamInstanceProfileSpecification' {Maybe Text
name :: Maybe Text
arn :: Maybe Text
$sel:name:LaunchTemplateIamInstanceProfileSpecification' :: LaunchTemplateIamInstanceProfileSpecification -> Maybe Text
$sel:arn:LaunchTemplateIamInstanceProfileSpecification' :: LaunchTemplateIamInstanceProfileSpecification -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
instance
Prelude.NFData
LaunchTemplateIamInstanceProfileSpecification
where
rnf :: LaunchTemplateIamInstanceProfileSpecification -> ()
rnf
LaunchTemplateIamInstanceProfileSpecification' {Maybe Text
name :: Maybe Text
arn :: Maybe Text
$sel:name:LaunchTemplateIamInstanceProfileSpecification' :: LaunchTemplateIamInstanceProfileSpecification -> Maybe Text
$sel:arn:LaunchTemplateIamInstanceProfileSpecification' :: LaunchTemplateIamInstanceProfileSpecification -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name