module Stratosphere.IoT.EncryptionConfiguration.ConfigurationDetailsProperty (
        ConfigurationDetailsProperty(..), mkConfigurationDetailsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConfigurationDetailsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-encryptionconfiguration-configurationdetails.html>
    ConfigurationDetailsProperty {ConfigurationDetailsProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-encryptionconfiguration-configurationdetails.html#cfn-iot-encryptionconfiguration-configurationdetails-configurationstatus>
                                  ConfigurationDetailsProperty -> Maybe (Value Text)
configurationStatus :: (Prelude.Maybe (Value Prelude.Text)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-encryptionconfiguration-configurationdetails.html#cfn-iot-encryptionconfiguration-configurationdetails-errorcode>
                                  ConfigurationDetailsProperty -> Maybe (Value Text)
errorCode :: (Prelude.Maybe (Value Prelude.Text)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-encryptionconfiguration-configurationdetails.html#cfn-iot-encryptionconfiguration-configurationdetails-errormessage>
                                  ConfigurationDetailsProperty -> Maybe (Value Text)
errorMessage :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ConfigurationDetailsProperty
-> ConfigurationDetailsProperty -> Bool
(ConfigurationDetailsProperty
 -> ConfigurationDetailsProperty -> Bool)
-> (ConfigurationDetailsProperty
    -> ConfigurationDetailsProperty -> Bool)
-> Eq ConfigurationDetailsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfigurationDetailsProperty
-> ConfigurationDetailsProperty -> Bool
== :: ConfigurationDetailsProperty
-> ConfigurationDetailsProperty -> Bool
$c/= :: ConfigurationDetailsProperty
-> ConfigurationDetailsProperty -> Bool
/= :: ConfigurationDetailsProperty
-> ConfigurationDetailsProperty -> Bool
Prelude.Eq, Int -> ConfigurationDetailsProperty -> ShowS
[ConfigurationDetailsProperty] -> ShowS
ConfigurationDetailsProperty -> String
(Int -> ConfigurationDetailsProperty -> ShowS)
-> (ConfigurationDetailsProperty -> String)
-> ([ConfigurationDetailsProperty] -> ShowS)
-> Show ConfigurationDetailsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfigurationDetailsProperty -> ShowS
showsPrec :: Int -> ConfigurationDetailsProperty -> ShowS
$cshow :: ConfigurationDetailsProperty -> String
show :: ConfigurationDetailsProperty -> String
$cshowList :: [ConfigurationDetailsProperty] -> ShowS
showList :: [ConfigurationDetailsProperty] -> ShowS
Prelude.Show)
mkConfigurationDetailsProperty :: ConfigurationDetailsProperty
mkConfigurationDetailsProperty :: ConfigurationDetailsProperty
mkConfigurationDetailsProperty
  = ConfigurationDetailsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), configurationStatus :: Maybe (Value Text)
configurationStatus = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       errorCode :: Maybe (Value Text)
errorCode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, errorMessage :: Maybe (Value Text)
errorMessage = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConfigurationDetailsProperty where
  toResourceProperties :: ConfigurationDetailsProperty -> ResourceProperties
toResourceProperties ConfigurationDetailsProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConfigurationDetailsProperty -> ()
configurationStatus :: ConfigurationDetailsProperty -> Maybe (Value Text)
errorCode :: ConfigurationDetailsProperty -> Maybe (Value Text)
errorMessage :: ConfigurationDetailsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationStatus :: Maybe (Value Text)
errorCode :: Maybe (Value Text)
errorMessage :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::EncryptionConfiguration.ConfigurationDetails",
         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
"ConfigurationStatus" (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)
configurationStatus,
                            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
"ErrorMessage" (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)
errorMessage])}
instance JSON.ToJSON ConfigurationDetailsProperty where
  toJSON :: ConfigurationDetailsProperty -> Value
