{-# 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.CreateFleetError 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 Amazonka.EC2.Types.InstanceLifecycle
import Amazonka.EC2.Types.LaunchTemplateAndOverridesResponse
import qualified Amazonka.Prelude as Prelude
data CreateFleetError = CreateFleetError'
{
CreateFleetError -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
CreateFleetError -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
CreateFleetError -> Maybe LaunchTemplateAndOverridesResponse
launchTemplateAndOverrides :: Prelude.Maybe LaunchTemplateAndOverridesResponse,
CreateFleetError -> Maybe InstanceLifecycle
lifecycle :: Prelude.Maybe InstanceLifecycle
}
deriving (CreateFleetError -> CreateFleetError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFleetError -> CreateFleetError -> Bool
$c/= :: CreateFleetError -> CreateFleetError -> Bool
== :: CreateFleetError -> CreateFleetError -> Bool
$c== :: CreateFleetError -> CreateFleetError -> Bool
Prelude.Eq, ReadPrec [CreateFleetError]
ReadPrec CreateFleetError
Int -> ReadS CreateFleetError
ReadS [CreateFleetError]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFleetError]
$creadListPrec :: ReadPrec [CreateFleetError]
readPrec :: ReadPrec CreateFleetError
$creadPrec :: ReadPrec CreateFleetError
readList :: ReadS [CreateFleetError]
$creadList :: ReadS [CreateFleetError]
readsPrec :: Int -> ReadS CreateFleetError
$creadsPrec :: Int -> ReadS CreateFleetError
Prelude.Read, Int -> CreateFleetError -> ShowS
[CreateFleetError] -> ShowS
CreateFleetError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFleetError] -> ShowS
$cshowList :: [CreateFleetError] -> ShowS
show :: CreateFleetError -> String
$cshow :: CreateFleetError -> String
showsPrec :: Int -> CreateFleetError -> ShowS
$cshowsPrec :: Int -> CreateFleetError -> ShowS
Prelude.Show, forall x. Rep CreateFleetError x -> CreateFleetError
forall x. CreateFleetError -> Rep CreateFleetError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFleetError x -> CreateFleetError
$cfrom :: forall x. CreateFleetError -> Rep CreateFleetError x
Prelude.Generic)
newCreateFleetError ::
CreateFleetError
newCreateFleetError :: CreateFleetError
newCreateFleetError =
CreateFleetError'
{ $sel:errorCode:CreateFleetError' :: Maybe Text
errorCode = forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:CreateFleetError' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
$sel:launchTemplateAndOverrides:CreateFleetError' :: Maybe LaunchTemplateAndOverridesResponse
launchTemplateAndOverrides = forall a. Maybe a
Prelude.Nothing,
$sel:lifecycle:CreateFleetError' :: Maybe InstanceLifecycle
lifecycle = forall a. Maybe a
Prelude.Nothing
}
createFleetError_errorCode :: Lens.Lens' CreateFleetError (Prelude.Maybe Prelude.Text)
createFleetError_errorCode :: Lens' CreateFleetError (Maybe Text)
createFleetError_errorCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleetError' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:CreateFleetError' :: CreateFleetError -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: CreateFleetError
s@CreateFleetError' {} Maybe Text
a -> CreateFleetError
s {$sel:errorCode:CreateFleetError' :: Maybe Text
errorCode = Maybe Text
a} :: CreateFleetError)
createFleetError_errorMessage :: Lens.Lens' CreateFleetError (Prelude.Maybe Prelude.Text)
createFleetError_errorMessage :: Lens' CreateFleetError (Maybe Text)
createFleetError_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleetError' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:CreateFleetError' :: CreateFleetError -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: CreateFleetError
s@CreateFleetError' {} Maybe Text
a -> CreateFleetError
s {$sel:errorMessage:CreateFleetError' :: Maybe Text
errorMessage = Maybe Text
a} :: CreateFleetError)
createFleetError_launchTemplateAndOverrides :: Lens.Lens' CreateFleetError (Prelude.Maybe LaunchTemplateAndOverridesResponse)
createFleetError_launchTemplateAndOverrides :: Lens' CreateFleetError (Maybe LaunchTemplateAndOverridesResponse)
createFleetError_launchTemplateAndOverrides = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleetError' {Maybe LaunchTemplateAndOverridesResponse
launchTemplateAndOverrides :: Maybe LaunchTemplateAndOverridesResponse
$sel:launchTemplateAndOverrides:CreateFleetError' :: CreateFleetError -> Maybe LaunchTemplateAndOverridesResponse
launchTemplateAndOverrides} -> Maybe LaunchTemplateAndOverridesResponse
launchTemplateAndOverrides) (\s :: CreateFleetError
s@CreateFleetError' {} Maybe LaunchTemplateAndOverridesResponse
a -> CreateFleetError
s {$sel:launchTemplateAndOverrides:CreateFleetError' :: Maybe LaunchTemplateAndOverridesResponse
launchTemplateAndOverrides = Maybe LaunchTemplateAndOverridesResponse
a} :: CreateFleetError)
createFleetError_lifecycle :: Lens.Lens' CreateFleetError (Prelude.Maybe InstanceLifecycle)
createFleetError_lifecycle :: Lens' CreateFleetError (Maybe InstanceLifecycle)
createFleetError_lifecycle = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleetError' {Maybe InstanceLifecycle
lifecycle :: Maybe InstanceLifecycle
$sel:lifecycle:CreateFleetError' :: CreateFleetError -> Maybe InstanceLifecycle
lifecycle} -> Maybe InstanceLifecycle
lifecycle) (\s :: CreateFleetError
s@CreateFleetError' {} Maybe InstanceLifecycle
a -> CreateFleetError
s {$sel:lifecycle:CreateFleetError' :: Maybe InstanceLifecycle
lifecycle = Maybe InstanceLifecycle
a} :: CreateFleetError)
instance Data.FromXML CreateFleetError where
parseXML :: [Node] -> Either String CreateFleetError
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateAndOverridesResponse
-> Maybe InstanceLifecycle
-> CreateFleetError
CreateFleetError'
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
"errorCode")
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
"errorMessage")
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
"launchTemplateAndOverrides")
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
"lifecycle")
instance Prelude.Hashable CreateFleetError where
hashWithSalt :: Int -> CreateFleetError -> Int
hashWithSalt Int
_salt CreateFleetError' {Maybe Text
Maybe InstanceLifecycle
Maybe LaunchTemplateAndOverridesResponse
lifecycle :: Maybe InstanceLifecycle
launchTemplateAndOverrides :: Maybe LaunchTemplateAndOverridesResponse
errorMessage :: Maybe Text
errorCode :: Maybe Text
$sel:lifecycle:CreateFleetError' :: CreateFleetError -> Maybe InstanceLifecycle
$sel:launchTemplateAndOverrides:CreateFleetError' :: CreateFleetError -> Maybe LaunchTemplateAndOverridesResponse
$sel:errorMessage:CreateFleetError' :: CreateFleetError -> Maybe Text
$sel:errorCode:CreateFleetError' :: CreateFleetError -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LaunchTemplateAndOverridesResponse
launchTemplateAndOverrides
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceLifecycle
lifecycle
instance Prelude.NFData CreateFleetError where
rnf :: CreateFleetError -> ()
rnf CreateFleetError' {Maybe Text
Maybe InstanceLifecycle
Maybe LaunchTemplateAndOverridesResponse
lifecycle :: Maybe InstanceLifecycle
launchTemplateAndOverrides :: Maybe LaunchTemplateAndOverridesResponse
errorMessage :: Maybe Text
errorCode :: Maybe Text
$sel:lifecycle:CreateFleetError' :: CreateFleetError -> Maybe InstanceLifecycle
$sel:launchTemplateAndOverrides:CreateFleetError' :: CreateFleetError -> Maybe LaunchTemplateAndOverridesResponse
$sel:errorMessage:CreateFleetError' :: CreateFleetError -> Maybe Text
$sel:errorCode:CreateFleetError' :: CreateFleetError -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LaunchTemplateAndOverridesResponse
launchTemplateAndOverrides
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceLifecycle
lifecycle