module Stratosphere.IoTFleetWise.DecoderManifest.CanInterfaceProperty (
CanInterfaceProperty(..), mkCanInterfaceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CanInterfaceProperty
=
CanInterfaceProperty {CanInterfaceProperty -> ()
haddock_workaround_ :: (),
CanInterfaceProperty -> Value Text
name :: (Value Prelude.Text),
CanInterfaceProperty -> Maybe (Value Text)
protocolName :: (Prelude.Maybe (Value Prelude.Text)),
CanInterfaceProperty -> Maybe (Value Text)
protocolVersion :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (CanInterfaceProperty -> CanInterfaceProperty -> Bool
(CanInterfaceProperty -> CanInterfaceProperty -> Bool)
-> (CanInterfaceProperty -> CanInterfaceProperty -> Bool)
-> Eq CanInterfaceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CanInterfaceProperty -> CanInterfaceProperty -> Bool
== :: CanInterfaceProperty -> CanInterfaceProperty -> Bool
$c/= :: CanInterfaceProperty -> CanInterfaceProperty -> Bool
/= :: CanInterfaceProperty -> CanInterfaceProperty -> Bool
Prelude.Eq, Int -> CanInterfaceProperty -> ShowS
[CanInterfaceProperty] -> ShowS
CanInterfaceProperty -> String
(Int -> CanInterfaceProperty -> ShowS)
-> (CanInterfaceProperty -> String)
-> ([CanInterfaceProperty] -> ShowS)
-> Show CanInterfaceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CanInterfaceProperty -> ShowS
showsPrec :: Int -> CanInterfaceProperty -> ShowS
$cshow :: CanInterfaceProperty -> String
show :: CanInterfaceProperty -> String
$cshowList :: [CanInterfaceProperty] -> ShowS
showList :: [CanInterfaceProperty] -> ShowS
Prelude.Show)
mkCanInterfaceProperty ::
Value Prelude.Text -> CanInterfaceProperty
mkCanInterfaceProperty :: Value Text -> CanInterfaceProperty
mkCanInterfaceProperty Value Text
name
= CanInterfaceProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
protocolName :: Maybe (Value Text)
protocolName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, protocolVersion :: Maybe (Value Text)
protocolVersion = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CanInterfaceProperty where
toResourceProperties :: CanInterfaceProperty -> ResourceProperties
toResourceProperties CanInterfaceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CanInterfaceProperty -> ()
name :: CanInterfaceProperty -> Value Text
protocolName :: CanInterfaceProperty -> Maybe (Value Text)
protocolVersion :: CanInterfaceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
protocolName :: Maybe (Value Text)
protocolVersion :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTFleetWise::DecoderManifest.CanInterface",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Name" 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..= Value Text
name]
([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
"ProtocolName" (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)
protocolName,
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
"ProtocolVersion" (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)
protocolVersion]))}
instance JSON.ToJSON CanInterfaceProperty where
toJSON :: CanInterfaceProperty -> Value
toJSON CanInterfaceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CanInterfaceProperty -> ()
name :: CanInterfaceProperty -> Value Text
protocolName :: CanInterfaceProperty -> Maybe (Value Text)
protocolVersion :: CanInterfaceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
protocolName :: Maybe (Value Text)
protocolVersion :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Name" 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..= Value Text
name]
([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
"ProtocolName" (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)
protocolName,
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
"ProtocolVersion" (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)
protocolVersion])))
instance Property "Name" CanInterfaceProperty where
type PropertyType "Name" CanInterfaceProperty = Value Prelude.Text
set :: PropertyType "Name" CanInterfaceProperty
-> CanInterfaceProperty -> CanInterfaceProperty
set PropertyType "Name" CanInterfaceProperty
newValue CanInterfaceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CanInterfaceProperty -> ()
name :: CanInterfaceProperty -> Value Text
protocolName :: CanInterfaceProperty -> Maybe (Value Text)
protocolVersion :: CanInterfaceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
protocolName :: Maybe (Value Text)
protocolVersion :: Maybe (Value Text)
..}
= CanInterfaceProperty {name :: Value Text
name = PropertyType "Name" CanInterfaceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
protocolName :: Maybe (Value Text)
protocolVersion :: Maybe (Value Text)
haddock_workaround_ :: ()
protocolName :: Maybe (Value Text)
protocolVersion :: Maybe (Value Text)
..}
instance Property "ProtocolName" CanInterfaceProperty where
type PropertyType "ProtocolName" CanInterfaceProperty = Value Prelude.Text
set :: PropertyType "ProtocolName" CanInterfaceProperty
-> CanInterfaceProperty -> CanInterfaceProperty
set PropertyType "ProtocolName" CanInterfaceProperty
newValue CanInterfaceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CanInterfaceProperty -> ()
name :: CanInterfaceProperty -> Value Text
protocolName :: CanInterfaceProperty -> Maybe (Value Text)
protocolVersion :: CanInterfaceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
protocolName :: Maybe (Value Text)
protocolVersion :: Maybe (Value Text)
..}
= CanInterfaceProperty {protocolName :: Maybe (Value Text)
protocolName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ProtocolName" CanInterfaceProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
protocolVersion :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
protocolVersion :: Maybe (Value Text)
..}
instance Property "ProtocolVersion" CanInterfaceProperty where
type PropertyType "ProtocolVersion" CanInterfaceProperty = Value Prelude.Text
set :: PropertyType "ProtocolVersion" CanInterfaceProperty
-> CanInterfaceProperty -> CanInterfaceProperty
set PropertyType "ProtocolVersion" CanInterfaceProperty
newValue CanInterfaceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CanInterfaceProperty -> ()
name :: CanInterfaceProperty -> Value Text
protocolName :: CanInterfaceProperty -> Maybe (Value Text)
protocolVersion :: CanInterfaceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
protocolName :: Maybe (Value Text)
protocolVersion :: Maybe (Value Text)
..}
= CanInterfaceProperty
{protocolVersion :: Maybe (Value Text)
protocolVersion = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ProtocolVersion" CanInterfaceProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
protocolName :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
protocolName :: Maybe (Value Text)
..}