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