module Stratosphere.PCS.Queue.ErrorInfoProperty (
        ErrorInfoProperty(..), mkErrorInfoProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ErrorInfoProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-queue-errorinfo.html>
    ErrorInfoProperty {ErrorInfoProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-queue-errorinfo.html#cfn-pcs-queue-errorinfo-code>
                       ErrorInfoProperty -> Maybe (Value Text)
code :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-queue-errorinfo.html#cfn-pcs-queue-errorinfo-message>
                       ErrorInfoProperty -> Maybe (Value Text)
message :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ErrorInfoProperty -> ErrorInfoProperty -> Bool
(ErrorInfoProperty -> ErrorInfoProperty -> Bool)
-> (ErrorInfoProperty -> ErrorInfoProperty -> Bool)
-> Eq ErrorInfoProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ErrorInfoProperty -> ErrorInfoProperty -> Bool
== :: ErrorInfoProperty -> ErrorInfoProperty -> Bool
$c/= :: ErrorInfoProperty -> ErrorInfoProperty -> Bool
/= :: ErrorInfoProperty -> ErrorInfoProperty -> Bool
Prelude.Eq, Int -> ErrorInfoProperty -> ShowS
[ErrorInfoProperty] -> ShowS
ErrorInfoProperty -> String
(Int -> ErrorInfoProperty -> ShowS)
-> (ErrorInfoProperty -> String)
-> ([ErrorInfoProperty] -> ShowS)
-> Show ErrorInfoProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ErrorInfoProperty -> ShowS
showsPrec :: Int -> ErrorInfoProperty -> ShowS
$cshow :: ErrorInfoProperty -> String
show :: ErrorInfoProperty -> String
$cshowList :: [ErrorInfoProperty] -> ShowS
showList :: [ErrorInfoProperty] -> ShowS
Prelude.Show)
mkErrorInfoProperty :: ErrorInfoProperty
mkErrorInfoProperty :: ErrorInfoProperty
mkErrorInfoProperty
  = ErrorInfoProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), code :: Maybe (Value Text)
code = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       message :: Maybe (Value Text)
message = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ErrorInfoProperty where
  toResourceProperties :: ErrorInfoProperty -> ResourceProperties
toResourceProperties ErrorInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: ErrorInfoProperty -> ()
code :: ErrorInfoProperty -> Maybe (Value Text)
message :: ErrorInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
code :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PCS::Queue.ErrorInfo",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Code" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
code,
                            Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Message" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
message])}
instance JSON.ToJSON ErrorInfoProperty where
  toJSON :: ErrorInfoProperty -> Value
toJSON ErrorInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: ErrorInfoProperty -> ()
code :: ErrorInfoProperty -> Maybe (Value Text)
message :: ErrorInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
code :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Code" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
code,
               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Message" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
message]))
instance Property "Code" ErrorInfoProperty where
  type PropertyType "Code" ErrorInfoProperty = Value Prelude.Text
  set :: PropertyType "Code" ErrorInfoProperty
-> ErrorInfoProperty -> ErrorInfoProperty
set PropertyType "Code" ErrorInfoProperty
newValue ErrorInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: ErrorInfoProperty -> ()
code :: ErrorInfoProperty -> Maybe (Value Text)
message :: ErrorInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
code :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
    = ErrorInfoProperty {code :: Maybe (Value Text)
code = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Code" ErrorInfoProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
message :: Maybe (Value Text)
haddock_workaround_ :: ()
message :: Maybe (Value Text)
..}
instance Property "Message" ErrorInfoProperty where
  type PropertyType "Message" ErrorInfoProperty = Value Prelude.Text
  set :: PropertyType "Message" ErrorInfoProperty
-> ErrorInfoProperty -> ErrorInfoProperty
set PropertyType "Message" ErrorInfoProperty
newValue ErrorInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: ErrorInfoProperty -> ()
code :: ErrorInfoProperty -> Maybe (Value Text)
message :: ErrorInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
code :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
    = ErrorInfoProperty {message :: Maybe (Value Text)
message = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Message" ErrorInfoProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
code :: Maybe (Value Text)
haddock_workaround_ :: ()
code :: Maybe (Value Text)
..}