{-# 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.DeviceFarm.Types.IncompatibilityMessage where
import qualified Amazonka.Core as Core
import Amazonka.DeviceFarm.Types.DeviceAttribute
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data IncompatibilityMessage = IncompatibilityMessage'
{
IncompatibilityMessage -> Maybe DeviceAttribute
type' :: Prelude.Maybe DeviceAttribute,
IncompatibilityMessage -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (IncompatibilityMessage -> IncompatibilityMessage -> Bool
(IncompatibilityMessage -> IncompatibilityMessage -> Bool)
-> (IncompatibilityMessage -> IncompatibilityMessage -> Bool)
-> Eq IncompatibilityMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IncompatibilityMessage -> IncompatibilityMessage -> Bool
$c/= :: IncompatibilityMessage -> IncompatibilityMessage -> Bool
== :: IncompatibilityMessage -> IncompatibilityMessage -> Bool
$c== :: IncompatibilityMessage -> IncompatibilityMessage -> Bool
Prelude.Eq, ReadPrec [IncompatibilityMessage]
ReadPrec IncompatibilityMessage
Int -> ReadS IncompatibilityMessage
ReadS [IncompatibilityMessage]
(Int -> ReadS IncompatibilityMessage)
-> ReadS [IncompatibilityMessage]
-> ReadPrec IncompatibilityMessage
-> ReadPrec [IncompatibilityMessage]
-> Read IncompatibilityMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IncompatibilityMessage]
$creadListPrec :: ReadPrec [IncompatibilityMessage]
readPrec :: ReadPrec IncompatibilityMessage
$creadPrec :: ReadPrec IncompatibilityMessage
readList :: ReadS [IncompatibilityMessage]
$creadList :: ReadS [IncompatibilityMessage]
readsPrec :: Int -> ReadS IncompatibilityMessage
$creadsPrec :: Int -> ReadS IncompatibilityMessage
Prelude.Read, Int -> IncompatibilityMessage -> ShowS
[IncompatibilityMessage] -> ShowS
IncompatibilityMessage -> String
(Int -> IncompatibilityMessage -> ShowS)
-> (IncompatibilityMessage -> String)
-> ([IncompatibilityMessage] -> ShowS)
-> Show IncompatibilityMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IncompatibilityMessage] -> ShowS
$cshowList :: [IncompatibilityMessage] -> ShowS
show :: IncompatibilityMessage -> String
$cshow :: IncompatibilityMessage -> String
showsPrec :: Int -> IncompatibilityMessage -> ShowS
$cshowsPrec :: Int -> IncompatibilityMessage -> ShowS
Prelude.Show, (forall x. IncompatibilityMessage -> Rep IncompatibilityMessage x)
-> (forall x.
Rep IncompatibilityMessage x -> IncompatibilityMessage)
-> Generic IncompatibilityMessage
forall x. Rep IncompatibilityMessage x -> IncompatibilityMessage
forall x. IncompatibilityMessage -> Rep IncompatibilityMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IncompatibilityMessage x -> IncompatibilityMessage
$cfrom :: forall x. IncompatibilityMessage -> Rep IncompatibilityMessage x
Prelude.Generic)
newIncompatibilityMessage ::
IncompatibilityMessage
newIncompatibilityMessage :: IncompatibilityMessage
newIncompatibilityMessage =
IncompatibilityMessage' :: Maybe DeviceAttribute -> Maybe Text -> IncompatibilityMessage
IncompatibilityMessage'
{ $sel:type':IncompatibilityMessage' :: Maybe DeviceAttribute
type' = Maybe DeviceAttribute
forall a. Maybe a
Prelude.Nothing,
$sel:message:IncompatibilityMessage' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
incompatibilityMessage_type :: Lens.Lens' IncompatibilityMessage (Prelude.Maybe DeviceAttribute)
incompatibilityMessage_type :: (Maybe DeviceAttribute -> f (Maybe DeviceAttribute))
-> IncompatibilityMessage -> f IncompatibilityMessage
incompatibilityMessage_type = (IncompatibilityMessage -> Maybe DeviceAttribute)
-> (IncompatibilityMessage
-> Maybe DeviceAttribute -> IncompatibilityMessage)
-> Lens
IncompatibilityMessage
IncompatibilityMessage
(Maybe DeviceAttribute)
(Maybe DeviceAttribute)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncompatibilityMessage' {Maybe DeviceAttribute
type' :: Maybe DeviceAttribute
$sel:type':IncompatibilityMessage' :: IncompatibilityMessage -> Maybe DeviceAttribute
type'} -> Maybe DeviceAttribute
type') (\s :: IncompatibilityMessage
s@IncompatibilityMessage' {} Maybe DeviceAttribute
a -> IncompatibilityMessage
s {$sel:type':IncompatibilityMessage' :: Maybe DeviceAttribute
type' = Maybe DeviceAttribute
a} :: IncompatibilityMessage)
incompatibilityMessage_message :: Lens.Lens' IncompatibilityMessage (Prelude.Maybe Prelude.Text)
incompatibilityMessage_message :: (Maybe Text -> f (Maybe Text))
-> IncompatibilityMessage -> f IncompatibilityMessage
incompatibilityMessage_message = (IncompatibilityMessage -> Maybe Text)
-> (IncompatibilityMessage -> Maybe Text -> IncompatibilityMessage)
-> Lens
IncompatibilityMessage
IncompatibilityMessage
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncompatibilityMessage' {Maybe Text
message :: Maybe Text
$sel:message:IncompatibilityMessage' :: IncompatibilityMessage -> Maybe Text
message} -> Maybe Text
message) (\s :: IncompatibilityMessage
s@IncompatibilityMessage' {} Maybe Text
a -> IncompatibilityMessage
s {$sel:message:IncompatibilityMessage' :: Maybe Text
message = Maybe Text
a} :: IncompatibilityMessage)
instance Core.FromJSON IncompatibilityMessage where
parseJSON :: Value -> Parser IncompatibilityMessage
parseJSON =
String
-> (Object -> Parser IncompatibilityMessage)
-> Value
-> Parser IncompatibilityMessage
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"IncompatibilityMessage"
( \Object
x ->
Maybe DeviceAttribute -> Maybe Text -> IncompatibilityMessage
IncompatibilityMessage'
(Maybe DeviceAttribute -> Maybe Text -> IncompatibilityMessage)
-> Parser (Maybe DeviceAttribute)
-> Parser (Maybe Text -> IncompatibilityMessage)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DeviceAttribute)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser (Maybe Text -> IncompatibilityMessage)
-> Parser (Maybe Text) -> Parser IncompatibilityMessage
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"message")
)
instance Prelude.Hashable IncompatibilityMessage
instance Prelude.NFData IncompatibilityMessage