{-# 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.Nimble.Types.ValidationResult where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Nimble.Types.LaunchProfileValidationState
import Amazonka.Nimble.Types.LaunchProfileValidationStatusCode
import Amazonka.Nimble.Types.LaunchProfileValidationType
import qualified Amazonka.Prelude as Prelude
data ValidationResult = ValidationResult'
{
ValidationResult -> LaunchProfileValidationState
state :: LaunchProfileValidationState,
ValidationResult -> LaunchProfileValidationStatusCode
statusCode :: LaunchProfileValidationStatusCode,
ValidationResult -> Text
statusMessage :: Prelude.Text,
ValidationResult -> LaunchProfileValidationType
type' :: LaunchProfileValidationType
}
deriving (ValidationResult -> ValidationResult -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ValidationResult -> ValidationResult -> Bool
$c/= :: ValidationResult -> ValidationResult -> Bool
== :: ValidationResult -> ValidationResult -> Bool
$c== :: ValidationResult -> ValidationResult -> Bool
Prelude.Eq, ReadPrec [ValidationResult]
ReadPrec ValidationResult
Int -> ReadS ValidationResult
ReadS [ValidationResult]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ValidationResult]
$creadListPrec :: ReadPrec [ValidationResult]
readPrec :: ReadPrec ValidationResult
$creadPrec :: ReadPrec ValidationResult
readList :: ReadS [ValidationResult]
$creadList :: ReadS [ValidationResult]
readsPrec :: Int -> ReadS ValidationResult
$creadsPrec :: Int -> ReadS ValidationResult
Prelude.Read, Int -> ValidationResult -> ShowS
[ValidationResult] -> ShowS
ValidationResult -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ValidationResult] -> ShowS
$cshowList :: [ValidationResult] -> ShowS
show :: ValidationResult -> String
$cshow :: ValidationResult -> String
showsPrec :: Int -> ValidationResult -> ShowS
$cshowsPrec :: Int -> ValidationResult -> ShowS
Prelude.Show, forall x. Rep ValidationResult x -> ValidationResult
forall x. ValidationResult -> Rep ValidationResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ValidationResult x -> ValidationResult
$cfrom :: forall x. ValidationResult -> Rep ValidationResult x
Prelude.Generic)
newValidationResult ::
LaunchProfileValidationState ->
LaunchProfileValidationStatusCode ->
Prelude.Text ->
LaunchProfileValidationType ->
ValidationResult
newValidationResult :: LaunchProfileValidationState
-> LaunchProfileValidationStatusCode
-> Text
-> LaunchProfileValidationType
-> ValidationResult
newValidationResult
LaunchProfileValidationState
pState_
LaunchProfileValidationStatusCode
pStatusCode_
Text
pStatusMessage_
LaunchProfileValidationType
pType_ =
ValidationResult'
{ $sel:state:ValidationResult' :: LaunchProfileValidationState
state = LaunchProfileValidationState
pState_,
$sel:statusCode:ValidationResult' :: LaunchProfileValidationStatusCode
statusCode = LaunchProfileValidationStatusCode
pStatusCode_,
$sel:statusMessage:ValidationResult' :: Text
statusMessage = Text
pStatusMessage_,
$sel:type':ValidationResult' :: LaunchProfileValidationType
type' = LaunchProfileValidationType
pType_
}
validationResult_state :: Lens.Lens' ValidationResult LaunchProfileValidationState
validationResult_state :: Lens' ValidationResult LaunchProfileValidationState
validationResult_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidationResult' {LaunchProfileValidationState
state :: LaunchProfileValidationState
$sel:state:ValidationResult' :: ValidationResult -> LaunchProfileValidationState
state} -> LaunchProfileValidationState
state) (\s :: ValidationResult
s@ValidationResult' {} LaunchProfileValidationState
a -> ValidationResult
s {$sel:state:ValidationResult' :: LaunchProfileValidationState
state = LaunchProfileValidationState
a} :: ValidationResult)
validationResult_statusCode :: Lens.Lens' ValidationResult LaunchProfileValidationStatusCode
validationResult_statusCode :: Lens' ValidationResult LaunchProfileValidationStatusCode
validationResult_statusCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidationResult' {LaunchProfileValidationStatusCode
statusCode :: LaunchProfileValidationStatusCode
$sel:statusCode:ValidationResult' :: ValidationResult -> LaunchProfileValidationStatusCode
statusCode} -> LaunchProfileValidationStatusCode
statusCode) (\s :: ValidationResult
s@ValidationResult' {} LaunchProfileValidationStatusCode
a -> ValidationResult
s {$sel:statusCode:ValidationResult' :: LaunchProfileValidationStatusCode
statusCode = LaunchProfileValidationStatusCode
a} :: ValidationResult)
validationResult_statusMessage :: Lens.Lens' ValidationResult Prelude.Text
validationResult_statusMessage :: Lens' ValidationResult Text
validationResult_statusMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidationResult' {Text
statusMessage :: Text
$sel:statusMessage:ValidationResult' :: ValidationResult -> Text
statusMessage} -> Text
statusMessage) (\s :: ValidationResult
s@ValidationResult' {} Text
a -> ValidationResult
s {$sel:statusMessage:ValidationResult' :: Text
statusMessage = Text
a} :: ValidationResult)
validationResult_type :: Lens.Lens' ValidationResult LaunchProfileValidationType
validationResult_type :: Lens' ValidationResult LaunchProfileValidationType
validationResult_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidationResult' {LaunchProfileValidationType
type' :: LaunchProfileValidationType
$sel:type':ValidationResult' :: ValidationResult -> LaunchProfileValidationType
type'} -> LaunchProfileValidationType
type') (\s :: ValidationResult
s@ValidationResult' {} LaunchProfileValidationType
a -> ValidationResult
s {$sel:type':ValidationResult' :: LaunchProfileValidationType
type' = LaunchProfileValidationType
a} :: ValidationResult)
instance Data.FromJSON ValidationResult where
parseJSON :: Value -> Parser ValidationResult
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ValidationResult"
( \Object
x ->
LaunchProfileValidationState
-> LaunchProfileValidationStatusCode
-> Text
-> LaunchProfileValidationType
-> ValidationResult
ValidationResult'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"state")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"statusCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"statusMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"type")
)
instance Prelude.Hashable ValidationResult where
hashWithSalt :: Int -> ValidationResult -> Int
hashWithSalt Int
_salt ValidationResult' {Text
LaunchProfileValidationState
LaunchProfileValidationStatusCode
LaunchProfileValidationType
type' :: LaunchProfileValidationType
statusMessage :: Text
statusCode :: LaunchProfileValidationStatusCode
state :: LaunchProfileValidationState
$sel:type':ValidationResult' :: ValidationResult -> LaunchProfileValidationType
$sel:statusMessage:ValidationResult' :: ValidationResult -> Text
$sel:statusCode:ValidationResult' :: ValidationResult -> LaunchProfileValidationStatusCode
$sel:state:ValidationResult' :: ValidationResult -> LaunchProfileValidationState
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LaunchProfileValidationState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LaunchProfileValidationStatusCode
statusCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
statusMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LaunchProfileValidationType
type'
instance Prelude.NFData ValidationResult where
rnf :: ValidationResult -> ()
rnf ValidationResult' {Text
LaunchProfileValidationState
LaunchProfileValidationStatusCode
LaunchProfileValidationType
type' :: LaunchProfileValidationType
statusMessage :: Text
statusCode :: LaunchProfileValidationStatusCode
state :: LaunchProfileValidationState
$sel:type':ValidationResult' :: ValidationResult -> LaunchProfileValidationType
$sel:statusMessage:ValidationResult' :: ValidationResult -> Text
$sel:statusCode:ValidationResult' :: ValidationResult -> LaunchProfileValidationStatusCode
$sel:state:ValidationResult' :: ValidationResult -> LaunchProfileValidationState
..} =
forall a. NFData a => a -> ()
Prelude.rnf LaunchProfileValidationState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LaunchProfileValidationStatusCode
statusCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
statusMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LaunchProfileValidationType
type'