module Stratosphere.NetworkManager.Device.LocationProperty (
        LocationProperty(..), mkLocationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LocationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-device-location.html>
    LocationProperty {LocationProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-device-location.html#cfn-networkmanager-device-location-address>
                      LocationProperty -> Maybe (Value Text)
address :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-device-location.html#cfn-networkmanager-device-location-latitude>
                      LocationProperty -> Maybe (Value Text)
latitude :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-device-location.html#cfn-networkmanager-device-location-longitude>
                      LocationProperty -> Maybe (Value Text)
longitude :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LocationProperty -> LocationProperty -> Bool
(LocationProperty -> LocationProperty -> Bool)
-> (LocationProperty -> LocationProperty -> Bool)
-> Eq LocationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LocationProperty -> LocationProperty -> Bool
== :: LocationProperty -> LocationProperty -> Bool
$c/= :: LocationProperty -> LocationProperty -> Bool
/= :: LocationProperty -> LocationProperty -> Bool
Prelude.Eq, Int -> LocationProperty -> ShowS
[LocationProperty] -> ShowS
LocationProperty -> String
(Int -> LocationProperty -> ShowS)
-> (LocationProperty -> String)
-> ([LocationProperty] -> ShowS)
-> Show LocationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LocationProperty -> ShowS
showsPrec :: Int -> LocationProperty -> ShowS
$cshow :: LocationProperty -> String
show :: LocationProperty -> String
$cshowList :: [LocationProperty] -> ShowS
showList :: [LocationProperty] -> ShowS
Prelude.Show)
mkLocationProperty :: LocationProperty
mkLocationProperty :: LocationProperty
mkLocationProperty
  = LocationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), address :: Maybe (Value Text)
address = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       latitude :: Maybe (Value Text)
latitude = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, longitude :: Maybe (Value Text)
longitude = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LocationProperty where
  toResourceProperties :: LocationProperty -> ResourceProperties
toResourceProperties LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LocationProperty -> ()
address :: LocationProperty -> Maybe (Value Text)
latitude :: LocationProperty -> Maybe (Value Text)
longitude :: LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
latitude :: Maybe (Value Text)
longitude :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::NetworkManager::Device.Location",
         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
"Address" (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)
address,
                            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
"Latitude" (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)
latitude,
                            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
"Longitude" (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)
longitude])}
instance JSON.ToJSON LocationProperty where
  toJSON :: LocationProperty -> Value
toJSON LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LocationProperty -> ()
address :: LocationProperty -> Maybe (Value Text)
latitude :: LocationProperty -> Maybe (Value Text)
longitude :: LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
latitude :: Maybe (Value Text)
longitude :: 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
"Address" (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)
address,
               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
"Latitude" (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)
latitude,
               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
"Longitude" (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)
longitude]))
instance Property "Address" LocationProperty where
  type PropertyType "Address" LocationProperty = Value Prelude.Text
  set :: PropertyType "Address" LocationProperty
-> LocationProperty -> LocationProperty
set PropertyType "Address" LocationProperty
newValue LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LocationProperty -> ()
address :: LocationProperty -> Maybe (Value Text)
latitude :: LocationProperty -> Maybe (Value Text)
longitude :: LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
latitude :: Maybe (Value Text)
longitude :: Maybe (Value Text)
..}
    = LocationProperty {address :: Maybe (Value Text)
address = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Address" LocationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
latitude :: Maybe (Value Text)
longitude :: Maybe (Value Text)
haddock_workaround_ :: ()
latitude :: Maybe (Value Text)
longitude :: Maybe (Value Text)
..}
instance Property "Latitude" LocationProperty where
  type PropertyType "Latitude" LocationProperty = Value Prelude.Text
  set :: PropertyType "Latitude" LocationProperty
-> LocationProperty -> LocationProperty
set PropertyType "Latitude" LocationProperty
newValue LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LocationProperty -> ()
address :: LocationProperty -> Maybe (Value Text)
latitude :: LocationProperty -> Maybe (Value Text)
longitude :: LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
latitude :: Maybe (Value Text)
longitude :: Maybe (Value Text)
..}
    = LocationProperty {latitude :: Maybe (Value Text)
latitude = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Latitude" LocationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
address :: Maybe (Value Text)
longitude :: Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
longitude :: Maybe (Value Text)
..}
instance Property "Longitude" LocationProperty where
  type PropertyType "Longitude" LocationProperty = Value Prelude.Text
  set :: PropertyType "Longitude" LocationProperty
-> LocationProperty -> LocationProperty
set PropertyType "Longitude" LocationProperty
newValue LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LocationProperty -> ()
address :: LocationProperty -> Maybe (Value Text)
latitude :: LocationProperty -> Maybe (Value Text)
longitude :: LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
latitude :: Maybe (Value Text)
longitude :: Maybe (Value Text)
..}
    = LocationProperty {longitude :: Maybe (Value Text)
longitude = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Longitude" LocationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
address :: Maybe (Value Text)
latitude :: Maybe (Value Text)
haddock_workaround_ :: ()
address :: Maybe (Value Text)
latitude :: Maybe (Value Text)
..}