module Stratosphere.IoTCoreDeviceAdvisor.SuiteDefinition.DeviceUnderTestProperty (
        DeviceUnderTestProperty(..), mkDeviceUnderTestProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DeviceUnderTestProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotcoredeviceadvisor-suitedefinition-deviceundertest.html>
    DeviceUnderTestProperty {DeviceUnderTestProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotcoredeviceadvisor-suitedefinition-deviceundertest.html#cfn-iotcoredeviceadvisor-suitedefinition-deviceundertest-certificatearn>
                             DeviceUnderTestProperty -> Maybe (Value Text)
certificateArn :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotcoredeviceadvisor-suitedefinition-deviceundertest.html#cfn-iotcoredeviceadvisor-suitedefinition-deviceundertest-thingarn>
                             DeviceUnderTestProperty -> Maybe (Value Text)
thingArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DeviceUnderTestProperty -> DeviceUnderTestProperty -> Bool
(DeviceUnderTestProperty -> DeviceUnderTestProperty -> Bool)
-> (DeviceUnderTestProperty -> DeviceUnderTestProperty -> Bool)
-> Eq DeviceUnderTestProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeviceUnderTestProperty -> DeviceUnderTestProperty -> Bool
== :: DeviceUnderTestProperty -> DeviceUnderTestProperty -> Bool
$c/= :: DeviceUnderTestProperty -> DeviceUnderTestProperty -> Bool
/= :: DeviceUnderTestProperty -> DeviceUnderTestProperty -> Bool
Prelude.Eq, Int -> DeviceUnderTestProperty -> ShowS
[DeviceUnderTestProperty] -> ShowS
DeviceUnderTestProperty -> String
(Int -> DeviceUnderTestProperty -> ShowS)
-> (DeviceUnderTestProperty -> String)
-> ([DeviceUnderTestProperty] -> ShowS)
-> Show DeviceUnderTestProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeviceUnderTestProperty -> ShowS
showsPrec :: Int -> DeviceUnderTestProperty -> ShowS
$cshow :: DeviceUnderTestProperty -> String
show :: DeviceUnderTestProperty -> String
$cshowList :: [DeviceUnderTestProperty] -> ShowS
showList :: [DeviceUnderTestProperty] -> ShowS
Prelude.Show)
mkDeviceUnderTestProperty :: DeviceUnderTestProperty
mkDeviceUnderTestProperty :: DeviceUnderTestProperty
mkDeviceUnderTestProperty
  = DeviceUnderTestProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), certificateArn :: Maybe (Value Text)
certificateArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       thingArn :: Maybe (Value Text)
thingArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DeviceUnderTestProperty where
  toResourceProperties :: DeviceUnderTestProperty -> ResourceProperties
toResourceProperties DeviceUnderTestProperty {Maybe (Value Text)
()
haddock_workaround_ :: DeviceUnderTestProperty -> ()
certificateArn :: DeviceUnderTestProperty -> Maybe (Value Text)
thingArn :: DeviceUnderTestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: Maybe (Value Text)
thingArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTCoreDeviceAdvisor::SuiteDefinition.DeviceUnderTest",
         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
"CertificateArn" (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)
certificateArn,
                            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
"ThingArn" (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)
thingArn])}
instance JSON.ToJSON DeviceUnderTestProperty where
  toJSON :: DeviceUnderTestProperty -> Value
toJSON DeviceUnderTestProperty {Maybe (Value Text)
()
haddock_workaround_ :: DeviceUnderTestProperty -> ()
certificateArn :: DeviceUnderTestProperty -> Maybe (Value Text)
thingArn :: DeviceUnderTestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: Maybe (Value Text)
thingArn :: 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
"CertificateArn" (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)
certificateArn,
               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
"ThingArn" (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)
thingArn]))
instance Property "CertificateArn" DeviceUnderTestProperty where
  type PropertyType "CertificateArn" DeviceUnderTestProperty = Value Prelude.Text
  set :: PropertyType "CertificateArn" DeviceUnderTestProperty
-> DeviceUnderTestProperty -> DeviceUnderTestProperty
set PropertyType "CertificateArn" DeviceUnderTestProperty
newValue DeviceUnderTestProperty {Maybe (Value Text)
()
haddock_workaround_ :: DeviceUnderTestProperty -> ()
certificateArn :: DeviceUnderTestProperty -> Maybe (Value Text)
thingArn :: DeviceUnderTestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: Maybe (Value Text)
thingArn :: Maybe (Value Text)
..}
    = DeviceUnderTestProperty
        {certificateArn :: Maybe (Value Text)
certificateArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CertificateArn" DeviceUnderTestProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
thingArn :: Maybe (Value Text)
haddock_workaround_ :: ()
thingArn :: Maybe (Value Text)
..}
instance Property "ThingArn" DeviceUnderTestProperty where
  type PropertyType "ThingArn" DeviceUnderTestProperty = Value Prelude.Text
  set :: PropertyType "ThingArn" DeviceUnderTestProperty
-> DeviceUnderTestProperty -> DeviceUnderTestProperty
set PropertyType "ThingArn" DeviceUnderTestProperty
newValue DeviceUnderTestProperty {Maybe (Value Text)
()
haddock_workaround_ :: DeviceUnderTestProperty -> ()
certificateArn :: DeviceUnderTestProperty -> Maybe (Value Text)
thingArn :: DeviceUnderTestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: Maybe (Value Text)
thingArn :: Maybe (Value Text)
..}
    = DeviceUnderTestProperty {thingArn :: Maybe (Value Text)
thingArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ThingArn" DeviceUnderTestProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
certificateArn :: Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: Maybe (Value Text)
..}