{-# 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.AutoScaling.Types.ProcessType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProcessType = ProcessType'
{
ProcessType -> Text
processName :: Prelude.Text
}
deriving (ProcessType -> ProcessType -> Bool
(ProcessType -> ProcessType -> Bool)
-> (ProcessType -> ProcessType -> Bool) -> Eq ProcessType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProcessType -> ProcessType -> Bool
$c/= :: ProcessType -> ProcessType -> Bool
== :: ProcessType -> ProcessType -> Bool
$c== :: ProcessType -> ProcessType -> Bool
Prelude.Eq, ReadPrec [ProcessType]
ReadPrec ProcessType
Int -> ReadS ProcessType
ReadS [ProcessType]
(Int -> ReadS ProcessType)
-> ReadS [ProcessType]
-> ReadPrec ProcessType
-> ReadPrec [ProcessType]
-> Read ProcessType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProcessType]
$creadListPrec :: ReadPrec [ProcessType]
readPrec :: ReadPrec ProcessType
$creadPrec :: ReadPrec ProcessType
readList :: ReadS [ProcessType]
$creadList :: ReadS [ProcessType]
readsPrec :: Int -> ReadS ProcessType
$creadsPrec :: Int -> ReadS ProcessType
Prelude.Read, Int -> ProcessType -> ShowS
[ProcessType] -> ShowS
ProcessType -> String
(Int -> ProcessType -> ShowS)
-> (ProcessType -> String)
-> ([ProcessType] -> ShowS)
-> Show ProcessType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProcessType] -> ShowS
$cshowList :: [ProcessType] -> ShowS
show :: ProcessType -> String
$cshow :: ProcessType -> String
showsPrec :: Int -> ProcessType -> ShowS
$cshowsPrec :: Int -> ProcessType -> ShowS
Prelude.Show, (forall x. ProcessType -> Rep ProcessType x)
-> (forall x. Rep ProcessType x -> ProcessType)
-> Generic ProcessType
forall x. Rep ProcessType x -> ProcessType
forall x. ProcessType -> Rep ProcessType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProcessType x -> ProcessType
$cfrom :: forall x. ProcessType -> Rep ProcessType x
Prelude.Generic)
newProcessType ::
Prelude.Text ->
ProcessType
newProcessType :: Text -> ProcessType
newProcessType Text
pProcessName_ =
ProcessType' :: Text -> ProcessType
ProcessType' {$sel:processName:ProcessType' :: Text
processName = Text
pProcessName_}
processType_processName :: Lens.Lens' ProcessType Prelude.Text
processType_processName :: (Text -> f Text) -> ProcessType -> f ProcessType
processType_processName = (ProcessType -> Text)
-> (ProcessType -> Text -> ProcessType)
-> Lens ProcessType ProcessType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessType' {Text
processName :: Text
$sel:processName:ProcessType' :: ProcessType -> Text
processName} -> Text
processName) (\s :: ProcessType
s@ProcessType' {} Text
a -> ProcessType
s {$sel:processName:ProcessType' :: Text
processName = Text
a} :: ProcessType)
instance Core.FromXML ProcessType where
parseXML :: [Node] -> Either String ProcessType
parseXML [Node]
x =
Text -> ProcessType
ProcessType' (Text -> ProcessType)
-> Either String Text -> Either String ProcessType
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ProcessName")
instance Prelude.Hashable ProcessType
instance Prelude.NFData ProcessType