module Stratosphere.CloudFront.ConnectionGroup (
        ConnectionGroup(..), mkConnectionGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ConnectionGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html>
    ConnectionGroup {ConnectionGroup -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html#cfn-cloudfront-connectiongroup-anycastiplistid>
                     ConnectionGroup -> Maybe (Value Text)
anycastIpListId :: (Prelude.Maybe (Value Prelude.Text)),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html#cfn-cloudfront-connectiongroup-enabled>
                     ConnectionGroup -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html#cfn-cloudfront-connectiongroup-ipv6enabled>
                     ConnectionGroup -> Maybe (Value Bool)
ipv6Enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html#cfn-cloudfront-connectiongroup-name>
                     ConnectionGroup -> Value Text
name :: (Value Prelude.Text),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html#cfn-cloudfront-connectiongroup-tags>
                     ConnectionGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ConnectionGroup -> ConnectionGroup -> Bool
(ConnectionGroup -> ConnectionGroup -> Bool)
-> (ConnectionGroup -> ConnectionGroup -> Bool)
-> Eq ConnectionGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConnectionGroup -> ConnectionGroup -> Bool
== :: ConnectionGroup -> ConnectionGroup -> Bool
$c/= :: ConnectionGroup -> ConnectionGroup -> Bool
/= :: ConnectionGroup -> ConnectionGroup -> Bool
Prelude.Eq, Int -> ConnectionGroup -> ShowS
[ConnectionGroup] -> ShowS
ConnectionGroup -> String
(Int -> ConnectionGroup -> ShowS)
-> (ConnectionGroup -> String)
-> ([ConnectionGroup] -> ShowS)
-> Show ConnectionGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConnectionGroup -> ShowS
showsPrec :: Int -> ConnectionGroup -> ShowS
$cshow :: ConnectionGroup -> String
show :: ConnectionGroup -> String
$cshowList :: [ConnectionGroup] -> ShowS
showList :: [ConnectionGroup] -> ShowS
Prelude.Show)
mkConnectionGroup :: Value Prelude.Text -> ConnectionGroup
mkConnectionGroup :: Value Text -> ConnectionGroup
mkConnectionGroup Value Text
name
  = ConnectionGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       anycastIpListId :: Maybe (Value Text)
anycastIpListId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       ipv6Enabled :: Maybe (Value Bool)
ipv6Enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConnectionGroup where
  toResourceProperties :: ConnectionGroup -> ResourceProperties
toResourceProperties ConnectionGroup {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConnectionGroup -> ()
anycastIpListId :: ConnectionGroup -> Maybe (Value Text)
enabled :: ConnectionGroup -> Maybe (Value Bool)
ipv6Enabled :: ConnectionGroup -> Maybe (Value Bool)
name :: ConnectionGroup -> Value Text
tags :: ConnectionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFront::ConnectionGroup",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"AnycastIpListId" (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)
anycastIpListId,
                               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
                               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Ipv6Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
ipv6Enabled,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON ConnectionGroup where
  toJSON :: ConnectionGroup -> Value
toJSON ConnectionGroup {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConnectionGroup -> ()
anycastIpListId :: ConnectionGroup -> Maybe (Value Text)
enabled :: ConnectionGroup -> Maybe (Value Bool)
ipv6Enabled :: ConnectionGroup -> Maybe (Value Bool)
name :: ConnectionGroup -> Value Text
tags :: ConnectionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
..}
    = [(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
"AnycastIpListId" (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)
anycastIpListId,
                  Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
                  Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Ipv6Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
ipv6Enabled,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "AnycastIpListId" ConnectionGroup where
  type PropertyType "AnycastIpListId" ConnectionGroup = Value Prelude.Text
  set :: PropertyType "AnycastIpListId" ConnectionGroup
-> ConnectionGroup -> ConnectionGroup
set PropertyType "AnycastIpListId" ConnectionGroup
newValue ConnectionGroup {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConnectionGroup -> ()
anycastIpListId :: ConnectionGroup -> Maybe (Value Text)
enabled :: ConnectionGroup -> Maybe (Value Bool)
ipv6Enabled :: ConnectionGroup -> Maybe (Value Bool)
name :: ConnectionGroup -> Value Text
tags :: ConnectionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
..}
    = ConnectionGroup {anycastIpListId :: Maybe (Value Text)
anycastIpListId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AnycastIpListId" ConnectionGroup
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Enabled" ConnectionGroup where
  type PropertyType "Enabled" ConnectionGroup = Value Prelude.Bool
  set :: PropertyType "Enabled" ConnectionGroup
-> ConnectionGroup -> ConnectionGroup
set PropertyType "Enabled" ConnectionGroup
newValue ConnectionGroup {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConnectionGroup -> ()
anycastIpListId :: ConnectionGroup -> Maybe (Value Text)
enabled :: ConnectionGroup -> Maybe (Value Bool)
ipv6Enabled :: ConnectionGroup -> Maybe (Value Bool)
name :: ConnectionGroup -> Value Text
tags :: ConnectionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
..}
    = ConnectionGroup {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" ConnectionGroup
Value Bool
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Ipv6Enabled" ConnectionGroup where
  type PropertyType "Ipv6Enabled" ConnectionGroup = Value Prelude.Bool
  set :: PropertyType "Ipv6Enabled" ConnectionGroup
-> ConnectionGroup -> ConnectionGroup
set PropertyType "Ipv6Enabled" ConnectionGroup
newValue ConnectionGroup {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConnectionGroup -> ()
anycastIpListId :: ConnectionGroup -> Maybe (Value Text)
enabled :: ConnectionGroup -> Maybe (Value Bool)
ipv6Enabled :: ConnectionGroup -> Maybe (Value Bool)
name :: ConnectionGroup -> Value Text
tags :: ConnectionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
..}
    = ConnectionGroup {ipv6Enabled :: Maybe (Value Bool)
ipv6Enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Ipv6Enabled" ConnectionGroup
Value Bool
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" ConnectionGroup where
  type PropertyType "Name" ConnectionGroup = Value Prelude.Text
  set :: PropertyType "Name" ConnectionGroup
-> ConnectionGroup -> ConnectionGroup
set PropertyType "Name" ConnectionGroup
newValue ConnectionGroup {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConnectionGroup -> ()
anycastIpListId :: ConnectionGroup -> Maybe (Value Text)
enabled :: ConnectionGroup -> Maybe (Value Bool)
ipv6Enabled :: ConnectionGroup -> Maybe (Value Bool)
name :: ConnectionGroup -> Value Text
tags :: ConnectionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
..}
    = ConnectionGroup {name :: Value Text
name = PropertyType "Name" ConnectionGroup
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
tags :: Maybe [Tag]
..}
instance Property "Tags" ConnectionGroup where
  type PropertyType "Tags" ConnectionGroup = [Tag]
  set :: PropertyType "Tags" ConnectionGroup
-> ConnectionGroup -> ConnectionGroup
set PropertyType "Tags" ConnectionGroup
newValue ConnectionGroup {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConnectionGroup -> ()
anycastIpListId :: ConnectionGroup -> Maybe (Value Text)
enabled :: ConnectionGroup -> Maybe (Value Bool)
ipv6Enabled :: ConnectionGroup -> Maybe (Value Bool)
name :: ConnectionGroup -> Value Text
tags :: ConnectionGroup -> Maybe [Tag]
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
tags :: Maybe [Tag]
..}
    = ConnectionGroup {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" ConnectionGroup
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
haddock_workaround_ :: ()
anycastIpListId :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
ipv6Enabled :: Maybe (Value Bool)
name :: Value Text
..}