module Stratosphere.S3Outposts.Endpoint.FailedReasonProperty (
        FailedReasonProperty(..), mkFailedReasonProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FailedReasonProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-endpoint-failedreason.html>
    FailedReasonProperty {FailedReasonProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-endpoint-failedreason.html#cfn-s3outposts-endpoint-failedreason-errorcode>
                          FailedReasonProperty -> Maybe (Value Text)
errorCode :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-endpoint-failedreason.html#cfn-s3outposts-endpoint-failedreason-message>
                          FailedReasonProperty -> Maybe (Value Text)
message :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (FailedReasonProperty -> FailedReasonProperty -> Bool
(FailedReasonProperty -> FailedReasonProperty -> Bool)
-> (FailedReasonProperty -> FailedReasonProperty -> Bool)
-> Eq FailedReasonProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FailedReasonProperty -> FailedReasonProperty -> Bool
== :: FailedReasonProperty -> FailedReasonProperty -> Bool
$c/= :: FailedReasonProperty -> FailedReasonProperty -> Bool
/= :: FailedReasonProperty -> FailedReasonProperty -> Bool
Prelude.Eq, Int -> FailedReasonProperty -> ShowS
[FailedReasonProperty] -> ShowS
FailedReasonProperty -> String
(Int -> FailedReasonProperty -> ShowS)
-> (FailedReasonProperty -> String)
-> ([FailedReasonProperty] -> ShowS)
-> Show FailedReasonProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FailedReasonProperty -> ShowS
showsPrec :: Int -> FailedReasonProperty -> ShowS
$cshow :: FailedReasonProperty -> String
show :: FailedReasonProperty -> String
$cshowList :: [FailedReasonProperty] -> ShowS
showList :: [FailedReasonProperty] -> ShowS
Prelude.Show)
mkFailedReasonProperty :: FailedReasonProperty
mkFailedReasonProperty :: FailedReasonProperty
mkFailedReasonProperty
  = FailedReasonProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), errorCode :: Maybe (Value Text)
errorCode = 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 FailedReasonProperty where
  toResourceProperties :: FailedReasonProperty -> ResourceProperties
toResourceProperties FailedReasonProperty {Maybe (Value Text)
()
haddock_workaround_ :: FailedReasonProperty -> ()
errorCode :: FailedReasonProperty -> Maybe (Value Text)
message :: FailedReasonProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorCode :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3Outposts::Endpoint.FailedReason",
         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
"ErrorCode" (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)
errorCode,
                            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 FailedReasonProperty where
  toJSON :: FailedReasonProperty -> Value
toJSON FailedReasonProperty {Maybe (Value Text)
()
haddock_workaround_ :: FailedReasonProperty -> ()
errorCode :: FailedReasonProperty -> Maybe (Value Text)
message :: FailedReasonProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorCode :: 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
"ErrorCode" (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)
errorCode,
               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 "ErrorCode" FailedReasonProperty where
  type PropertyType "ErrorCode" FailedReasonProperty = Value Prelude.Text
  set :: PropertyType "ErrorCode" FailedReasonProperty
-> FailedReasonProperty -> FailedReasonProperty
set PropertyType "ErrorCode" FailedReasonProperty
newValue FailedReasonProperty {Maybe (Value Text)
()
haddock_workaround_ :: FailedReasonProperty -> ()
errorCode :: FailedReasonProperty -> Maybe (Value Text)
message :: FailedReasonProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorCode :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
    = FailedReasonProperty {errorCode :: Maybe (Value Text)
errorCode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ErrorCode" FailedReasonProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
message :: Maybe (Value Text)
haddock_workaround_ :: ()
message :: Maybe (Value Text)
..}
instance Property "Message" FailedReasonProperty where
  type PropertyType "Message" FailedReasonProperty = Value Prelude.Text
  set :: PropertyType "Message" FailedReasonProperty
-> FailedReasonProperty -> FailedReasonProperty
set PropertyType "Message" FailedReasonProperty
newValue FailedReasonProperty {Maybe (Value Text)
()
haddock_workaround_ :: FailedReasonProperty -> ()
errorCode :: FailedReasonProperty -> Maybe (Value Text)
message :: FailedReasonProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorCode :: Maybe (Value Text)
message :: Maybe (Value Text)
..}
    = FailedReasonProperty {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" FailedReasonProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
errorCode :: Maybe (Value Text)
haddock_workaround_ :: ()
errorCode :: Maybe (Value Text)
..}