module Stratosphere.CloudFront.DistributionTenant.GeoRestrictionCustomizationProperty (
GeoRestrictionCustomizationProperty(..),
mkGeoRestrictionCustomizationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GeoRestrictionCustomizationProperty
=
GeoRestrictionCustomizationProperty {GeoRestrictionCustomizationProperty -> ()
haddock_workaround_ :: (),
GeoRestrictionCustomizationProperty -> Maybe (ValueList Text)
locations :: (Prelude.Maybe (ValueList Prelude.Text)),
GeoRestrictionCustomizationProperty -> Maybe (Value Text)
restrictionType :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty -> Bool
(GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty -> Bool)
-> (GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty -> Bool)
-> Eq GeoRestrictionCustomizationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty -> Bool
== :: GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty -> Bool
$c/= :: GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty -> Bool
/= :: GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty -> Bool
Prelude.Eq, Int -> GeoRestrictionCustomizationProperty -> ShowS
[GeoRestrictionCustomizationProperty] -> ShowS
GeoRestrictionCustomizationProperty -> String
(Int -> GeoRestrictionCustomizationProperty -> ShowS)
-> (GeoRestrictionCustomizationProperty -> String)
-> ([GeoRestrictionCustomizationProperty] -> ShowS)
-> Show GeoRestrictionCustomizationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GeoRestrictionCustomizationProperty -> ShowS
showsPrec :: Int -> GeoRestrictionCustomizationProperty -> ShowS
$cshow :: GeoRestrictionCustomizationProperty -> String
show :: GeoRestrictionCustomizationProperty -> String
$cshowList :: [GeoRestrictionCustomizationProperty] -> ShowS
showList :: [GeoRestrictionCustomizationProperty] -> ShowS
Prelude.Show)
mkGeoRestrictionCustomizationProperty ::
GeoRestrictionCustomizationProperty
mkGeoRestrictionCustomizationProperty :: GeoRestrictionCustomizationProperty
mkGeoRestrictionCustomizationProperty
= GeoRestrictionCustomizationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), locations :: Maybe (ValueList Text)
locations = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
restrictionType :: Maybe (Value Text)
restrictionType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GeoRestrictionCustomizationProperty where
toResourceProperties :: GeoRestrictionCustomizationProperty -> ResourceProperties
toResourceProperties GeoRestrictionCustomizationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: GeoRestrictionCustomizationProperty -> ()
locations :: GeoRestrictionCustomizationProperty -> Maybe (ValueList Text)
restrictionType :: GeoRestrictionCustomizationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
locations :: Maybe (ValueList Text)
restrictionType :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CloudFront::DistributionTenant.GeoRestrictionCustomization",
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 -> ValueList 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
"Locations" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
locations,
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
"RestrictionType" (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)
restrictionType])}
instance JSON.ToJSON GeoRestrictionCustomizationProperty where
toJSON :: GeoRestrictionCustomizationProperty -> Value
toJSON GeoRestrictionCustomizationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: GeoRestrictionCustomizationProperty -> ()
locations :: GeoRestrictionCustomizationProperty -> Maybe (ValueList Text)
restrictionType :: GeoRestrictionCustomizationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
locations :: Maybe (ValueList Text)
restrictionType :: 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 -> ValueList 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
"Locations" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
locations,
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
"RestrictionType" (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)
restrictionType]))
instance Property "Locations" GeoRestrictionCustomizationProperty where
type PropertyType "Locations" GeoRestrictionCustomizationProperty = ValueList Prelude.Text
set :: PropertyType "Locations" GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty
set PropertyType "Locations" GeoRestrictionCustomizationProperty
newValue GeoRestrictionCustomizationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: GeoRestrictionCustomizationProperty -> ()
locations :: GeoRestrictionCustomizationProperty -> Maybe (ValueList Text)
restrictionType :: GeoRestrictionCustomizationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
locations :: Maybe (ValueList Text)
restrictionType :: Maybe (Value Text)
..}
= GeoRestrictionCustomizationProperty
{locations :: Maybe (ValueList Text)
locations = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Locations" GeoRestrictionCustomizationProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
restrictionType :: Maybe (Value Text)
haddock_workaround_ :: ()
restrictionType :: Maybe (Value Text)
..}
instance Property "RestrictionType" GeoRestrictionCustomizationProperty where
type PropertyType "RestrictionType" GeoRestrictionCustomizationProperty = Value Prelude.Text
set :: PropertyType "RestrictionType" GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty
-> GeoRestrictionCustomizationProperty
set PropertyType "RestrictionType" GeoRestrictionCustomizationProperty
newValue GeoRestrictionCustomizationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: GeoRestrictionCustomizationProperty -> ()
locations :: GeoRestrictionCustomizationProperty -> Maybe (ValueList Text)
restrictionType :: GeoRestrictionCustomizationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
locations :: Maybe (ValueList Text)
restrictionType :: Maybe (Value Text)
..}
= GeoRestrictionCustomizationProperty
{restrictionType :: Maybe (Value Text)
restrictionType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RestrictionType" GeoRestrictionCustomizationProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
locations :: Maybe (ValueList Text)
haddock_workaround_ :: ()
locations :: Maybe (ValueList Text)
..}