module Stratosphere.Lightsail.Distribution.CacheBehaviorPerPathProperty (
        CacheBehaviorPerPathProperty(..), mkCacheBehaviorPerPathProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CacheBehaviorPerPathProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachebehaviorperpath.html>
    CacheBehaviorPerPathProperty {CacheBehaviorPerPathProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachebehaviorperpath.html#cfn-lightsail-distribution-cachebehaviorperpath-behavior>
                                  CacheBehaviorPerPathProperty -> Maybe (Value Text)
behavior :: (Prelude.Maybe (Value Prelude.Text)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachebehaviorperpath.html#cfn-lightsail-distribution-cachebehaviorperpath-path>
                                  CacheBehaviorPerPathProperty -> Maybe (Value Text)
path :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CacheBehaviorPerPathProperty
-> CacheBehaviorPerPathProperty -> Bool
(CacheBehaviorPerPathProperty
 -> CacheBehaviorPerPathProperty -> Bool)
-> (CacheBehaviorPerPathProperty
    -> CacheBehaviorPerPathProperty -> Bool)
-> Eq CacheBehaviorPerPathProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CacheBehaviorPerPathProperty
-> CacheBehaviorPerPathProperty -> Bool
== :: CacheBehaviorPerPathProperty
-> CacheBehaviorPerPathProperty -> Bool
$c/= :: CacheBehaviorPerPathProperty
-> CacheBehaviorPerPathProperty -> Bool
/= :: CacheBehaviorPerPathProperty
-> CacheBehaviorPerPathProperty -> Bool
Prelude.Eq, Int -> CacheBehaviorPerPathProperty -> ShowS
[CacheBehaviorPerPathProperty] -> ShowS
CacheBehaviorPerPathProperty -> String
(Int -> CacheBehaviorPerPathProperty -> ShowS)
-> (CacheBehaviorPerPathProperty -> String)
-> ([CacheBehaviorPerPathProperty] -> ShowS)
-> Show CacheBehaviorPerPathProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CacheBehaviorPerPathProperty -> ShowS
showsPrec :: Int -> CacheBehaviorPerPathProperty -> ShowS
$cshow :: CacheBehaviorPerPathProperty -> String
show :: CacheBehaviorPerPathProperty -> String
$cshowList :: [CacheBehaviorPerPathProperty] -> ShowS
showList :: [CacheBehaviorPerPathProperty] -> ShowS
Prelude.Show)
mkCacheBehaviorPerPathProperty :: CacheBehaviorPerPathProperty
mkCacheBehaviorPerPathProperty :: CacheBehaviorPerPathProperty
mkCacheBehaviorPerPathProperty
  = CacheBehaviorPerPathProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), behavior :: Maybe (Value Text)
behavior = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       path :: Maybe (Value Text)
path = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CacheBehaviorPerPathProperty where
  toResourceProperties :: CacheBehaviorPerPathProperty -> ResourceProperties
toResourceProperties CacheBehaviorPerPathProperty {Maybe (Value Text)
()
haddock_workaround_ :: CacheBehaviorPerPathProperty -> ()
behavior :: CacheBehaviorPerPathProperty -> Maybe (Value Text)
path :: CacheBehaviorPerPathProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
behavior :: Maybe (Value Text)
path :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lightsail::Distribution.CacheBehaviorPerPath",
         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
"Behavior" (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)
behavior,
                            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
"Path" (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)
path])}
instance JSON.ToJSON CacheBehaviorPerPathProperty where
  toJSON :: CacheBehaviorPerPathProperty -> Value
toJSON CacheBehaviorPerPathProperty {Maybe (Value Text)
()
haddock_workaround_ :: CacheBehaviorPerPathProperty -> ()
behavior :: CacheBehaviorPerPathProperty -> Maybe (Value Text)
path :: CacheBehaviorPerPathProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
behavior :: Maybe (Value Text)
path :: 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
"Behavior" (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)
behavior,
               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
"Path" (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)
path]))
instance Property "Behavior" CacheBehaviorPerPathProperty where
  type PropertyType "Behavior" CacheBehaviorPerPathProperty = Value Prelude.Text
  set :: PropertyType "Behavior" CacheBehaviorPerPathProperty
-> CacheBehaviorPerPathProperty -> CacheBehaviorPerPathProperty
set PropertyType "Behavior" CacheBehaviorPerPathProperty
newValue CacheBehaviorPerPathProperty {Maybe (Value Text)
()
haddock_workaround_ :: CacheBehaviorPerPathProperty -> ()
behavior :: CacheBehaviorPerPathProperty -> Maybe (Value Text)
path :: CacheBehaviorPerPathProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
behavior :: Maybe (Value Text)
path :: Maybe (Value Text)
..}
    = CacheBehaviorPerPathProperty
        {behavior :: Maybe (Value Text)
behavior = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Behavior" CacheBehaviorPerPathProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
path :: Maybe (Value Text)
haddock_workaround_ :: ()
path :: Maybe (Value Text)
..}
instance Property "Path" CacheBehaviorPerPathProperty where
  type PropertyType "Path" CacheBehaviorPerPathProperty = Value Prelude.Text
  set :: PropertyType "Path" CacheBehaviorPerPathProperty
-> CacheBehaviorPerPathProperty -> CacheBehaviorPerPathProperty
set PropertyType "Path" CacheBehaviorPerPathProperty
newValue CacheBehaviorPerPathProperty {Maybe (Value Text)
()
haddock_workaround_ :: CacheBehaviorPerPathProperty -> ()
behavior :: CacheBehaviorPerPathProperty -> Maybe (Value Text)
path :: CacheBehaviorPerPathProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
behavior :: Maybe (Value Text)
path :: Maybe (Value Text)
..}
    = CacheBehaviorPerPathProperty {path :: Maybe (Value Text)
path = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Path" CacheBehaviorPerPathProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
behavior :: Maybe (Value Text)
haddock_workaround_ :: ()
behavior :: Maybe (Value Text)
..}