module Stratosphere.CodeBuild.Fleet.ProxyConfigurationProperty (
        module Exports, ProxyConfigurationProperty(..),
        mkProxyConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CodeBuild.Fleet.FleetProxyRuleProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ProxyConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-fleet-proxyconfiguration.html>
    ProxyConfigurationProperty {ProxyConfigurationProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-fleet-proxyconfiguration.html#cfn-codebuild-fleet-proxyconfiguration-defaultbehavior>
                                ProxyConfigurationProperty -> Maybe (Value Text)
defaultBehavior :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-fleet-proxyconfiguration.html#cfn-codebuild-fleet-proxyconfiguration-orderedproxyrules>
                                ProxyConfigurationProperty -> Maybe [FleetProxyRuleProperty]
orderedProxyRules :: (Prelude.Maybe [FleetProxyRuleProperty])}
  deriving stock (ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool
(ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool)
-> (ProxyConfigurationProperty
    -> ProxyConfigurationProperty -> Bool)
-> Eq ProxyConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool
== :: ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool
$c/= :: ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool
/= :: ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool
Prelude.Eq, Int -> ProxyConfigurationProperty -> ShowS
[ProxyConfigurationProperty] -> ShowS
ProxyConfigurationProperty -> String
(Int -> ProxyConfigurationProperty -> ShowS)
-> (ProxyConfigurationProperty -> String)
-> ([ProxyConfigurationProperty] -> ShowS)
-> Show ProxyConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ProxyConfigurationProperty -> ShowS
showsPrec :: Int -> ProxyConfigurationProperty -> ShowS
$cshow :: ProxyConfigurationProperty -> String
show :: ProxyConfigurationProperty -> String
$cshowList :: [ProxyConfigurationProperty] -> ShowS
showList :: [ProxyConfigurationProperty] -> ShowS
Prelude.Show)
mkProxyConfigurationProperty :: ProxyConfigurationProperty
mkProxyConfigurationProperty :: ProxyConfigurationProperty
mkProxyConfigurationProperty
  = ProxyConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), defaultBehavior :: Maybe (Value Text)
defaultBehavior = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       orderedProxyRules :: Maybe [FleetProxyRuleProperty]
orderedProxyRules = Maybe [FleetProxyRuleProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ProxyConfigurationProperty where
  toResourceProperties :: ProxyConfigurationProperty -> ResourceProperties
toResourceProperties ProxyConfigurationProperty {Maybe [FleetProxyRuleProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ProxyConfigurationProperty -> ()
defaultBehavior :: ProxyConfigurationProperty -> Maybe (Value Text)
orderedProxyRules :: ProxyConfigurationProperty -> Maybe [FleetProxyRuleProperty]
haddock_workaround_ :: ()
defaultBehavior :: Maybe (Value Text)
orderedProxyRules :: Maybe [FleetProxyRuleProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodeBuild::Fleet.ProxyConfiguration",
         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
"DefaultBehavior" (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)
defaultBehavior,
                            Key -> [FleetProxyRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OrderedProxyRules" ([FleetProxyRuleProperty] -> (Key, Value))
-> Maybe [FleetProxyRuleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FleetProxyRuleProperty]
orderedProxyRules])}
instance JSON.ToJSON ProxyConfigurationProperty where
  toJSON :: ProxyConfigurationProperty -> Value
toJSON ProxyConfigurationProperty {Maybe [FleetProxyRuleProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ProxyConfigurationProperty -> ()
defaultBehavior :: ProxyConfigurationProperty -> Maybe (Value Text)
orderedProxyRules :: ProxyConfigurationProperty -> Maybe [FleetProxyRuleProperty]
haddock_workaround_ :: ()
defaultBehavior :: Maybe (Value Text)
orderedProxyRules :: Maybe [FleetProxyRuleProperty]
..}
    = [(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
"DefaultBehavior" (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)
defaultBehavior,
               Key -> [FleetProxyRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OrderedProxyRules" ([FleetProxyRuleProperty] -> (Key, Value))
-> Maybe [FleetProxyRuleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FleetProxyRuleProperty]
orderedProxyRules]))
instance Property "DefaultBehavior" ProxyConfigurationProperty where
  type PropertyType "DefaultBehavior" ProxyConfigurationProperty = Value Prelude.Text
  set :: PropertyType "DefaultBehavior" ProxyConfigurationProperty
-> ProxyConfigurationProperty -> ProxyConfigurationProperty
set PropertyType "DefaultBehavior" ProxyConfigurationProperty
newValue ProxyConfigurationProperty {Maybe [FleetProxyRuleProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ProxyConfigurationProperty -> ()
defaultBehavior :: ProxyConfigurationProperty -> Maybe (Value Text)
orderedProxyRules :: ProxyConfigurationProperty -> Maybe [FleetProxyRuleProperty]
haddock_workaround_ :: ()
defaultBehavior :: Maybe (Value Text)
orderedProxyRules :: Maybe [FleetProxyRuleProperty]
..}
    = ProxyConfigurationProperty
        {defaultBehavior :: Maybe (Value Text)
defaultBehavior = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultBehavior" ProxyConfigurationProperty
Value Text
newValue, Maybe [FleetProxyRuleProperty]
()
haddock_workaround_ :: ()
orderedProxyRules :: Maybe [FleetProxyRuleProperty]
haddock_workaround_ :: ()
orderedProxyRules :: Maybe [FleetProxyRuleProperty]
..}
instance Property "OrderedProxyRules" ProxyConfigurationProperty where
  type PropertyType "OrderedProxyRules" ProxyConfigurationProperty = [FleetProxyRuleProperty]
  set :: PropertyType "OrderedProxyRules" ProxyConfigurationProperty
-> ProxyConfigurationProperty -> ProxyConfigurationProperty
set PropertyType "OrderedProxyRules" ProxyConfigurationProperty
newValue ProxyConfigurationProperty {Maybe [FleetProxyRuleProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ProxyConfigurationProperty -> ()
defaultBehavior :: ProxyConfigurationProperty -> Maybe (Value Text)
orderedProxyRules :: ProxyConfigurationProperty -> Maybe [FleetProxyRuleProperty]
haddock_workaround_ :: ()
defaultBehavior :: Maybe (Value Text)
orderedProxyRules :: Maybe [FleetProxyRuleProperty]
..}
    = ProxyConfigurationProperty
        {orderedProxyRules :: Maybe [FleetProxyRuleProperty]
orderedProxyRules = [FleetProxyRuleProperty] -> Maybe [FleetProxyRuleProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [FleetProxyRuleProperty]
PropertyType "OrderedProxyRules" ProxyConfigurationProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
defaultBehavior :: Maybe (Value Text)
haddock_workaround_ :: ()
defaultBehavior :: Maybe (Value Text)
..}