module Stratosphere.CloudFront.Distribution.RestrictionsProperty (
module Exports, RestrictionsProperty(..), mkRestrictionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CloudFront.Distribution.GeoRestrictionProperty as Exports
import Stratosphere.ResourceProperties
data RestrictionsProperty
=
RestrictionsProperty {RestrictionsProperty -> ()
haddock_workaround_ :: (),
RestrictionsProperty -> GeoRestrictionProperty
geoRestriction :: GeoRestrictionProperty}
deriving stock (RestrictionsProperty -> RestrictionsProperty -> Bool
(RestrictionsProperty -> RestrictionsProperty -> Bool)
-> (RestrictionsProperty -> RestrictionsProperty -> Bool)
-> Eq RestrictionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RestrictionsProperty -> RestrictionsProperty -> Bool
== :: RestrictionsProperty -> RestrictionsProperty -> Bool
$c/= :: RestrictionsProperty -> RestrictionsProperty -> Bool
/= :: RestrictionsProperty -> RestrictionsProperty -> Bool
Prelude.Eq, Int -> RestrictionsProperty -> ShowS
[RestrictionsProperty] -> ShowS
RestrictionsProperty -> String
(Int -> RestrictionsProperty -> ShowS)
-> (RestrictionsProperty -> String)
-> ([RestrictionsProperty] -> ShowS)
-> Show RestrictionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RestrictionsProperty -> ShowS
showsPrec :: Int -> RestrictionsProperty -> ShowS
$cshow :: RestrictionsProperty -> String
show :: RestrictionsProperty -> String
$cshowList :: [RestrictionsProperty] -> ShowS
showList :: [RestrictionsProperty] -> ShowS
Prelude.Show)
mkRestrictionsProperty ::
GeoRestrictionProperty -> RestrictionsProperty
mkRestrictionsProperty :: GeoRestrictionProperty -> RestrictionsProperty
mkRestrictionsProperty GeoRestrictionProperty
geoRestriction
= RestrictionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), geoRestriction :: GeoRestrictionProperty
geoRestriction = GeoRestrictionProperty
geoRestriction}
instance ToResourceProperties RestrictionsProperty where
toResourceProperties :: RestrictionsProperty -> ResourceProperties
toResourceProperties RestrictionsProperty {()
GeoRestrictionProperty
haddock_workaround_ :: RestrictionsProperty -> ()
geoRestriction :: RestrictionsProperty -> GeoRestrictionProperty
haddock_workaround_ :: ()
geoRestriction :: GeoRestrictionProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CloudFront::Distribution.Restrictions",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"GeoRestriction" Key -> GeoRestrictionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= GeoRestrictionProperty
geoRestriction]}
instance JSON.ToJSON RestrictionsProperty where
toJSON :: RestrictionsProperty -> Value
toJSON RestrictionsProperty {()
GeoRestrictionProperty
haddock_workaround_ :: RestrictionsProperty -> ()
geoRestriction :: RestrictionsProperty -> GeoRestrictionProperty
haddock_workaround_ :: ()
geoRestriction :: GeoRestrictionProperty
..}
= [(Key, Value)] -> Value
JSON.object [Key
"GeoRestriction" Key -> GeoRestrictionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= GeoRestrictionProperty
geoRestriction]
instance Property "GeoRestriction" RestrictionsProperty where
type PropertyType "GeoRestriction" RestrictionsProperty = GeoRestrictionProperty
set :: PropertyType "GeoRestriction" RestrictionsProperty
-> RestrictionsProperty -> RestrictionsProperty
set PropertyType "GeoRestriction" RestrictionsProperty
newValue RestrictionsProperty {()
GeoRestrictionProperty
haddock_workaround_ :: RestrictionsProperty -> ()
geoRestriction :: RestrictionsProperty -> GeoRestrictionProperty
haddock_workaround_ :: ()
geoRestriction :: GeoRestrictionProperty
..}
= RestrictionsProperty {geoRestriction :: GeoRestrictionProperty
geoRestriction = PropertyType "GeoRestriction" RestrictionsProperty
GeoRestrictionProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}