toJSON ConfigurationDetailsProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConfigurationDetailsProperty -> ()
configurationStatus :: ConfigurationDetailsProperty -> Maybe (Value Text)
errorCode :: ConfigurationDetailsProperty -> Maybe (Value Text)
errorMessage :: ConfigurationDetailsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationStatus :: Maybe (Value Text)
errorCode :: Maybe (Value Text)
errorMessage :: 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
"ConfigurationStatus" (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)
configurationStatus,
               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
"ErrorMessage" (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)
errorMessage]))
instance Property "ConfigurationStatus" ConfigurationDetailsProperty where
  type PropertyType "ConfigurationStatus" ConfigurationDetailsProperty = Value Prelude.Text
  set :: PropertyType "ConfigurationStatus" ConfigurationDetailsProperty
-> ConfigurationDetailsProperty -> ConfigurationDetailsProperty
set PropertyType "ConfigurationStatus" ConfigurationDetailsProperty
newValue ConfigurationDetailsProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConfigurationDetailsProperty -> ()
configurationStatus :: ConfigurationDetailsProperty -> Maybe (Value Text)
errorCode :: ConfigurationDetailsProperty -> Maybe (Value Text)
errorMessage :: ConfigurationDetailsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationStatus :: Maybe (Value Text)
errorCode :: Maybe (Value Text)
errorMessage :: Maybe (Value Text)
..}
    = ConfigurationDetailsProperty
        {configurationStatus :: Maybe (Value Text)
configurationStatus = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConfigurationStatus" ConfigurationDetailsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
errorCode :: Maybe (Value Text)
errorMessage :: Maybe (Value Text)
haddock_workaround_ :: ()
errorCode :: Maybe (Value Text)
errorMessage :: Maybe (Value Text)
..}
instance Property "ErrorCode" ConfigurationDetailsProperty where
  type PropertyType "ErrorCode" ConfigurationDetailsProperty = Value Prelude.Text
  set :: PropertyType "ErrorCode" ConfigurationDetailsProperty
-> ConfigurationDetailsProperty -> ConfigurationDetailsProperty
set PropertyType "ErrorCode" ConfigurationDetailsProperty
newValue ConfigurationDetailsProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConfigurationDetailsProperty -> ()
configurationStatus :: ConfigurationDetailsProperty -> Maybe (Value Text)
errorCode :: ConfigurationDetailsProperty -> Maybe (Value Text)
errorMessage :: ConfigurationDetailsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationStatus :: Maybe (Value Text)
errorCode :: Maybe (Value Text)
errorMessage :: Maybe (Value Text)
..}
    = ConfigurationDetailsProperty
        {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" ConfigurationDetailsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
configurationStatus :: Maybe (Value Text)
errorMessage :: Maybe (Value Text)
haddock_workaround_ :: ()
configurationStatus :: Maybe (Value Text)
errorMessage :: Maybe (Value Text)
..}
instance Property "ErrorMessage" ConfigurationDetailsProperty where
  type PropertyType "ErrorMessage" ConfigurationDetailsProperty = Value Prelude.Text
  set :: PropertyType "ErrorMessage" ConfigurationDetailsProperty
-> ConfigurationDetailsProperty -> ConfigurationDetailsProperty
set PropertyType "ErrorMessage" ConfigurationDetailsProperty
newValue ConfigurationDetailsProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConfigurationDetailsProperty -> ()
configurationStatus :: ConfigurationDetailsProperty -> Maybe (Value Text)
errorCode :: ConfigurationDetailsProperty -> Maybe (Value Text)
errorMessage :: ConfigurationDetailsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
configurationStatus :: Maybe (Value Text)
errorCode :: Maybe (Value Text)
errorMessage :: Maybe (Value Text)
..}
    = ConfigurationDetailsProperty
        {errorMessage :: Maybe (Value Text)
errorMessage = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ErrorMessage" ConfigurationDetailsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
configurationStatus :: Maybe (Value Text)
errorCode :: Maybe (Value Text)
haddock_workaround_ :: ()
configurationStatus :: Maybe (Value Text)
errorCode :: Maybe (Value Text)
..}